- Launch four init containers with docker-compose
- Configure a haproxy, two nginx and a client for an web access with ansible
# cat /etc/fedora-release
Fedora release 39 (Thirty Nine)
# docker info |grep -E 'Server Version|Cgroup Version'
Server Version: 24.0.7
Cgroup Version: 2
# docker compose version
Docker Compose version v2.21.0
- Install Docker Engine and Docker Compose
- This playbook is not tested with Podman or Podman-Compose
- Confirmed this worked on Fedora 39, CentOS Stream 9, and Rocky 9
Install required Python module.
cd setup_haproxy_nginx_ansible/
python3 -m venv venv
source venv/bin/activate
pip install pip --upgrade
pip install -r requirements.txt
Build containers.
docker-compose build
Run the containers.
docker-compose up -d
Confirm four containers are up and running.
docker ps
Run the playbook
ansible-playbook -i inventory.ini main.yml
Smoke test
Access to the HAProxy VIP from the client
ansible-playbook -i inventory.ini main.yml --tag smoke_test
See group_vars.
ls group_vars/