Skip to content

Commit

Permalink
CentOS 8: Update packages in images
Browse files Browse the repository at this point in the history
* Some further changes for python2 vs python3 packages
* Allow rabbitmq 3.7.*, since a newer erlang is available
* Switch from qemu-img-ev to qemu-img on CentOS 8
* bridge-utils no longer available on CentOS 8
* libvirt-daemon-driver-lxc no longer available on CentOS 8
* Mark some more images buildable for CentOS 8

Change-Id: Iaf5b68ff6d944ae730ca0b1d5832172c106a6c08
Partially-Implements: blueprint centos-rhel-8
Partially-Implements: blueprint centos-rhel-python-3
  • Loading branch information
markgoddard committed Jan 29, 2020
1 parent bdb0dbd commit 4b4e262
Show file tree
Hide file tree
Showing 18 changed files with 165 additions and 128 deletions.
12 changes: 9 additions & 3 deletions docker/ceilometer/ceilometer-compute/Dockerfile.j2
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,15 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build

{% elif install_type == 'source' %}
{% if base_package_type == 'rpm' %}
{% set ceilometer_compute_packages = [
'libvirt-python'
] %}
{% if distro_python_version.startswith('3') %}
{% set ceilometer_compute_packages = [
'python3-libvirt'
] %}
{% else %}
{% set ceilometer_compute_packages = [
'libvirt-python'
] %}
{% endif %}
{% elif base_package_type == 'deb' %}
{% set ceilometer_compute_packages = [
'python3-libvirt'
Expand Down
6 changes: 3 additions & 3 deletions docker/cinder/cinder-base/Dockerfile.j2
Original file line number Diff line number Diff line change
Expand Up @@ -50,13 +50,13 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build
'lvm2',
'cryptsetup',
] %}
{% if base_distro in ['centos'] %}
{% if distro_package_manager == 'dnf' or base_distro not in ['centos'] %}
{% set cinder_base_packages = cinder_base_packages + [
'qemu-img-ev'
'qemu-img'
] %}
{% else %}
{% set cinder_base_packages = cinder_base_packages + [
'qemu-img'
'qemu-img-ev'
] %}
{% endif %}
{% elif base_package_type == 'deb' %}
Expand Down
1 change: 0 additions & 1 deletion docker/cinder/cinder-volume/Dockerfile.j2
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build
'sysfsutils',
'targetcli'
] %}

{% if distro_python_version.startswith('3') %}
{% set cinder_volume_packages = cinder_volume_packages + [
'python3-rtslib',
Expand Down
8 changes: 5 additions & 3 deletions docker/glance/glance-api/Dockerfile.j2
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,12 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build

{% import "macros.j2" as macros with context %}

{% if base_distro in ['centos'] %}
{% set glance_api_packages = ['qemu-img-ev'] %}
{% elif base_distro == 'rhel' %}
{% if base_package_type == 'rpm' %}
{% if distro_package_manager == 'dnf' or base_distro not in ['centos'] %}
{% set glance_api_packages = ['qemu-img'] %}
{% else %}
{% set glance_api_packages = ['qemu-img-ev'] %}
{% endif %}
{% elif base_package_type == 'deb' %}
{% set glance_api_packages = ['qemu-utils'] %}
{% endif %}
Expand Down
16 changes: 12 additions & 4 deletions docker/ironic/ironic-conductor/Dockerfile.j2
Original file line number Diff line number Diff line change
Expand Up @@ -49,13 +49,13 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build
'systemd-python'
] %}
{% endif %}
{% if base_distro in ['centos'] %}
{% if distro_package_manager == 'dnf' or base_distro not in ['centos'] %}
{% set ironic_conductor_packages = ironic_conductor_packages + [
'qemu-img-ev'
'qemu-img'
] %}
{% else %}
{% set ironic_conductor_packages = ironic_conductor_packages + [
'qemu-img'
'qemu-img-ev'
] %}
{% endif %}
{% elif base_package_type == 'deb' %}
Expand Down Expand Up @@ -92,7 +92,6 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build
'ipmitool',
'parted',
'psmisc',
'qemu-img-ev',
'shellinabox',
'util-linux',
'xfsprogs',
Expand All @@ -106,6 +105,15 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build
'systemd',
] %}
{% endif %}
{% if distro_package_manager == 'dnf' or base_distro not in ['centos'] %}
{% set ironic_conductor_packages = ironic_conductor_packages + [
'qemu-img'
] %}
{% else %}
{% set ironic_conductor_packages = ironic_conductor_packages + [
'qemu-img-ev'
] %}
{% endif %}
{% elif base_package_type == 'deb' %}
{% set ironic_conductor_packages = [
'bsdmainutils',
Expand Down
8 changes: 8 additions & 0 deletions docker/keystone/keystone-base/Dockerfile.j2
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,10 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build
] %}
{% endif %}

{% if distro_package_manager == 'dnf' %}
RUN dnf module enable mod_auth_openidc -y
{% endif %}

{{ macros.install_packages(keystone_base_packages | customizable("packages")) }}
RUN mkdir -p /var/www/cgi-bin/keystone \
&& cp -a /usr/bin/keystone-wsgi-public /var/www/cgi-bin/keystone/main \
Expand Down Expand Up @@ -76,6 +80,10 @@ RUN mkdir -p /var/www/cgi-bin/keystone \
] %}
{% endif %}

{% if distro_package_manager == 'dnf' %}
RUN dnf module enable mod_auth_openidc -y
{% endif %}

{{ macros.install_packages(keystone_base_packages | customizable("packages")) }}
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
Expand Down
15 changes: 13 additions & 2 deletions docker/kolla-toolbox/Dockerfile.j2
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,20 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build
'mariadb-devel',
'openssh-clients',
'openssl-devel',
'python-devel',
'rabbitmq-server-3.7.10',
] %}
{% if distro_package_manager == 'dnf' %}
{% set kolla_toolbox_packages = kolla_toolbox_packages + [
'python3-devel',
'rabbitmq-server-3.7.*'
] %}
{% else %}
# NOTE(mandre) Remove rabbitmq-server pinning once package dependencies are met
# https://bugs.launchpad.net/kolla/+bug/1814233
{% set kolla_toolbox_packages = kolla_toolbox_packages + [
'python-devel',
'rabbitmq-server-3.7.10'
] %}
{% endif %}

{% elif base_package_type == 'deb' %}
{% set kolla_toolbox_packages = [
Expand Down
6 changes: 5 additions & 1 deletion docker/kuryr/kuryr-libnetwork/Dockerfile.j2
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,13 @@ RUN echo '{{ install_type }} not yet available for {{ base_distro }}' \
{% if base_package_type == 'rpm' %}

{% set kuryr_libnetwork_packages = [
'bridge-utils',
'openvswitch'
] %}
{% if distro_package_manager == 'yum' %}
{% set kuryr_libnetwork_packages = kuryr_libnetwork_packages + [
'bridge-utils',
] %}
{% endif %}

{% elif base_package_type == 'deb' %}

Expand Down
11 changes: 10 additions & 1 deletion docker/neutron/neutron-base/Dockerfile.j2
Original file line number Diff line number Diff line change
Expand Up @@ -83,14 +83,23 @@ RUN mkdir -p /usr/share/neutron \
'dnsmasq-utils',
'haproxy',
'ipset',
'iptables',
'iputils',
'keepalived',
'net-tools',
'openvswitch',
'python2-openvswitch',
'radvd',
'uuid'
] %}
{% if distro_python_version.startswith('3') %}
{% set neutron_base_packages = neutron_base_packages + [
'python3-openvswitch',
] %}
{% else %}
{% set neutron_base_packages = neutron_base_packages + [
'python2-openvswitch',
] %}
{% endif %}

{% elif base_package_type == 'deb' %}

Expand Down
6 changes: 5 additions & 1 deletion docker/neutron/neutron-linuxbridge-agent/Dockerfile.j2
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,13 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build
{% elif install_type == 'source' %}

{% set neutron_linuxbridge_agent_packages = [
'bridge-utils',
'ebtables'
] %}
{% if distro_package_manager != 'dnf' %}
{% set neutron_linuxbridge_agent_packages = neutron_linuxbridge_agent_packages + [
'bridge-utils',
] %}
{% endif %}

{% endif %}

Expand Down
26 changes: 22 additions & 4 deletions docker/nova/nova-compute/Dockerfile.j2
Original file line number Diff line number Diff line change
Expand Up @@ -83,18 +83,36 @@ RUN rm -f /etc/nova/nova-compute.conf
'e2fsprogs',
'genisoimage',
'iscsi-initiator-utils',
'libvirt-python',
'libosinfo',
'nfs-utils',
'openvswitch',
'parted',
'python-libguestfs',
'python-rtslib',
'qemu-img-ev',
'sysfsutils',
'targetcli',
'xfsprogs'
] %}
{% if distro_python_version.startswith('3') %}
{% set nova_compute_packages = nova_compute_packages + [
'python3-libguestfs',
'python3-libvirt',
'python3-rtslib'
] %}
{% else %}
{% set nova_compute_packages = nova_compute_packages + [
'libvirt-python',
'python-libguestfs',
'python-rtslib'
] %}
{% endif %}
{% if distro_package_manager == 'dnf' %}
{% set nova_compute_packages = nova_compute_packages + [
'qemu-img',
] %}
{% else %}
{% set nova_compute_packages = nova_compute_packages + [
'qemu-img-ev',
] %}
{% endif %}

{% elif base_package_type == 'deb' %}

Expand Down
12 changes: 8 additions & 4 deletions docker/nova/nova-libvirt/Dockerfile.j2
Original file line number Diff line number Diff line change
Expand Up @@ -18,18 +18,22 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build
'libvirt-client',
'libvirt-daemon',
'libvirt-daemon-config-nwfilter',
'libvirt-daemon-driver-lxc',
'libvirt-daemon-driver-nwfilter',
'openvswitch',
'trousers'
] %}
{% if base_distro in ['centos'] %}
{% if distro_package_manager == 'dnf' or base_distro not in ['centos'] %}
{% set nova_libvirt_packages = nova_libvirt_packages + [
'qemu-kvm-ev'
'qemu-kvm'
] %}
{% else %}
{% set nova_libvirt_packages = nova_libvirt_packages + [
'qemu-kvm'
'qemu-kvm-ev'
] %}
{% endif %}
{% if distro_package_manager != 'dnf' %}
{% set nova_libvirt_packages = nova_libvirt_packages + [
'libvirt-daemon-driver-lxc',
] %}
{% endif %}

Expand Down
11 changes: 10 additions & 1 deletion docker/nova/nova-spicehtml5proxy/Dockerfile.j2
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,19 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build
{% if base_package_type == 'rpm' %}

{% set nova_spicehtml5proxy_packages = [
'numpy',
'spice-html5'
] %}

{% if distro_python_version.startswith('3') %}
{% set nova_spicehtml5proxy_packages = nova_spicehtml5proxy_packages + [
'python3-numpy',
] %}
{% else %}
{% set nova_spicehtml5proxy_packages = nova_spicehtml5proxy_packages + [
'numpy',
] %}
{% endif %}

{% elif base_package_type == 'deb' %}

{% set nova_spicehtml5proxy_packages = [
Expand Down
14 changes: 11 additions & 3 deletions docker/rabbitmq/Dockerfile.j2
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,21 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build

{% block rabbitmq_install %}
{% if base_package_type == 'rpm' %}
# NOTE(mandre) Remove rabbitmq-server pinning once package dependencies are met
# https://bugs.launchpad.net/kolla/+bug/1814233
{% set rabbitmq_packages = [
'erlang-hipe',
'hostname',
'rabbitmq-server-3.7.10'
] %}
{% if distro_package_manager == 'dnf' %}
{% set rabbitmq_packages = rabbitmq_packages + [
'rabbitmq-server-3.7.*'
] %}
{% else %}
# NOTE(mandre) Remove rabbitmq-server pinning once package dependencies are met
# https://bugs.launchpad.net/kolla/+bug/1814233
{% set rabbitmq_packages = rabbitmq_packages + [
'rabbitmq-server-3.7.10'
] %}
{% endif %}

{% elif base_package_type == 'deb' %}
{% set rabbitmq_packages = [
Expand Down

0 comments on commit 4b4e262

Please sign in to comment.