podman-compose support
Opened this issue · 2 comments
This ticket is to track changes needed in order to have this running under podman and podman-compose instead of docker.
Target is rhel8 / oracle linux 8. No other environments will be tested for now.
Why this? Getting docker to run on Centos 8 / RHEL 8 / OEL 8 is getting difficult and many are dropping docker in favour of podman.
Is this worth doing considering that podman 3.0 (in development) will have built in docker-compose support:
https://www.redhat.com/sysadmin/podman-docker-compose
Command reference:
sudo dnf install fuse3 podman git
sudo pip3 install podman-compose
git clone https://github.com/HenryGP/om_ansible.git
cd om_ansible
podman-compose build && podman-compose up -d
podman exec -it provisioner ansible-playbook /root/om_ansible.yaml
To get a container shell:
podman exec -it <container> /bin/bash
Issues that needed to be patched:
- Selinux on the host running podman doesn't work -> no plan to make it work for now
- Exposed ports need to be > 1024 so docker-compose file needs to be amended
- security_opt params don't work, commented them out, not sure if this will cause trouble.
Current main issue, /etc/hosts is not populated correctly:
[vagrant@oracle8 om_ansible]$ podman-compose up -d
podman pod create --name=om_ansible --share net -p 5222:22 -p 5696:5696 -p 3222:22 -p 8443:8443 -p 6222:22 -p 3636:636 -p 3389:389 -p 7222:22 -p 25999:25999 -p 2222:22 -p 1222:22 -p 9000:9000 -p 8080:8080 -p 4222:22
eaed7a6e4530066608fd2e623f80d4ba882c49a8310351ece7da920defd13686
0
podman run --name=provisioner -d --pod=om_ansible -l io.podman.compose.config-hash=123 -l io.podman.compose.project=om_ansible -l io.podman.compose.version=0.0.1 -l com.docker.compose.container-number=1 -l com.docker.compose.service=provisioner --add-host provisioner:127.0.0.1 --add-host provisioner:127.0.0.1 --add-host omserver:127.0.0.1 --add-host omserver:127.0.0.1 --add-host n1:127.0.0.1 --add-host n1:127.0.0.1 --add-host n2:127.0.0.1 --add-host n2:127.0.0.1 --add-host n3:127.0.0.1 --add-host n3:127.0.0.1 --add-host bkp:127.0.0.1 --add-host bkp:127.0.0.1 --add-host ldapserver:127.0.0.1 --add-host ldapserver:127.0.0.1 --add-host kmip:127.0.0.1 --add-host kmip:127.0.0.1 --hostname provisioner.omansible.int om_ansible_provisioner tail -f /dev/null
c4b85e75b5b88b4afb7692bc96fdc250660d74cb27bfc47c8d4d2c90cb644abc
0
podman run --name=omserver -d --pod=om_ansible -l io.podman.compose.config-hash=123 -l io.podman.compose.project=om_ansible -l io.podman.compose.version=0.0.1 -l com.docker.compose.container-number=1 -l com.docker.compose.service=omserver --mount type=bind,source=/sys/fs/cgroup,destination=/sys/fs/cgroup,ro --add-host provisioner:127.0.0.1 --add-host provisioner:127.0.0.1 --add-host omserver:127.0.0.1 --add-host omserver:127.0.0.1 --add-host n1:127.0.0.1 --add-host n1:127.0.0.1 --add-host n2:127.0.0.1 --add-host n2:127.0.0.1 --add-host n3:127.0.0.1 --add-host n3:127.0.0.1 --add-host bkp:127.0.0.1 --add-host bkp:127.0.0.1 --add-host ldapserver:127.0.0.1 --add-host ldapserver:127.0.0.1 --add-host kmip:127.0.0.1 --add-host kmip:127.0.0.1 --hostname omserver.omansible.int om_ansible_omserver
4204a2b603376aba7842cf9a0ca7acd3667ef3f4629dd47e8015c1769e831b18
0
podman run --name=n1 -d --pod=om_ansible -l io.podman.compose.config-hash=123 -l io.podman.compose.project=om_ansible -l io.podman.compose.version=0.0.1 -l com.docker.compose.container-number=1 -l com.docker.compose.service=n1 --mount type=bind,source=/sys/fs/cgroup,destination=/sys/fs/cgroup,ro --add-host provisioner:127.0.0.1 --add-host provisioner:127.0.0.1 --add-host omserver:127.0.0.1 --add-host omserver:127.0.0.1 --add-host n1:127.0.0.1 --add-host n1:127.0.0.1 --add-host n2:127.0.0.1 --add-host n2:127.0.0.1 --add-host n3:127.0.0.1 --add-host n3:127.0.0.1 --add-host bkp:127.0.0.1 --add-host bkp:127.0.0.1 --add-host ldapserver:127.0.0.1 --add-host ldapserver:127.0.0.1 --add-host kmip:127.0.0.1 --add-host kmip:127.0.0.1 --hostname n1.omansible.int om_ansible_n1
1b8cd974e4b76c9c16256c5690a2aab27d41073bf091f3f0d7d9faeed862fb6d
0
podman run --name=n2 -d --pod=om_ansible -l io.podman.compose.config-hash=123 -l io.podman.compose.project=om_ansible -l io.podman.compose.version=0.0.1 -l com.docker.compose.container-number=1 -l com.docker.compose.service=n2 --mount type=bind,source=/sys/fs/cgroup,destination=/sys/fs/cgroup,ro --add-host provisioner:127.0.0.1 --add-host provisioner:127.0.0.1 --add-host omserver:127.0.0.1 --add-host omserver:127.0.0.1 --add-host n1:127.0.0.1 --add-host n1:127.0.0.1 --add-host n2:127.0.0.1 --add-host n2:127.0.0.1 --add-host n3:127.0.0.1 --add-host n3:127.0.0.1 --add-host bkp:127.0.0.1 --add-host bkp:127.0.0.1 --add-host ldapserver:127.0.0.1 --add-host ldapserver:127.0.0.1 --add-host kmip:127.0.0.1 --add-host kmip:127.0.0.1 --hostname n2.omansible.int om_ansible_n2
ae7bf0de09370d0dfbed4cfd0611fd6087f85b369a526f5db93ef961f81e7d87
0
podman run --name=n3 -d --pod=om_ansible -l io.podman.compose.config-hash=123 -l io.podman.compose.project=om_ansible -l io.podman.compose.version=0.0.1 -l com.docker.compose.container-number=1 -l com.docker.compose.service=n3 --mount type=bind,source=/sys/fs/cgroup,destination=/sys/fs/cgroup,ro --add-host provisioner:127.0.0.1 --add-host provisioner:127.0.0.1 --add-host omserver:127.0.0.1 --add-host omserver:127.0.0.1 --add-host n1:127.0.0.1 --add-host n1:127.0.0.1 --add-host n2:127.0.0.1 --add-host n2:127.0.0.1 --add-host n3:127.0.0.1 --add-host n3:127.0.0.1 --add-host bkp:127.0.0.1 --add-host bkp:127.0.0.1 --add-host ldapserver:127.0.0.1 --add-host ldapserver:127.0.0.1 --add-host kmip:127.0.0.1 --add-host kmip:127.0.0.1 --hostname n3.omansible.int om_ansible_n3
ce567d887f8db6672f56515a27fb52847c30da12ab306b81e8d7405f7e0cbc60
0
podman run --name=bkp -d --pod=om_ansible -l io.podman.compose.config-hash=123 -l io.podman.compose.project=om_ansible -l io.podman.compose.version=0.0.1 -l com.docker.compose.container-number=1 -l com.docker.compose.service=bkp --mount type=bind,source=/sys/fs/cgroup,destination=/sys/fs/cgroup,ro --add-host provisioner:127.0.0.1 --add-host provisioner:127.0.0.1 --add-host omserver:127.0.0.1 --add-host omserver:127.0.0.1 --add-host n1:127.0.0.1 --add-host n1:127.0.0.1 --add-host n2:127.0.0.1 --add-host n2:127.0.0.1 --add-host n3:127.0.0.1 --add-host n3:127.0.0.1 --add-host bkp:127.0.0.1 --add-host bkp:127.0.0.1 --add-host ldapserver:127.0.0.1 --add-host ldapserver:127.0.0.1 --add-host kmip:127.0.0.1 --add-host kmip:127.0.0.1 --hostname bkp.omansible.int om_ansible_bkp
b2d23facd13863302708e1a104f8a0641745ec4ba094503d88b2d3d14bd384e1
0
podman run --name=ldapserver -d --pod=om_ansible -l io.podman.compose.config-hash=123 -l io.podman.compose.project=om_ansible -l io.podman.compose.version=0.0.1 -l com.docker.compose.container-number=1 -l com.docker.compose.service=ldapserver --mount type=bind,source=/sys/fs/cgroup,destination=/sys/fs/cgroup,ro --add-host provisioner:127.0.0.1 --add-host provisioner:127.0.0.1 --add-host omserver:127.0.0.1 --add-host omserver:127.0.0.1 --add-host n1:127.0.0.1 --add-host n1:127.0.0.1 --add-host n2:127.0.0.1 --add-host n2:127.0.0.1 --add-host n3:127.0.0.1 --add-host n3:127.0.0.1 --add-host bkp:127.0.0.1 --add-host bkp:127.0.0.1 --add-host ldapserver:127.0.0.1 --add-host ldapserver:127.0.0.1 --add-host kmip:127.0.0.1 --add-host kmip:127.0.0.1 --hostname ldapserver.omansible.int om_ansible_ldapserver
cabf210de380f1c8a6789ce0dd98685bdff3bd18f784ac7325895e3fd92bde7c
0
podman run --name=kmip -d --pod=om_ansible -l io.podman.compose.config-hash=123 -l io.podman.compose.project=om_ansible -l io.podman.compose.version=0.0.1 -l com.docker.compose.container-number=1 -l com.docker.compose.service=kmip --mount type=bind,source=/sys/fs/cgroup,destination=/sys/fs/cgroup,ro --add-host provisioner:127.0.0.1 --add-host provisioner:127.0.0.1 --add-host omserver:127.0.0.1 --add-host omserver:127.0.0.1 --add-host n1:127.0.0.1 --add-host n1:127.0.0.1 --add-host n2:127.0.0.1 --add-host n2:127.0.0.1 --add-host n3:127.0.0.1 --add-host n3:127.0.0.1 --add-host bkp:127.0.0.1 --add-host bkp:127.0.0.1 --add-host ldapserver:127.0.0.1 --add-host ldapserver:127.0.0.1 --add-host kmip:127.0.0.1 --add-host kmip:127.0.0.1 --hostname kmip.omansible.int om_ansible_kmip
6a7e496c07beb0b3aed84dfc49107f69af40076e0d8e1cee06fe7e8a04741edd
0
TO BE CONTINUED
sounds like the network model is totally different and it's not easy to make it similar to normal docker-compose...