Remove external dependencies

Switch the molecule tests to build their own test images instead of
relying on externally build systemd containers.
This commit is contained in:
Felix Niederwanger 2022-06-27 16:10:30 +02:00
parent 5810b2404c
commit 1b9a98248a
Signed by: phoenix
GPG key ID: 31860289A704FB3C
4 changed files with 43 additions and 9 deletions

View file

@ -0,0 +1,9 @@
FROM docker.io/debian:bullseye
# Install systemd, and development tools, clear cache and clean system
RUN apt-get update && apt-get install -y systemd systemd-sysv python3 curl && rm -rf /var/cache/* && systemctl mask -- dev-hugepages.mount sys-fs-fuse-connections.mount && rm -f /etc/machine-id /var/lib/dbus/machine-id
STOPSIGNAL SIGRTMIN+3
# Start container with systemd
ENTRYPOINT ["/sbin/init"]

View file

@ -0,0 +1,7 @@
FROM registry.opensuse.org/opensuse/leap:15.3
# Install systemd and development tools, clear cache
RUN zypper in -y systemd systemd-sysvinit firewalld python3 python3-firewall curl && rm -rf /var/cache/* && rm -f /etc/machine-id /var/lib/dbus/machine-id
# Start container with systemd
ENTRYPOINT ["/usr/sbin/init"]

View file

@ -0,0 +1,7 @@
FROM registry.opensuse.org/opensuse/leap:15.4
# Install systemd and development tools, clear cache
RUN zypper in -y systemd systemd-sysvinit firewalld python3 python3-firewall curl && rm -rf /var/cache/* && rm -f /etc/machine-id /var/lib/dbus/machine-id
# Start container with systemd
ENTRYPOINT ["/usr/sbin/init"]

View file

@ -4,22 +4,30 @@ dependency:
driver:
name: docker
platforms:
- name: leap
image: registry.opensuse.org/home/ph03nix/containers/containers/leap:ansible-leap
pre_build_image: true
- name: leap15_3
image: registry.opensuse.org/opensuse/leap:15.3
dockerfile: Dockerfile.leap15_3
command: ${MOLECULE_DOCKER_COMMAND:-"/usr/sbin/init"}
privileged: true
volumes:
- /sys/fs/cgroup:/sys/fs/cgroup:ro
tmpfs:
- /run
- /tmp
- name: leap15_4
image: registry.opensuse.org/opensuse/leap:15.4
dockerfile: Dockerfile.leap15_4
command: ${MOLECULE_DOCKER_COMMAND:-"/usr/sbin/init"}
privileged: true
volumes:
- /sys/fs/cgroup:/sys/fs/cgroup:ro
capabilities:
- SYS_ADMIN
tmpfs:
- /run
- /tmp
- name: bullseye
image: grisu48/bullseye-ansible
pre_build_image: true
command: ${MOLECULE_DOCKER_COMMAND:-"/usr/sbin/init"}
image: docker.io/debian:bullseye
dockerfile: Dockerfile.bullseye
command: ${MOLECULE_DOCKER_COMMAND:-"/sbin/init"}
privileged: true
volumes:
- /sys/fs/cgroup:/sys/fs/cgroup:ro
@ -32,7 +40,10 @@ provisioner:
name: ansible
inventory:
host_vars:
leap:
leap15_3:
vhosts_dir: "/etc/nginx/vhosts.d"
deploy_nginx_config: true
leap15_4:
vhosts_dir: "/etc/nginx/vhosts.d"
deploy_nginx_config: true
bullseye: