Start & Shutdown
Prerequisites
This section assumes that CDK is installed and my-connector
project has been generated.
Testing your connector runs the process in the foreground.
When you are ready, you can run cdk deploy start
to run your connector in the background.
$ cdk deploy start --config sample-config.yaml
Log file: /private/tmp/my-connector/my-connector.log
Connector runs with process id: 88589
In order to use secrets, you can use the --secrets
flag to pass a file with the secrets definition.
Example:
$ cdk deploy start --config sample-config.yaml --secrets secrets.txt
In the secrets file, you should define a secret per line in the format SECRET_NAME=SECRET_VALUE
.
Example:
SECRET_NAME=SECRET_VALUE
SECRET_NAME_2=SUPER_SECRET_VALUE
Conversely, when you want to stop running your connector, you can run cdk deploy shutdown <connector name>
to stop the running process of your connector in background.
You can access the connector name from the list of your running connectors, or you can find the connector name
in your config file.