Update tcib for CentOS Stream 9

It moves the EL8 and EL9 packages into two conditional
and also introduces python_version for both EL versions.

https://review.opendev.org/c/openstack/python-tripleoclient/+/807098
adds the support for passing extra parameters and based on those
parameter above distro and python version conditionals
will be evaluated.

Since collectd packages and qdrouterd packages are not available
currently so are restricting to EL8.

Note: /usr/share/zoneinfo comes from tzdata and this directory
does not exists on base image. On reinstalling in a running
container, the directory exists but on a image it does not
exists. So In order to fix it, we are removing the tzdata
rpm and reinstalling it as a workaround.

Related-Bug: #1946461

Depends-On: https://review.opendev.org/c/openstack/tripleo-ci/+/800577

Signed-off-by: Ronelle Landy <rlandy@redhat.com>
Co-authored-by: Chandan Kumar (raukadah) <chkumar@redhat.com>
Change-Id: I23c64637e161c8054332c4e4761cd82802f3ae1f
This commit is contained in:
Ronelle Landy 2021-07-12 21:35:15 -04:00 committed by Chandan Kumar (raukadah)
parent f9eb6f0604
commit f558eaa75a
8 changed files with 40 additions and 16 deletions

View File

@ -27,15 +27,23 @@ tcib_actions:
- run: chmod 755 /usr/local/bin/kolla_httpd_setup
- run: cp /usr/share/openstack-tripleo-common-containers/container-images/kolla/base/sudoers /etc/sudoers
- run: chmod 440 /etc/sudoers
- run: sed -ri '/-session(\s+)optional(\s+)pam_systemd.so/d' /etc/pam.d/system-auth
- run: >-
if [ '{{ tcib_release }}' == '8' ];then
sed -ri '/-session(\s+)optional(\s+)pam_systemd.so/d' /etc/pam.d/system-auth; fi
- run: sed -ri '/^(passwd:|group:)/ s/systemd//g' /etc/nsswitch.conf
- run: dnf install -y {{ tcib_packages['common'] | join(' ') }}
- run: >-
if [ '{{ tcib_release }}' == '9' ];then
dnf -y reinstall which &&
rpm -e --nodeps tzdata &&
dnf -y install tzdata; fi
- run: mkdir -p /openstack
- run: >-
if [ '{{ tcib_distro }}' == 'centos' ];then dnf download centos*release &&
rpm -ivh --nodeps --replacefiles *.rpm &&
rm -rf *.rpm &&
rpm -e --nodeps redhat-release; fi
if [ '{{ tcib_distro }}' == 'centos' ];then dnf -y install dnf-plugins-core &&
dnf download centos*release &&
rpm -ivh --nodeps --replacepkgs --replacefiles *.rpm &&
if [ '{{ tcib_release }}' == '8' ];then rpm -e --nodeps redhat-release; fi &&
rm -rf *.rpm; fi
- run: dnf update --excludepkgs redhat-release -y && dnf clean all && rm -rf /var/cache/dnf
tcib_cmd: kolla_start
tcib_entrypoint: dumb-init --single-child --
@ -62,10 +70,11 @@ tcib_packages:
- sudo
- tar
- util-linux-user
- which
modules:
- disable: container-tools:rhel8
- disable: virt:rhel
- enable: container-tools:{{ tcib_rhel_modules['container-tools'] | default('3.0') }}
- enable: container-tools:{{ tcib_rhel_modules['container-tools'] | default('latest' if tcib_release is version('9', '==') else '3.0') }}
- enable: mariadb:{{ tcib_rhel_modules['mariadb'] | default('10.3') }}
- enable: virt:{{ tcib_rhel_modules['virt'] | default('av') }}
- enable: redis:{{ tcib_rhel_modules['redis'] | default('5') }}

View File

@ -1,6 +1,7 @@
tcib_actions:
- run: bash /usr/local/bin/uid_gid_manage collectd
- run: if [ "{{ tcib_distro }}" == "rhel" ]; then dnf -y install {{ tcib_packages['rhel'] | join(' ') }}; fi
- run: if [ '{{ tcib_release }}' == '8' ];then dnf -y install {{ tcib_packages['el8'] | join(' ') }}; fi
- run: if [ "$(uname -m)" == "x86_64" ]; then dnf -y install {{ tcib_packages['x86_64'] | join(' ') }}; fi
- run: dnf -y install {{ tcib_packages['common'] | join(' ') }} && dnf clean all && rm -rf /var/cache/dnf
- run: chown -R collectd:collectd /etc/collectd* /var/run/
@ -20,11 +21,8 @@ tcib_packages:
- collectd-dbi
- collectd-disk
- collectd-dns
- collectd-generic-jmx
- collectd-ipmi
- collectd-iptables
- collectd-log_logstash
- collectd-libpod-stats
- collectd-mcelog
- collectd-memcachec
- collectd-mysql
@ -36,7 +34,6 @@ tcib_packages:
- collectd-procevent
- collectd-python
- collectd-sensors
- collectd-sensubility
- collectd-smart
- collectd-snmp
- collectd-snmp-agent
@ -47,12 +44,17 @@ tcib_packages:
- collectd-write_kafka
- collectd-write_prometheus
- python3-collectd-gnocchi
- python3-sqlalchemy-collectd
rhel:
- python3-collectd-rabbitmq-monitoring
x86_64:
- collectd-hugepages
- collectd-pcie-errors
- collectd-pmu
- collectd-rdt
- collectd-turbostat
el8:
- collectd-generic-jmx
- collectd-iptables
- collectd-libpod-stats
- python3-sqlalchemy-collectd
- collectd-sensubility
- collectd-pmu

View File

@ -2,7 +2,7 @@ tcib_actions:
- run: mv /etc/rpm/macros.image-language-conf /tmp && dnf -y install {{ tcib_packages.with_localization | join(' ') }} && mv /tmp/macros.image-language-conf /etc/rpm && dnf -y install {{ tcib_packages.common | join(' ') }} && dnf clean all && rm -rf /var/cache/dnf
- run: cp /usr/share/openstack-tripleo-common-containers/container-images/kolla/horizon/extend_start.sh /usr/local/bin/kolla_extend_start
- run: chmod 755 /usr/local/bin/kolla_extend_start
- run: 'sed -i -r ''s,^(Listen 80),#\1,'' /etc/httpd/conf/httpd.conf && sed -i -r ''s,^(Listen 443),#\1,'' /etc/httpd/conf.d/ssl.conf && ln -s /usr/share/openstack-dashboard/openstack_dashboard /usr/lib/python3.6/site-packages/openstack_dashboard && ln -s /usr/share/openstack-dashboard/static /usr/lib/python3.6/site-packages/static && chown -R apache /etc/openstack-dashboard /usr/share/openstack-dashboard && chown -R apache /usr/share/openstack-dashboard/static && sed -i "s|WEBROOT = ''/dashboard/''|WEBROOT = ''/''|" /etc/openstack-dashboard/local_settings && cp /usr/share/openstack-dashboard/manage.py /usr/bin/manage.py && rm -f /usr/share/openstack-dashboard/openstack_dashboard/local/enabled/?[^_]*.py* && rm -f /usr/lib/python3.6/site-packages/openstack_dashboard/local/enabled/?[^_]*.py* && for locale in /usr/lib/python3.6/site-packages/*/locale; do (cd ${locale%/*} && /usr/bin/django-admin compilemessages) done'
- run: 'sed -i -r ''s,^(Listen 80),#\1,'' /etc/httpd/conf/httpd.conf && sed -i -r ''s,^(Listen 443),#\1,'' /etc/httpd/conf.d/ssl.conf && ln -s /usr/share/openstack-dashboard/openstack_dashboard /usr/lib/python{{ tcib_python_version | default("3.9" if tcib_release is version("9", "==") else "3.6") }}/site-packages/openstack_dashboard && ln -s /usr/share/openstack-dashboard/static /usr/lib/python{{ tcib_python_version | default("3.9" if tcib_release is version("9", "==") else "3.6") }}/site-packages/static && chown -R apache /etc/openstack-dashboard /usr/share/openstack-dashboard && chown -R apache /usr/share/openstack-dashboard/static && sed -i "s|WEBROOT = ''/dashboard/''|WEBROOT = ''/''|" /etc/openstack-dashboard/local_settings && cp /usr/share/openstack-dashboard/manage.py /usr/bin/manage.py && rm -f /usr/share/openstack-dashboard/openstack_dashboard/local/enabled/?[^_]*.py* && rm -f /usr/lib/python{{ tcib_python_version | default("3.9" if tcib_release is version("9", "==") else "3.6") }}/site-packages/openstack_dashboard/local/enabled/?[^_]*.py* && for locale in /usr/lib/python{{ tcib_python_version | default("3.9" if tcib_release is version("9", "==") else "3.6") }}/site-packages/*/locale; do (cd ${locale%/*} && /usr/bin/django-admin compilemessages) done'
- run: ln -s /usr/share/openstack-tripleo-common/healthcheck/horizon /openstack/healthcheck && chmod a+rx /openstack/healthcheck
tcib_packages:
common:

View File

@ -1,6 +1,9 @@
tcib_actions:
- run: bash /usr/local/bin/uid_gid_manage keystone
- run: dnf module -y enable mod_auth_openidc && dnf -y install {{ tcib_packages['common'] | join(' ') }} && dnf clean all && rm -rf /var/cache/dnf
- run: >-
if [ '{{ tcib_release }}' == '8' ];then
dnf module -y enable mod_auth_openidc; fi
- run: dnf -y install {{ tcib_packages['common'] | join(' ') }} && dnf clean all && rm -rf /var/cache/dnf
- run: mkdir -p /var/www/cgi-bin/keystone && chown -R keystone /var/www/cgi-bin/keystone
- run: cp /usr/share/openstack-tripleo-common-containers/container-images/kolla/keystone/extend_start.sh /usr/local/bin/kolla_extend_start
- run: chmod 755 /usr/local/bin/kolla_extend_start

View File

@ -1,5 +1,6 @@
tcib_actions:
- run: if [ "$(uname -m)" == "x86_64" ]; then dnf -y install {{ tcib_packages['x86_64'] | join(' ') }}; fi
- run: if ['{{ tcib_release }}' == '8' ]; then dnf -y install {{ tcib_packages['el8'] | join(' ') }}; fi
- run: dnf -y install {{ tcib_packages['common'] | join(' ') }} && dnf clean all && rm -rf /var/cache/dnf
# this need to happen after installing nova-compute because the distgit does usermod to add libvirt/qemu groups
- run: bash /usr/local/bin/uid_gid_manage nova
@ -27,8 +28,9 @@ tcib_packages:
- swtpm
- swtpm-tools
- targetcli
- trousers
- xfsprogs
x86_64:
- daxio
el8:
- trousers
tcib_user: nova

View File

@ -1,5 +1,6 @@
tcib_actions:
- run: if [ "$(uname -m)" == "x86_64" ]; then dnf -y install {{ tcib_packages['x86_64'] | join(' ') }}; fi
- run: if ['{{ tcib_release }}' == '8' ]; then dnf -y install {{ tcib_packages['el8'] | join(' ') }}; fi
- run: dnf -y install {{ tcib_packages['common'] | join(' ') }} && dnf clean all && rm -rf /var/cache/dnf
- run: ln -s /usr/share/openstack-tripleo-common/healthcheck/nova-libvirt /openstack/healthcheck && chmod a+rx /openstack/healthcheck
tcib_packages:
@ -20,6 +21,7 @@ tcib_packages:
- qemu-kvm
- swtpm
- swtpm-tools
- trousers
x86_64:
- edk2-ovmf
el8:
- trousers

View File

@ -1,11 +1,13 @@
tcib_actions:
- run: bash /usr/local/bin/uid_gid_manage {{ tcib_user }}
- run: if [ '{{ tcib_release }}' == '8' ];then dnf -y install {{ tcib_packages['el8'] | join(' ') }}; fi
- run: dnf -y install {{ tcib_packages.common | join(' ') }} && dnf clean all && rm -rf /var/cache/dnf
- run: ln -s /usr/share/openstack-tripleo-common/healthcheck/qdrouterd /openstack/healthcheck && chmod a+rx /openstack/healthcheck
tcib_packages:
common:
- cyrus-sasl-lib
- cyrus-sasl-plain
el8:
- qpid-dispatch-router
- qpid-dispatch-tools
tcib_user: qdrouterd

View File

@ -1,5 +1,6 @@
tcib_actions:
- run: bash /usr/local/bin/uid_gid_manage {{ tcib_user }}
- run: dnf -y install {{ tcib_packages['el' ~ tcib_release] | join(' ') }};
- run: dnf -y install {{ tcib_packages['common'] | join(' ') }} && dnf clean all && rm -rf /var/cache/dnf
- run: openstack complete | tee /etc/bash_completion.d/osc.bash_completion > /dev/null
- run: cp /usr/share/openstack-tripleo-common-containers/container-images/kolla/tripleoclient/create_super_user.sh /usr/local/bin/create_super_user.sh
@ -19,5 +20,8 @@ tcib_packages:
- xfsprogs
- python3-osc-placement
- bash-completion
el8:
- ceph-ansible
el9:
- cephadm
tcib_user: cloud-admin