Merge "Move c7 molecule job to c8 - Part 2" into stable/train

This commit is contained in:
Zuul 2020-10-05 17:26:05 +00:00 committed by Gerrit Code Review
commit 85853e67ed
26 changed files with 122 additions and 733 deletions

View File

@ -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"]

View File

@ -1,26 +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 apk add python
ENTRYPOINT ["/entrypoint.sh"]

View File

@ -1,91 +0,0 @@
---
driver:
name: docker
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
security_opts:
- seccomp=unconfined
tmpfs:
- /run
- /tmp
capabilities:
- ALL
volumes: &vols
- /run/udev:/run/udev:ro
- /sys/fs/cgroup:/sys/fs/cgroup:ro
- /var/run/docker.sock:/var/run/docker.sock
# TODO(cloudnull): when RDO has centos8 repos this test node should be re-enabled.
#
# - name: centos8
# hostname: centos8
# image: centos:8
# dockerfile: Dockerfile
# pkg_extras: python*-setuptools
# environment:
# http_proxy: "{{ lookup('env', 'http_proxy') }}"
# https_proxy: "{{ lookup('env', 'https_proxy') }}"
# command: /sbin/init
# privileged: true
# security_opts:
# - seccomp=unconfined
# tmpfs:
# - /run
# - /tmp
# capabilities:
# - ALL
# volumes: *vols
- name: registry
hostname: registry
image: registry:2
dockerfile: DockerfileRegistry
environment:
<<: *env
command: /etc/docker/registry/config.yml
exposed_ports:
- 5000/udp
- 5000/tcp
published_ports:
- 0.0.0.0:8787:5000/udp
- 0.0.0.0:8787:5000/tcp
provisioner:
name: ansible
config_options:
defaults:
fact_caching: jsonfile
fact_caching_connection: /tmp/molecule/facts
env:
ANSIBLE_STDOUT_CALLBACK: yaml
scenario:
test_sequence:
- destroy
- create
- prepare
- converge
- check
- verify
- destroy
lint:
enabled: false
verifier:
name: testinfra
lint:
name: flake8

View File

@ -1,91 +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
hosts: all
serial: 1
roles:
- role: "tripleo-container-image-prepare"
when:
- inventory_hostname != "registry"
tripleo_container_image_prepare_debug: true
tripleo_container_image_prepare_content:
parameter_defaults:
AdditionalArchitectures: []
ContainerImagePrepare:
- modify_append_tag: -updated-TEST
modify_only_with_labels:
- kolla_version
modify_role: tripleo-modify-image
modify_vars:
tasks_from: yum_update.yml
update_repo: gating-repo,delorean-current,quickstart-centos-ceph-nautilus
yum_repos_dir_path: /etc/yum.repos.d
push_destination: "{{ hostvars['registry']['ansible_default_ipv4']['address'] }}:5000"
set:
ceph_alertmanager_image: alertmanager
ceph_alertmanager_namespace: docker.io/prom
ceph_alertmanager_tag: latest
ceph_grafana_image: grafana
ceph_grafana_namespace: docker.io/grafana
ceph_grafana_tag: latest
ceph_image: daemon
ceph_namespace: docker.io/ceph
ceph_node_exporter_image: node-exporter
ceph_node_exporter_namespace: docker.io/prom
ceph_node_exporter_tag: latest
ceph_prometheus_image: prometheus
ceph_prometheus_namespace: docker.io/prom
ceph_prometheus_tag: latest
ceph_tag: v4.0.0-stable-4.0-nautilus-centos-7-x86_64
name_prefix: centos-binary-
name_suffix: ''
namespace: docker.io/tripleomaster
neutron_driver: ovn
tag: master
tag_from_label: null
ContainerImageRegistryCredentials: {}
DockerInsecureRegistryAddress:
- "{{ hostvars['registry']['ansible_default_ipv4']['address'] }}:5000"
DockerRegistryMirror: "https://registry-1.docker.io/"
NeutronMechanismDrivers:
- ovn
StandaloneCount: 1
StandaloneServices:
- OS::TripleO::Services::CACerts
tripleo_container_image_prepare_roles:
- CountDefault: 1
ServicesDefault:
- OS::TripleO::Services::CACerts
description: 'Testing'
disable_constraints: true
name: Standalone
networks:
External:
subnet: external_subnet
InternalApi:
subnet: internal_api_subnet
Storage:
subnet: storage_subnet
StorageMgmt:
subnet: storage_mgmt_subnet
Tenant:
subnet: tenant_subnet
tags:
- primary
- controller
- standalone

View File

@ -1,43 +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
roles:
- role: test_deps
test_deps_setup_tripleo: true
when:
- inventory_hostname != "registry"
post_tasks:
- name: Install docker
package:
name: docker
state: present
- name: Create buildah directory
file:
path: /etc/containers
state: directory
- name: Create buildah registries config
copy:
content: |-
[registries.search]
registries = ['docker.io', 'registry.fedoraproject.org', 'quay.io', 'registry.access.redhat.com', 'registry.centos.org']
[registries.insecure]
registries = ["{{ hostvars['registry']['ansible_default_ipv4']['address'] }}:5000"]
[registries.block]
registries = []
dest: /etc/containers/registries.conf

View File

@ -1,6 +1,6 @@
---
driver:
name: docker
name: podman
log: true
@ -17,6 +17,8 @@ platforms:
environment: &env
http_proxy: "{{ lookup('env', 'http_proxy') }}"
https_proxy: "{{ lookup('env', 'https_proxy') }}"
ulimits: &ulimit
- host
- name: centos8
hostname: centos8
@ -26,13 +28,17 @@ platforms:
volumes:
- /etc/ci/mirror_info.sh:/etc/ci/mirror_info.sh:ro
environment:
<<: *env
http_proxy: "{{ lookup('env', 'http_proxy') }}"
https_proxy: "{{ lookup('env', 'https_proxy') }}"
ulimits:
- host
provisioner:
name: ansible
log: true
env:
ANSIBLE_STDOUT_CALLBACK: yaml
ANSIBLE_LIBRARY: "${ANSIBLE_LIBRARY:-/usr/share/ansible/plugins/modules}"
scenario:
test_sequence:
@ -44,10 +50,5 @@ scenario:
- verify
- destroy
lint:
enabled: false
verifier:
name: testinfra
lint:
name: flake8

View File

@ -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"]

View File

@ -38,6 +38,7 @@ provisioner:
ANSIBLE_STDOUT_CALLBACK: yaml
ANSIBLE_ROLES_PATH: "${ANSIBLE_ROLES_PATH}:${HOME}/zuul-jobs/roles"
ANSIBLE_LIBRARY: "${ANSIBLE_LIBRARY:-/usr/share/ansible/plugins/modules}"
ANSIBLE_FILTER_PLUGINS: "${ANSIBLE_FILTER_PLUGINS:-/usr/share/ansible/plugins/filter}"
scenario:
name: default
@ -46,10 +47,5 @@ scenario:
- converge
- check
lint:
enabled: false
verifier:
name: testinfra
lint:
name: flake8

View File

@ -21,7 +21,5 @@
roles:
- role: tripleo-container-stop
tripleo_containers_to_stop:
- docker-container1
- docker-container2
vars:
ansible_python_interpreter: "{{ ansible_user_dir }}/test-python/bin/python"
- podman-container1
- podman-container2

View File

@ -19,58 +19,30 @@
hosts: all
become: true
gather_facts: true
pre_tasks:
- name: Check for docker cli
command: "command -v docker"
register: docker_cli
failed_when: false
changed_when: false
- name: Check for docker connection
command: "docker ps"
register: docker_ps
failed_when: false
changed_when: false
- name: set basic user fact
set_fact:
ansible_user: "{{ lookup('env', 'USER') }}"
when:
- ansible_user is undefined
- name: set basic home fact
set_fact:
ansible_user_dir: "{{ lookup('env', 'HOME') }}"
when:
- ansible_user_dir is undefined
vars:
required_packages:
- podman
roles:
- role: test_deps
- role: ensure-docker
when:
- (docker_cli.rc != 0) or
(docker_ps.rc != 0)
post_tasks:
- name: Install docker-sdk
pip:
name: docker
virtualenv: "{{ ansible_user_dir }}/test-python"
virtualenv_site_packages: true
- name: Install podman
become: true
package:
name: "{{ required_packages }}"
state: latest
- name: pull an image
docker_image:
- name: Pull container image
podman_image:
name: centos:8
source: pull
vars:
ansible_python_interpreter: "{{ ansible_user_dir }}/test-python/bin/python"
- name: Create a data container
docker_container:
- name: Create test containers
podman_container:
name: "{{ item }}"
image: centos:8
interactive: true
tty: true
detach: true
command: sleep 1d
image: centos:8
command: bash
with_items:
- docker-container1
- docker-container2
vars:
ansible_python_interpreter: "{{ ansible_user_dir }}/test-python/bin/python"
- podman-container1
- podman-container2

View File

@ -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"]

View File

@ -1,55 +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"
ANSIBLE_LIBRARY: "${ANSIBLE_LIBRARY:-/usr/share/ansible/plugins/modules}"
scenario:
name: podman
test_sequence:
- prepare
- converge
- verify
lint:
enabled: false
verifier:
name: testinfra
lint:
name: flake8

View File

@ -1,27 +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-stop
tripleo_containers_to_stop:
- podman-container1
- podman-container2
vars:
ansible_python_interpreter: "{{ ansible_user_dir }}/test-python/bin/python"

View File

@ -1,48 +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
podman_image:
name: fedora
- name: Create test containers
podman_container:
name: "{{ item }}"
interactive: true
tty: true
detach: true
image: fedora
command: bash
with_items:
- podman-container1
- podman-container2

View File

@ -1,23 +1,10 @@
---
driver:
name: docker
name: podman
log: true
platforms:
- name: centos7
hostname: centos7
image: centos:7
dockerfile: Dockerfile
pkg_extras: python-setuptools
volumes:
- /etc/ci/mirror_info.sh:/etc/ci/mirror_info.sh:ro
easy_install:
- pip
environment: &env
http_proxy: "{{ lookup('env', 'http_proxy') }}"
https_proxy: "{{ lookup('env', 'https_proxy') }}"
- name: centos8
hostname: centos8
image: centos:8
@ -26,7 +13,10 @@ platforms:
volumes:
- /etc/ci/mirror_info.sh:/etc/ci/mirror_info.sh:ro
environment:
<<: *env
http_proxy: "{{ lookup('env', 'http_proxy') }}"
https_proxy: "{{ lookup('env', 'https_proxy') }}"
ulimits: &ulimit
- host
provisioner:
name: ansible
@ -260,7 +250,6 @@ provisioner:
Standalone:
hosts:
centos8: {}
centos7: {}
log: true
env:
ANSIBLE_STDOUT_CALLBACK: yaml

View File

@ -1,23 +1,10 @@
---
driver:
name: docker
name: podman
log: true
platforms:
- name: centos7
hostname: centos7
image: centos:7
dockerfile: Dockerfile
pkg_extras: python-setuptools
volumes:
- /etc/ci/mirror_info.sh:/etc/ci/mirror_info.sh:ro
easy_install:
- pip
environment: &env
http_proxy: "{{ lookup('env', 'http_proxy') }}"
https_proxy: "{{ lookup('env', 'https_proxy') }}"
- name: centos8
hostname: centos8
image: centos:8
@ -26,7 +13,10 @@ platforms:
volumes:
- /etc/ci/mirror_info.sh:/etc/ci/mirror_info.sh:ro
environment:
<<: *env
http_proxy: "{{ lookup('env', 'http_proxy') }}"
https_proxy: "{{ lookup('env', 'https_proxy') }}"
ulimits:
- host
provisioner:
name: ansible

View File

@ -1,23 +1,10 @@
---
driver:
name: docker
name: podman
log: true
platforms:
- name: centos7
hostname: centos7
image: centos:7
dockerfile: Dockerfile
pkg_extras: python-setuptools
volumes:
- /etc/ci/mirror_info.sh:/etc/ci/mirror_info.sh:ro
easy_install:
- pip
environment: &env
http_proxy: "{{ lookup('env', 'http_proxy') }}"
https_proxy: "{{ lookup('env', 'https_proxy') }}"
- name: centos8
hostname: centos8
image: centos:8
@ -26,7 +13,10 @@ platforms:
volumes:
- /etc/ci/mirror_info.sh:/etc/ci/mirror_info.sh:ro
environment:
<<: *env
http_proxy: "{{ lookup('env', 'http_proxy') }}"
https_proxy: "{{ lookup('env', 'https_proxy') }}"
ulimits:
- host
provisioner:
name: ansible
@ -260,7 +250,6 @@ provisioner:
Standalone:
hosts:
centos8: {}
centos7: {}
log: true
env:
ANSIBLE_STDOUT_CALLBACK: yaml
@ -275,10 +264,5 @@ scenario:
- verify
- destroy
lint:
enabled: false
verifier:
name: testinfra
lint:
name: flake8

View File

@ -1,23 +1,10 @@
---
driver:
name: docker
name: podman
log: true
platforms:
- name: centos7
hostname: centos7
image: centos:7
dockerfile: Dockerfile
pkg_extras: python-setuptools
volumes:
- /etc/ci/mirror_info.sh:/etc/ci/mirror_info.sh:ro
easy_install:
- pip
environment: &env
http_proxy: "{{ lookup('env', 'http_proxy') }}"
https_proxy: "{{ lookup('env', 'https_proxy') }}"
- name: centos8
hostname: centos8
image: centos:8
@ -26,7 +13,8 @@ platforms:
volumes:
- /etc/ci/mirror_info.sh:/etc/ci/mirror_info.sh:ro
environment:
<<: *env
http_proxy: "{{ lookup('env', 'http_proxy') }}"
https_proxy: "{{ lookup('env', 'https_proxy') }}"
provisioner:
name: ansible
@ -43,10 +31,5 @@ scenario:
- verify
- destroy
lint:
enabled: false
verifier:
name: testinfra
lint:
name: flake8

View File

@ -19,4 +19,4 @@
path: "{{ tripleo_persist_storage_root_dir }}"
state: absent
delegate_to: localhost
become: "{{ tripleo_persist_storage_root_become | bool }}"
become: true

View File

@ -37,18 +37,14 @@ provisioner:
env:
ANSIBLE_STDOUT_CALLBACK: yaml
ANSIBLE_ROLES_PATH: "${ANSIBLE_ROLES_PATH}:${HOME}/zuul-jobs/roles"
ANSIBLE_LIBRARY: "${ANSIBLE_LIBRARY:-/usr/share/ansible/plugins/modules}"
ANSIBLE_FILTER_PLUGINS: "${ANSIBLE_FILTER_PLUGINS:-/usr/share/ansible/plugins/filter}"
scenario:
name: default
test_sequence:
- prepare
- converge
- check
lint:
enabled: false
verifier:
name: testinfra
lint:
name: flake8

View File

@ -20,18 +20,6 @@
become: true
gather_facts: true
pre_tasks:
- name: Check for docker cli
command: "command -v docker"
register: docker_cli
failed_when: false
changed_when: false
- name: Check for docker connection
command: "docker ps"
register: docker_ps
failed_when: false
changed_when: false
- name: set basic user fact
set_fact:
ansible_user: "{{ lookup('env', 'USER') }}"
@ -45,32 +33,17 @@
- ansible_user_dir is undefined
roles:
- role: test_deps
- role: ensure-docker
when:
- (docker_cli.rc != 0) or
(docker_ps.rc != 0)
post_tasks:
- name: Install docker-sdk
pip:
name: docker
virtualenv: "{{ ansible_user_dir }}/test-python"
virtualenv_site_packages: true
- name: pull an image
docker_image:
podman_image:
name: centos:8
source: pull
vars:
ansible_python_interpreter: "{{ ansible_user_dir }}/test-python/bin/python"
- name: Create a data container
docker_container:
podman_container:
name: "{{ item }}"
image: centos:8
detach: true
command: sleep 1d
with_items:
- docker-container1
- docker-container2
vars:
ansible_python_interpreter: "{{ ansible_user_dir }}/test-python/bin/python"
- test-container1
- test-container2

View File

@ -37,18 +37,14 @@ provisioner:
env:
ANSIBLE_STDOUT_CALLBACK: yaml
ANSIBLE_ROLES_PATH: "${ANSIBLE_ROLES_PATH}:${HOME}/zuul-jobs/roles"
ANSIBLE_LIBRARY: "${ANSIBLE_LIBRARY:-/usr/share/ansible/plugins/modules}"
ANSIBLE_FILTER_PLUGINS: "${ANSIBLE_FILTER_PLUGINS:-/usr/share/ansible/plugins/filter}"
scenario:
name: install
test_sequence:
- prepare
- converge
- check
lint:
enabled: false
verifier:
name: testinfra
lint:
name: flake8

View File

@ -37,18 +37,14 @@ provisioner:
env:
ANSIBLE_STDOUT_CALLBACK: yaml
ANSIBLE_ROLES_PATH: "${ANSIBLE_ROLES_PATH}:${HOME}/zuul-jobs/roles"
ANSIBLE_LIBRARY: "${ANSIBLE_LIBRARY:-/usr/share/ansible/plugins/modules}"
ANSIBLE_FILTER_PLUGINS: "${ANSIBLE_FILTER_PLUGINS:-/usr/share/ansible/plugins/filter}"
scenario:
name: login
test_sequence:
- prepare
- converge
- check
lint:
enabled: false
verifier:
name: testinfra
lint:
name: flake8

View File

@ -17,7 +17,6 @@
- name: Prepare
hosts: all
become: true
gather_facts: true
pre_tasks:
- name: set basic user fact
@ -34,29 +33,53 @@
roles:
- role: test_deps
- role: ensure-docker
tasks:
- name: Create a docker registry
become: true
- name: Ensure registry doesn't exist
podman_container:
name: registry
state: absent
- name: Pull ubuntu image
podman_image:
name: ubuntu
tag: 16.04
- name: Create auth directory
file:
state: directory
path: "{{ ansible_user_dir }}/auth"
- name: Create registry
shell: |-
docker pull ubuntu:16.04
docker tag ubuntu:16.04 localhost:5000/my-ubuntu
mkdir auth
docker run --entrypoint htpasswd registry:2.7.0 -Bbn testuser testpassword > auth/htpasswd
docker container stop registry
docker run -d -p 5000:5000 --restart=always \
--name registry \
-v "$(pwd)"/auth:/auth \
-e "REGISTRY_AUTH=htpasswd" \
-e "REGISTRY_AUTH_HTPASSWD_REALM=Registry Realm" \
-e REGISTRY_AUTH_HTPASSWD_PATH=/auth/htpasswd \
registry:2.7.0
podman tag ubuntu:16.04 localhost:5000/my-ubuntu
podman run --entrypoint htpasswd registry:2.7.0 -Bbn testuser testpassword > {{ ansible_user_dir }}/auth/htpasswd
args:
creates: /root/auth/htpasswd
executable: /bin/bash
- name: Create registry
podman_container:
name: registry
image: "registry:2.7.0"
restart_policy: always
detach: true
ports:
- "5000:5000"
volume:
- "{{ ansible_user_dir }}/auth:/auth"
env:
REGISTRY_AUTH: "htpasswd"
REGISTRY_AUTH_HTPASSWD_REALM: "Registry Realm"
REGISTRY_AUTH_HTPASSWD_PATH: "/auth/htpasswd"
- name: Run install
include_role:
name: tripleo-podman
tasks_from: tripleo_podman_install.yml
vars_from: "redhat.yml"
- name: Disable SELinux
become: true
selinux:
state: disabled

View File

@ -1,23 +1,10 @@
---
driver:
name: docker
name: podman
log: true
platforms:
- name: centos7
hostname: centos7
image: centos:7
dockerfile: Dockerfile
pkg_extras: python-setuptools
volumes:
- /etc/ci/mirror_info.sh:/etc/ci/mirror_info.sh:ro
easy_install:
- pip
environment: &env
http_proxy: "{{ lookup('env', 'http_proxy') }}"
https_proxy: "{{ lookup('env', 'https_proxy') }}"
- name: centos8
hostname: centos8
image: centos:8
@ -26,7 +13,9 @@ platforms:
volumes:
- /etc/ci/mirror_info.sh:/etc/ci/mirror_info.sh:ro
environment:
<<: *env
http_proxy: "{{ lookup('env', 'http_proxy') }}"
https_proxy: "{{ lookup('env', 'https_proxy') }}"
provisioner:
name: ansible
@ -43,10 +32,5 @@ scenario:
- verify
- destroy
lint:
enabled: false
verifier:
name: testinfra
lint:
name: flake8

View File

@ -15,19 +15,19 @@
- tripleo-ansible-centos-8-molecule-tripleo-container-rm
- tripleo-ansible-centos-8-molecule-tripleo-image-serve
- tripleo-ansible-centos-8-molecule-tripleo-transfer
- tripleo-ansible-centos-7-molecule-tripleo-podman
- tripleo-ansible-centos-7-molecule-tripleo-persist
- tripleo-ansible-centos-8-molecule-tripleo-podman
- tripleo-ansible-centos-8-molecule-tripleo-persist
- tripleo-ansible-centos-8-molecule-tripleo-ceph-run-ansible
- tripleo-ansible-centos-8-molecule-login-defs
- tripleo-ansible-centos-8-molecule-tripleo-ptp
- tripleo-ansible-centos-8-molecule-tripleo-timezone
- tripleo-ansible-centos-8-molecule-tripleo-config
- tripleo-ansible-centos-8-molecule-tripleo-container-image-build
- tripleo-ansible-centos-7-molecule-tripleo-container-stop
- tripleo-ansible-centos-8-molecule-tripleo-container-stop
- tripleo-ansible-centos-8-molecule-tripleo-hieradata
- tripleo-ansible-centos-7-molecule-tripleo-upgrade-hiera
- tripleo-ansible-centos-8-molecule-tripleo-upgrade-hiera
- tripleo-ansible-centos-8-molecule-tripleo-kernel
- tripleo-ansible-centos-7-molecule-tripleo-container-image-prepare
- tripleo-ansible-centos-8-molecule-tripleo-container-image-prepare
- tripleo-ansible-centos-8-molecule-tripleo-firewall
- tripleo-ansible-centos-8-molecule-tripleo-redhat-enforce
- tripleo-ansible-centos-8-molecule-tripleo-securetty
@ -62,19 +62,19 @@
- tripleo-ansible-centos-8-molecule-tripleo-container-rm
- tripleo-ansible-centos-8-molecule-tripleo-image-serve
- tripleo-ansible-centos-8-molecule-tripleo-transfer
- tripleo-ansible-centos-7-molecule-tripleo-podman
- tripleo-ansible-centos-7-molecule-tripleo-persist
- tripleo-ansible-centos-8-molecule-tripleo-podman
- tripleo-ansible-centos-8-molecule-tripleo-persist
- tripleo-ansible-centos-8-molecule-tripleo-ceph-run-ansible
- tripleo-ansible-centos-8-molecule-login-defs
- tripleo-ansible-centos-8-molecule-tripleo-ptp
- tripleo-ansible-centos-8-molecule-tripleo-timezone
- tripleo-ansible-centos-8-molecule-tripleo-config
- tripleo-ansible-centos-8-molecule-tripleo-container-image-build
- tripleo-ansible-centos-7-molecule-tripleo-container-stop
- tripleo-ansible-centos-8-molecule-tripleo-container-stop
- tripleo-ansible-centos-8-molecule-tripleo-hieradata
- tripleo-ansible-centos-7-molecule-tripleo-upgrade-hiera
- tripleo-ansible-centos-8-molecule-tripleo-upgrade-hiera
- tripleo-ansible-centos-8-molecule-tripleo-kernel
- tripleo-ansible-centos-7-molecule-tripleo-container-image-prepare
- tripleo-ansible-centos-8-molecule-tripleo-container-image-prepare
- tripleo-ansible-centos-8-molecule-tripleo-firewall
- tripleo-ansible-centos-8-molecule-tripleo-redhat-enforce
- tripleo-ansible-centos-8-molecule-tripleo-securetty
@ -194,15 +194,15 @@
- job:
files:
- ^tripleo_ansible/roles/tripleo-podman/.*
name: tripleo-ansible-centos-7-molecule-tripleo-podman
parent: tripleo-ansible-centos-7-base
name: tripleo-ansible-centos-8-molecule-tripleo-podman
parent: tripleo-ansible-centos-8-base
vars:
tripleo_role_name: tripleo-podman
- job:
files:
- ^tripleo_ansible/roles/tripleo-persist/.*
name: tripleo-ansible-centos-7-molecule-tripleo-persist
parent: tripleo-ansible-centos-7-base
name: tripleo-ansible-centos-8-molecule-tripleo-persist
parent: tripleo-ansible-centos-8-base
vars:
tripleo_role_name: tripleo-persist
- job:
@ -251,8 +251,8 @@
- job:
files:
- ^tripleo_ansible/roles/tripleo-container-stop/.*
name: tripleo-ansible-centos-7-molecule-tripleo-container-stop
parent: tripleo-ansible-centos-7-base
name: tripleo-ansible-centos-8-molecule-tripleo-container-stop
parent: tripleo-ansible-centos-8-base
vars:
tripleo_role_name: tripleo-container-stop
- job:
@ -265,8 +265,8 @@
- job:
files:
- ^tripleo_ansible/roles/tripleo-upgrade-hiera/.*
name: tripleo-ansible-centos-7-molecule-tripleo-upgrade-hiera
parent: tripleo-ansible-centos-7-base
name: tripleo-ansible-centos-8-molecule-tripleo-upgrade-hiera
parent: tripleo-ansible-centos-8-base
vars:
tripleo_role_name: tripleo-upgrade-hiera
@ -288,8 +288,8 @@
- job:
files:
- ^tripleo_ansible/roles/tripleo-container-image-prepare/.*
name: tripleo-ansible-centos-7-molecule-tripleo-container-image-prepare
parent: tripleo-ansible-centos-7-base
name: tripleo-ansible-centos-8-molecule-tripleo-container-image-prepare
parent: tripleo-ansible-centos-8-base
vars:
tripleo_docker_enable_vfs: true
tripleo_docker_temp_file: '{{ zuul.executor.work_root }}/.tmp/docker-daemon-{{ inventory_hostname }}.json'