Skip to content

docker-compose environment to run cp-ansible in a docker environment with systemd and ssh for the inventory nodes.

Notifications You must be signed in to change notification settings

Platformatory/cp-ansible-sandbox

Repository files navigation

cp-ansible-sandbox

docker-compose environment to run cp-ansible in a docker environment with systemd and ssh for the inventory nodes.

Requires docker version 24.0.5 or lower to work

Getting Started

# Clone using SSH
git clone git@github.com:Platformatory/cp-ansible-sandbox.git
# This is run only once after cloning the repo
git submodule update --init --recursive

docker compose up -d

Verify if the containers are up

docker compose ps -a

Setup SSH keys on all containers

./setup-ssh-keys.sh

Access the ansible control node

docker compose exec -it ansible-control bash

# Inside the ansible control node, verify ssh connectivity with other nodes
ssh root@zookeeper1

Install the cp-ansible playbook

# Inside the ansible control node
ansible-playbook confluent.platform.all
# This assumes the inventory is in /ansible/inventories/ansible-inventory.yml since ANSIBLE_INVENTORY is pointing to that

Change the inventory

The inventory files in inventories is mounted to /ansible/inventories/ on the ansible control node container. You can create new files or update ansible-inventory.yml locally to let it reflect on the control node.

Using a custom inventory file

ansible-playbook -i /ansible/inventories/custom-inventory.yml confluent.platform.all

Additional files

Add additional files to the ansible control node by placing them in the share directory locally. These will be available in /usr/share/cp-ansible-sandbox in the ansible control node

Accessing the control center

Port 9021 is exposed locally as 9021 for the control-center container. If control-center is installed in the control-center container, it can be accessed locally in localhost:9021

Verifying health of the cp-ansible cluster

docker compose exec -it kafka1 bash

# Once inside the container, you can run the Kafka CLIs to interact with the cluster

Updating the cp-ansible playbook

git submodule update --recursive

Destroy the environment

docker compose down -v

About

docker-compose environment to run cp-ansible in a docker environment with systemd and ssh for the inventory nodes.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •