Browse Source
This change updates all uses of docker to podman and removes our docker installation process from zuul and our local test process. Some container based tests have been moved to "delegated" becuase they no longer make sense to run in a container and the hacks needed to maintain the container based testing are not worth maintaining for podman. Change-Id: I02de94a1229bfa847f14ecf282eadbcfe6396875 Signed-off-by: Kevin Carter <kecarter@redhat.com>changes/09/720609/28
108 changed files with 537 additions and 1311 deletions
@ -1,8 +0,0 @@
|
||||
#!/bin/bash |
||||
set -euxo pipefail |
||||
# Used by Zuul CI to perform extra bootstrapping |
||||
|
||||
# Workaround for a potential: |
||||
# Got permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock |
||||
# See https://docs.docker.com/install/linux/linux-postinstall/ |
||||
newgrp docker || true |
@ -1,37 +0,0 @@
|
||||
# Molecule managed |
||||
# Copyright 2019 Red Hat, Inc. |
||||
# All Rights Reserved. |
||||
# |
||||
# Licensed under the Apache License, Version 2.0 (the "License"); you may |
||||
# not use this file except in compliance with the License. You may obtain |
||||
# a copy of the License at |
||||
# |
||||
# http://www.apache.org/licenses/LICENSE-2.0 |
||||
# |
||||
# Unless required by applicable law or agreed to in writing, software |
||||
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT |
||||
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the |
||||
# License for the specific language governing permissions and limitations |
||||
# under the License. |
||||
|
||||
|
||||
{% if item.registry is defined %} |
||||
FROM {{ item.registry.url }}/{{ item.image }} |
||||
{% else %} |
||||
FROM {{ item.image }} |
||||
{% endif %} |
||||
|
||||
RUN if [ $(command -v apt-get) ]; then apt-get update && apt-get install -y python sudo bash ca-certificates && apt-get clean; \ |
||||
elif [ $(command -v dnf) ]; then dnf makecache && dnf --assumeyes install sudo python*-devel python*-dnf bash {{ item.pkg_extras | default('') }} && dnf clean all; \ |
||||
elif [ $(command -v yum) ]; then yum makecache fast && yum install -y python sudo yum-plugin-ovl python-setuptools bash {{ item.pkg_extras | default('') }} && sed -i 's/plugins=0/plugins=1/g' /etc/yum.conf && yum clean all; \ |
||||
elif [ $(command -v zypper) ]; then zypper refresh && zypper install -y python sudo bash python-xml {{ item.pkg_extras | default('') }} && zypper clean -a; \ |
||||
elif [ $(command -v apk) ]; then apk update && apk add --no-cache python sudo bash ca-certificates {{ item.pkg_extras | default('') }}; \ |
||||
elif [ $(command -v xbps-install) ]; then xbps-install -Syu && xbps-install -y python sudo bash ca-certificates {{ item.pkg_extras | default('') }} && xbps-remove -O; fi |
||||
|
||||
{% for pkg in item.easy_install | default([]) %} |
||||
# install pip for centos where there is no python-pip rpm in default repos |
||||
RUN easy_install {{ pkg }} |
||||
{% endfor %} |
||||
|
||||
|
||||
CMD ["sh", "-c", "while true; do sleep 10000; done"] |
@ -1,37 +0,0 @@
|
||||
# Molecule managed |
||||
# Copyright 2019 Red Hat, Inc. |
||||
# All Rights Reserved. |
||||
# |
||||
# Licensed under the Apache License, Version 2.0 (the "License"); you may |
||||
# not use this file except in compliance with the License. You may obtain |
||||
# a copy of the License at |
||||
# |
||||
# http://www.apache.org/licenses/LICENSE-2.0 |
||||
# |
||||
# Unless required by applicable law or agreed to in writing, software |
||||
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT |
||||
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the |
||||
# License for the specific language governing permissions and limitations |
||||
# under the License. |
||||
|
||||
|
||||
{% if item.registry is defined %} |
||||
FROM {{ item.registry.url }}/{{ item.image }} |
||||
{% else %} |
||||
FROM {{ item.image }} |
||||
{% endif %} |
||||
|
||||
RUN if [ $(command -v apt-get) ]; then apt-get update && apt-get install -y python sudo bash ca-certificates && apt-get clean; \ |
||||
elif [ $(command -v dnf) ]; then dnf makecache && dnf --assumeyes install sudo python*-devel python*-dnf bash {{ item.pkg_extras | default('') }} && dnf clean all; \ |
||||
elif [ $(command -v yum) ]; then yum makecache fast && yum install -y python sudo yum-plugin-ovl python-setuptools bash {{ item.pkg_extras | default('') }} && sed -i 's/plugins=0/plugins=1/g' /etc/yum.conf && yum clean all; \ |
||||
elif [ $(command -v zypper) ]; then zypper refresh && zypper install -y python sudo bash python-xml {{ item.pkg_extras | default('') }} && zypper clean -a; \ |
||||
elif [ $(command -v apk) ]; then apk update && apk add --no-cache python sudo bash ca-certificates {{ item.pkg_extras | default('') }}; \ |
||||
elif [ $(command -v xbps-install) ]; then xbps-install -Syu && xbps-install -y python sudo bash ca-certificates {{ item.pkg_extras | default('') }} && xbps-remove -O; fi |
||||
|
||||
{% for pkg in item.easy_install | default([]) %} |
||||
# install pip for centos where there is no python-pip rpm in default repos |
||||
RUN easy_install {{ pkg }} |
||||
{% endfor %} |
||||
|
||||
|
||||
CMD ["sh", "-c", "while true; do sleep 10000; done"] |
@ -1,66 +1,45 @@
|
||||
--- |
||||
driver: |
||||
name: docker |
||||
name: delegated |
||||
options: |
||||
managed: false |
||||
login_cmd_template: >- |
||||
ssh |
||||
-o UserKnownHostsFile=/dev/null |
||||
-o StrictHostKeyChecking=no |
||||
-o Compression=no |
||||
-o TCPKeepAlive=yes |
||||
-o VerifyHostKeyDNS=no |
||||
-o ForwardX11=no |
||||
-o ForwardAgent=no |
||||
{instance} |
||||
ansible_connection_options: |
||||
ansible_connection: ssh |
||||
|
||||
log: true |
||||
|
||||
platforms: |
||||
- name: centos7 |
||||
hostname: centos7 |
||||
image: centos:7 |
||||
dockerfile: Dockerfile |
||||
pkg_extras: python-setuptools |
||||
easy_install: |
||||
- pip |
||||
environment: &env |
||||
http_proxy: "{{ lookup('env', 'http_proxy') }}" |
||||
https_proxy: "{{ lookup('env', 'https_proxy') }}" |
||||
command: /sbin/init |
||||
tmpfs: |
||||
- /run |
||||
- /tmp |
||||
capabilities: |
||||
- ALL # CENT7 requires all due to the age of the software |
||||
volumes: |
||||
- /run/udev:/run/udev:ro |
||||
- /sys/fs/cgroup:/sys/fs/cgroup:ro |
||||
- /etc/ci/mirror_info.sh:/etc/ci/mirror_info.sh:ro |
||||
|
||||
- name: centos8 |
||||
hostname: centos8 |
||||
image: centos:8 |
||||
dockerfile: Dockerfile |
||||
pkg_extras: python*-setuptools NetworkManager |
||||
environment: |
||||
http_proxy: "{{ lookup('env', 'http_proxy') }}" |
||||
https_proxy: "{{ lookup('env', 'https_proxy') }}" |
||||
command: /sbin/init |
||||
privileged: true |
||||
tmpfs: |
||||
- /run |
||||
- /tmp |
||||
capabilities: |
||||
- SYS_ADMIN |
||||
volumes: |
||||
- /run/udev:/run/udev:ro |
||||
- /sys/fs/cgroup:/sys/fs/cgroup:ro |
||||
- /etc/ci/mirror_info.sh:/etc/ci/mirror_info.sh:ro |
||||
- name: instance |
||||
|
||||
provisioner: |
||||
name: ansible |
||||
inventory: |
||||
hosts: |
||||
all: |
||||
hosts: |
||||
instance: |
||||
ansible_host: localhost |
||||
log: true |
||||
env: |
||||
ANSIBLE_STDOUT_CALLBACK: yaml |
||||
ANSIBLE_LIBRARY: "${ANSIBLE_LIBRARY:-/usr/share/ansible/plugins/modules}" |
||||
ANSIBLE_FILTER_PLUGINS: "${ANSIBLE_FILTER_PLUGINS:-/usr/share/ansible/plugins/filter}" |
||||
|
||||
scenario: |
||||
test_sequence: |
||||
- destroy |
||||
- create |
||||
- prepare |
||||
- converge |
||||
- check |
||||
- verify |
||||
- destroy |
||||
|
||||
verifier: |
||||
name: testinfra |
||||
|
@ -1,33 +0,0 @@
|
||||
--- |
||||
# Copyright 2019 Red Hat, Inc. |
||||
# All Rights Reserved. |
||||
# |
||||
# Licensed under the Apache License, Version 2.0 (the "License"); you may |
||||
# not use this file except in compliance with the License. You may obtain |
||||
# a copy of the License at |
||||
# |
||||
# http://www.apache.org/licenses/LICENSE-2.0 |
||||
# |
||||
# Unless required by applicable law or agreed to in writing, software |
||||
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT |
||||
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the |
||||
# License for the specific language governing permissions and limitations |
||||
# under the License. |
||||
|
||||
|
||||
# NOTE(Cloudnull): This role is a linked role to `tripleo_container_rm`. This role and exists |
||||
# to ensure we're providing a stable interface as we transition. In a future |
||||
# release this link will be removed in favor of using the stable role, |
||||
# `tripleo_container_rm`. |
||||
- name: Converge |
||||
become: true |
||||
hosts: all |
||||
roles: |
||||
- role: tripleo_container_rm |
||||
container_cli: docker |
||||
containers_to_rm: |
||||
- docker-container1 |
||||
- docker-container2 |
||||
|
||||
vars: |
||||
ansible_python_interpreter: "{{ ansible_user_dir }}/test-python/bin/python" |
@ -1,48 +0,0 @@
|
||||
--- |
||||
driver: |
||||
name: delegated |
||||
options: |
||||
managed: false |
||||
login_cmd_template: >- |
||||
ssh |
||||
-o UserKnownHostsFile=/dev/null |
||||
-o StrictHostKeyChecking=no |
||||
-o Compression=no |
||||
-o TCPKeepAlive=yes |
||||
-o VerifyHostKeyDNS=no |
||||
-o ForwardX11=no |
||||
-o ForwardAgent=no |
||||
{instance} |
||||
ansible_connection_options: |
||||
ansible_connection: ssh |
||||
|
||||
log: true |
||||
|
||||
platforms: |
||||
- name: instance |
||||
|
||||
provisioner: |
||||
name: ansible |
||||
config_options: |
||||
defaults: |
||||
fact_caching: jsonfile |
||||
fact_caching_connection: /tmp/molecule/facts |
||||
inventory: |
||||
hosts: |
||||
all: |
||||
hosts: |
||||
instance: |
||||
ansible_host: localhost |
||||
log: true |
||||
env: |
||||
ANSIBLE_STDOUT_CALLBACK: yaml |
||||
ANSIBLE_ROLES_PATH: "${ANSIBLE_ROLES_PATH}:${HOME}/zuul-jobs/roles" |
||||
|
||||
scenario: |
||||
test_sequence: |
||||
- prepare |
||||
- converge |
||||
- check |
||||
|
||||
verifier: |
||||
name: testinfra |
@ -1,26 +0,0 @@
|
||||
--- |
||||
# Copyright 2019 Red Hat, Inc. |
||||
# All Rights Reserved. |
||||
# |
||||
# Licensed under the Apache License, Version 2.0 (the "License"); you may |
||||
# not use this file except in compliance with the License. You may obtain |
||||
# a copy of the License at |
||||
# |
||||
# http://www.apache.org/licenses/LICENSE-2.0 |
||||
# |
||||
# Unless required by applicable law or agreed to in writing, software |
||||
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT |
||||
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the |
||||
# License for the specific language governing permissions and limitations |
||||
# under the License. |
||||
|
||||
|
||||
- name: Converge |
||||
become: true |
||||
hosts: all |
||||
roles: |
||||
- role: tripleo_container_rm |
||||
tripleo_container_cli: podman |
||||
tripleo_containers_to_rm: |
||||
- podman-container1 |
||||
- podman-container2 |
@ -1,43 +0,0 @@
|
||||
--- |
||||
driver: |
||||
name: delegated |
||||
options: |
||||
managed: false |
||||
login_cmd_template: >- |
||||
ssh |
||||
-o UserKnownHostsFile=/dev/null |
||||
-o StrictHostKeyChecking=no |
||||
-o Compression=no |
||||
-o TCPKeepAlive=yes |
||||
-o VerifyHostKeyDNS=no |
||||
-o ForwardX11=no |
||||
-o ForwardAgent=no |
||||
{instance} |
||||
ansible_connection_options: |
||||
ansible_connection: ssh |
||||
|
||||
log: true |
||||
|
||||
platforms: |
||||
- name: instance |
||||
|
||||
provisioner: |
||||
name: ansible |
||||
inventory: |
||||
hosts: |
||||
all: |
||||
hosts: |
||||
instance: |
||||
ansible_host: localhost |
||||
log: true |
||||
env: |
||||
ANSIBLE_STDOUT_CALLBACK: yaml |
||||
|
||||
scenario: |
||||
test_sequence: |
||||
- prepare |
||||
- converge |
||||
- check |
||||
|
||||
verifier: |
||||
name: testinfra |
@ -1,41 +0,0 @@
|
||||
--- |
||||
# Copyright 2019 Red Hat, Inc. |
||||
# All Rights Reserved. |
||||
# |
||||
# Licensed under the Apache License, Version 2.0 (the "License"); you may |
||||
# not use this file except in compliance with the License. You may obtain |
||||
# a copy of the License at |
||||
# |
||||
# http://www.apache.org/licenses/LICENSE-2.0 |
||||
# |
||||
# Unless required by applicable law or agreed to in writing, software |
||||
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT |
||||
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the |
||||
# License for the specific language governing permissions and limitations |
||||
# under the License. |
||||
|
||||
|
||||
- name: Prepare |
||||
hosts: all |
||||
become: true |
||||
gather_facts: true |
||||
vars: |
||||
required_packages: |
||||
- podman |
||||
roles: |
||||
- role: test_deps |
||||
post_tasks: |
||||
- name: Install podman |
||||
become: true |
||||
package: |
||||
name: "{{ required_packages }}" |
||||
state: latest |
||||
|
||||
- name: Pull container image |
||||
command: "podman pull centos:8" |
||||
|
||||
- name: Create test containers |
||||
command: "podman run -itd --systemd true --name {{ item }} fedora bash" |
||||
with_items: |
||||
- podman-container1 |
||||
- podman-container2 |
@ -1,37 +0,0 @@
|
||||
# Molecule managed |
||||
# Copyright 2019 Red Hat, Inc. |
||||
# All Rights Reserved. |
||||
# |
||||
# Licensed under the Apache License, Version 2.0 (the "License"); you may |
||||
# not use this file except in compliance with the License. You may obtain |
||||
# a copy of the License at |
||||
# |
||||
# http://www.apache.org/licenses/LICENSE-2.0 |
||||
# |
||||
# Unless required by applicable law or agreed to in writing, software |
||||
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT |
||||
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the |
||||
# License for the specific language governing permissions and limitations |
||||
# under the License. |
||||
|
||||
|
||||
{% if item.registry is defined %} |
||||
FROM {{ item.registry.url }}/{{ item.image }} |
||||
{% else %} |
||||
FROM {{ item.image }} |
||||
{% endif %} |
||||
|
||||
RUN if [ $(command -v apt-get) ]; then apt-get update && apt-get install -y python sudo bash ca-certificates && apt-get clean; \ |
||||
elif [ $(command -v dnf) ]; then dnf makecache && dnf --assumeyes install sudo python*-devel python*-dnf bash {{ item.pkg_extras | default('') }} && dnf clean all; \ |
||||
elif [ $(command -v yum) ]; then yum makecache fast && yum install -y python sudo yum-plugin-ovl python-setuptools bash {{ item.pkg_extras | default('') }} && sed -i 's/plugins=0/plugins=1/g' /etc/yum.conf && yum clean all; \ |
||||
elif [ $(command -v zypper) ]; then zypper refresh && zypper install -y python sudo bash python-xml {{ item.pkg_extras | default('') }} && zypper clean -a; \ |
||||
elif [ $(command -v apk) ]; then apk update && apk add --no-cache python sudo bash ca-certificates {{ item.pkg_extras | default('') }}; \ |
||||
elif [ $(command -v xbps-install) ]; then xbps-install -Syu && xbps-install -y python sudo bash ca-certificates {{ item.pkg_extras | default('') }} && xbps-remove -O; fi |
||||
|
||||
{% for pkg in item.easy_install | default([]) %} |
||||
# install pip for centos where there is no python-pip rpm in default repos |
||||
RUN easy_install {{ pkg }} |
||||
{% endfor %} |
||||
|
||||
|
||||
CMD ["sh", "-c", "while true; do sleep 10000; done"] |