Coder Social home page Coder Social logo

asdf's Introduction

Debezium Server

Debezium Server is a standalone Java application built on Qurkus framework. The application itself contains the core module and a set of modules responsible for communication with different target systems.

Building and Packaging

The following software is required to work with the Debezium codebase and build it locally:

See the links above for installation instructions on your platform. You can verify the versions are installed and running:

$ git --version
$ javac -version
$ mvn -version

Building the code

Debezium Server depends on core Debezium. You'll need to install the most recent snapshot locally. First obtain the code by cloning the Git repository:

$ git clone https://github.com/debezium/debezium.git
$ cd debezium

Then build the code using Maven:

$ mvn clean install -DskipITs -DskipTests

Then, you can build Debezium Server:

$ git clone https://github.com/debezium/debezium-server.git
$ cd debezium-server
$ mvn clean install -DskipITs -DskipTests

Creating a Distribution

Debezium Server is normally run by downloading the distribution tar.gz or zip file. You can generate this file by:

$ mvn clean package -DskipITs -DskipTests -Passembly

The archives can be found under debezium-server-dist/target.

Building just the artifacts, without running tests, CheckStyle, etc.

You can skip all non-essential plug-ins (tests, integration tests, CheckStyle, formatter, API compatibility check, etc.) using the "quick" build profile:

$ mvn clean verify -Dquick

This provides the fastest way for solely producing the output artifacts, without running any of the QA related Maven plug-ins. This comes in handy for producing connector JARs and/or archives as quickly as possible, e.g. for manual testing in Kafka Connect

Integration Tests

The per-module integration tests depend on the availability of the external services. It is thus recommended to execute integration tests per-module and set-up necessary pre-requisities beforehand.

Note: running these tests against external infrastructure may incur cost with your cloud provider. We're not going to pay your AWS/GCP/Azure bill.

Amazon Kinesis

  • Execute aws configure as described in AWS CLI getting started guide and setup the account.
  • Create Kinesis stream aws kinesis create-stream --stream-name testc.inventory.customers --shard-count 1
  • Build the module and execute the tests mvn clean install -DskipITs=false -am -pl debezium-server-kinesis
  • Remove the stream aws kinesis delete-stream --stream-name testc.inventory.customers

Google Cloud Pub/Sub

  • Login into your Google Cloud account using gcloud auth application-default login as described in the documentation.
  • Build the module and execute the tests mvn clean install -DskipITs=false -am -pl debezium-server-pubsub

Azure Event Hubs

Login into your Azure account and create a resource group, e.g. on the CLI:

az login
az group create --name eventhubstest --location westeurope

Create an Event Hubs namespace

Create an Event Hubs namespace. Check the documentation for options on how do this using the Azure Portal, Azure CLI etc., e.g. on the CLI:

az eventhubs namespace create --name debezium-test --resource-group eventhubstest -l westeurope

Create an Event Hub

Create an Event Hub (equivalent to a topic) with 5 partitions. Check the documentation for options on how do this using the Azure Portal, Azure CLI etc. , e.g. on the CLI:

`az eventhubs eventhub create` --name debezium-test-hub --resource-group eventhubstest --namespace-name debezium-test --partition-count 5

Build the module

Get the Connection string required to communicate with Event Hubs. The format is: Endpoint=sb://<NAMESPACE>/;SharedAccessKeyName=<ACCESS_KEY_NAME>;SharedAccessKey=<ACCESS_KEY_VALUE>. E.g. on the CLI:

az eventhubs namespace authorization-rule keys list --resource-group eventhubstest --namespace-name debezium-test --name RootManageSharedAccessKey

Set environment variables required for tests:

export EVENTHUBS_CONNECTION_STRING=<Event Hubs connection string>
export EVENTHUBS_NAME=<name of the Event hub created in previous step>

Execute the tests:

mvn clean install -DskipITs=false -Deventhubs.connection.string=$EVENTHUBS_CONNECTION_STRING -Deventhubs.hub.name=$EVENTHUBS_NAME -am -pl :debezium-server-eventhubs

Examine Events in the Event Hub

E.g. using kafkacat. Create kafkacat.conf:

metadata.broker.list=debezium-test.servicebus.windows.net:9093
security.protocol=SASL_SSL
sasl.mechanisms=PLAIN
sasl.username=$ConnectionString
sasl.password=Endpoint=sb://debezium-test.servicebus.windows.net/;SharedAccessKeyName=RootManageSharedAccessKey;SharedAccessKey=<access key>

Start consuming events:

export KAFKACAT_CONFIG= kafkacat -b debezium-test.servicebus.windows.net:9093 -t debezium-test-hub

Clean up

Delete the Event Hubs namespace and log out, e.g. on the CLI:

az group delete -n eventhubstest
az logout

asdf's People

Contributors

debezium-builder avatar jpechane avatar vjuranek avatar ggaborg avatar naros avatar gunnarmorling avatar plugarut avatar eizners avatar zalmane avatar spicy-sauce avatar slknijnenburg avatar ismailsimsek avatar ani-sha avatar abhirockzz avatar rnowling-memphis avatar tavancini avatar calinilie avatar derekm avatar ilyasahsan123 avatar jeremy-l-ford avatar skezzowski avatar jcechace avatar dependabot[bot] avatar sazzad16 avatar alfusainey avatar aleksandervalle avatar cab105 avatar dude0001 avatar rajdangwal avatar nathan-smit-1 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.