To run this example:
-
Edit or copy example.env
- Set
TF_VAR_do_tokenby replacingabcdefwith a Digital Ocean API token. - Feel free to change
TF_VAR_do_public_keyandTF_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 initto initialize the plugins first. -
Run
terraform applyto create the infrastructure, and you've got Debezium set up! -
Run
bin/watch.shin one terminal -
In another terminal run some postgres updates, for example:
bin/run-query.sh "INSERT INTO PEOPLE (email, name) VALUES ('test@example.com', '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")