pip install -r requirements.txt
export CACERT=/path/to/certificate.crt
export CA_KEY=/path/to/key.key
export CA_CER=/path/to/ca_certificate.crt
Below are the commands to manage Kafka connectors using the kafka_connector
script:
This command lists all connectors in the dev environment.
./kafka_connector dev list
This command retrieves the configuration of the simple-connector in the dev environment.
./kafka_connector dev get simple-connector
This command retrieves the status of the simple-connector in the dev environment.
./kafka_connector dev status simple-connector
This command creates a new connector named simple-connector with the specified configuration in the dev environment.
./kafka_connector dev create '{"name":"simple-connector","config":{"connector.class":"com.github.jcustenborder.kafka.connect.spooldir.SpoolDirJsonSourceConnector","task.max":"1","topic":"test-topic","input.path":"/home/appuser/connect-test/input","input.file.pattern":"sample.txt","error.path":"/home/appuser/connect-test/failure","finished.path":"/home/appuser/connect-test/success","schema.generation.enabled":true,"value.converter":"org.apache.kafka.connect.json.JsonConverter"}}'
This command updates the configuration of the simple-connector in the dev environment.
./kafka_connector dev update simple-connector '{"connector.class":"com.github.jcustenborder.kafka.connect.spooldir.SpoolDirJsonSourceConnector","task.max":"1","topic":"test-topic","input.path":"/home/appuser/connect-test/input","input.file.pattern":"sample.txt","error.path":"/home/appuser/connect-test/failure","finished.path":"/home/appuser/connect-test/success","schema.generation.enabled":true,"value.converter":"org.apache.kafka.connect.json.JsonConverter"}'
Connectors : https://docs.confluent.io/platform/current/connect/references/restapi.html Connectors secret: https://docs.confluent.io/platform/current/connect/rbac/connect-rbac-secret-registry.html