To run this example:
-
Edit or copy example.env
- Set
TF_VAR_do_token
by replacingabcdef
with a Digital Ocean API token. - Feel free to change
TF_VAR_do_public_key
andTF_VAR_do_private_key
, but what's there should work if you have an rsa ssh key set up.
- Set
-
Source your env file:
source example.env
. (If you're using oh-my-zsh, there's a plugin for that.) -
Run
terraform init
to initialize the plugins first. -
Run
terraform apply
to create the infrastructure, and you've got Debezium set up! -
Run
bin/watch.sh
in one terminal -
In another terminal run some postgres updates, for example:
bin/run-query.sh "INSERT INTO PEOPLE (email, name) VALUES ('[email protected]', 'Testing Tester');" bin/run-query.sh "DELETE FROM PEOPLE;"
TODO: Setup deployment of (something like docker save people-consumer | bzip2 | pv | bin/ssh-debezium.sh "bunzip2 | docker load"
)