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

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

Signed-off-by: Chandan Kumar (raukadah) <chkumar@redhat.com>
Change-Id: I75a27ca496fb7670ba22a6a22f62f001c8afe6a9
This commit is contained in:
Chandan Kumar (raukadah) 2022-05-30 09:45:42 +05:30
parent 95b800f4c3
commit 4c9233d07c
43 changed files with 235 additions and 217 deletions

View File

@ -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') }}"

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

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

@ -19,6 +19,7 @@
package:
name: cephadm
state: latest
releasever: "{{ ansible_facts['distribution_major_version'] }}"
when:
- tripleo_cephadm_predeployed | bool

View File

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

View File

@ -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') }}"

View File

@ -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') }}"

View File

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

View File

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

View File

@ -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') }}"

View File

@ -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') }}"

View File

@ -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') }}"

View File

@ -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') }}"

View File

@ -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') }}"

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

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

View File

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

View File

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

View File

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

View File

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