Skip to content

edeandrea/debezium-demo-apb

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

66 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Table of Contents

Info

Ansible playbook for provisioning a Debezium demo using my Summit Lab Spring Music application as the "monolith". The Debezium connector is configured to use the Outbox Event Router.

The application is a simple Spring Boot application connected to a MySQL database. We'll install a 3 replica Kafka cluster with Kafka connect and then install the Debezium MySQL connector.

Once the events get into Kafka, a camel-k application runs and updates a Red Hat Data Grid cache according to contents from the event (ALBUM_CREATED/ALBUM_UPDATED/ALBUM_DELETED).

The database credentials are stored in a Secret and then mounted into the Kafka Connect cluster.

The Kafka Broker, Kafka Connect, and Kafka Bridge are all authenticated via OAuth 2.0. Red Hat Single Sign-on is installed and used as the authorization server. A new realm is automatically created and provisioned.

All metrics are captures by Prometheus and there are Grafana dashboards for Kafka, Zookeeper, and the caches.

Once completed, the resulting output of everything in the OpenShift Topology view should look something like

DBZ Demo

Assumptions / Requirements

  1. Ansible >= 2.9 is required for running the playbook
  2. The OpenShift sso74-postgresql-persistent template is installed in the openshift namespace
  3. OperatorHub is available with the following operators available
  4. The openssl utility is installed
  5. The keytool utility is installed

Deployed Resource URLs

All the below resource URLs are suffixed with the apps url of the cluster (i.e. for an RHPDS environment, apps.cluster-##GUID##.##GUID##.example.opentlc.com).

Running the playbook

To run this you would do something like

$ ansible-playbook -v main.yml -e ocp_api_url=<OCP_API_URL> -e ocp_admin_pwd=<OCP_ADMIN_USER_PASSWORD>

You'll need to replace the following variables with appropriate values:

Variable Description
<OCP_API_URL> API url of your cluster
<OCP_ADMIN_USER_PASSWORD> Password for the OCP admin account

This playbook also makes some assumptions about some things within the cluster. The biggest assumption is that the playbook is installing everything into an empty cluster. The following variables can be overridden with the -e switch when running the playbook to customize some of the installation locations and configuration.

Description Variable Default Value
OpenShift admin user name ocp_admin opentlc-mgr
OCP user to install demo into ocp_proj_user user1
OCP user password for above user ocp_proj_user_pwd openshift
Project name to install demo into proj_nm_demo demo
Project name to install ALL global operators into proj_nm_rh_operators openshift-operators
Project name to install AMQ Streams operator into proj_nm_amq_streams_operator {{ proj_nm_rh_operators }}
Project name to install Container Security operator into proj_nm_container_security_operator {{ proj_nm_rh_operators }}
Project name to install Serverless operator into proj_nm_serverless_operator {{ proj_nm_rh_operators }}

Additional Resources

Backlog for enhancements

PRs welcome!

About

Ansible playbook for provisioning a Debezium demo

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published