Use ubi9-init image as base

CentOS-8 no longer exists and existing jobs are running
on centos-stream-8. There will be no openstack master
rpm packages for centos-stream-8.

In order to use ubi9-init image in molecule jobs,
we need to include following workarounds:
- redhat-release package(RH specific package) is installed in ubi-init
  which does not work with centos-stream package.
  On removing redhat-release, dnf ansible breaks as they did not find
  --releasever during package installation.
  - By adding releasever in the package module fixes the issue.
- In Molecule job, we can use any hostname either of centos or ubi both
  will work.
- It changes the nodeset and image to ubi9.
- Install pip < 20.3.0 to avoid https://pip.pypa.io/en/stable/topics/dependency-resolution/#backtracking
  and upstream requirements file to avoid cyclic dependency
  issue.
- Set enable_fips: true in collectd jobs as in molecule it is not
  needed otherwise job will enter into retry_limit.

We cannot use centos:stream9 image as, init support is removed
from there.

Below is the list of following jobs marked non-voting
due to following bugs.
- tripleo-ansible-centos-stream-molecule-tripleo_update_trusted_cas
  - https://bugs.launchpad.net/tripleo/+bug/1979807
- tripleo-ansible-centos-stream-molecule-tripleo-modules
  - https://bugs.launchpad.net/tripleo/+bug/1979807
- tripleo-ansible-centos-stream-molecule-tripleo_container_manage
  - https://bugs.launchpad.net/tripleo/+bug/1979810
- tripleo-ansible-centos-stream-molecule-tripleo_redhat_enforce
  - https://bugs.launchpad.net/tripleo/+bug/1979971
- tripleo-ansible-centos-stream-molecule-tripleo_collectd
  - https://bugs.launchpad.net/tripleo/+bug/1979972
- tripleo-ansible-centos-stream-molecule-backup_and_restore
  - https://bugs.launchpad.net/tripleo/+bug/1980198

Note: It is not a clean cherry pick.
- Remove cap from molecule dependency
  to fix No module named 'ansiblelint.prerun'
- Populate wallaby repos using tripleo-repos tool
- This includes the commit 0bc2fa808d
  which fixed the issue with the original change in master.
- Marking tripleo-ansible-centos-stream-molecule-tripleo_packages
  to non-voting due to
  https://bugs.launchpad.net/tripleo/+bug/1983347

Related-Bug: #1979807
Related-Bug: #1979810
Related-Bug: #1979971
Related-Bug: #1979972
Related-Bug: #1980198
Related-Bug: #1983347

Signed-off-by: Chandan Kumar (raukadah) <chkumar@redhat.com>
Change-Id: I75a27ca496fb7670ba22a6a22f62f001c8afe6a9
(cherry picked from commit 4c9233d07c)
This commit is contained in:
Chandan Kumar (raukadah) 2022-05-30 09:45:42 +05:30
parent 89ca763607
commit b666c78954
46 changed files with 274 additions and 231 deletions

View File

@ -3,9 +3,9 @@ log: true
platforms: platforms:
- name: centos - name: centos
hostname: centos hostname: centos
image: centos/centos:stream8 image: ubi9/ubi-init
registry: registry:
url: quay.io url: registry.access.redhat.com
dockerfile: Dockerfile.j2 dockerfile: Dockerfile.j2
pkg_extras: python*setuptools pkg_extras: python*setuptools
volumes: volumes:

View File

@ -7,10 +7,10 @@ log: true
platforms: platforms:
- name: centos - name: centos
hostname: centos hostname: centos
image: centos/centos:stream8 image: centos/centos:stream9
registry: registry:
url: quay.io url: quay.io
dockerfile: Dockerfile dockerfile: Dockerfile.j2
pkg_extras: python*setuptools pkg_extras: python*setuptools
volumes: volumes:
- /etc/ci/mirror_info.sh:/etc/ci/mirror_info.sh:ro - /etc/ci/mirror_info.sh:/etc/ci/mirror_info.sh:ro

View File

@ -21,7 +21,7 @@ openssl-devel [platform:rpm]
podman [platform:rpm] podman [platform:rpm]
python-devel [platform:rpm !platform:rhel-8 !platform:centos-8 !platform:fedora] python-devel [platform:rpm !platform:rhel-8 !platform:centos-8 !platform:fedora]
python3-devel [platform:rpm !platform:rhel-7 !platform:centos-7] 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-pyyaml [platform:rpm !platform:rhel-7 !platform:centos-7]
python3-dnf [platform:rpm !platform:rhel-7 !platform:centos-7] python3-dnf [platform:rpm !platform:rhel-7 !platform:centos-7]

View File

@ -8,7 +8,7 @@ pytest-cov
pytest-html pytest-html
pytest-xdist pytest-xdist
mock mock
molecule>=3.3.4,<3.5 molecule>=3.3.4
molecule-podman>=1.0.0a1 molecule-podman>=1.0.0a1
ruamel.yaml ruamel.yaml
testinfra testinfra

View File

@ -96,8 +96,9 @@ sitepackages = False
[testenv:role-addition] [testenv:role-addition]
basepython = python3 basepython = python3
deps = deps =
{[testenv:linters]deps} {[testenv:linters]deps}
-r {toxinidir}/molecule-requirements.txt -r {toxinidir}/molecule-requirements.txt
-c{env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/wallaby}
commands = commands =
ansible-galaxy install -fr {toxinidir}/tripleo_ansible/ansible-collections-requirements.yml 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" bash -c "ansible-playbook -i localhost, role-addition.yml -e role_name=skeleton_test"

View File

@ -2,22 +2,20 @@
driver: driver:
name: podman name: podman
# It is not discovered by default podman molecule config log: true
# due to different directory structure.
# That's why the config is kept here
platforms: platforms:
- name: centos - name: ubi9
hostname: centos hostname: ubi9
image: centos/centos:stream8 image: ubi9/ubi-init
registry: registry:
url: quay.io url: registry.access.redhat.com
dockerfile: Dockerfile.j2 dockerfile: Dockerfile.j2
pkg_extras: python*setuptools pkg_extras: python*setuptools
volumes: volumes:
- /sys/fs/cgroup:/sys/fs/cgroup:ro
- /etc/ci/mirror_info.sh:/etc/ci/mirror_info.sh:ro - /etc/ci/mirror_info.sh:/etc/ci/mirror_info.sh:ro
- /etc/pki/rpm-gpg:/etc/pki/rpm-gpg - /etc/pki/rpm-gpg:/etc/pki/rpm-gpg
- /opt/yum.repos.d:/etc/yum.repos.d:rw
- /etc/dnf/vars:/etc/dnf/vars - /etc/dnf/vars:/etc/dnf/vars
privileged: true privileged: true
environment: &env environment: &env
@ -32,7 +30,7 @@ provisioner:
hosts: hosts:
all: all:
hosts: hosts:
centos: ubi9:
ansible_python_interpreter: /usr/bin/python3 ansible_python_interpreter: /usr/bin/python3
log: true log: true
env: env:

View File

@ -15,7 +15,7 @@
# under the License. # under the License.
- name: Prepare - name: Prepare
hosts: all hosts: ubi9
roles: roles:
- role: test_deps - role: test_deps
tasks: tasks:

View File

@ -84,8 +84,8 @@
containers.podman.podman_image: containers.podman.podman_image:
name: "{{ item }}" name: "{{ item }}"
with_items: with_items:
- registry.access.redhat.com/ubi8/ubi-minimal - registry.access.redhat.com/ubi9/ubi-minimal
- mysql - docker.io/mysql
- name: Create a data container - name: Create a data container
containers.podman.podman_container: containers.podman.podman_container:

View File

@ -58,6 +58,17 @@
path: /etc/rhsm-host path: /etc/rhsm-host
state: absent 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 - name: Install tripleo-repos package
become: true become: true
package: package:
@ -71,13 +82,33 @@
- test_deps_setup_tripleo | bool - test_deps_setup_tripleo | bool
block: block:
- name: Create tripleo repos - 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 wallaby current-tripleo {{ test_deps_setup_ceph | ternary('ceph', '', omit) }} -b wallaby 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 - name: Install tripleo packages
package: package:
name: "{{ test_deps_tripleo_packages }}" name: "{{ test_deps_tripleo_packages }}"
state: present state: present
releasever: "{{ ansible_facts['distribution_major_version'] }}"
- name: Package block - name: Package block
become: true become: true
@ -86,6 +117,7 @@
package: package:
name: "{{ test_deps_selinux_packages }}" name: "{{ test_deps_selinux_packages }}"
state: present state: present
releasever: "{{ ansible_facts['distribution_major_version'] }}"
when: when:
- (ansible_facts['os_family'] | lower) == 'redhat' - (ansible_facts['os_family'] | lower) == 'redhat'
@ -93,6 +125,7 @@
package: package:
name: "{{ test_deps_yaml_packages }}" name: "{{ test_deps_yaml_packages }}"
state: present state: present
releasever: "{{ ansible_facts['distribution_major_version'] }}"
when: when:
- (ansible_facts['os_family'] | lower) == 'redhat' - (ansible_facts['os_family'] | lower) == 'redhat'
@ -100,5 +133,6 @@
package: package:
name: "{{ test_deps_extra_packages }}" name: "{{ test_deps_extra_packages }}"
state: present state: present
releasever: "{{ ansible_facts['distribution_major_version'] }}"
when: when:
- (test_deps_extra_packages | length) > 0 - (test_deps_extra_packages | length) > 0

View File

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

View File

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

View File

@ -2,6 +2,29 @@
driver: driver:
name: podman name: podman
log: true
platforms:
- name: centos
hostname: centos
image: ubi9/ubi-init
registry:
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
environment: &env
http_proxy: "{{ lookup('env', 'http_proxy') }}"
https_proxy: "{{ lookup('env', 'https_proxy') }}"
ulimits: &ulimit
- host
provisioner: provisioner:
name: ansible name: ansible
inventory: inventory:

View File

@ -14,11 +14,19 @@
# License for the specific language governing permissions and limitations # License for the specific language governing permissions and limitations
# under the License. # under the License.
- name: Gather distribution facts if they don't exist
setup:
gather_subset: distribution
when: ansible_facts['distribution_major_version'] is not defined
tags:
- always
- name: Install cephadm package - name: Install cephadm package
become: true become: true
package: package:
name: cephadm name: cephadm
state: latest state: latest
releasever: "{{ ansible_facts['distribution_major_version'] }}"
when: when:
- tripleo_cephadm_predeployed | bool - tripleo_cephadm_predeployed | bool

View File

@ -54,6 +54,7 @@
package: package:
name: "{{ pkg.value }}" name: "{{ pkg.value }}"
state: "{{ pkg.key }}" state: "{{ pkg.key }}"
releasever: "{{ ansible_facts['distribution_major_version'] }}"
when: when:
- (pkg.value | length) > 0 - (pkg.value | length) > 0
loop: "{{ client_package_facts | dict2items }}" loop: "{{ client_package_facts | dict2items }}"

View File

@ -5,14 +5,14 @@ driver:
platforms: platforms:
- name: collectd-test - name: collectd-test
hostname: collectd-test hostname: collectd-test
image: centos/centos:stream8 image: ubi9/ubi-init
registry: registry:
url: quay.io url: registry.access.redhat.com
pkg_extras: python*setuptools libselinux-python* policycoreutils-python-utils
volumes: volumes:
- /etc/ci/mirror_info.sh:/etc/ci/mirror_info.sh:ro - /etc/ci/mirror_info.sh:/etc/ci/mirror_info.sh:ro
# Had to comment this out or I get "No URLs in mirrorlist" - /etc/pki/rpm-gpg:/etc/pki/rpm-gpg
#- /etc/dnf/vars:/etc/dnf/vars - /opt/yum.repos.d:/etc/yum.repos.d:rw
- /etc/dnf/vars:/etc/dnf/vars
privileged: true privileged: true
environment: &env environment: &env
http_proxy: "{{ lookup('env', 'http_proxy') }}" http_proxy: "{{ lookup('env', 'http_proxy') }}"

View File

@ -5,14 +5,14 @@ driver:
platforms: platforms:
- name: collectd-test - name: collectd-test
hostname: collectd-test hostname: collectd-test
image: centos/centos:stream8 image: ubi9/ubi-init
registry: registry:
url: quay.io url: registry.access.redhat.com
pkg_extras: python*setuptools libselinux-python* policycoreutils-python-utils
volumes: volumes:
- /etc/ci/mirror_info.sh:/etc/ci/mirror_info.sh:ro - /etc/ci/mirror_info.sh:/etc/ci/mirror_info.sh:ro
# Had to comment this out or I get "No URLs in mirrorlist" - /etc/pki/rpm-gpg:/etc/pki/rpm-gpg
#- /etc/dnf/vars:/etc/dnf/vars - /opt/yum.repos.d:/etc/yum.repos.d:rw
- /etc/dnf/vars:/etc/dnf/vars
privileged: true privileged: true
environment: &env environment: &env
http_proxy: "{{ lookup('env', 'http_proxy') }}" http_proxy: "{{ lookup('env', 'http_proxy') }}"

View File

@ -9,14 +9,14 @@ driver:
platforms: platforms:
- name: collectd-test - name: collectd-test
hostname: collectd-test hostname: collectd-test
image: centos/centos:stream8 image: ubi9/ubi-init
registry: registry:
url: quay.io url: registry.access.redhat.com
pkg_extras: python*setuptools libselinux-python* policycoreutils-python-utils
volumes: volumes:
- /etc/ci/mirror_info.sh:/etc/ci/mirror_info.sh:ro - /etc/ci/mirror_info.sh:/etc/ci/mirror_info.sh:ro
# Had to comment this out or I get "No URLs in mirrorlist" - /etc/pki/rpm-gpg:/etc/pki/rpm-gpg
#- /etc/dnf/vars:/etc/dnf/vars - /opt/yum.repos.d:/etc/yum.repos.d:rw
- /etc/dnf/vars:/etc/dnf/vars
privileged: true privileged: true
environment: &env environment: &env
http_proxy: "{{ lookup('env', 'http_proxy') }}" http_proxy: "{{ lookup('env', 'http_proxy') }}"
@ -34,10 +34,9 @@ platforms:
ipv4_address: "192.168.42.1" ipv4_address: "192.168.42.1"
- name: collectd-server - name: collectd-server
hostname: collectd-server hostname: collectd-server
image: centos/centos:stream8 image: ubi9/ubi-init
registry: registry:
url: quay.io url: registry.access.redhat.com
pkg_extras: python*setuptools libselinux-python* policycoreutils-python-utils
volumes: volumes:
- /etc/ci/mirror_info.sh:/etc/ci/mirror_info.sh:ro - /etc/ci/mirror_info.sh:/etc/ci/mirror_info.sh:ro
privileged: true privileged: true

View File

@ -16,42 +16,32 @@
- name: Prepare - name: Prepare
hosts: all 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: tasks:
- name: "Enable delorean repos"
command: |
dnf config-manager --add-repo https://trunk.rdoproject.org/centos{{ ansible_facts['distribution_major_version'] }}/current/delorean.repo
- 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: "Create a directory for the log file" - name: "Create a directory for the log file"
file: file:
path: /var/log/collectd/ path: /var/log/collectd/

View File

@ -5,15 +5,14 @@ driver:
platforms: platforms:
- name: collectd-test - name: collectd-test
hostname: collectd-test hostname: collectd-test
image: centos/centos:stream8 image: ubi9/ubi-init
registry: registry:
url: quay.io url: registry.access.redhat.com
pkg_extras: python*setuptools libselinux-python* policycoreutils-python-utils
volumes: volumes:
- /etc/ci/mirror_info.sh:/etc/ci/mirror_info.sh:ro - /etc/ci/mirror_info.sh:/etc/ci/mirror_info.sh:ro
- /etc/pki/rpm-gpg:/etc/pki/rpm-gpg - /etc/pki/rpm-gpg:/etc/pki/rpm-gpg
# Had to comment this out or I get "No URLs in mirrorlist" - /opt/yum.repos.d:/etc/yum.repos.d:rw
#- /etc/dnf/vars:/etc/dnf/vars - /etc/dnf/vars:/etc/dnf/vars
privileged: true privileged: true
environment: &env environment: &env
http_proxy: "{{ lookup('env', 'http_proxy') }}" http_proxy: "{{ lookup('env', 'http_proxy') }}"

View File

@ -5,14 +5,14 @@ driver:
platforms: platforms:
- name: collectd-test - name: collectd-test
hostname: collectd-test hostname: collectd-test
image: centos/centos:stream8 image: ubi9/ubi-init
registry: registry:
url: quay.io url: registry.access.redhat.com
pkg_extras: python*setuptools libselinux-python* policycoreutils-python-utils
volumes: volumes:
- /etc/ci/mirror_info.sh:/etc/ci/mirror_info.sh:ro - /etc/ci/mirror_info.sh:/etc/ci/mirror_info.sh:ro
# Had to comment this out or I get "No URLs in mirrorlist" - /etc/pki/rpm-gpg:/etc/pki/rpm-gpg
#- /etc/dnf/vars:/etc/dnf/vars - /opt/yum.repos.d:/etc/yum.repos.d:rw
- /etc/dnf/vars:/etc/dnf/vars
privileged: true privileged: true
environment: &env environment: &env
http_proxy: "{{ lookup('env', 'http_proxy') }}" http_proxy: "{{ lookup('env', 'http_proxy') }}"

View File

@ -5,14 +5,14 @@ driver:
platforms: platforms:
- name: collectd-test - name: collectd-test
hostname: collectd-test hostname: collectd-test
image: centos/centos:stream8 image: ubi9/ubi-init
registry: registry:
url: quay.io url: registry.access.redhat.com
pkg_extras: python*setuptools libselinux-python* policycoreutils-python-utils
volumes: volumes:
- /etc/ci/mirror_info.sh:/etc/ci/mirror_info.sh:ro - /etc/ci/mirror_info.sh:/etc/ci/mirror_info.sh:ro
# Had to comment this out or I get "No URLs in mirrorlist" - /etc/pki/rpm-gpg:/etc/pki/rpm-gpg
#- /etc/dnf/vars:/etc/dnf/vars - /opt/yum.repos.d:/etc/yum.repos.d:rw
- /etc/dnf/vars:/etc/dnf/vars
privileged: true privileged: true
environment: &env environment: &env
http_proxy: "{{ lookup('env', 'http_proxy') }}" http_proxy: "{{ lookup('env', 'http_proxy') }}"

View File

@ -5,14 +5,14 @@ driver:
platforms: platforms:
- name: collectd-test - name: collectd-test
hostname: collectd-test hostname: collectd-test
image: centos/centos:stream8 image: ubi9/ubi-init
registry: registry:
url: quay.io url: registry.access.redhat.com
pkg_extras: python*setuptools libselinux-python* policycoreutils-python-utils
volumes: volumes:
- /etc/ci/mirror_info.sh:/etc/ci/mirror_info.sh:ro - /etc/ci/mirror_info.sh:/etc/ci/mirror_info.sh:ro
# Had to comment this out or I get "No URLs in mirrorlist" - /etc/pki/rpm-gpg:/etc/pki/rpm-gpg
#- /etc/dnf/vars:/etc/dnf/vars - /opt/yum.repos.d:/etc/yum.repos.d:rw
- /etc/dnf/vars:/etc/dnf/vars
privileged: true privileged: true
environment: &env environment: &env
http_proxy: "{{ lookup('env', 'http_proxy') }}" http_proxy: "{{ lookup('env', 'http_proxy') }}"

View File

@ -5,14 +5,14 @@ driver:
platforms: platforms:
- name: collectd-test - name: collectd-test
hostname: collectd-test hostname: collectd-test
image: centos/centos:stream8 image: ubi9/ubi-init
registry: registry:
url: quay.io url: registry.access.redhat.com
pkg_extras: python*setuptools libselinux-python* policycoreutils-python-utils
volumes: volumes:
- /etc/ci/mirror_info.sh:/etc/ci/mirror_info.sh:ro - /etc/ci/mirror_info.sh:/etc/ci/mirror_info.sh:ro
# Had to comment this out or I get "No URLs in mirrorlist" - /etc/pki/rpm-gpg:/etc/pki/rpm-gpg
#- /etc/dnf/vars:/etc/dnf/vars - /opt/yum.repos.d:/etc/yum.repos.d:rw
- /etc/dnf/vars:/etc/dnf/vars
privileged: true privileged: true
environment: &env environment: &env
http_proxy: "{{ lookup('env', 'http_proxy') }}" http_proxy: "{{ lookup('env', 'http_proxy') }}"

View File

@ -12,7 +12,7 @@ provisioner:
instance: instance:
ansible_host: localhost ansible_host: localhost
ansible_connection: local ansible_connection: local
ansible_distribution: centos8 ansible_distribution: centos9
log: true log: true
env: env:
ANSIBLE_STDOUT_CALLBACK: yaml ANSIBLE_STDOUT_CALLBACK: yaml

View File

@ -32,7 +32,7 @@
- python3-openstacksdk - python3-openstacksdk
- python3-openstackclient - python3-openstackclient
- python3-keystoneclient - python3-keystoneclient
- ansible - ansible-core
- ansible-collections-openstack - ansible-collections-openstack
- name: Build keystone container - name: Build keystone container

View File

@ -2,7 +2,6 @@
- name: Prepare - name: Prepare
hosts: all hosts: all
tasks: tasks:
- name: "Enable delorean repos" - name: "Enable delorean repos"
command: | command: |
dnf config-manager --add-repo https://trunk.rdoproject.org/centos{{ ansible_facts['distribution_major_version'] }}/current/delorean.repo dnf config-manager --add-repo https://trunk.rdoproject.org/centos{{ ansible_facts['distribution_major_version'] }}/current/delorean.repo

View File

@ -5,11 +5,11 @@ driver:
log: true log: true
platforms: platforms:
- name: centos - name: ubi
hostname: centos hostname: ubi
image: centos/centos:stream8 image: ubi9/ubi-init
registry: registry:
url: quay.io url: registry.access.redhat.com
pkg_extras: python*setuptools pkg_extras: python*setuptools
volumes: volumes:
- /etc/ci/mirror_info.sh:/etc/ci/mirror_info.sh:ro - /etc/ci/mirror_info.sh:/etc/ci/mirror_info.sh:ro
@ -29,7 +29,7 @@ provisioner:
hosts: hosts:
all: all:
hosts: hosts:
centos: ubi:
ansible_python_interpreter: /usr/bin/python3 ansible_python_interpreter: /usr/bin/python3
vars: vars:
ansible_user: root ansible_user: root

View File

@ -5,11 +5,11 @@ driver:
log: true log: true
platforms: platforms:
- name: centos - name: ubi
hostname: centos hostname: ubi
image: centos/centos:stream8 image: ubi9/ubi-init
registry: registry:
url: quay.io url: registry.access.redhat.com
pkg_extras: python*setuptools pkg_extras: python*setuptools
volumes: volumes:
- /etc/ci/mirror_info.sh:/etc/ci/mirror_info.sh:ro - /etc/ci/mirror_info.sh:/etc/ci/mirror_info.sh:ro
@ -29,7 +29,7 @@ provisioner:
hosts: hosts:
all: all:
hosts: hosts:
centos: ubi:
ansible_python_interpreter: /usr/bin/python3 ansible_python_interpreter: /usr/bin/python3
vars: vars:
ansible_user: root ansible_user: root

View File

@ -5,11 +5,11 @@ driver:
log: true log: true
platforms: platforms:
- name: centos - name: ubi
hostname: centos hostname: ubi
image: centos/centos:stream8 image: ubi9/ubi-init
registry: registry:
url: quay.io url: registry.access.redhat.com
pkg_extras: python*setuptools pkg_extras: python*setuptools
volumes: volumes:
- /etc/ci/mirror_info.sh:/etc/ci/mirror_info.sh:ro - /etc/ci/mirror_info.sh:/etc/ci/mirror_info.sh:ro
@ -29,7 +29,7 @@ provisioner:
hosts: hosts:
all: all:
hosts: hosts:
centos: ubi:
ansible_python_interpreter: /usr/bin/python3 ansible_python_interpreter: /usr/bin/python3
vars: vars:
ansible_user: root ansible_user: root

View File

@ -5,11 +5,11 @@ driver:
log: true log: true
platforms: platforms:
- name: centos - name: ubi
hostname: centos hostname: ubi
image: centos/centos:stream8 image: ubi9/ubi-init
registry: registry:
url: quay.io url: registry.access.redhat.com
pkg_extras: python*setuptools pkg_extras: python*setuptools
volumes: volumes:
- /etc/ci/mirror_info.sh:/etc/ci/mirror_info.sh:ro - /etc/ci/mirror_info.sh:/etc/ci/mirror_info.sh:ro
@ -30,7 +30,7 @@ provisioner:
hosts: hosts:
all: all:
hosts: hosts:
centos: ubi:
ansible_python_interpreter: /usr/bin/python3 ansible_python_interpreter: /usr/bin/python3
vars: vars:
ansible_user: root ansible_user: root

View File

@ -25,3 +25,4 @@
test_deps_setup_stream: true test_deps_setup_stream: true
test_deps_extra_packages: test_deps_extra_packages:
- jq - jq
- ndctl

View File

@ -35,6 +35,7 @@
package: package:
name: "{{ pkgs }}" name: "{{ pkgs }}"
state: present state: present
releasever: "{{ ansible_facts['distribution_major_version'] }}"
vars: vars:
pkgs: pkgs:
- ndctl - ndctl

View File

@ -23,14 +23,10 @@
test_deps_setup_stream: true test_deps_setup_stream: true
roles: roles:
- role: test_deps - role: test_deps
test_deps_extra_packages:
- openvswitch
- libibverbs
post_tasks: post_tasks:
- name: Install ovs
package:
name:
- openvswitch
- libibverbs
state: present
- name: Create ovs runtime directories - name: Create ovs runtime directories
file: file:
path: "{{ item }}" path: "{{ item }}"

View File

@ -23,14 +23,10 @@
test_deps_setup_stream: true test_deps_setup_stream: true
roles: roles:
- role: test_deps - role: test_deps
test_deps_extra_packages:
- openvswitch
- libibverbs
post_tasks: post_tasks:
- name: Install ovs
package:
name:
- openvswitch
- libibverbs
state: present
- name: Create ovs runtime directories - name: Create ovs runtime directories
file: file:
path: "{{ item }}" path: "{{ item }}"

View File

@ -7,9 +7,9 @@ log: true
platforms: platforms:
- name: centos - name: centos
hostname: centos hostname: centos
image: centos/centos:stream8 image: ubi9/ubi-init
registry: registry:
url: quay.io url: registry.access.redhat.com
dockerfile: Dockerfile dockerfile: Dockerfile
pkg_extras: python*setuptools pkg_extras: python*setuptools
command: /sbin/init command: /sbin/init

View File

@ -7,9 +7,9 @@ log: true
platforms: platforms:
- name: centos - name: centos
hostname: centos hostname: centos
image: centos/centos:stream8 image: ubi9/ubi-init
registry: registry:
url: quay.io url: registry.access.redhat.com
dockerfile: Dockerfile dockerfile: Dockerfile
pkg_extras: python*setuptools pkg_extras: python*setuptools
command: /sbin/init command: /sbin/init

View File

@ -7,9 +7,9 @@ log: true
platforms: platforms:
- name: centos - name: centos
hostname: centos hostname: centos
image: centos/centos:stream8 image: ubi9/ubi-init
registry: registry:
url: quay.io url: registry.access.redhat.com
dockerfile: Dockerfile dockerfile: Dockerfile
pkg_extras: python*setuptools pkg_extras: python*setuptools
command: /sbin/init command: /sbin/init

View File

@ -7,9 +7,9 @@ log: true
platforms: platforms:
- name: centos - name: centos
hostname: centos hostname: centos
image: centos/centos:stream8 image: ubi9/ubi-init
registry: registry:
url: quay.io url: registry.access.redhat.com
dockerfile: Dockerfile dockerfile: Dockerfile
pkg_extras: python*setuptools pkg_extras: python*setuptools
command: >- command: >-

View File

@ -33,6 +33,8 @@
- ansible_user_dir is undefined - ansible_user_dir is undefined
roles: roles:
- role: test_deps - role: test_deps
test_deps_extra_packages:
- runc
post_tasks: post_tasks:
- name: pull an image - name: pull an image
containers.podman.podman_image: containers.podman.podman_image:

View File

@ -5,9 +5,9 @@ driver:
log: true log: true
platforms: platforms:
- name: ubi8 - name: ubi9
hostname: ubi8 hostname: ubi9
image: ubi8/ubi-init image: ubi9/ubi-init
registry: registry:
url: registry.access.redhat.com url: registry.access.redhat.com
dockerfile: Dockerfile dockerfile: Dockerfile
@ -30,7 +30,7 @@ provisioner:
hosts: hosts:
all: all:
hosts: hosts:
ubi8: ubi9:
ansible_python_interpreter: /usr/bin/python3 ansible_python_interpreter: /usr/bin/python3
log: true log: true
env: env:

View File

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

View File

@ -2,42 +2,13 @@
driver: driver:
name: podman 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: centos8
hostname: centos8
image: centos:8
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: provisioner:
inventory:
hosts:
all:
hosts:
centos:
ansible_python_interpreter: /usr/bin/python3
name: ansible name: ansible
log: true log: true
env: env:

View File

@ -18,6 +18,7 @@
package: package:
name: 'openstack-tripleo-validations' name: 'openstack-tripleo-validations'
state: installed state: installed
releasever: "{{ ansible_facts['distribution_major_version'] }}"
- name: Set group name fact - name: Set group name fact
set_fact: set_fact:

View File

@ -2,7 +2,7 @@
- job: - job:
description: Base tripleo-ansible job description: Base tripleo-ansible job
name: tripleo-ansible-centos-stream-base name: tripleo-ansible-centos-stream-base
nodeset: centos-8-stream nodeset: centos-9-stream
parent: base parent: base
success-url: "reports.html" success-url: "reports.html"
failure-url: "reports.html" failure-url: "reports.html"

View File

@ -199,6 +199,9 @@
- ^tripleo_ansible/roles/backup_and_restore/(?!meta).* - ^tripleo_ansible/roles/backup_and_restore/(?!meta).*
name: tripleo-ansible-centos-stream-molecule-backup_and_restore name: tripleo-ansible-centos-stream-molecule-backup_and_restore
parent: tripleo-ansible-centos-stream-base 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: vars:
tripleo_role_name: backup_and_restore tripleo_role_name: backup_and_restore
- job: - job:
@ -292,11 +295,13 @@
name: tripleo-ansible-centos-stream-molecule-tripleo_collectd name: tripleo-ansible-centos-stream-molecule-tripleo_collectd
parent: tripleo-ansible-centos-stream-base parent: tripleo-ansible-centos-stream-base
timeout: 7200 timeout: 7200
# Note(ChandanKumar): Marking this job as non-voting
# due to https://bugs.launchpad.net/tripleo/+bug/1979972
voting: false voting: false
vars: vars:
tripleo_role_name: tripleo_collectd
enable_fips: true enable_fips: true
nslookup_target: opendev.org nslookup_target: opendev.org
tripleo_role_name: tripleo_collectd
pre-run: zuul.d/playbooks/enable-fips.yml pre-run: zuul.d/playbooks/enable-fips.yml
- job: - job:
files: files:
@ -333,6 +338,9 @@
- ^tripleo_ansible/ansible_plugins/modules/container_startup_config.py$ - ^tripleo_ansible/ansible_plugins/modules/container_startup_config.py$
name: tripleo-ansible-centos-stream-molecule-tripleo_container_manage name: tripleo-ansible-centos-stream-molecule-tripleo_container_manage
parent: tripleo-ansible-centos-stream-base 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: vars:
tripleo_role_name: tripleo_container_manage tripleo_role_name: tripleo_container_manage
- job: - job:
@ -501,6 +509,9 @@
- ^tripleo_ansible/roles/tripleo_packages/(?!meta).* - ^tripleo_ansible/roles/tripleo_packages/(?!meta).*
name: tripleo-ansible-centos-stream-molecule-tripleo_packages name: tripleo-ansible-centos-stream-molecule-tripleo_packages
parent: tripleo-ansible-centos-stream-base parent: tripleo-ansible-centos-stream-base
# Note(chandan): Marking this job to non-voting
# due to https://bugs.launchpad.net/tripleo/+bug/1983347
voting: false
vars: vars:
tripleo_role_name: tripleo_packages tripleo_role_name: tripleo_packages
- job: - job:
@ -543,6 +554,8 @@
- ^tripleo_ansible/roles/tripleo_redhat_enforce/(?!meta).* - ^tripleo_ansible/roles/tripleo_redhat_enforce/(?!meta).*
name: tripleo-ansible-centos-stream-molecule-tripleo_redhat_enforce name: tripleo-ansible-centos-stream-molecule-tripleo_redhat_enforce
parent: tripleo-ansible-centos-stream-base parent: tripleo-ansible-centos-stream-base
# Note(chandankumar): Marking this job non-voting due
# to https://bugs.launchpad.net/tripleo/+bug/1979971
voting: false voting: false
vars: vars:
tox_envlist: mol-tripleo_redhat_enforce tox_envlist: mol-tripleo_redhat_enforce
@ -608,6 +621,8 @@
- ^tripleo_ansible/roles/tripleo_update_trusted_cas/(?!meta).* - ^tripleo_ansible/roles/tripleo_update_trusted_cas/(?!meta).*
name: tripleo-ansible-centos-stream-molecule-tripleo_update_trusted_cas name: tripleo-ansible-centos-stream-molecule-tripleo_update_trusted_cas
parent: tripleo-ansible-centos-stream-base parent: tripleo-ansible-centos-stream-base
# Note(ChandanKumar): Marking this job non-voting
# due to https://bugs.launchpad.net/tripleo/+bug/1979807
voting: false voting: false
vars: vars:
tox_envlist: mol-tripleo_update_trusted_cas tox_envlist: mol-tripleo_update_trusted_cas
@ -642,7 +657,7 @@
- ^zuul.d/playbooks/.* - ^zuul.d/playbooks/.*
- ^zuul.d/molecule.yaml - ^zuul.d/molecule.yaml
name: tripleo-ansible-centos-stream-role-addition name: tripleo-ansible-centos-stream-role-addition
nodeset: centos-8-stream nodeset: centos-9-stream
parent: tox parent: tox
timeout: 1800 timeout: 1800
voting: false voting: false
@ -659,4 +674,6 @@
- ^tox.ini - ^tox.ini
name: tripleo-ansible-centos-stream-molecule-tripleo-modules name: tripleo-ansible-centos-stream-molecule-tripleo-modules
parent: tripleo-ansible-centos-stream-base 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 voting: false

View File

@ -22,13 +22,6 @@
virtualenv_command: "{{ ensure_pip_virtualenv_command }}" virtualenv_command: "{{ ensure_pip_virtualenv_command }}"
virtualenv_site_packages: true 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 - name: Run bindep
shell: |- shell: |-
. {{ ansible_user_dir }}/test-python/bin/activate . {{ ansible_user_dir }}/test-python/bin/activate
@ -37,9 +30,10 @@
- name: Ensure a recent version of pip is installed in virtualenv - name: Ensure a recent version of pip is installed in virtualenv
pip: pip:
name: "pip>=19.1.1" name: "pip<20.3.0"
virtualenv: "{{ ansible_user_dir }}/test-python" virtualenv: "{{ ansible_user_dir }}/test-python"
virtualenv_command: "{{ ensure_pip_virtualenv_command }}" virtualenv_command: "{{ ensure_pip_virtualenv_command }}"
state: latest
- name: Setup test-python - name: Setup test-python
pip: pip: