diff options
| author | Marcin Juszkiewicz <marcin.juszkiewicz@linaro.org> | 2020-03-09 17:44:54 +0100 |
|---|---|---|
| committer | Mark Goddard <mark@stackhpc.com> | 2020-04-15 09:32:06 +0000 |
| commit | 53443c5c712f4ec23b859105e94bcd90abc27762 (patch) | |
| tree | 5bc6d8db4c65519e16d231b55f574e813e29da4b /docker/nova | |
| parent | a176c6e080be2e71829e8ca5e8b330fdda70038a (diff) | |
| download | kolla-53443c5c712f4ec23b859105e94bcd90abc27762.tar.gz kolla-53443c5c712f4ec23b859105e94bcd90abc27762.zip | |
Remove support for CentOS 7
With the move to RHEL/CentOS 8 we no longer have Python 2 in our images
so there is no need for checking which Python version (2.x or 3.x) is
used inside of containers.
We also no longer have to support yum as a value for
distro_package_manager.
Partially-Implements: blueprint centos-rhel-8
Change-Id: Ie45cf3465fedddbde7856961527421883ba3d5c9
Diffstat (limited to 'docker/nova')
| -rw-r--r-- | docker/nova/nova-api/Dockerfile.j2 | 14 | ||||
| -rw-r--r-- | docker/nova/nova-compute/Dockerfile.j2 | 43 | ||||
| -rw-r--r-- | docker/nova/nova-libvirt/Dockerfile.j2 | 30 | ||||
| -rw-r--r-- | docker/nova/nova-spicehtml5proxy/Dockerfile.j2 | 24 | ||||
| -rw-r--r-- | docker/nova/nova-ssh/Dockerfile.j2 | 2 |
5 files changed, 20 insertions, 93 deletions
diff --git a/docker/nova/nova-api/Dockerfile.j2 b/docker/nova/nova-api/Dockerfile.j2 index c4e9fe1ee..bc84ca80c 100644 --- a/docker/nova/nova-api/Dockerfile.j2 +++ b/docker/nova/nova-api/Dockerfile.j2 @@ -13,13 +13,9 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {% set nova_api_packages = [ 'httpd', 'mod_ssl', - 'openstack-nova-api' + 'openstack-nova-api', + 'python3-mod_wsgi', ] %} - {% if distro_python_version.startswith('3') %} - {% set nova_api_packages = nova_api_packages + ['python3-mod_wsgi'] %} - {% else %} - {% set nova_api_packages = nova_api_packages + ['mod_wsgi'] %} - {% endif %} {{ macros.install_packages(nova_api_packages | customizable("packages")) }} RUN sed -i -r 's,^(Listen 80),#\1,' /etc/httpd/conf/httpd.conf \ @@ -45,12 +41,8 @@ RUN echo > /etc/apache2/ports.conf {% set nova_api_packages = [ 'httpd', 'mod_ssl', + 'python3-mod_wsgi', ] %} - {% if distro_python_version.startswith('3') %} - {% set nova_api_packages = nova_api_packages + ['python3-mod_wsgi'] %} - {% else %} - {% set nova_api_packages = nova_api_packages + ['mod_wsgi'] %} - {% endif %} {{ macros.install_packages(nova_api_packages | customizable("packages")) }} RUN sed -i -r 's,^(Listen 80),#\1,' /etc/httpd/conf/httpd.conf \ diff --git a/docker/nova/nova-compute/Dockerfile.j2 b/docker/nova/nova-compute/Dockerfile.j2 index ec6157d33..248695fdf 100644 --- a/docker/nova/nova-compute/Dockerfile.j2 +++ b/docker/nova/nova-compute/Dockerfile.j2 @@ -23,25 +23,14 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build 'openstack-nova-compute', 'openvswitch', 'parted', + 'python3-libguestfs', + 'python3-oslo-vmware', + 'python3-rtslib', 'sysfsutils', 'targetcli', 'xfsprogs' ] %} - {% if distro_python_version.startswith('3') %} - {% set nova_compute_packages = nova_compute_packages + [ - 'python3-libguestfs', - 'python3-oslo-vmware', - 'python3-rtslib' - ] %} - {% else %} - {% set nova_compute_packages = nova_compute_packages + [ - 'python-libguestfs', - 'python-oslo-vmware', - 'python-rtslib' - ] %} - {% endif %} - {{ macros.install_packages(nova_compute_packages | customizable("packages")) }} {% elif base_package_type == 'deb' %} @@ -89,32 +78,14 @@ RUN rm -f /etc/nova/nova-compute.conf 'nfs-utils', 'openvswitch', 'parted', - '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 + [ + 'python3-rtslib', 'qemu-img', + 'sysfsutils', + 'targetcli', + 'xfsprogs' ] %} - {% else %} - {% set nova_compute_packages = nova_compute_packages + [ - 'qemu-img-ev', - ] %} - {% endif %} {% elif base_package_type == 'deb' %} diff --git a/docker/nova/nova-libvirt/Dockerfile.j2 b/docker/nova/nova-libvirt/Dockerfile.j2 index c9a806a14..953a0e43d 100644 --- a/docker/nova/nova-libvirt/Dockerfile.j2 +++ b/docker/nova/nova-libvirt/Dockerfile.j2 @@ -22,23 +22,9 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build 'libvirt-daemon-config-nwfilter', 'libvirt-daemon-driver-nwfilter', 'openvswitch', + 'qemu-kvm', 'trousers' ] %} - {% if distro_package_manager == 'dnf' or base_distro not in ['centos'] %} - {% set nova_libvirt_packages = nova_libvirt_packages + [ - 'qemu-kvm' - ] %} - {% else %} - {% set nova_libvirt_packages = nova_libvirt_packages + [ - 'qemu-kvm-ev' - ] %} - {% endif %} - {% if distro_package_manager != 'dnf' %} - {% set nova_libvirt_packages = nova_libvirt_packages + [ - 'libvirt-daemon-driver-lxc', - ] %} - {% endif %} - {% if base_arch == 'x86_64' %} {% if base_distro_tag.startswith('7') %} {% set nova_libvirt_packages = nova_libvirt_packages + [ @@ -77,6 +63,13 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build 'qemu-system', 'trousers' ] %} +{% elif base_package_type == 'rpm' %} + + {% if base_arch == 'x86_64' and base_distro_tag.startswith('7') %} +# NOTE(jeffrey4l): for x86_64, nova will validate the existence of /usr/share/OVMF/OVMF_CODE.fd +RUN ln -sf /usr/share/OVMF/OVMF_CODE.secboot.fd /usr/share/OVMF/OVMF_CODE.fd + {% endif %} + {% if base_arch == "aarch64" %} {% set nova_libvirt_packages = nova_libvirt_packages + [ @@ -109,13 +102,6 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build RUN rm -f /etc/libvirt/qemu/networks/default.xml /etc/libvirt/qemu/networks/autostart/default.xml -{% elif base_package_type == 'rpm' %} - - {% if base_arch == 'x86_64' and base_distro_tag.startswith('7') %} -# NOTE(jeffrey4l): for x86_64, nova will validate the existence of /usr/share/OVMF/OVMF_CODE.fd -RUN ln -sf /usr/share/OVMF/OVMF_CODE.secboot.fd /usr/share/OVMF/OVMF_CODE.fd - {% endif %} - {% endif %} COPY extend_start.sh /usr/local/bin/kolla_extend_start diff --git a/docker/nova/nova-spicehtml5proxy/Dockerfile.j2 b/docker/nova/nova-spicehtml5proxy/Dockerfile.j2 index 9016ebe77..338b6d9ea 100644 --- a/docker/nova/nova-spicehtml5proxy/Dockerfile.j2 +++ b/docker/nova/nova-spicehtml5proxy/Dockerfile.j2 @@ -8,27 +8,16 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {% import "macros.j2" as macros with context %} {# NOTE(mgoddard): EPEL required for spice-html5 package. Not provided by EPEL8 #} -{% if distro_package_manager == 'yum' %} {{ macros.enable_extra_repos(['epel']) }} -{% endif %} {% if install_type == 'binary' %} {% if base_package_type == 'rpm' %} {% set nova_spicehtml5proxy_packages = [ 'openstack-nova-spicehtml5proxy', - 'spice-html5' - ] %} - - {% if distro_python_version.startswith('3') %} - {% set nova_spicehtml5proxy_packages = nova_spicehtml5proxy_packages + [ 'python3-numpy', + 'spice-html5' ] %} - {% else %} - {% set nova_spicehtml5proxy_packages = nova_spicehtml5proxy_packages + [ - 'numpy', - ] %} - {% endif %} {% elif base_package_type == 'deb' %} @@ -43,18 +32,9 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {% if base_package_type == 'rpm' %} {% set nova_spicehtml5proxy_packages = [ - 'spice-html5' - ] %} - - {% if distro_python_version.startswith('3') %} - {% set nova_spicehtml5proxy_packages = nova_spicehtml5proxy_packages + [ 'python3-numpy', + 'spice-html5' ] %} - {% else %} - {% set nova_spicehtml5proxy_packages = nova_spicehtml5proxy_packages + [ - 'numpy', - ] %} - {% endif %} {% elif base_package_type == 'deb' %} diff --git a/docker/nova/nova-ssh/Dockerfile.j2 b/docker/nova/nova-ssh/Dockerfile.j2 index b66b587ab..4810393f6 100644 --- a/docker/nova/nova-ssh/Dockerfile.j2 +++ b/docker/nova/nova-ssh/Dockerfile.j2 @@ -15,11 +15,9 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {% if base_package_type == 'rpm' %} -{% if distro_package_manager == 'dnf' %} # NOTE(mgoddard): The centos:8 image contains a /run/nologin file, which # prevents SSH access to it. RUN rm -f /run/nologin -{% endif %} {% elif base_package_type == 'deb' %} |
