diff --git a/.config/molecule/config_podman.yml b/.config/molecule/config_podman.yml index 4fe6d8722..2a5cd6c03 100644 --- a/.config/molecule/config_podman.yml +++ b/.config/molecule/config_podman.yml @@ -3,18 +3,18 @@ log: true platforms: - name: centos hostname: centos - image: centos/centos:stream8 + image: ubi9/ubi-init registry: - url: quay.io + url: registry.access.redhat.com dockerfile: Dockerfile.j2 pkg_extras: python*setuptools + command: /sbin/init volumes: - /etc/ci/mirror_info.sh:/etc/ci/mirror_info.sh:ro - /etc/pki/rpm-gpg:/etc/pki/rpm-gpg - /opt/yum.repos.d:/etc/yum.repos.d:rw - /etc/dnf/vars:/etc/dnf/vars privileged: true - command: /sbin/init environment: &env http_proxy: "{{ lookup('env', 'http_proxy') }}" https_proxy: "{{ lookup('env', 'https_proxy') }}" diff --git a/_skeleton_role_/molecule/default/molecule.yml b/_skeleton_role_/molecule/default/molecule.yml index 8b18ad84d..93b3c5b7e 100644 --- a/_skeleton_role_/molecule/default/molecule.yml +++ b/_skeleton_role_/molecule/default/molecule.yml @@ -7,10 +7,10 @@ log: true platforms: - name: centos hostname: centos - image: centos/centos:stream8 + image: centos/centos:stream9 registry: url: quay.io - dockerfile: Dockerfile + dockerfile: Dockerfile.j2 pkg_extras: python*setuptools volumes: - /etc/ci/mirror_info.sh:/etc/ci/mirror_info.sh:ro diff --git a/bindep.txt b/bindep.txt index aaaaad96f..25acc492f 100644 --- a/bindep.txt +++ b/bindep.txt @@ -21,7 +21,7 @@ openssl-devel [platform:rpm] podman [platform:rpm] python-devel [platform:rpm !platform:rhel-8 !platform:centos-8 !platform:fedora] python3-devel [platform:rpm !platform:rhel-7 !platform:centos-7] -PyYAML [platform:rpm !platform:rhel-8 !platform:centos-8 !platform:fedora] +PyYAML [platform:rpm !platform:rhel-8 !platform:centos-8 !platform:rhel-9 !platform:centos-9 !platform:fedora] python3-pyyaml [platform:rpm !platform:rhel-7 !platform:centos-7] python3-dnf [platform:rpm !platform:rhel-7 !platform:centos-7] diff --git a/tox.ini b/tox.ini index ce338d0e7..9902fba96 100644 --- a/tox.ini +++ b/tox.ini @@ -100,6 +100,7 @@ basepython = python3 deps = {[testenv:linters]deps} -r {toxinidir}/molecule-requirements.txt + -c{env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master} commands = ansible-galaxy install -fr {toxinidir}/tripleo_ansible/ansible-collections-requirements.yml bash -c "ansible-playbook -i localhost, role-addition.yml -e role_name=skeleton_test" diff --git a/tripleo_ansible/ansible_plugins/tests/molecule/tripleo_dnf_stream/molecule.yml b/tripleo_ansible/ansible_plugins/tests/molecule/tripleo_dnf_stream/molecule.yml index bcb46f15b..c8ebec2d0 100644 --- a/tripleo_ansible/ansible_plugins/tests/molecule/tripleo_dnf_stream/molecule.yml +++ b/tripleo_ansible/ansible_plugins/tests/molecule/tripleo_dnf_stream/molecule.yml @@ -7,11 +7,11 @@ driver: # That's why the config is kept here platforms: - - name: centos - hostname: centos - image: centos/centos:stream8 + - name: ubi9 + hostname: ubi9 + image: ubi9/ubi-init registry: - url: quay.io + url: registry.access.redhat.com dockerfile: Dockerfile.j2 pkg_extras: python*setuptools volumes: @@ -32,7 +32,7 @@ provisioner: hosts: all: hosts: - centos: + ubi9: ansible_python_interpreter: /usr/bin/python3 log: true env: diff --git a/tripleo_ansible/ansible_plugins/tests/molecule/tripleo_dnf_stream/prepare.yml b/tripleo_ansible/ansible_plugins/tests/molecule/tripleo_dnf_stream/prepare.yml index f30f6659b..7d9f4b27b 100644 --- a/tripleo_ansible/ansible_plugins/tests/molecule/tripleo_dnf_stream/prepare.yml +++ b/tripleo_ansible/ansible_plugins/tests/molecule/tripleo_dnf_stream/prepare.yml @@ -15,7 +15,7 @@ # under the License. - name: Prepare - hosts: ubi8 + hosts: ubi9 roles: - role: test_deps tasks: diff --git a/tripleo_ansible/roles/backup_and_restore/molecule/cli_undercloud_backup_db/prepare.yml b/tripleo_ansible/roles/backup_and_restore/molecule/cli_undercloud_backup_db/prepare.yml index b1f5383f6..536532aa7 100644 --- a/tripleo_ansible/roles/backup_and_restore/molecule/cli_undercloud_backup_db/prepare.yml +++ b/tripleo_ansible/roles/backup_and_restore/molecule/cli_undercloud_backup_db/prepare.yml @@ -84,8 +84,8 @@ containers.podman.podman_image: name: "{{ item }}" with_items: - - registry.access.redhat.com/ubi8/ubi-minimal - - mysql + - registry.access.redhat.com/ubi9/ubi-minimal + - docker.io/mysql - name: Create a data container containers.podman.podman_container: diff --git a/tripleo_ansible/roles/test_deps/tasks/main.yml b/tripleo_ansible/roles/test_deps/tasks/main.yml index 71bada151..f84f1f6f6 100644 --- a/tripleo_ansible/roles/test_deps/tasks/main.yml +++ b/tripleo_ansible/roles/test_deps/tasks/main.yml @@ -58,6 +58,17 @@ path: /etc/rhsm-host state: absent + - name: Disable ubi 9 repos + when: ansible_distribution_major_version is version(9, '>=') + become: true + yum_repository: + name: "{{ item }}" + state: absent + with_items: + - ubi-9-appstream + - ubi-9-baseos + - ubi-9-codeready-builder + - name: Install tripleo-repos package become: true package: @@ -71,13 +82,33 @@ - test_deps_setup_tripleo | bool block: - name: Create tripleo repos - command: tripleo-repos {{ test_deps_setup_stream | ternary('--stream', '--no-stream', omit) }} \ + command: tripleo-repos -d ubi9 {{ test_deps_setup_stream | ternary('--stream', '--no-stream', omit) }} \ -b master current-tripleo {{ test_deps_setup_ceph | ternary('ceph', '', omit) }} + - name: look for redhat-release rpm + shell: | + rpm -qe redhat-release + register: rpm_found + ignore_errors: yes + + - name: Workaround of redhat-release binary on ubi9 + when: rpm_found.rc == 0 + block: + - name: Remove redhat-release + shell: | + rpm -e --nodeps redhat-release + + - name: Install centos-stream-release + package: + name: "centos-stream-release" + state: latest + releasever: "{{ ansible_facts['distribution_major_version'] }}" + - name: Install tripleo packages package: name: "{{ test_deps_tripleo_packages }}" state: present + releasever: "{{ ansible_facts['distribution_major_version'] }}" - name: Package block become: true @@ -86,6 +117,7 @@ package: name: "{{ test_deps_selinux_packages }}" state: present + releasever: "{{ ansible_facts['distribution_major_version'] }}" when: - (ansible_facts['os_family'] | lower) == 'redhat' @@ -93,6 +125,7 @@ package: name: "{{ test_deps_yaml_packages }}" state: present + releasever: "{{ ansible_facts['distribution_major_version'] }}" when: - (ansible_facts['os_family'] | lower) == 'redhat' @@ -100,5 +133,6 @@ package: name: "{{ test_deps_extra_packages }}" state: present + releasever: "{{ ansible_facts['distribution_major_version'] }}" when: - (test_deps_extra_packages | length) > 0 diff --git a/tripleo_ansible/roles/test_deps/vars/centos-9.yml b/tripleo_ansible/roles/test_deps/vars/centos-9.yml new file mode 100644 index 000000000..ee72e857e --- /dev/null +++ b/tripleo_ansible/roles/test_deps/vars/centos-9.yml @@ -0,0 +1,24 @@ +--- +# Copyright 2022 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. +test_deps_repo: https://trunk.rdoproject.org/centos9-master/current +test_deps_yaml_packages: + - python3-pyyaml +test_deps_selinux_packages: + - python3-libselinux +test_deps_tripleo_packages: + - python3-tripleoclient + - python3-openstacksdk +test_deps_tripleo_repos: current-tripleo diff --git a/tripleo_ansible/roles/test_deps/vars/redhat-9.yml b/tripleo_ansible/roles/test_deps/vars/redhat-9.yml new file mode 100644 index 000000000..113a42c10 --- /dev/null +++ b/tripleo_ansible/roles/test_deps/vars/redhat-9.yml @@ -0,0 +1,25 @@ +--- +# Copyright 2022 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. +test_deps_repo: https://trunk.rdoproject.org/centos9-master/current +test_deps_yaml_packages: + - python3-pyyaml +test_deps_selinux_packages: + - python3-libselinux +test_deps_tripleo_packages: + - python3-tripleoclient + - python3-openstacksdk + - centos-stream-release +test_deps_tripleo_repos: current-tripleo diff --git a/tripleo_ansible/roles/tripleo_cephadm/tasks/pre.yaml b/tripleo_ansible/roles/tripleo_cephadm/tasks/pre.yaml index c31de69b0..5b7a4efa0 100644 --- a/tripleo_ansible/roles/tripleo_cephadm/tasks/pre.yaml +++ b/tripleo_ansible/roles/tripleo_cephadm/tasks/pre.yaml @@ -19,6 +19,7 @@ package: name: cephadm state: latest + releasever: "{{ ansible_facts['distribution_major_version'] }}" when: - tripleo_cephadm_predeployed | bool diff --git a/tripleo_ansible/roles/tripleo_clients_install/tasks/main.yml b/tripleo_ansible/roles/tripleo_clients_install/tasks/main.yml index 69578fe1a..c567bb975 100644 --- a/tripleo_ansible/roles/tripleo_clients_install/tasks/main.yml +++ b/tripleo_ansible/roles/tripleo_clients_install/tasks/main.yml @@ -54,6 +54,7 @@ package: name: "{{ pkg.value }}" state: "{{ pkg.key }}" + releasever: "{{ ansible_facts['distribution_major_version'] }}" when: - (pkg.value | length) > 0 loop: "{{ client_package_facts | dict2items }}" diff --git a/tripleo_ansible/roles/tripleo_collectd/molecule/amqp_connection/molecule.yml b/tripleo_ansible/roles/tripleo_collectd/molecule/amqp_connection/molecule.yml index 7fcfa0721..c2d5de1f1 100644 --- a/tripleo_ansible/roles/tripleo_collectd/molecule/amqp_connection/molecule.yml +++ b/tripleo_ansible/roles/tripleo_collectd/molecule/amqp_connection/molecule.yml @@ -5,13 +5,14 @@ driver: platforms: - name: collectd-test hostname: collectd-test - image: centos/centos:stream8 + image: ubi9/ubi-init registry: - url: quay.io + url: registry.access.redhat.com volumes: - /etc/ci/mirror_info.sh:/etc/ci/mirror_info.sh:ro - # Had to comment this out or I get "No URLs in mirrorlist" - #- /etc/dnf/vars:/etc/dnf/vars + - /etc/pki/rpm-gpg:/etc/pki/rpm-gpg + - /opt/yum.repos.d:/etc/yum.repos.d:rw + - /etc/dnf/vars:/etc/dnf/vars privileged: true environment: &env http_proxy: "{{ lookup('env', 'http_proxy') }}" diff --git a/tripleo_ansible/roles/tripleo_collectd/molecule/amqp_default_interval/molecule.yml b/tripleo_ansible/roles/tripleo_collectd/molecule/amqp_default_interval/molecule.yml index 7fcfa0721..c2d5de1f1 100644 --- a/tripleo_ansible/roles/tripleo_collectd/molecule/amqp_default_interval/molecule.yml +++ b/tripleo_ansible/roles/tripleo_collectd/molecule/amqp_default_interval/molecule.yml @@ -5,13 +5,14 @@ driver: platforms: - name: collectd-test hostname: collectd-test - image: centos/centos:stream8 + image: ubi9/ubi-init registry: - url: quay.io + url: registry.access.redhat.com volumes: - /etc/ci/mirror_info.sh:/etc/ci/mirror_info.sh:ro - # Had to comment this out or I get "No URLs in mirrorlist" - #- /etc/dnf/vars:/etc/dnf/vars + - /etc/pki/rpm-gpg:/etc/pki/rpm-gpg + - /opt/yum.repos.d:/etc/yum.repos.d:rw + - /etc/dnf/vars:/etc/dnf/vars privileged: true environment: &env http_proxy: "{{ lookup('env', 'http_proxy') }}" diff --git a/tripleo_ansible/roles/tripleo_collectd/molecule/collectd_connection/molecule.yml b/tripleo_ansible/roles/tripleo_collectd/molecule/collectd_connection/molecule.yml index 304306699..14b4695fd 100644 --- a/tripleo_ansible/roles/tripleo_collectd/molecule/collectd_connection/molecule.yml +++ b/tripleo_ansible/roles/tripleo_collectd/molecule/collectd_connection/molecule.yml @@ -9,13 +9,14 @@ driver: platforms: - name: collectd-test hostname: collectd-test - image: centos/centos:stream8 + image: ubi9/ubi-init registry: - url: quay.io + url: registry.access.redhat.com volumes: - /etc/ci/mirror_info.sh:/etc/ci/mirror_info.sh:ro - # Had to comment this out or I get "No URLs in mirrorlist" - #- /etc/dnf/vars:/etc/dnf/vars + - /etc/pki/rpm-gpg:/etc/pki/rpm-gpg + - /opt/yum.repos.d:/etc/yum.repos.d:rw + - /etc/dnf/vars:/etc/dnf/vars privileged: true environment: &env http_proxy: "{{ lookup('env', 'http_proxy') }}" @@ -33,9 +34,9 @@ platforms: ipv4_address: "192.168.42.1" - name: collectd-server hostname: collectd-server - image: centos/centos:stream8 + image: ubi9/ubi-init registry: - url: quay.io + url: registry.access.redhat.com volumes: - /etc/ci/mirror_info.sh:/etc/ci/mirror_info.sh:ro privileged: true diff --git a/tripleo_ansible/roles/tripleo_collectd/molecule/common/prepare.yml b/tripleo_ansible/roles/tripleo_collectd/molecule/common/prepare.yml index 9891f925c..bdbde002c 100644 --- a/tripleo_ansible/roles/tripleo_collectd/molecule/common/prepare.yml +++ b/tripleo_ansible/roles/tripleo_collectd/molecule/common/prepare.yml @@ -19,48 +19,29 @@ hosts: - collectd-test - collectd-server + roles: + - role: test_deps + test_deps_setup_tripleo: true + test_deps_setup_stream: true + test_deps_extra_packages: + - collectd + - collectd-amqp1 + - collectd-disk + - collectd-hugepages + # for collectdctl + - collectd-utils + # enable_stf + - collectd-connectivity + - collectd-ipmi + - collectd-procevent + - collectd-rdt + # enable_sqlalchemy + - collectd-python + - python3-sqlalchemy-collectd + # libpodstats + - collectd-libpod-stats + - procps-ng tasks: - - name: "Enable delorean repos" - command: | - dnf config-manager --add-repo https://trunk.rdoproject.org/centos{{ ansible_facts['distribution_major_version'] }}/current/delorean.repo - args: - warn: false - - - name: "Install tripleo-repos" - package: - name: "python*tripleo-repos" - state: present - - - name: "Set-up tripleo-repos" - command: | - tripleo-repos -b master current-tripleo - - - name: "Install collectd plugin packages" - package: - name: - - collectd - - collectd-amqp1 - - collectd-disk - - collectd-hugepages - # for collectdctl - - collectd-utils - # enable_stf - - collectd-connectivity - - collectd-ipmi - - collectd-procevent - - collectd-rdt - # enable_sqlalchemy - - collectd-python - - python3-sqlalchemy-collectd - # libpodstats - - collectd-libpod-stats - state: present - - - name: "Install pkill" - package: - name: - - procps-ng - - name: "Create a directory for the log file" file: path: /var/log/collectd/ diff --git a/tripleo_ansible/roles/tripleo_collectd/molecule/default/molecule.yml b/tripleo_ansible/roles/tripleo_collectd/molecule/default/molecule.yml index a864056a5..b61393509 100644 --- a/tripleo_ansible/roles/tripleo_collectd/molecule/default/molecule.yml +++ b/tripleo_ansible/roles/tripleo_collectd/molecule/default/molecule.yml @@ -5,14 +5,14 @@ driver: platforms: - name: collectd-test hostname: collectd-test - image: centos/centos:stream8 + image: ubi9/ubi-init registry: - url: quay.io + url: registry.access.redhat.com volumes: - /etc/ci/mirror_info.sh:/etc/ci/mirror_info.sh:ro - /etc/pki/rpm-gpg:/etc/pki/rpm-gpg - # Had to comment this out or I get "No URLs in mirrorlist" - #- /etc/dnf/vars:/etc/dnf/vars + - /opt/yum.repos.d:/etc/yum.repos.d:rw + - /etc/dnf/vars:/etc/dnf/vars privileged: true environment: &env http_proxy: "{{ lookup('env', 'http_proxy') }}" diff --git a/tripleo_ansible/roles/tripleo_collectd/molecule/enable_libpodstats/molecule.yml b/tripleo_ansible/roles/tripleo_collectd/molecule/enable_libpodstats/molecule.yml index 7fcfa0721..c2d5de1f1 100644 --- a/tripleo_ansible/roles/tripleo_collectd/molecule/enable_libpodstats/molecule.yml +++ b/tripleo_ansible/roles/tripleo_collectd/molecule/enable_libpodstats/molecule.yml @@ -5,13 +5,14 @@ driver: platforms: - name: collectd-test hostname: collectd-test - image: centos/centos:stream8 + image: ubi9/ubi-init registry: - url: quay.io + url: registry.access.redhat.com volumes: - /etc/ci/mirror_info.sh:/etc/ci/mirror_info.sh:ro - # Had to comment this out or I get "No URLs in mirrorlist" - #- /etc/dnf/vars:/etc/dnf/vars + - /etc/pki/rpm-gpg:/etc/pki/rpm-gpg + - /opt/yum.repos.d:/etc/yum.repos.d:rw + - /etc/dnf/vars:/etc/dnf/vars privileged: true environment: &env http_proxy: "{{ lookup('env', 'http_proxy') }}" diff --git a/tripleo_ansible/roles/tripleo_collectd/molecule/enable_sensubility/molecule.yml b/tripleo_ansible/roles/tripleo_collectd/molecule/enable_sensubility/molecule.yml index 7fcfa0721..c2d5de1f1 100644 --- a/tripleo_ansible/roles/tripleo_collectd/molecule/enable_sensubility/molecule.yml +++ b/tripleo_ansible/roles/tripleo_collectd/molecule/enable_sensubility/molecule.yml @@ -5,13 +5,14 @@ driver: platforms: - name: collectd-test hostname: collectd-test - image: centos/centos:stream8 + image: ubi9/ubi-init registry: - url: quay.io + url: registry.access.redhat.com volumes: - /etc/ci/mirror_info.sh:/etc/ci/mirror_info.sh:ro - # Had to comment this out or I get "No URLs in mirrorlist" - #- /etc/dnf/vars:/etc/dnf/vars + - /etc/pki/rpm-gpg:/etc/pki/rpm-gpg + - /opt/yum.repos.d:/etc/yum.repos.d:rw + - /etc/dnf/vars:/etc/dnf/vars privileged: true environment: &env http_proxy: "{{ lookup('env', 'http_proxy') }}" diff --git a/tripleo_ansible/roles/tripleo_collectd/molecule/enable_sqlalchemy/molecule.yml b/tripleo_ansible/roles/tripleo_collectd/molecule/enable_sqlalchemy/molecule.yml index 7fcfa0721..c2d5de1f1 100644 --- a/tripleo_ansible/roles/tripleo_collectd/molecule/enable_sqlalchemy/molecule.yml +++ b/tripleo_ansible/roles/tripleo_collectd/molecule/enable_sqlalchemy/molecule.yml @@ -5,13 +5,14 @@ driver: platforms: - name: collectd-test hostname: collectd-test - image: centos/centos:stream8 + image: ubi9/ubi-init registry: - url: quay.io + url: registry.access.redhat.com volumes: - /etc/ci/mirror_info.sh:/etc/ci/mirror_info.sh:ro - # Had to comment this out or I get "No URLs in mirrorlist" - #- /etc/dnf/vars:/etc/dnf/vars + - /etc/pki/rpm-gpg:/etc/pki/rpm-gpg + - /opt/yum.repos.d:/etc/yum.repos.d:rw + - /etc/dnf/vars:/etc/dnf/vars privileged: true environment: &env http_proxy: "{{ lookup('env', 'http_proxy') }}" diff --git a/tripleo_ansible/roles/tripleo_collectd/molecule/enable_stf/molecule.yml b/tripleo_ansible/roles/tripleo_collectd/molecule/enable_stf/molecule.yml index 7fcfa0721..c2d5de1f1 100644 --- a/tripleo_ansible/roles/tripleo_collectd/molecule/enable_stf/molecule.yml +++ b/tripleo_ansible/roles/tripleo_collectd/molecule/enable_stf/molecule.yml @@ -5,13 +5,14 @@ driver: platforms: - name: collectd-test hostname: collectd-test - image: centos/centos:stream8 + image: ubi9/ubi-init registry: - url: quay.io + url: registry.access.redhat.com volumes: - /etc/ci/mirror_info.sh:/etc/ci/mirror_info.sh:ro - # Had to comment this out or I get "No URLs in mirrorlist" - #- /etc/dnf/vars:/etc/dnf/vars + - /etc/pki/rpm-gpg:/etc/pki/rpm-gpg + - /opt/yum.repos.d:/etc/yum.repos.d:rw + - /etc/dnf/vars:/etc/dnf/vars privileged: true environment: &env http_proxy: "{{ lookup('env', 'http_proxy') }}" diff --git a/tripleo_ansible/roles/tripleo_container_manage/molecule/default/molecule.yml b/tripleo_ansible/roles/tripleo_container_manage/molecule/default/molecule.yml index fbccedf48..d970bb144 100644 --- a/tripleo_ansible/roles/tripleo_container_manage/molecule/default/molecule.yml +++ b/tripleo_ansible/roles/tripleo_container_manage/molecule/default/molecule.yml @@ -12,7 +12,7 @@ provisioner: instance: ansible_host: localhost ansible_connection: local - ansible_distribution: centos8 + ansible_distribution: centos9 log: true env: ANSIBLE_STDOUT_CALLBACK: yaml diff --git a/tripleo_ansible/roles/tripleo_keystone_resources/molecule/default/prepare.yml b/tripleo_ansible/roles/tripleo_keystone_resources/molecule/default/prepare.yml index 71cac84e3..ff55b4692 100644 --- a/tripleo_ansible/roles/tripleo_keystone_resources/molecule/default/prepare.yml +++ b/tripleo_ansible/roles/tripleo_keystone_resources/molecule/default/prepare.yml @@ -32,7 +32,7 @@ - python3-openstacksdk - python3-openstackclient - python3-keystoneclient - - ansible + - ansible-core - ansible-collections-openstack - name: Build keystone container diff --git a/tripleo_ansible/roles/tripleo_metrics_qdr/molecule/common/prepare.yml b/tripleo_ansible/roles/tripleo_metrics_qdr/molecule/common/prepare.yml index 7955a503f..1e5f53106 100644 --- a/tripleo_ansible/roles/tripleo_metrics_qdr/molecule/common/prepare.yml +++ b/tripleo_ansible/roles/tripleo_metrics_qdr/molecule/common/prepare.yml @@ -2,7 +2,6 @@ - name: Prepare hosts: centos tasks: - - name: "Enable delorean repos" command: | dnf config-manager --add-repo https://trunk.rdoproject.org/centos{{ ansible_facts['distribution_major_version'] }}/current/delorean.repo diff --git a/tripleo_ansible/roles/tripleo_metrics_qdr/molecule/controller-mesh-edge-node/molecule.yml b/tripleo_ansible/roles/tripleo_metrics_qdr/molecule/controller-mesh-edge-node/molecule.yml index beb0d0172..c4686990d 100644 --- a/tripleo_ansible/roles/tripleo_metrics_qdr/molecule/controller-mesh-edge-node/molecule.yml +++ b/tripleo_ansible/roles/tripleo_metrics_qdr/molecule/controller-mesh-edge-node/molecule.yml @@ -5,11 +5,11 @@ driver: log: true platforms: - - name: centos - hostname: centos - image: centos/centos:stream8 + - name: ubi + hostname: ubi + image: ubi9/ubi-init registry: - url: quay.io + url: registry.access.redhat.com pkg_extras: python*setuptools volumes: - /etc/ci/mirror_info.sh:/etc/ci/mirror_info.sh:ro @@ -29,7 +29,7 @@ provisioner: hosts: all: hosts: - centos: + ubi: ansible_python_interpreter: /usr/bin/python3 vars: ansible_user: root diff --git a/tripleo_ansible/roles/tripleo_metrics_qdr/molecule/controller-mesh-interior-node/molecule.yml b/tripleo_ansible/roles/tripleo_metrics_qdr/molecule/controller-mesh-interior-node/molecule.yml index ff06cd591..9e54a227b 100644 --- a/tripleo_ansible/roles/tripleo_metrics_qdr/molecule/controller-mesh-interior-node/molecule.yml +++ b/tripleo_ansible/roles/tripleo_metrics_qdr/molecule/controller-mesh-interior-node/molecule.yml @@ -5,11 +5,11 @@ driver: log: true platforms: - - name: centos - hostname: centos - image: centos/centos:stream8 + - name: ubi + hostname: ubi + image: ubi9/ubi-init registry: - url: quay.io + url: registry.access.redhat.com pkg_extras: python*setuptools volumes: - /etc/ci/mirror_info.sh:/etc/ci/mirror_info.sh:ro @@ -29,7 +29,7 @@ provisioner: hosts: all: hosts: - centos: + ubi: ansible_python_interpreter: /usr/bin/python3 vars: ansible_user: root diff --git a/tripleo_ansible/roles/tripleo_metrics_qdr/molecule/default/molecule.yml b/tripleo_ansible/roles/tripleo_metrics_qdr/molecule/default/molecule.yml index 728a60179..2a4f5529b 100644 --- a/tripleo_ansible/roles/tripleo_metrics_qdr/molecule/default/molecule.yml +++ b/tripleo_ansible/roles/tripleo_metrics_qdr/molecule/default/molecule.yml @@ -5,11 +5,11 @@ driver: log: true platforms: - - name: centos - hostname: centos - image: centos/centos:stream8 + - name: ubi + hostname: ubi + image: ubi9/ubi-init registry: - url: quay.io + url: registry.access.redhat.com pkg_extras: python*setuptools volumes: - /etc/ci/mirror_info.sh:/etc/ci/mirror_info.sh:ro @@ -29,7 +29,7 @@ provisioner: hosts: all: hosts: - centos: + ubi: ansible_python_interpreter: /usr/bin/python3 vars: ansible_user: root diff --git a/tripleo_ansible/roles/tripleo_metrics_qdr/molecule/internal-tls/molecule.yml b/tripleo_ansible/roles/tripleo_metrics_qdr/molecule/internal-tls/molecule.yml index f94cb2309..3218840f4 100644 --- a/tripleo_ansible/roles/tripleo_metrics_qdr/molecule/internal-tls/molecule.yml +++ b/tripleo_ansible/roles/tripleo_metrics_qdr/molecule/internal-tls/molecule.yml @@ -5,11 +5,11 @@ driver: log: true platforms: - - name: centos - hostname: centos - image: centos/centos:stream8 + - name: ubi + hostname: ubi + image: ubi9/ubi-init registry: - url: quay.io + url: registry.access.redhat.com pkg_extras: python*setuptools volumes: - /etc/ci/mirror_info.sh:/etc/ci/mirror_info.sh:ro @@ -30,7 +30,7 @@ provisioner: hosts: all: hosts: - centos: + ubi: ansible_python_interpreter: /usr/bin/python3 vars: ansible_user: root diff --git a/tripleo_ansible/roles/tripleo_nvdimm/molecule/default/prepare.yml b/tripleo_ansible/roles/tripleo_nvdimm/molecule/default/prepare.yml index 1be7a52da..d44cc0342 100644 --- a/tripleo_ansible/roles/tripleo_nvdimm/molecule/default/prepare.yml +++ b/tripleo_ansible/roles/tripleo_nvdimm/molecule/default/prepare.yml @@ -25,3 +25,4 @@ test_deps_setup_stream: true test_deps_extra_packages: - jq + - ndctl diff --git a/tripleo_ansible/roles/tripleo_nvdimm/tasks/main.yml b/tripleo_ansible/roles/tripleo_nvdimm/tasks/main.yml index 7464a185e..3198aa785 100644 --- a/tripleo_ansible/roles/tripleo_nvdimm/tasks/main.yml +++ b/tripleo_ansible/roles/tripleo_nvdimm/tasks/main.yml @@ -35,6 +35,7 @@ package: name: "{{ pkgs }}" state: present + releasever: "{{ ansible_facts['distribution_major_version'] }}" vars: pkgs: - ndctl diff --git a/tripleo_ansible/roles/tripleo_ovs_dpdk/molecule/default/prepare.yml b/tripleo_ansible/roles/tripleo_ovs_dpdk/molecule/default/prepare.yml index a968b40f0..3ca7bdd8e 100644 --- a/tripleo_ansible/roles/tripleo_ovs_dpdk/molecule/default/prepare.yml +++ b/tripleo_ansible/roles/tripleo_ovs_dpdk/molecule/default/prepare.yml @@ -23,14 +23,10 @@ test_deps_setup_stream: true roles: - role: test_deps + test_deps_extra_packages: + - openvswitch + - libibverbs post_tasks: - - name: Install ovs - package: - name: - - openvswitch - - libibverbs - state: present - - name: Create ovs runtime directories file: path: "{{ item }}" diff --git a/tripleo_ansible/roles/tripleo_ovs_dpdk/molecule/positive/prepare.yml b/tripleo_ansible/roles/tripleo_ovs_dpdk/molecule/positive/prepare.yml index a968b40f0..3ca7bdd8e 100644 --- a/tripleo_ansible/roles/tripleo_ovs_dpdk/molecule/positive/prepare.yml +++ b/tripleo_ansible/roles/tripleo_ovs_dpdk/molecule/positive/prepare.yml @@ -23,14 +23,10 @@ test_deps_setup_stream: true roles: - role: test_deps + test_deps_extra_packages: + - openvswitch + - libibverbs post_tasks: - - name: Install ovs - package: - name: - - openvswitch - - libibverbs - state: present - - name: Create ovs runtime directories file: path: "{{ item }}" diff --git a/tripleo_ansible/roles/tripleo_packages/molecule/default/molecule.yml b/tripleo_ansible/roles/tripleo_packages/molecule/default/molecule.yml index 93c201a14..4cd937f29 100644 --- a/tripleo_ansible/roles/tripleo_packages/molecule/default/molecule.yml +++ b/tripleo_ansible/roles/tripleo_packages/molecule/default/molecule.yml @@ -7,9 +7,9 @@ log: true platforms: - name: centos hostname: centos - image: centos/centos:stream8 + image: ubi9/ubi-init registry: - url: quay.io + url: registry.access.redhat.com dockerfile: Dockerfile pkg_extras: python*setuptools command: /sbin/init diff --git a/tripleo_ansible/roles/tripleo_packages/molecule/external_upgrade/molecule.yml b/tripleo_ansible/roles/tripleo_packages/molecule/external_upgrade/molecule.yml index 93c201a14..4cd937f29 100644 --- a/tripleo_ansible/roles/tripleo_packages/molecule/external_upgrade/molecule.yml +++ b/tripleo_ansible/roles/tripleo_packages/molecule/external_upgrade/molecule.yml @@ -7,9 +7,9 @@ log: true platforms: - name: centos hostname: centos - image: centos/centos:stream8 + image: ubi9/ubi-init registry: - url: quay.io + url: registry.access.redhat.com dockerfile: Dockerfile pkg_extras: python*setuptools command: /sbin/init diff --git a/tripleo_ansible/roles/tripleo_packages/molecule/ffu/molecule.yml b/tripleo_ansible/roles/tripleo_packages/molecule/ffu/molecule.yml index 615479724..0d69d2109 100644 --- a/tripleo_ansible/roles/tripleo_packages/molecule/ffu/molecule.yml +++ b/tripleo_ansible/roles/tripleo_packages/molecule/ffu/molecule.yml @@ -7,9 +7,9 @@ log: true platforms: - name: centos hostname: centos - image: centos/centos:stream8 + image: ubi9/ubi-init registry: - url: quay.io + url: registry.access.redhat.com dockerfile: Dockerfile pkg_extras: python*setuptools command: /sbin/init diff --git a/tripleo_ansible/roles/tripleo_packages/molecule/update/molecule.yml b/tripleo_ansible/roles/tripleo_packages/molecule/update/molecule.yml index 43a22996f..0ed891021 100644 --- a/tripleo_ansible/roles/tripleo_packages/molecule/update/molecule.yml +++ b/tripleo_ansible/roles/tripleo_packages/molecule/update/molecule.yml @@ -7,9 +7,9 @@ log: true platforms: - name: centos hostname: centos - image: centos/centos:stream8 + image: ubi9/ubi-init registry: - url: quay.io + url: registry.access.redhat.com dockerfile: Dockerfile pkg_extras: python*setuptools command: >- diff --git a/tripleo_ansible/roles/tripleo_podman/molecule/default/prepare.yml b/tripleo_ansible/roles/tripleo_podman/molecule/default/prepare.yml index 09358dfd9..9b2128a5d 100644 --- a/tripleo_ansible/roles/tripleo_podman/molecule/default/prepare.yml +++ b/tripleo_ansible/roles/tripleo_podman/molecule/default/prepare.yml @@ -33,6 +33,8 @@ - ansible_user_dir is undefined roles: - role: test_deps + test_deps_extra_packages: + - runc post_tasks: - name: pull an image containers.podman.podman_image: diff --git a/tripleo_ansible/roles/tripleo_update_trusted_cas/molecule/default/Dockerfile b/tripleo_ansible/roles/tripleo_update_trusted_cas/molecule/default/Dockerfile deleted file mode 100644 index 8fc73a838..000000000 --- a/tripleo_ansible/roles/tripleo_update_trusted_cas/molecule/default/Dockerfile +++ /dev/null @@ -1,37 +0,0 @@ -# Molecule managed -# Copyright 2020 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"] diff --git a/tripleo_ansible/roles/tripleo_update_trusted_cas/molecule/default/molecule.yml b/tripleo_ansible/roles/tripleo_update_trusted_cas/molecule/default/molecule.yml index 80776b911..20d7e2005 100644 --- a/tripleo_ansible/roles/tripleo_update_trusted_cas/molecule/default/molecule.yml +++ b/tripleo_ansible/roles/tripleo_update_trusted_cas/molecule/default/molecule.yml @@ -2,42 +2,13 @@ driver: name: podman -log: true - -platforms: - - name: centos7 - hostname: centos7 - image: centos:7 - dockerfile: Dockerfile - pkg_extras: python-setuptools cronie rsyslog - easy_install: - - pip - environment: &env - http_proxy: "{{ lookup('env', 'http_proxy') }}" - https_proxy: "{{ lookup('env', 'https_proxy') }}" - command: /sbin/init - volumes: - - /etc/ci/mirror_info.sh:/etc/ci/mirror_info.sh:ro - privileged: true - ulimits: &ulimit - - host - - - name: stream8 - hostname: stream8 - image: quay.io/centos/centos:stream8 - dockerfile: Dockerfile - pkg_extras: python*-setuptools cronie rsyslog - environment: - http_proxy: "{{ lookup('env', 'http_proxy') }}" - https_proxy: "{{ lookup('env', 'https_proxy') }}" - command: /sbin/init - volumes: - - /etc/ci/mirror_info.sh:/etc/ci/mirror_info.sh:ro - - /etc/dnf/vars:/etc/dnf/vars - privileged: true - ulimits: *ulimit - provisioner: + inventory: + hosts: + all: + hosts: + centos: + ansible_python_interpreter: /usr/bin/python3 name: ansible log: true env: diff --git a/tripleo_ansible/roles/tripleo_validations_package/tasks/main.yml b/tripleo_ansible/roles/tripleo_validations_package/tasks/main.yml index fe506dd0e..529b5b13d 100644 --- a/tripleo_ansible/roles/tripleo_validations_package/tasks/main.yml +++ b/tripleo_ansible/roles/tripleo_validations_package/tasks/main.yml @@ -18,6 +18,7 @@ package: name: 'openstack-tripleo-validations' state: installed + releasever: "{{ ansible_facts['distribution_major_version'] }}" - name: Set group name fact set_fact: diff --git a/zuul.d/base.yaml b/zuul.d/base.yaml index 573dd9bba..1decef32d 100644 --- a/zuul.d/base.yaml +++ b/zuul.d/base.yaml @@ -2,7 +2,7 @@ - job: description: Base tripleo-ansible job name: tripleo-ansible-centos-stream-base - nodeset: centos-8-stream + nodeset: centos-9-stream parent: base success-url: "reports.html" failure-url: "reports.html" diff --git a/zuul.d/molecule.yaml b/zuul.d/molecule.yaml index a772457c6..08c668cc6 100644 --- a/zuul.d/molecule.yaml +++ b/zuul.d/molecule.yaml @@ -214,6 +214,9 @@ - ^tripleo_ansible/roles/backup_and_restore/(?!meta).* name: tripleo-ansible-centos-stream-molecule-backup_and_restore parent: tripleo-ansible-centos-stream-base + # Note(ChandanKumar): Marking this job to non-voting due to + # https://bugs.launchpad.net/tripleo/+bug/1980198 + voting: false vars: tripleo_role_name: backup_and_restore - job: @@ -272,6 +275,9 @@ - ^tox.ini name: tripleo-ansible-centos-stream-molecule-tripleo-modules parent: tripleo-ansible-centos-stream-base + # Note(ChandanKumar): Marking this job as non-voting due + # to https://bugs.launchpad.net/tripleo/+bug/1979807 + voting: false - job: files: - ^tripleo_ansible/roles/tripleo_bootstrap/(?!meta).* @@ -326,8 +332,13 @@ parent: tripleo-ansible-centos-stream-base pre-run: zuul.d/playbooks/enable-fips.yml timeout: 7200 + # Note(ChandanKumar): Marking this job as non-voting + # due to https://bugs.launchpad.net/tripleo/+bug/1979972 + voting: false vars: tripleo_role_name: tripleo_collectd + nslookup_target: 'opendev.org' + enable_fips: True - job: files: - ^tripleo_ansible/roles/tripleo_config/(?!meta).* @@ -362,6 +373,9 @@ - ^tripleo_ansible/ansible_plugins/modules/container_startup_config.py$ name: tripleo-ansible-centos-stream-molecule-tripleo_container_manage parent: tripleo-ansible-centos-stream-base + # Note(ChandanKumar): Marking this job to non-voting + # due to https://bugs.launchpad.net/tripleo/+bug/1979810 + voting: false vars: tripleo_role_name: tripleo_container_manage - job: @@ -601,6 +615,9 @@ - ^tripleo_ansible/roles/tripleo_redhat_enforce/(?!meta).* name: tripleo-ansible-centos-stream-molecule-tripleo_redhat_enforce parent: tripleo-ansible-centos-stream-base + # Note(chandankumar): Marking this job non-voting due + # to https://bugs.launchpad.net/tripleo/+bug/1979971 + voting: false vars: tox_envlist: mol-tripleo_redhat_enforce - job: @@ -665,6 +682,9 @@ - ^tripleo_ansible/roles/tripleo_update_trusted_cas/(?!meta).* name: tripleo-ansible-centos-stream-molecule-tripleo_update_trusted_cas parent: tripleo-ansible-centos-stream-base + # Note(ChandanKumar): Marking this job non-voting + # due to https://bugs.launchpad.net/tripleo/+bug/1979807 + voting: false vars: tox_envlist: mol-tripleo_update_trusted_cas - job: @@ -699,7 +719,7 @@ - ^zuul.d/playbooks/.* - ^zuul.d/molecule.yaml name: tripleo-ansible-centos-stream-role-addition - nodeset: centos-8-stream + nodeset: centos-9-stream parent: tox run: - zuul.d/playbooks/run-tox.yml diff --git a/zuul.d/playbooks/pre.yml b/zuul.d/playbooks/pre.yml index 10d86cc65..b738dbcbb 100644 --- a/zuul.d/playbooks/pre.yml +++ b/zuul.d/playbooks/pre.yml @@ -22,13 +22,6 @@ virtualenv_command: "{{ ensure_pip_virtualenv_command }}" virtualenv_site_packages: true - - name: Set containers module to 3.0 - become: true - shell: | - dnf module disable container-tools:rhel8 -y - dnf module enable container-tools:3.0 -y - dnf clean metadata - - name: Run bindep shell: |- . {{ ansible_user_dir }}/test-python/bin/activate @@ -37,9 +30,10 @@ - name: Ensure a recent version of pip is installed in virtualenv pip: - name: "pip>=19.1.1" + name: "pip<20.3.0" virtualenv: "{{ ansible_user_dir }}/test-python" virtualenv_command: "{{ ensure_pip_virtualenv_command }}" + state: latest - name: Setup test-python pip: