diff --git a/docker/aodh/aodh-base/Dockerfile.j2 b/docker/aodh/aodh-base/Dockerfile.j2 index 23c1b4608e..ec55885fb3 100644 --- a/docker/aodh/aodh-base/Dockerfile.j2 +++ b/docker/aodh/aodh-base/Dockerfile.j2 @@ -17,19 +17,10 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build 'httpd', 'mod_ssl', 'openstack-aodh-api', - 'openstack-aodh-common' - ] %} - {% if distro_python_version.startswith('3') %} - {% set aodh_base_packages = aodh_base_packages + [ + 'openstack-aodh-common', 'python3-ldappool', 'python3-mod_wsgi' ] %} - {% else %} - {% set aodh_base_packages = aodh_base_packages + [ - 'mod_wsgi', - 'python2-ldappool' - ] %} - {% endif %} {{ macros.install_packages(aodh_base_packages | customizable("packages")) }} RUN mkdir -p /var/www/cgi-bin/aodh \ @@ -58,19 +49,9 @@ RUN mkdir -p /var/www/cgi-bin/aodh \ {% set aodh_base_packages = [ 'httpd', 'mod_ssl', - ] %} - {% if distro_python_version.startswith('3') %} - {% set aodh_base_packages = aodh_base_packages + [ 'python3-ldappool', 'python3-mod_wsgi' ] %} - {% else %} - {% set aodh_base_packages = aodh_base_packages + [ - 'mod_wsgi', - 'python2-ldappool' - ] %} - {% endif %} - {{ macros.install_packages(aodh_base_packages | customizable("packages")) }} RUN mkdir -p /var/www/cgi-bin/aodh \ diff --git a/docker/barbican/barbican-api/Dockerfile.j2 b/docker/barbican/barbican-api/Dockerfile.j2 index 5f6bd8fb49..a789668e55 100644 --- a/docker/barbican/barbican-api/Dockerfile.j2 +++ b/docker/barbican/barbican-api/Dockerfile.j2 @@ -12,20 +12,10 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {% set barbican_api_packages = [ 'httpd', 'mod_ssl', - 'openstack-barbican-api' - ] %} - - {% if distro_python_version.startswith('3') %} - {% set barbican_api_packages = barbican_api_packages + [ + 'openstack-barbican-api', 'python3-mod_wsgi', 'uwsgi-plugin-python3' ] %} - {% else %} - {% set barbican_api_packages = barbican_api_packages + [ - 'mod_wsgi', - 'uwsgi-plugin-python' - ] %} - {% endif %} {{ macros.install_packages(barbican_api_packages | customizable("packages")) }} diff --git a/docker/barbican/barbican-base/Dockerfile.j2 b/docker/barbican/barbican-base/Dockerfile.j2 index ff10d53ad6..fb4cf4ea6c 100644 --- a/docker/barbican/barbican-base/Dockerfile.j2 +++ b/docker/barbican/barbican-base/Dockerfile.j2 @@ -20,12 +20,7 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {% elif install_type == 'source' %} {% if base_package_type == 'rpm' %} - {% if distro_python_version.startswith('3') %} {% set barbican_base_packages = ['uwsgi-plugin-python3'] %} - {% else %} - {% set barbican_base_packages = ['uwsgi-plugin-python'] %} - {% endif %} - {% elif base_package_type == 'deb' %} {% set barbican_base_packages = ['uwsgi-plugin-python3'] %} {% endif %} diff --git a/docker/base/Dockerfile.j2 b/docker/base/Dockerfile.j2 index 9670dcdf40..a0a0ffebec 100644 --- a/docker/base/Dockerfile.j2 +++ b/docker/base/Dockerfile.j2 @@ -44,37 +44,29 @@ ENV PS1="$(tput bold)($(printenv KOLLA_SERVICE_NAME))$(tput sgr0)[$(id -un)@$(ho # enables to provide repo overrides at a later date in a simple fashion if we # desire such functionality. I think we will :) -{# FIXME(mgoddard): Remove special case for CentOS 8 when CentOS 7 is no #} -{# longer supported. #} RUN CURRENT_DISTRO_RELEASE=$(awk '{match($0, /[0-9]+/,version)}END{print version[0]}' /etc/system-release); \ - if [ $CURRENT_DISTRO_RELEASE != "{{ supported_distro_release }}" ] && [ $CURRENT_DISTRO_RELEASE != 8 ]; then \ - echo "Only releases '{{ supported_distro_release }}' and '8' are supported on {{ base_distro }}"; false; \ + if [ $CURRENT_DISTRO_RELEASE != "{{ supported_distro_release }}" ]; then \ + echo "Only releases '{{ supported_distro_release }}' are supported on {{ base_distro }}"; false; \ fi \ && cat /tmp/kolla_bashrc >> /etc/bashrc \ - && sed -i 's|^\(override_install_langs=.*\)|# \1|' {% if distro_package_manager == 'dnf' %}/etc/dnf/dnf.conf{% else %}/etc/yum.conf{% endif %} + && sed -i 's|^\(override_install_langs=.*\)|# \1|' /etc/dnf/dnf.conf {% block base_yum_conf %} -{% if distro_package_manager == 'dnf' %} COPY dnf.conf /etc/dnf/dnf.conf -{% else %} -COPY yum.conf /etc/yum.conf -{% endif %} {% endblock %} # Install what is needed for en_US.UTF-8 {% block base_centos_distro_sync_and_languages %} -{% if distro_package_manager == 'dnf' %} - {% set base_centos_language_packages = [ - 'langpacks-en', - 'glibc-all-langpacks' - ] %} +{% set base_centos_language_packages = [ + 'langpacks-en', + 'glibc-all-langpacks' +] %} RUN {{ macros.install_packages(base_centos_language_packages | customizable("centos_language_packages"), chain=True, clean=False) }} \ && {{ macros.rpm_security_update(clean_package_cache) }} -{% endif %} {% endblock %} @@ -97,13 +89,9 @@ RUN {{ macros.install_packages(base_centos_language_packages | customizable("cen 'td.repo', ] %} # FIXME(mgoddard): Not available for CentOS 8 yet. - {% if distro_package_manager == 'yum' %} - {% set base_yum_repo_files = base_yum_repo_files + [ - 'crmsh.repo', - 'elasticsearch.repo', - 'opendaylight.repo', - ] %} - {% endif %} + # 'crmsh.repo', + # 'elasticsearch.repo', + # 'opendaylight.repo', {% set base_yum_repo_keys = [ 'https://packages.grafana.com/gpg.key', @@ -112,11 +100,9 @@ RUN {{ macros.install_packages(base_centos_language_packages | customizable("cen 'https://packages.treasuredata.com/GPG-KEY-td-agent', ] %} # FIXME(mgoddard): Not available for CentOS 8 yet. - {% if distro_package_manager == 'yum' %} - {% set base_yum_repo_keys = base_yum_repo_keys + [ - 'https://artifacts.elastic.co/GPG-KEY-elasticsearch', - ] %} - {% endif %} + # + # 'https://artifacts.elastic.co/GPG-KEY-elasticsearch', + # {% elif base_arch == 'aarch64' %} {% set base_yum_repo_files = [ 'grafana.repo', @@ -124,11 +110,9 @@ RUN {{ macros.install_packages(base_centos_language_packages | customizable("cen 'rabbitmq_rabbitmq-erlang-aarch64.repo', ] %} # FIXME(mgoddard): Not available for CentOS 8 yet. - {% if distro_package_manager == 'yum' %} - {% set base_yum_repo_files = base_yum_repo_files + [ - 'elasticsearch.repo', - ] %} - {% endif %} + # + # 'elasticsearch.repo', + # {% set base_yum_repo_keys = [ 'https://packages.grafana.com/gpg.key', @@ -136,30 +120,24 @@ RUN {{ macros.install_packages(base_centos_language_packages | customizable("cen 'https://obs.linaro.org/repos/home:/marcin.juszkiewicz/centos7/repodata/repomd.xml.key', ] %} # FIXME(mgoddard): Not available for CentOS 8 yet. - {% if distro_package_manager == 'yum' %} - {% set base_yum_repo_keys = base_yum_repo_keys + [ - 'https://artifacts.elastic.co/GPG-KEY-elasticsearch', - ] %} - {% endif %} + # + # 'https://artifacts.elastic.co/GPG-KEY-elasticsearch', + # {% elif base_arch == 'ppc64le' %} {% set base_yum_repo_files = [ 'rabbitmq_rabbitmq-server.repo', ] %} # FIXME(mgoddard): Not available for CentOS 8 yet. - {% if distro_package_manager == 'yum' %} - {% set base_yum_repo_files = base_yum_repo_files + [ - 'elasticsearch.repo', - ] %} - {% endif %} + # + # 'elasticsearch.repo', + # {% set base_yum_repo_keys = [ ] %} # FIXME(mgoddard): Not available for CentOS 8 yet. - {% if distro_package_manager == 'yum' %} - {% set base_yum_repo_keys = base_yum_repo_keys + [ - 'https://artifacts.elastic.co/GPG-KEY-elasticsearch', - ] %} - {% endif %} + # + # 'https://artifacts.elastic.co/GPG-KEY-elasticsearch', + # {% endif %} {%- for repo_file in base_yum_repo_files | customizable('yum_repo_files') %} @@ -199,97 +177,62 @@ RUN if [[ -e /etc/yum.repos.d/rabbitmq_rabbitmq-server.repo ]]; then \ {% if install_metatype == 'rhos' %} -{% block base_rhos_repo_enablement %} -# Turn on the RHOS 7.0 repo for RHOS -RUN yum-config-manager --enable rhel-7-server-rpms \ - && yum-config-manager --enable rhel-7-server-openstack-7.0-rpms -{% endblock %} +{% block base_rhos_repo_enablement %}{% endblock %} {% endif %} {% if base_distro == 'centos' %} {% block base_centos_gpg_key_import %} -{% if distro_package_manager == 'dnf' %} RUN rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial -{% else %} -RUN rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7 -{% endif %} {% endblock %} {% set base_centos_yum_repo_keys = [ '/etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-SIG-OpsTools', ] %} # FIXME(mgoddard): Not available for CentOS 8 yet. -{% if distro_package_manager == 'yum' %} - {% set base_centos_yum_repo_keys = base_centos_yum_repo_keys + [ - '/etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-SIG-Storage', - '/etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-SIG-Virtualization', - ] %} -{% endif %} +# +# '/etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-SIG-Storage', +# '/etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-SIG-Virtualization', +# {% set base_centos_yum_repo_packages = [ 'centos-release-opstools', 'epel-release', ] %} # FIXME(mgoddard): Not available for CentOS 8 yet. -{% if distro_package_manager == 'yum' %} - {% set base_centos_yum_repo_packages = base_centos_yum_repo_packages + [ - 'centos-release-ceph-nautilus', - 'centos-release-qemu-ev', - ] %} +# +# 'centos-release-ceph-nautilus', +# # FIXME(mnasiadka): Replace with CentOS Storage SIG packages when avail -{% else %} COPY ceph.repo /etc/yum.repos.d/ -{% endif %} -{% if distro_package_manager == 'dnf' %} - # We need 'dnf-plugins-core' for 'dnf config-manager' - {% set base_centos_yum_repo_packages = base_centos_yum_repo_packages + [ - 'dnf-plugins-core' - ] %} - {% set base_centos_yum_repos_to_enable = [ - 'PowerTools' - ] %} -{% else %} - {% set base_centos_yum_repo_packages = base_centos_yum_repo_packages + [ - 'yum-plugin-priorities', - ] %} -{% endif %} +# We need 'dnf-plugins-core' for 'dnf config-manager' +{% set base_centos_yum_repo_packages = base_centos_yum_repo_packages + [ + 'dnf-plugins-core' +] %} +{% set base_centos_yum_repos_to_enable = [ + 'PowerTools' +] %} {% set base_centos_yum_repos_to_disable = [ 'centos-ceph-nautilus', 'centos-nfs-ganesha28', ] %} - {% if base_arch == 'x86_64' %} {% set base_centos_yum_repos_to_disable = base_centos_yum_repos_to_disable + [ 'influxdb', ] %} {% endif %} -{% if distro_package_manager == 'yum' %} - {% set base_centos_yum_repos_to_disable = base_centos_yum_repos_to_disable + [ - 'centos-qemu-ev', - ] %} -{% endif %} - RUN {{ macros.install_packages(base_centos_yum_repo_packages | customizable("centos_yum_repo_packages"), chain=True, clean=False) }} \ {%- for repo in base_centos_yum_repos_to_enable | customizable('centos_yum_repos_to_enable') %} -{%- if distro_package_manager == 'dnf' %} && dnf config-manager --enable {{ repo }} \ -{% else %} - && yum-config-manager --enable {{ repo }} \ -{% endif -%} {% endfor -%} {%- for repo in base_centos_yum_repos_to_disable | customizable('centos_yum_repos_to_disable') %} -{%- if distro_package_manager == 'dnf' %} && dnf config-manager --disable {{ repo }} \ -{%- else %} - && yum-config-manager --disable {{ repo }} \ -{%- endif -%} -{%- endfor %} +{% endfor -%} {% for key in base_centos_yum_repo_keys | customizable('centos_yum_repo_keys') -%} && rpm --import {{ key }} \ {% endfor -%} @@ -301,21 +244,7 @@ RUN {{ macros.install_packages(base_centos_yum_repo_packages | customizable("cen {% if base_distro == 'rhel' %} -{% block base_rhel_package_installation %} -# Enable couple required repositories for all RHEL builds -# Turn on EPEL throughout the build -RUN yum-config-manager --enable rhel-7-server-optional-rpms \ - && {{ macros.install_packages( ['yum-plugin-priorities' ], chain=True, clean=False) }} \ - {%- if install_type != 'binary' or install_metatype != 'rdo' %} - && {{ macros.install_packages( [ 'https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm' ], chain=True, clean=False) }} \ - && rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7 \ - {% endif -%} - && yum-config-manager --enable rhel-7-server-extras-rpms \ - && yum-config-manager --enable rhel-7-server-rhceph-2-osd-rpms \ - && yum-config-manager --enable rhel-7-server-rhceph-2-mon-rpms \ - && yum-config-manager --enable rhel-7-server-rhceph-2-tools-rpms \ - && {{ macros.rpm_security_update(clean_package_cache) }} -{% endblock %} +{% block base_rhel_package_installation %}{% endblock %} {% endif %} {# Endif for base_distro RHEL #} @@ -336,29 +265,13 @@ RUN yum-config-manager --enable rhel-7-server-optional-rpms \ 'lvm2', 'ncurses', 'procps-ng', + 'python3', 'socat', 'sudo', 'tar', + 'util-linux-user', 'which' ] %} -{% if distro_python_version.startswith('3') %} - {% set base_centos_packages = base_centos_packages + [ - 'python3' - ] %} -{% else %} - {% set base_centos_packages = base_centos_packages + [ - 'python' - ] %} -{% endif %} -{% if distro_package_manager == 'dnf' %} - {% set base_centos_packages = base_centos_packages + [ - 'util-linux-user', - ] %} -{% else %} - {% set base_centos_packages = base_centos_packages + [ - 'scsi-target-utils', - ] %} -{% endif %} # Install base packages {{ macros.install_packages( base_centos_packages | customizable("centos_packages") | customizable("centos_binary_packages") | customizable("centos_source_packages") ) }} @@ -512,9 +425,6 @@ RUN sed -ri '/-session(\s+)optional(\s+)pam_systemd.so/d' /etc/pam.d/system-auth {% endif %} COPY set_configs.py /usr/local/bin/kolla_set_configs -{% if distro_python_version.startswith('3') %} -RUN sed -i -e "s+#\!/usr/bin/env python+#\!/usr/bin/env python3+g" /usr/local/bin/kolla_set_configs -{% endif %} COPY start.sh /usr/local/bin/kolla_start COPY copy_cacerts.sh /usr/local/bin/kolla_copy_cacerts COPY httpd_setup.sh /usr/local/bin/kolla_httpd_setup diff --git a/docker/base/set_configs.py b/docker/base/set_configs.py index 93a758f1d2..5f030866fb 100644 --- a/docker/base/set_configs.py +++ b/docker/base/set_configs.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/docker/base/yum.conf b/docker/base/yum.conf deleted file mode 100644 index cac98d8def..0000000000 --- a/docker/base/yum.conf +++ /dev/null @@ -1,10 +0,0 @@ -[main] -keepcache=0 -logfile=/var/log/yum.log -exactarch=1 -obsoletes=1 -gpgcheck=1 -plugins=1 -installonly_limit=0 -skip_missing_names_on_install=False -tsflags=nodocs diff --git a/docker/ceilometer/ceilometer-base/Dockerfile.j2 b/docker/ceilometer/ceilometer-base/Dockerfile.j2 index 331a9d203c..23a35a1ccd 100644 --- a/docker/ceilometer/ceilometer-base/Dockerfile.j2 +++ b/docker/ceilometer/ceilometer-base/Dockerfile.j2 @@ -12,23 +12,12 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {% if install_type == 'binary' %} {% if base_package_type == 'rpm' %} {% set ceilometer_base_packages = [ - 'openstack-ceilometer-common' - ] %} - {% if distro_python_version.startswith('3') %} - {% set ceilometer_base_packages = ceilometer_base_packages + [ + 'openstack-ceilometer-common', 'python3-gnocchiclient', 'python3-oslo-db', 'python3-panko', 'python3-tooz' ] %} - {% else %} - {% set ceilometer_base_packages = ceilometer_base_packages + [ - 'python-gnocchiclient', - 'python-oslo-db', - 'python-panko', - 'python-tooz' - ] %} - {% endif %} {% elif base_package_type == 'deb' %} {% set ceilometer_base_packages = [ 'ceilometer-common', diff --git a/docker/ceilometer/ceilometer-compute/Dockerfile.j2 b/docker/ceilometer/ceilometer-compute/Dockerfile.j2 index ec62398039..a02e99fdb5 100644 --- a/docker/ceilometer/ceilometer-compute/Dockerfile.j2 +++ b/docker/ceilometer/ceilometer-compute/Dockerfile.j2 @@ -22,15 +22,9 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {% elif install_type == 'source' %} {% if base_package_type == 'rpm' %} - {% if distro_python_version.startswith('3') %} - {% set ceilometer_compute_packages = [ - 'python3-libvirt' - ] %} - {% else %} - {% set ceilometer_compute_packages = [ - 'libvirt-python' - ] %} - {% endif %} + {% set ceilometer_compute_packages = [ + 'python3-libvirt' + ] %} {% elif base_package_type == 'deb' %} {% set ceilometer_compute_packages = [ 'python3-libvirt' diff --git a/docker/cinder/cinder-api/Dockerfile.j2 b/docker/cinder/cinder-api/Dockerfile.j2 index 7fd822ae7a..d62db9ca1a 100644 --- a/docker/cinder/cinder-api/Dockerfile.j2 +++ b/docker/cinder/cinder-api/Dockerfile.j2 @@ -12,19 +12,9 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {% set cinder_api_packages = [ 'httpd', 'mod_ssl', - ] %} - - {% if distro_python_version.startswith('3') %} - {% set cinder_api_packages = cinder_api_packages + [ 'python3-keystone', 'python3-mod_wsgi' ] %} - {% else %} - {% set cinder_api_packages = cinder_api_packages + [ - 'mod_wsgi', - 'python-keystone' - ] %} - {% endif %} {{ macros.install_packages(cinder_api_packages | customizable("packages")) }} RUN mkdir -p /var/www/cgi-bin/cinder \ && cp -a /usr/bin/cinder-wsgi /var/www/cgi-bin/cinder/cinder-wsgi \ @@ -49,12 +39,8 @@ RUN mkdir -p /var/www/cgi-bin/cinder \ {% set cinder_api_packages = [ 'httpd', 'mod_ssl', + 'python3-mod_wsgi' ] %} - {% if distro_python_version.startswith('3') %} - {% set cinder_api_packages = cinder_api_packages + ['python3-mod_wsgi'] %} - {% else %} - {% set cinder_api_packages = cinder_api_packages + ['mod_wsgi'] %} - {% endif %} {{ macros.install_packages(cinder_api_packages | customizable("packages")) }} RUN sed -i -r 's,^(Listen 80),#\1,' /etc/httpd/conf/httpd.conf \ diff --git a/docker/cinder/cinder-base/Dockerfile.j2 b/docker/cinder/cinder-base/Dockerfile.j2 index 6dc63b36ca..08b4ec51d5 100644 --- a/docker/cinder/cinder-base/Dockerfile.j2 +++ b/docker/cinder/cinder-base/Dockerfile.j2 @@ -17,20 +17,10 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build 'ceph-common', 'lvm2', 'cryptsetup', - 'openstack-cinder' - ] %} - - {% if distro_python_version.startswith('3') %} - {% set cinder_base_packages = cinder_base_packages + [ + 'openstack-cinder', 'python3-automaton', 'python3-oslo-vmware' ] %} - {% else %} - {% set cinder_base_packages = cinder_base_packages + [ - 'python-automaton', - 'python-oslo-vmware' - ] %} - {% endif %} {% elif base_package_type == 'deb' %} {% set cinder_base_packages = [ 'ceph-common', @@ -49,18 +39,10 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {% if base_package_type == 'rpm' %} {% set cinder_base_packages = [ 'ceph-common', - 'lvm2', 'cryptsetup', - ] %} - {% if distro_package_manager == 'dnf' or base_distro not in ['centos'] %} - {% set cinder_base_packages = cinder_base_packages + [ + 'lvm2', 'qemu-img' - ] %} - {% else %} - {% set cinder_base_packages = cinder_base_packages + [ - 'qemu-img-ev' - ] %} - {% endif %} + ] %} {% elif base_package_type == 'deb' %} {% set cinder_base_packages = [ 'ceph-common', diff --git a/docker/cinder/cinder-volume/Dockerfile.j2 b/docker/cinder/cinder-volume/Dockerfile.j2 index 3e9dba3d18..f95cfb6844 100644 --- a/docker/cinder/cinder-volume/Dockerfile.j2 +++ b/docker/cinder/cinder-volume/Dockerfile.j2 @@ -11,26 +11,14 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {% set cinder_volume_packages = [ 'nfs-utils', 'nvmetcli', + 'python3-rtslib', + 'python3-cinderlib', 'sysfsutils', 'targetcli' ] %} - {% if distro_python_version.startswith('3') %} - {% set cinder_volume_packages = cinder_volume_packages + [ - 'python3-rtslib', - 'python3-cinderlib', - ] %} - {% else %} - {% set cinder_volume_packages = cinder_volume_packages + [ - 'python-rtslib', - 'python2-cinderlib', - ] %} - {% endif %} {{ macros.install_packages(cinder_volume_packages | customizable("packages")) }} {% block cinder_volume_redhat_setup %} -{% if distro_package_manager == 'yum' %} -RUN sed -i '1 i include /var/lib/cinder/volumes/*' /etc/tgt/tgtd.conf -{% endif %} {% endblock %} {% elif base_package_type == 'deb' %} diff --git a/docker/cloudkitty/cloudkitty-api/Dockerfile.j2 b/docker/cloudkitty/cloudkitty-api/Dockerfile.j2 index 951b424f4e..54c2b70cb6 100644 --- a/docker/cloudkitty/cloudkitty-api/Dockerfile.j2 +++ b/docker/cloudkitty/cloudkitty-api/Dockerfile.j2 @@ -13,13 +13,9 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {% set cloudkitty_api_packages = [ 'httpd', 'mod_ssl', - 'openstack-cloudkitty-api' + 'openstack-cloudkitty-api', + 'python3-mod_wsgi' ] %} - {% if distro_python_version.startswith('3') %} - {% set cloudkitty_api_packages = cloudkitty_api_packages + ['python3-mod_wsgi'] %} - {% else %} - {% set cloudkitty_api_packages = cloudkitty_api_packages + ['mod_wsgi'] %} - {% endif %} {{ macros.install_packages(cloudkitty_api_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 @@ -37,12 +33,8 @@ RUN echo '{{ install_type }} not yet available for {{ base_distro }}' \ {% set cloudkitty_api_packages = [ 'httpd', 'mod_ssl', + 'python3-mod_wsgi' ] %} - {% if distro_python_version.startswith('3') %} - {% set cloudkitty_api_packages = cloudkitty_api_packages + ['python3-mod_wsgi'] %} - {% else %} - {% set cloudkitty_api_packages = cloudkitty_api_packages + ['mod_wsgi'] %} - {% endif %} {{ macros.install_packages(cloudkitty_api_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 diff --git a/docker/collectd/Dockerfile.j2 b/docker/collectd/Dockerfile.j2 index f350815742..e5b7e9bf4f 100644 --- a/docker/collectd/Dockerfile.j2 +++ b/docker/collectd/Dockerfile.j2 @@ -54,18 +54,8 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build 'collectd-write_http', 'collectd-write_kafka', 'collectd-write_prometheus', - ] %} - - {% if distro_python_version.startswith('3') %} - {% set collectd_packages = collectd_packages + [ 'python3-sqlalchemy-collectd' ] %} - {% else %} - {% set collectd_packages = collectd_packages + [ - 'python2-collectd-rabbitmq-monitoring', - 'python2-sqlalchemy-collectd' - ] %} - {% endif %} {% if base_arch in ['x86_64', 'ppc64le'] %} {% set collectd_packages = collectd_packages + [ diff --git a/docker/designate/designate-base/Dockerfile.j2 b/docker/designate/designate-base/Dockerfile.j2 index c87e30e31a..ccad55d730 100644 --- a/docker/designate/designate-base/Dockerfile.j2 +++ b/docker/designate/designate-base/Dockerfile.j2 @@ -12,22 +12,11 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {% if install_type == 'binary' %} {% if base_package_type == 'rpm' %} {% set designate_base_packages = [ - 'openstack-designate-common' - ] %} - - {% if distro_python_version.startswith('3') %} - {% set designate_base_packages = designate_base_packages + [ + 'openstack-designate-common', 'python3-oslo-reports', 'python3-suds', 'python3-tooz' ] %} - {% else %} - {% set designate_base_packages = designate_base_packages + [ - 'python-tooz', - 'python2-oslo-reports', - 'python2-suds' - ] %} - {% endif %} {{ macros.install_packages(designate_base_packages | customizable("packages")) }} {% elif base_package_type == 'deb' %} diff --git a/docker/designate/designate-sink/Dockerfile.j2 b/docker/designate/designate-sink/Dockerfile.j2 index 88fb5bda22..07a743c00f 100644 --- a/docker/designate/designate-sink/Dockerfile.j2 +++ b/docker/designate/designate-sink/Dockerfile.j2 @@ -10,18 +10,9 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {% if install_type == 'binary' %} {% if base_package_type == 'rpm' %} {% set designate_sink_packages = [ - 'openstack-designate-sink' - ] %} - - {% if distro_python_version.startswith('3') %} - {% set designate_sink_packages = designate_sink_packages + [ + 'openstack-designate-sink', 'python3-designateclient' ] %} - {% else %} - {% set designate_sink_packages = designate_sink_packages + [ - 'python-designateclient' - ] %} - {% endif %} {% elif base_package_type == 'deb' %} {% set designate_sink_packages = [ 'designate-sink', diff --git a/docker/freezer/freezer-api/Dockerfile.j2 b/docker/freezer/freezer-api/Dockerfile.j2 index 702d8719f7..f6bba058c6 100644 --- a/docker/freezer/freezer-api/Dockerfile.j2 +++ b/docker/freezer/freezer-api/Dockerfile.j2 @@ -18,12 +18,8 @@ RUN echo '{{ install_type }} not yet available for {{ base_distro }}' \ {% set freezer_api_packages = [ 'httpd', 'mod_ssl', - ] %} - {% if distro_python_version.startswith('3') %} - {% set freezer_api_packages = freezer_api_packages + ['python3-mod_wsgi'] %} - {% else %} - {% set freezer_api_packages = freezer_api_packages + ['mod_wsgi'] %} - {% endif %} + 'python3-mod_wsgi' + ] %} {{ macros.install_packages(freezer_api_packages | customizable("packages")) }} diff --git a/docker/freezer/freezer-base/Dockerfile.j2 b/docker/freezer/freezer-base/Dockerfile.j2 index 299f569853..94c53283d4 100644 --- a/docker/freezer/freezer-base/Dockerfile.j2 +++ b/docker/freezer/freezer-base/Dockerfile.j2 @@ -10,9 +10,7 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {{ macros.configure_user(name='freezer') }} {# NOTE(mgoddard): EPEL required for trickle package. Not provided by EPEL8 #} -{% if distro_package_manager == 'yum' %} {{ macros.enable_extra_repos(['epel']) }} -{% endif %} {% if install_type == 'binary' %} @@ -20,7 +18,7 @@ RUN echo '{{ install_type }} not yet available for {{ base_distro }}' \ && /bin/false {% elif install_type == 'source' %} - {% if distro_package_manager != 'dnf' %} + {% if base_package_type != 'rpm' %} {% set freezer_base_packages = [ 'trickle' ] %} diff --git a/docker/glance/glance-api/Dockerfile.j2 b/docker/glance/glance-api/Dockerfile.j2 index 5f6635faae..7b42c8d127 100644 --- a/docker/glance/glance-api/Dockerfile.j2 +++ b/docker/glance/glance-api/Dockerfile.j2 @@ -8,12 +8,7 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {% import "macros.j2" as macros with context %} {% 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 %} - {% set glance_api_packages = glance_api_packages + ['nfs-utils'] %} + {% set glance_api_packages = ['qemu-img'] %} {% elif base_package_type == 'deb' %} {% set glance_api_packages = [ 'nfs-common', diff --git a/docker/glance/glance-base/Dockerfile.j2 b/docker/glance/glance-base/Dockerfile.j2 index f63e899361..b5d6d00c77 100644 --- a/docker/glance/glance-base/Dockerfile.j2 +++ b/docker/glance/glance-base/Dockerfile.j2 @@ -14,21 +14,11 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {% if install_type == 'binary' %} {% if base_package_type == 'rpm' %} {% set glance_base_packages = [ - 'openstack-glance' - ] %} - {% if distro_python_version.startswith('3') %} - {% set glance_base_packages = glance_base_packages + [ + 'openstack-glance', 'python3-oslo-vmware', 'python3-rados', 'python3-rbd' ] %} - {% else %} - {% set glance_base_packages = glance_base_packages + [ - 'python-oslo-vmware', - 'python-rados', - 'python-rbd' - ] %} - {% endif %} {% elif base_package_type == 'deb' %} {% set glance_base_packages = [ 'glance', @@ -36,8 +26,6 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build 'python3-oslo.vmware', 'python3-rados', 'python3-rbd', - 'python3-rados', - 'python3-rbd' ] %} {% endif %} @@ -45,17 +33,10 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {% elif install_type == 'source' %} {% if base_package_type == 'rpm' %} - {% if distro_python_version.startswith('3') %} {% set glance_base_packages = [ 'python3-rados', 'python3-rbd' ] %} - {% else %} - {% set glance_base_packages = [ - 'python-rados', - 'python-rbd' - ] %} - {% endif %} {% elif base_package_type == 'deb' %} {% set glance_base_packages = [ 'python3-rados', diff --git a/docker/gnocchi/gnocchi-base/Dockerfile.j2 b/docker/gnocchi/gnocchi-base/Dockerfile.j2 index 487c70a359..f88fe6bdd4 100644 --- a/docker/gnocchi/gnocchi-base/Dockerfile.j2 +++ b/docker/gnocchi/gnocchi-base/Dockerfile.j2 @@ -13,10 +13,8 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {% if install_type == 'binary' %} - {# NOTE(mgoddard): EPEL required for python3-boto3 package on CentOS 8 #} - {% if distro_package_manager == 'dnf' %} - {{ macros.enable_extra_repos(['epel']) }} - {% endif %} +{# NOTE(mgoddard): EPEL required for python3-boto3 package on CentOS 8 #} +{{ macros.enable_extra_repos(['epel']) }} {% if base_package_type == 'rpm' %} @@ -24,22 +22,11 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build 'gnocchi-common', 'httpd', 'mod_ssl', - ] %} - {% if distro_python_version.startswith('3') %} - {% set gnocchi_base_packages = gnocchi_base_packages + [ 'python3-boto3', 'python3-cradox', 'python3-ldappool', 'python3-mod_wsgi' ] %} - {% else %} - {% set gnocchi_base_packages = gnocchi_base_packages + [ - 'mod_wsgi', - 'python-boto3', - 'python2-cradox', - 'python2-ldappool' - ] %} - {% endif %} {{ macros.install_packages(gnocchi_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 @@ -74,19 +61,9 @@ RUN {{ macros.install_pip(gnocchi_base_pip_packages | customizable("pip_packages 'httpd', 'librados2-devel', 'mod_ssl', - ] %} - {% if distro_python_version.startswith('3') %} - {% set gnocchi_base_packages = gnocchi_base_packages + [ 'python3-ldappool', 'python3-mod_wsgi' ] %} - {% else %} - {% set gnocchi_base_packages = gnocchi_base_packages + [ - 'mod_wsgi', - 'python2-ldappool' - ] %} - {% endif %} - # on x86-64 pip grabs precompiled numpy/scipy - on aarch64/ppc64le # it needs to be built diff --git a/docker/heat/heat-base/Dockerfile.j2 b/docker/heat/heat-base/Dockerfile.j2 index bd8cfb661e..4819f5291d 100644 --- a/docker/heat/heat-base/Dockerfile.j2 +++ b/docker/heat/heat-base/Dockerfile.j2 @@ -15,13 +15,9 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {% set heat_base_packages = [ 'httpd', 'mod_ssl', - 'openstack-heat-common' + 'openstack-heat-common', + 'python3-mod_wsgi' ] %} - {% if distro_python_version.startswith('3') %} - {% set heat_base_packages = heat_base_packages + ['python3-mod_wsgi'] %} - {% else %} - {% set heat_base_packages = heat_base_packages + ['mod_wsgi'] %} - {% endif %} {{ macros.install_packages(heat_base_packages | customizable("packages")) }} RUN sed -i -r 's,^(Listen 80),#\1,' /etc/httpd/conf/httpd.conf \ @@ -43,12 +39,8 @@ RUN echo > /etc/apache2/ports.conf {% set heat_base_packages = [ 'httpd', 'mod_ssl', + 'python3-mod_wsgi' ] %} - {% if distro_python_version.startswith('3') %} - {% set heat_base_packages = heat_base_packages + ['python3-mod_wsgi'] %} - {% else %} - {% set heat_base_packages = heat_base_packages + ['mod_wsgi'] %} - {% endif %} {{ macros.install_packages(heat_base_packages | customizable("packages")) }} RUN sed -i -r 's,^(Listen 80),#\1,' /etc/httpd/conf/httpd.conf \ diff --git a/docker/heat/heat-engine/Dockerfile.j2 b/docker/heat/heat-engine/Dockerfile.j2 index fcb958109f..04fa304861 100644 --- a/docker/heat/heat-engine/Dockerfile.j2 +++ b/docker/heat/heat-engine/Dockerfile.j2 @@ -10,19 +10,10 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {% if install_type == 'binary' %} {% if base_package_type == 'rpm' %} {% set heat_engine_packages = [ - 'openstack-heat-engine' - ] %} - {% if distro_python_version.startswith('3') %} - {% set heat_engine_packages = heat_engine_packages + [ + 'openstack-heat-engine', 'python3-barbicanclient', 'python3-zaqarclient' ] %} - {% else %} - {% set heat_engine_packages = heat_engine_packages + [ - 'python-barbicanclient', - 'python-zaqarclient' - ] %} - {% endif %} {% elif base_package_type == 'deb' %} {% set heat_engine_packages = ['heat-engine'] %} {% endif %} diff --git a/docker/horizon/Dockerfile.j2 b/docker/horizon/Dockerfile.j2 index c9474d5e98..ec3a5e233d 100644 --- a/docker/horizon/Dockerfile.j2 +++ b/docker/horizon/Dockerfile.j2 @@ -11,11 +11,6 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {% if install_type == 'binary' %} {% if base_package_type == 'rpm' %} - {% if distro_python_version.startswith('3') %} - {% set horizon_python = 'python3' %} - {% else %} - {% set horizon_python = 'python2' %} - {% endif %} {% set horizon_packages = [ 'gettext', 'httpd', @@ -32,13 +27,9 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build 'openstack-octavia-ui', 'openstack-sahara-ui', 'openstack-trove-ui', - 'openstack-vitrage-ui' + 'openstack-vitrage-ui', + 'python3-mod_wsgi', ] %} - {% if distro_python_version.startswith('3') %} - {% set horizon_packages = horizon_packages + ['python3-mod_wsgi'] %} - {% else %} - {% set horizon_packages = horizon_packages + ['mod_wsgi'] %} - {% endif %} {{ macros.install_packages(horizon_packages | customizable("packages")) }} @@ -115,12 +106,8 @@ RUN echo > /etc/apache2/ports.conf \ 'gettext', 'httpd', 'mod_ssl', + 'python3-mod_wsgi', ] %} - {% if distro_python_version.startswith('3') %} - {% set horizon_packages = horizon_packages + ['python3-mod_wsgi'] %} - {% else %} - {% set horizon_packages = horizon_packages + ['mod_wsgi'] %} - {% endif %} {{ macros.install_packages(horizon_packages | customizable("packages")) }} diff --git a/docker/ironic/ironic-api/Dockerfile.j2 b/docker/ironic/ironic-api/Dockerfile.j2 index 35bde0c7a6..f6634a3b4c 100644 --- a/docker/ironic/ironic-api/Dockerfile.j2 +++ b/docker/ironic/ironic-api/Dockerfile.j2 @@ -12,13 +12,9 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {% set ironic_api_packages = [ 'httpd', 'mod_ssl', - 'openstack-ironic-api' + 'openstack-ironic-api', + 'python3-mod_wsgi', ] %} - {% if distro_python_version.startswith('3') %} - {% set ironic_api_packages = ironic_api_packages + ['python3-mod_wsgi'] %} - {% else %} - {% set ironic_api_packages = ironic_api_packages + ['mod_wsgi'] %} - {% endif %} {% elif base_package_type == 'deb' %} {% set ironic_api_packages = [ 'apache2', @@ -32,12 +28,8 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {% set ironic_api_packages = [ 'httpd', 'mod_ssl', + 'python3-mod_wsgi', ] %} - {% if distro_python_version.startswith('3') %} - {% set ironic_api_packages = ironic_api_packages + ['python3-mod_wsgi'] %} - {% else %} - {% set ironic_api_packages = ironic_api_packages + ['mod_wsgi'] %} - {% endif %} {% elif base_package_type == 'deb' %} {% set ironic_api_packages = [ 'apache2', diff --git a/docker/ironic/ironic-conductor/Dockerfile.j2 b/docker/ironic/ironic-conductor/Dockerfile.j2 index e8592e36d4..5883f604f4 100644 --- a/docker/ironic/ironic-conductor/Dockerfile.j2 +++ b/docker/ironic/ironic-conductor/Dockerfile.j2 @@ -7,11 +7,6 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {% import "macros.j2" as macros with context %} -{# NOTE(mgoddard): EPEL required for shellinabox 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' %} # TODO(Jeffrey4l): no python-oneviewclient @@ -25,14 +20,6 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build 'openstack-ironic-staging-drivers', 'parted', 'psmisc', - 'util-linux', - 'xfsprogs' - ] %} - - # FIXME(mgoddard): Removed shellinabox which is not currently provided - # by EPEL8. - {% if distro_python_version.startswith('3') %} - {% set ironic_conductor_packages = ironic_conductor_packages + [ 'python3dist\(ansible\)', 'python3-dracclient', 'python3-ironic-inspector-client', @@ -40,35 +27,14 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build 'python3-pysnmp', 'python3-scciclient', 'python3-sushy', - 'python3-systemd' + 'python3-systemd', + 'qemu-img', + 'util-linux', + 'xfsprogs' ] %} - {% else %} - {% set ironic_conductor_packages = ironic_conductor_packages + [ - 'ansible', - 'pysnmp', - 'python-UcsSdk', - 'python-dracclient', - 'python-ironic-inspector-client', - 'python-proliantutils', - 'python-scciclient', - 'python-sushy', - 'python2-ImcSdk', - 'shellinabox', - 'systemd-python' - ] %} - {% 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' %} - # TODO(jeffrey4l): no python-dracclient, python-oneviewclient, UcsSdk, - # ImcSdk package, python-sushy, ironic-staging-drivers + # TODO(jeffrey4l): no python-dracclient, python-oneviewclient, + # python-sushy, ironic-staging-drivers {% set ironic_conductor_packages = [ 'ansible', 'bsdmainutils', @@ -102,32 +68,12 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build 'openssh-clients', 'parted', 'psmisc', + 'python3-systemd', + 'qemu-img', + 'systemd-udev', 'util-linux', 'xfsprogs', ] %} - # FIXME(mgoddard): Removed shellinabox which is not currently provided - # by EPEL8. - {% if distro_python_version.startswith('3') %} - {% set ironic_conductor_packages = ironic_conductor_packages + [ - 'python3-systemd', - 'systemd-udev', - ] %} - {% else %} - {% set ironic_conductor_packages = ironic_conductor_packages + [ - 'shellinabox', - 'systemd-python', - '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', diff --git a/docker/ironic/ironic-pxe/Dockerfile.j2 b/docker/ironic/ironic-pxe/Dockerfile.j2 index 1a778fa235..52b940bf46 100644 --- a/docker/ironic/ironic-pxe/Dockerfile.j2 +++ b/docker/ironic/ironic-pxe/Dockerfile.j2 @@ -12,13 +12,9 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build 'httpd', 'ipxe-bootimgs', 'mod_ssl', - 'tftp-server' + 'python3-mod_wsgi', + 'tftp-server', ] %} - {% if distro_python_version.startswith('3') %} - {% set ironic_pxe_packages = ironic_pxe_packages + ['python3-mod_wsgi'] %} - {% else %} - {% set ironic_pxe_packages = ironic_pxe_packages + ['mod_wsgi'] %} - {% endif %} {% if base_arch == 'x86_64' %} {% set ironic_pxe_packages = ironic_pxe_packages + [ diff --git a/docker/iscsid/Dockerfile.j2 b/docker/iscsid/Dockerfile.j2 index 49bccd5767..71799e2293 100644 --- a/docker/iscsid/Dockerfile.j2 +++ b/docker/iscsid/Dockerfile.j2 @@ -10,19 +10,10 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {% if base_package_type == 'rpm' %} {% set iscsid_packages = [ 'iscsi-initiator-utils', + 'python3-rtslib', 'targetcli' ] %} - {% if distro_python_version.startswith('3') %} - {% set iscsid_packages = iscsid_packages + [ - 'python3-rtslib' - ] %} - {% else %} - {% set iscsid_packages = iscsid_packages + [ - 'python-rtslib' - ] %} - {% endif %} - {% elif base_package_type == 'deb' %} {% set iscsid_packages = [ 'open-iscsi', diff --git a/docker/keystone/keystone-base/Dockerfile.j2 b/docker/keystone/keystone-base/Dockerfile.j2 index 6792ff3c52..194480191f 100644 --- a/docker/keystone/keystone-base/Dockerfile.j2 +++ b/docker/keystone/keystone-base/Dockerfile.j2 @@ -16,26 +16,13 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build 'mod_auth_mellon', 'mod_auth_openidc', 'mod_ssl', - 'openstack-keystone' - ] %} - - {% if distro_python_version.startswith('3') %} - {% set keystone_base_packages = keystone_base_packages + [ + 'openstack-keystone', 'python3-keystoneclient', 'python3-ldappool', 'python3-mod_wsgi' ] %} - {% else %} - {% set keystone_base_packages = keystone_base_packages + [ - 'mod_wsgi', - 'python-keystoneclient', - 'python2-ldappool' - ] %} - {% 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 \ @@ -69,22 +56,11 @@ RUN mkdir -p /var/www/cgi-bin/keystone \ 'mod_auth_mellon', 'mod_auth_openidc', 'mod_ssl', - ] %} - {% if distro_python_version.startswith('3') %} - {% set keystone_base_packages = keystone_base_packages + [ 'python3-ldappool', 'python3-mod_wsgi' ] %} - {% else %} - {% set keystone_base_packages = keystone_base_packages + [ - 'mod_wsgi', - 'python2-ldappool' - ] %} - {% 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 \ diff --git a/docker/keystone/keystone-ssh/Dockerfile.j2 b/docker/keystone/keystone-ssh/Dockerfile.j2 index cfda95319e..7708329915 100644 --- a/docker/keystone/keystone-ssh/Dockerfile.j2 +++ b/docker/keystone/keystone-ssh/Dockerfile.j2 @@ -15,11 +15,9 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build 'rsync' ] %} -{% 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' %} {% set keystone_ssh_packages = [ diff --git a/docker/keystone/keystone/Dockerfile.j2 b/docker/keystone/keystone/Dockerfile.j2 index 95096f59da..763d78d25f 100644 --- a/docker/keystone/keystone/Dockerfile.j2 +++ b/docker/keystone/keystone/Dockerfile.j2 @@ -14,18 +14,9 @@ RUN chmod 755 /usr/local/bin/kolla_extend_start /usr/local/bin/kolla_keystone_bo {% if install_type == 'binary' %} {% if base_package_type == 'rpm' %} {% set keystone_packages = [ - 'mod_auth_gssapi' - ] %} - - {% if distro_python_version.startswith('3') %} - {% set keystone_packages = keystone_packages + [ + 'mod_auth_gssapi', 'python3-requests-kerberos' ] %} - {% else %} - {% set keystone_packages = keystone_packages + [ - 'python-requests-kerberos' - ] %} - {% endif %} {% elif base_package_type == 'deb' %} {% set keystone_packages = [ 'libapache2-mod-auth-gssapi', diff --git a/docker/kolla-toolbox/Dockerfile.j2 b/docker/kolla-toolbox/Dockerfile.j2 index 039d02e1cd..08ac79024e 100644 --- a/docker/kolla-toolbox/Dockerfile.j2 +++ b/docker/kolla-toolbox/Dockerfile.j2 @@ -30,18 +30,9 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build 'mariadb-devel', 'openssh-clients', 'openssl-devel', - ] %} - {% if distro_package_manager == 'dnf' %} - {% set kolla_toolbox_packages = kolla_toolbox_packages + [ - 'python3-devel', - 'rabbitmq-server-3.8.*' + 'python3-devel', + 'rabbitmq-server-3.8.*' ] %} - {% else %} - {% set kolla_toolbox_packages = kolla_toolbox_packages + [ - 'python-devel', - 'rabbitmq-server-3.8.*' - ] %} - {% endif %} {% elif base_package_type == 'deb' %} {% set kolla_toolbox_packages = [ diff --git a/docker/kuryr/kuryr-libnetwork/Dockerfile.j2 b/docker/kuryr/kuryr-libnetwork/Dockerfile.j2 index 4bab327a9d..4264f7ad1a 100644 --- a/docker/kuryr/kuryr-libnetwork/Dockerfile.j2 +++ b/docker/kuryr/kuryr-libnetwork/Dockerfile.j2 @@ -18,11 +18,6 @@ RUN echo '{{ install_type }} not yet available for {{ base_distro }}' \ {% set kuryr_libnetwork_packages = [ 'openvswitch' ] %} - {% if distro_package_manager == 'yum' %} - {% set kuryr_libnetwork_packages = kuryr_libnetwork_packages + [ - 'bridge-utils', - ] %} - {% endif %} {% elif base_package_type == 'deb' %} diff --git a/docker/macros.j2 b/docker/macros.j2 index bdccacfc46..efeac9b818 100644 --- a/docker/macros.j2 +++ b/docker/macros.j2 @@ -19,11 +19,7 @@ {# Be Extra vigilant about introducing any extra whitespace at the end of the macro for chaining purposes -#} {% macro rpm_security_update(cleanup) -%} -{% if distro_package_manager == 'dnf' -%} {{ distro_package_manager }} -y distro-sync --security --sec-severity=Important --sec-severity=Critical -{%- else -%} - {{ distro_package_manager }} -y update --security --sec-severity=Important --sec-severity=Critical -{%- endif %} {%- if cleanup %} \ && {{ distro_package_manager }} clean all && rm -rf /var/cache/{{ distro_package_manager }}{% endif -%} {%- endmacro %} @@ -37,13 +33,8 @@ {%- endmacro %} {% macro get_pip() %} -{% if distro_python_version == '2.7' %} - {% set python='python' %} -{% else %} - {% set python='python3' %} -{% endif %} RUN curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py \ - && {{python}} get-pip.py \ + && python3 get-pip.py \ && rm get-pip.py {% endmacro %} diff --git a/docker/manila/manila-api/Dockerfile.j2 b/docker/manila/manila-api/Dockerfile.j2 index d16ee8f918..a55e8e098e 100644 --- a/docker/manila/manila-api/Dockerfile.j2 +++ b/docker/manila/manila-api/Dockerfile.j2 @@ -12,12 +12,8 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {% set manila_api_packages = [ 'httpd', 'mod_ssl', + 'python3-mod_wsgi', ] %} - {% if distro_python_version.startswith('3') %} - {% set manila_api_packages = manila_api_packages + ['python3-mod_wsgi' ] %} - {% else %} - {% set manila_api_packages = manila_api_packages + ['mod_wsgi' ] %} - {% endif %} {{ macros.install_packages(manila_api_packages | customizable("packages")) }} RUN mkdir -p /var/www/cgi-bin/manila \ && cp -a /usr/bin/manila-wsgi /var/www/cgi-bin/manila/manila-wsgi \ @@ -43,12 +39,8 @@ RUN mkdir -p /var/www/cgi-bin/manila \ {% set manila_api_packages = [ 'httpd', 'mod_ssl', + 'python3-mod_wsgi', ] %} - {% if distro_python_version.startswith('3') %} - {% set manila_api_packages = manila_api_packages + ['python3-mod_wsgi' ] %} - {% else %} - {% set manila_api_packages = manila_api_packages + ['mod_wsgi' ] %} - {% endif %} {{ macros.install_packages(manila_api_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 diff --git a/docker/masakari/masakari-base/Dockerfile.j2 b/docker/masakari/masakari-base/Dockerfile.j2 index 42170f5653..3bd6a988c4 100644 --- a/docker/masakari/masakari-base/Dockerfile.j2 +++ b/docker/masakari/masakari-base/Dockerfile.j2 @@ -21,18 +21,9 @@ RUN echo '{{ install_type }} not yet available for {{ base_distro }}' \ {% set masakari_base_packages = [ 'httpd', 'mod_ssl', - ] %} - {% if distro_python_version.startswith('3') %} - {% set masakari_base_packages = masakari_base_packages + [ 'python3-ldappool', 'python3-mod_wsgi' ] %} - {% else %} - {% set masakari_base_packages = masakari_base_packages + [ - 'mod_wsgi', - 'python2-ldappool' - ] %} - {% endif %} {{ macros.install_packages(masakari_base_packages | customizable("packages")) }} RUN mkdir -p /var/www/cgi-bin/masakari \ diff --git a/docker/mistral/mistral-api/Dockerfile.j2 b/docker/mistral/mistral-api/Dockerfile.j2 index 05ea55f647..7a8c47537c 100644 --- a/docker/mistral/mistral-api/Dockerfile.j2 +++ b/docker/mistral/mistral-api/Dockerfile.j2 @@ -12,13 +12,9 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {% set mistral_api_packages = [ 'httpd', 'mod_ssl', - 'openstack-mistral-api' + 'openstack-mistral-api', + 'python3-mod_wsgi', ] %} - {% if distro_python_version.startswith('3') %} - {% set mistral_api_packages = mistral_api_packages + ['python3-mod_wsgi'] %} - {% else %} - {% set mistral_api_packages = mistral_api_packages + ['mod_wsgi'] %} - {% endif %} {{ macros.install_packages(mistral_api_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 @@ -38,12 +34,8 @@ RUN echo > /etc/apache2/ports.conf {% set mistral_api_packages = [ 'httpd', 'mod_ssl', + 'python3-mod_wsgi', ] %} - {% if distro_python_version.startswith('3') %} - {% set mistral_api_packages = mistral_api_packages + ['python3-mod_wsgi'] %} - {% else %} - {% set mistral_api_packages = mistral_api_packages + ['mod_wsgi'] %} - {% endif %} {{ macros.install_packages(mistral_api_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 diff --git a/docker/monasca/monasca-base/Dockerfile.j2 b/docker/monasca/monasca-base/Dockerfile.j2 index fbe6da4578..e4ccf449fb 100644 --- a/docker/monasca/monasca-base/Dockerfile.j2 +++ b/docker/monasca/monasca-base/Dockerfile.j2 @@ -20,12 +20,8 @@ RUN echo '{{ install_type }} not yet available for {{ base_distro }}' \ {% set monasca_base_packages = [ 'httpd', 'mod_ssl', + 'python3-mod_wsgi', ] %} - {% if distro_python_version.startswith('3') %} - {% set monasca_base_packages = monasca_base_packages + ['python3-mod_wsgi'] %} - {% else %} - {% set monasca_base_packages = monasca_base_packages + ['mod_wsgi'] %} - {% endif %} {{ macros.install_packages(monasca_base_packages | customizable("packages")) }} RUN sed -i -r 's,^(Listen 80),#\1,' /etc/httpd/conf/httpd.conf \ diff --git a/docker/monasca/monasca-grafana/Dockerfile.j2 b/docker/monasca/monasca-grafana/Dockerfile.j2 index e04bb2bb88..870f8e374e 100644 --- a/docker/monasca/monasca-grafana/Dockerfile.j2 +++ b/docker/monasca/monasca-grafana/Dockerfile.j2 @@ -50,12 +50,10 @@ ARG monasca_grafana_version=grafana4_2 ARG monasca_grafana_url=https://github.com/monasca/grafana/archive/$monasca_grafana_version.tar.gz {% block monasca_grafana_install %} -# NOTE(mgoddard): Pinning rake because rake 13.0.0 depends on Ruby 2.2, and CentOS 7 only provides -# Ruby 2.0. # NOTE(yoctozepto): Update npm to 6.x version to avoid issues with metadata parsing. # NPM installs itself in /usr/local/bin (the default in Ubuntu) which is not in the PATH. # This is forced for all distros to avoid conflicts with native packages. -RUN gem install rake:"~>12" fpm \ +RUN gem install fpm \ && curl -sSL -o /tmp/monasca-grafana.tgz ${monasca_grafana_url} \ && mkdir -p ${monasca_grafana_build_path} \ && tar --strip 1 -xvf /tmp/monasca-grafana.tgz -C ${monasca_grafana_build_path} \ diff --git a/docker/mongodb/Dockerfile.j2 b/docker/mongodb/Dockerfile.j2 index 73ff374444..1a41438e15 100644 --- a/docker/mongodb/Dockerfile.j2 +++ b/docker/mongodb/Dockerfile.j2 @@ -9,11 +9,6 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {{ macros.configure_user(name='mongodb') }} -{# NOTE(mgoddard): EPEL required for mongodb packages. Not provided by EPEL8 #} -{% if distro_package_manager == 'yum' %} -{{ macros.enable_extra_repos(['epel']) }} -{% endif %} - {% if base_package_type == 'rpm' %} {% set mongodb_packages = [ 'mongodb', diff --git a/docker/networking-baremetal/ironic-neutron-agent/Dockerfile.j2 b/docker/networking-baremetal/ironic-neutron-agent/Dockerfile.j2 index 07006d86ce..8f0c72a5bc 100644 --- a/docker/networking-baremetal/ironic-neutron-agent/Dockerfile.j2 +++ b/docker/networking-baremetal/ironic-neutron-agent/Dockerfile.j2 @@ -11,18 +11,11 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {% if base_package_type == 'rpm' %} - {% if distro_python_version.startswith('3') %} {% set ironic_neutron_agent_packages = [ 'python3-ironic-neutron-agent', 'python3-networking-baremetal' ] %} - {% else %} - {% set ironic_neutron_agent_packages = [ - 'python-ironic-neutron-agent', - 'python-networking-baremetal' - ] %} - {% endif %} {% elif base_package_type == 'deb' %} RUN echo '{{ install_type }} not yet available for {{ base_distro }}' \ diff --git a/docker/neutron/neutron-base/Dockerfile.j2 b/docker/neutron/neutron-base/Dockerfile.j2 index 3ac8c07fd3..81ba036c06 100644 --- a/docker/neutron/neutron-base/Dockerfile.j2 +++ b/docker/neutron/neutron-base/Dockerfile.j2 @@ -20,10 +20,7 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build 'openstack-neutron', 'openstack-neutron-fwaas', 'openstack-neutron-ml2', - 'openvswitch' - ] %} - {% if distro_python_version.startswith('3') %} - {% set neutron_base_packages = neutron_base_packages + [ + 'openvswitch', 'python3-networking-baremetal', 'python3-networking-mlnx', 'python3-networking-sfc', @@ -31,16 +28,6 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build 'python3-openvswitch', 'python3-oslo-vmware' ] %} - {% else %} - {% set neutron_base_packages = neutron_base_packages + [ - 'python-networking-sfc', - 'python-networking-vmware-nsx', - 'python2-networking-baremetal', - 'python2-networking-mlnx', - 'python2-openvswitch', - 'python2-oslo-vmware' - ] %} - {% endif %} {% elif base_package_type == 'deb' %} @@ -87,18 +74,10 @@ RUN mkdir -p /usr/share/neutron \ 'keepalived', 'net-tools', 'openvswitch', + 'python3-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' %} diff --git a/docker/neutron/neutron-linuxbridge-agent/Dockerfile.j2 b/docker/neutron/neutron-linuxbridge-agent/Dockerfile.j2 index 5fe9cb630b..284754a768 100644 --- a/docker/neutron/neutron-linuxbridge-agent/Dockerfile.j2 +++ b/docker/neutron/neutron-linuxbridge-agent/Dockerfile.j2 @@ -29,11 +29,6 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {% set neutron_linuxbridge_agent_packages = [ 'ebtables' ] %} - {% if distro_package_manager != 'dnf' %} - {% set neutron_linuxbridge_agent_packages = neutron_linuxbridge_agent_packages + [ - 'bridge-utils', - ] %} - {% endif %} {% endif %} diff --git a/docker/neutron/neutron-mlnx-agent/Dockerfile.j2 b/docker/neutron/neutron-mlnx-agent/Dockerfile.j2 index 7a957b5845..1741d6199e 100644 --- a/docker/neutron/neutron-mlnx-agent/Dockerfile.j2 +++ b/docker/neutron/neutron-mlnx-agent/Dockerfile.j2 @@ -7,29 +7,16 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {% import "macros.j2" as macros with context %} -{% if distro_python_version.startswith('3') %} - {% set neutron_mlnx_agent_packages = [ - 'python3-libvirt', - 'python3-ethtool', - ] %} -{% else %} - {% set neutron_mlnx_agent_packages = [ - 'libvirt-python', - 'python-ethtool', - ] %} -{% endif %} +{% set neutron_mlnx_agent_packages = [ + 'python3-libvirt', + 'python3-ethtool', +] %} {% if install_type == 'binary' %} - {% if distro_python_version.startswith('3') %} - {% set neutron_mlnx_agent_packages = neutron_mlnx_agent_packages + [ - 'python3-networking-mlnx' - ] %} - {% else %} - {% set neutron_mlnx_agent_packages = neutron_mlnx_agent_packages + [ - 'python-networking-mlnx' - ] %} - {% endif %} + {% set neutron_mlnx_agent_packages = neutron_mlnx_agent_packages + [ + 'python3-networking-mlnx' + ] %} {% endif %} diff --git a/docker/neutron/neutron-server-opendaylight/Dockerfile.j2 b/docker/neutron/neutron-server-opendaylight/Dockerfile.j2 index 5c6055dce4..8f86db6a64 100644 --- a/docker/neutron/neutron-server-opendaylight/Dockerfile.j2 +++ b/docker/neutron/neutron-server-opendaylight/Dockerfile.j2 @@ -11,21 +11,12 @@ USER root {% if install_type == 'binary' %} {% if base_package_type == 'rpm' %} - {% if distro_python_version.startswith('3') %} {% set neutron_server_opendaylight_packages = [ 'python3-networking-bgpvpn', 'python3-networking-bgpvpn-heat', 'python3-networking-l2gw', 'python3-networking-odl' ] %} - {% else %} - {% set neutron_server_opendaylight_packages = [ - 'python-networking-bgpvpn', - 'python-networking-bgpvpn-heat', - 'python-networking-l2gw', - 'python-networking-odl' - ] %} - {% endif %} {% elif base_package_type == 'deb' %} {% set neutron_server_opendaylight_packages = [ 'python3-networking-bgpvpn', diff --git a/docker/neutron/neutron-server/Dockerfile.j2 b/docker/neutron/neutron-server/Dockerfile.j2 index e41520088a..1694051481 100644 --- a/docker/neutron/neutron-server/Dockerfile.j2 +++ b/docker/neutron/neutron-server/Dockerfile.j2 @@ -11,17 +11,8 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {% if base_package_type == 'rpm' %} {% set neutron_server_packages = [ 'openstack-neutron-vpnaas', - ] %} - - {% if distro_python_version.startswith('3') %} - {% set neutron_server_packages = neutron_server_packages + [ 'python3-networking-generic-switch' ] %} - {% else %} - {% set neutron_server_packages = neutron_server_packages + [ - 'python-networking-generic-switch' - ] %} - {% endif %} {% elif base_package_type == 'deb' %} diff --git a/docker/nova/nova-api/Dockerfile.j2 b/docker/nova/nova-api/Dockerfile.j2 index c4e9fe1ee6..bc84ca80c9 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 ec6157d336..248695fdfc 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', + 'python3-libguestfs', + 'python3-libvirt', + 'python3-rtslib', + 'qemu-img', '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' %} diff --git a/docker/nova/nova-libvirt/Dockerfile.j2 b/docker/nova/nova-libvirt/Dockerfile.j2 index c9a806a144..953a0e43dc 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 9016ebe775..338b6d9eaa 100644 --- a/docker/nova/nova-spicehtml5proxy/Dockerfile.j2 +++ b/docker/nova/nova-spicehtml5proxy/Dockerfile.j2 @@ -8,28 +8,17 @@ 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', + 'python3-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 = [ @@ -43,19 +32,10 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {% if base_package_type == 'rpm' %} {% set nova_spicehtml5proxy_packages = [ + 'python3-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 = [ diff --git a/docker/nova/nova-ssh/Dockerfile.j2 b/docker/nova/nova-ssh/Dockerfile.j2 index b66b587ab8..4810393f65 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' %} diff --git a/docker/novajoin/novajoin-base/Dockerfile.j2 b/docker/novajoin/novajoin-base/Dockerfile.j2 index aba307a965..690a75d34f 100644 --- a/docker/novajoin/novajoin-base/Dockerfile.j2 +++ b/docker/novajoin/novajoin-base/Dockerfile.j2 @@ -11,17 +11,9 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {% if install_type == 'binary' %} {% if base_package_type == 'rpm' %} - - {% if distro_python_version.startswith('3') %} {% set novajoin_base_packages = [ 'python3-novajoin' ] %} - {% else %} - {% set novajoin_base_packages = [ - 'python-novajoin' - ] %} - {% endif %} - {% else %} RUN echo '{{ install_type }} not yet available for {{ base_distro }}' \ && /bin/false diff --git a/docker/octavia/octavia-api/Dockerfile.j2 b/docker/octavia/octavia-api/Dockerfile.j2 index 7d8bec19a8..3420c2eb97 100644 --- a/docker/octavia/octavia-api/Dockerfile.j2 +++ b/docker/octavia/octavia-api/Dockerfile.j2 @@ -10,19 +10,11 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {% if install_type == 'binary' %} {% if base_package_type == 'rpm' %} {% set octavia_api_packages = [ - 'openstack-octavia-api', 'httpd', - 'mod_ssl' - ] %} - {% if distro_python_version.startswith('3') %} - {% set octavia_api_packages = octavia_api_packages + [ + 'mod_ssl', + 'openstack-octavia-api', 'python3-mod_wsgi' ] %} - {% else %} - {% set octavia_api_packages = octavia_api_packages + [ - 'mod_wsgi' - ] %} - {% endif %} {% elif base_package_type == 'deb' %} {% set octavia_api_packages = [ 'octavia-api', @@ -31,22 +23,13 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build ] %} {% endif %} - {% elif install_type == 'source' %} {% if base_package_type == 'rpm' %} {% set octavia_api_packages = [ 'httpd', - 'mod_ssl' - ] %} - {% if distro_python_version.startswith('3') %} - {% set octavia_api_packages = octavia_api_packages + [ + 'mod_ssl', 'python3-mod_wsgi' ] %} - {% else %} - {% set octavia_api_packages = octavia_api_packages + [ - 'mod_wsgi' - ] %} - {% endif %} {% elif base_package_type == 'deb' %} {% set octavia_api_packages = [ diff --git a/docker/openstack-base/Dockerfile.j2 b/docker/openstack-base/Dockerfile.j2 index 779624c74c..9a09d0efb7 100644 --- a/docker/openstack-base/Dockerfile.j2 +++ b/docker/openstack-base/Dockerfile.j2 @@ -18,11 +18,6 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build 'libyaml', 'mailcap', 'openssl', - 'systemd-sysv' - ] %} - {% if distro_python_version.startswith('3') %} - {% set openstack_base_packages = openstack_base_packages + [ - 'python3-PyYAML', 'python3-alembic', 'python3-anyjson', 'python3-aodhclient', @@ -82,6 +77,7 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build 'python3-prettytable', 'python3-psycopg2', 'python3-pyasn1', + 'python3-PyYAML', 'python3-redis', 'python3-retrying', 'python3-routes', @@ -96,88 +92,8 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build 'python3-vitrageclient', 'python3-webob', 'python3-zaqarclient', + 'systemd-sysv', ] %} - {% else %} - {% set openstack_base_packages = openstack_base_packages + [ - 'python2-cryptography', - 'python2-eventlet', - 'python2-iso8601', - 'python2-oslo-cache', - 'python2-oslo-concurrency', - 'python2-oslo-config', - 'python2-oslo-context', - 'python2-oslo-db', - 'python2-oslo-i18n', - 'python2-oslo-log', - 'python2-oslo-messaging', - 'python2-oslo-middleware', - 'python2-oslo-policy', - 'python2-oslo-reports', - 'python2-oslo-rootwrap', - 'python2-oslo-serialization', - 'python2-oslo-service', - 'python2-oslo-upgradecheck', - 'python2-oslo-utils', - 'python2-oslo-versionedobjects', - 'python2-pika', - 'python2-pyasn1', - 'python2-sysv_ipc', - 'python2-alembic', - 'python-anyjson', - 'python-aodhclient', - 'python-barbicanclient', - 'python2-cachetools', - 'python-cloudkittyclient', - 'python-congressclient', - 'python-contextlib2', - 'python-designateclient', - 'python-elasticsearch', - 'python2-extras', - 'python-futures', - 'python-glanceclient', - 'python-gnocchiclient', - 'python-heatclient', - 'python-httplib2', - 'python-ironicclient', - 'python-kazoo', - 'python-keystoneauth1', - 'python-keystoneclient', - 'python-keystonemiddleware', - 'python-logutils', - 'python-lxml', - 'python-magnumclient', - 'python-manilaclient', - 'python-migrate', - 'python2-mimeparse', - 'python-mistralclient', - 'python-muranoclient', - 'python-neutronclient', - 'python-novaclient', - 'python-openstackclient', - 'python-osprofiler', - 'python-paramiko', - 'python-paste-deploy', - 'python-pbr', - 'python-posix_ipc', - 'python-prettytable', - 'python-psycopg2', - 'python-redis', - 'python-retrying', - 'python-routes', - 'python-saharaclient', - 'python2-sqlalchemy', - 'python2-sqlalchemy-collectd', - 'python-sqlparse', - 'python-swiftclient', - 'python-tooz', - 'python-troveclient', - 'python-vitrageclient', - 'python2-webob', - 'python-zaqarclient', - 'PyYAML', - 'sysvinit-tools' - ] %} - {% endif %} {% elif base_package_type == 'deb' %} @@ -243,18 +159,10 @@ ENV DEBIAN_FRONTEND noninteractive 'pcre-devel', 'postgresql', 'postgresql-devel', + 'python3-devel', 'sqlite-devel', 'zip' ] %} - {% if distro_python_version.startswith('3') %} - {% set openstack_base_packages = openstack_base_packages + [ - 'python3-devel', - ] %} - {% else %} - {% set openstack_base_packages = openstack_base_packages + [ - 'python-devel', - ] %} - {% endif %} {% elif base_package_type == 'deb' %} {% set openstack_base_packages = [ @@ -400,15 +308,6 @@ ENV DEBIAN_FRONTEND noninteractive ] %} -{% if distro_python_version == '2.7' %} - {% set openstack_base_pip_packages = openstack_base_pip_packages + [ - 'enum34', - 'functools32', - 'futures' - ] - %} -{% endif %} - ADD openstack-base-archive /openstack-base-source RUN ln -s openstack-base-source/* /requirements \ && mkdir -p /var/lib/kolla \ diff --git a/docker/openvswitch/openvswitch-base/Dockerfile.j2 b/docker/openvswitch/openvswitch-base/Dockerfile.j2 index c98676f2c8..e35544df1a 100644 --- a/docker/openvswitch/openvswitch-base/Dockerfile.j2 +++ b/docker/openvswitch/openvswitch-base/Dockerfile.j2 @@ -12,20 +12,10 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {% if base_package_type == 'rpm' %} {% set openvswitch_base_packages = [ 'openvswitch', + 'python3-netifaces', + 'python3-openvswitch', 'tcpdump' ] %} - - {% if distro_python_version.startswith('3') %} - {% set openvswitch_base_packages = openvswitch_base_packages + [ - 'python3-netifaces', - 'python3-openvswitch' - ] %} - {% else %} - {% set openvswitch_base_packages = openvswitch_base_packages + [ - 'python-netifaces', - 'python-openvswitch' - ] %} - {% endif %} {% elif base_package_type == 'deb' %} {% set openvswitch_base_packages = [ 'openvswitch-switch', diff --git a/docker/panko/panko-api/Dockerfile.j2 b/docker/panko/panko-api/Dockerfile.j2 index 6816a400e1..1d1d560629 100644 --- a/docker/panko/panko-api/Dockerfile.j2 +++ b/docker/panko/panko-api/Dockerfile.j2 @@ -10,18 +10,9 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {% if install_type == 'binary' %} {% if base_package_type == 'rpm' %} {% set panko_api_packages = [ - 'openstack-panko-api' - ] %} - - {% if distro_python_version.startswith('3') %} - {% set panko_api_packages = panko_api_packages + [ + 'openstack-panko-api', 'python3-pymongo' ] %} - {% else %} - {% set panko_api_packages = panko_api_packages + [ - 'python-pymongo' - ] %} - {% endif %} {% elif base_package_type == 'deb' %} {% set panko_api_packages = [ 'panko-api', diff --git a/docker/panko/panko-base/Dockerfile.j2 b/docker/panko/panko-base/Dockerfile.j2 index 48d90ccb47..1504b2a54f 100644 --- a/docker/panko/panko-base/Dockerfile.j2 +++ b/docker/panko/panko-base/Dockerfile.j2 @@ -15,20 +15,10 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {% set panko_base_packages = [ 'httpd', 'mod_ssl', - 'openstack-panko-common' - ] %} - - {% if distro_python_version.startswith('3') %} - {% set panko_base_packages = panko_base_packages + [ + 'openstack-panko-common', 'python3-ldappool', 'python3-mod_wsgi' ] %} - {% else %} - {% set panko_base_packages = panko_base_packages + [ - 'mod_wsgi', - 'python2-ldappool' - ] %} - {% endif %} {{ macros.install_packages(panko_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 @@ -46,18 +36,9 @@ RUN echo > /etc/apache2/ports.conf {% set panko_base_packages = [ 'httpd', 'mod_ssl', - ] %} - {% if distro_python_version.startswith('3') %} - {% set panko_base_packages = panko_base_packages + [ 'python3-ldappool', 'python3-mod_wsgi' ] %} - {% else %} - {% set panko_base_packages = panko_base_packages + [ - 'mod_wsgi', - 'python2-ldappool' - ] %} - {% endif %} {{ macros.install_packages(panko_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 diff --git a/docker/placement/placement-api/Dockerfile.j2 b/docker/placement/placement-api/Dockerfile.j2 index 0781677363..01e32c196a 100644 --- a/docker/placement/placement-api/Dockerfile.j2 +++ b/docker/placement/placement-api/Dockerfile.j2 @@ -13,13 +13,9 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {% set placement_api_packages = [ 'httpd', 'mod_ssl', - 'openstack-placement-api' + 'openstack-placement-api', + 'python3-mod_wsgi' ] %} - {% if distro_python_version.startswith('3') %} - {% set placement_api_packages = placement_api_packages + ['python3-mod_wsgi'] %} - {% else %} - {% set placement_api_packages = placement_api_packages + ['mod_wsgi'] %} - {% endif %} {{ macros.install_packages(placement_api_packages | customizable("packages")) }} RUN sed -i -r 's,^(Listen 80),#\1,' /etc/httpd/conf/httpd.conf \ @@ -44,12 +40,8 @@ RUN truncate -s 0 /etc/apache2/ports.conf \ {% set placement_api_packages = [ 'httpd', 'mod_ssl', + 'python3-mod_wsgi' ] %} - {% if distro_python_version.startswith('3') %} - {% set placement_api_packages = placement_api_packages + ['python3-mod_wsgi'] %} - {% else %} - {% set placement_api_packages = placement_api_packages + ['mod_wsgi'] %} - {% endif %} {{ macros.install_packages(placement_api_packages | customizable("packages")) }} RUN sed -i -r 's,^(Listen 80),#\1,' /etc/httpd/conf/httpd.conf \ diff --git a/docker/qinling/qinling-base/Dockerfile.j2 b/docker/qinling/qinling-base/Dockerfile.j2 index c18c749435..38aa61163d 100644 --- a/docker/qinling/qinling-base/Dockerfile.j2 +++ b/docker/qinling/qinling-base/Dockerfile.j2 @@ -21,18 +21,9 @@ RUN echo '{{ install_type }} not yet available for {{ base_distro }}' \ {% set qinling_base_packages = [ 'httpd', 'mod_ssl', - ] %} - {% if distro_python_version.startswith('3') %} - {% set qinling_base_packages = qinling_base_packages + [ 'python3-ldappool', 'python3-mod_wsgi' ] %} - {% else %} - {% set qinling_base_packages = qinling_base_packages + [ - 'mod_wsgi', - 'python2-ldappool' - ] %} - {% endif %} {{ macros.install_packages(qinling_base_packages | customizable("packages")) }} RUN mkdir -p /var/www/cgi-bin/qinling \ diff --git a/docker/rabbitmq/Dockerfile.j2 b/docker/rabbitmq/Dockerfile.j2 index 385255749a..9414b04f86 100644 --- a/docker/rabbitmq/Dockerfile.j2 +++ b/docker/rabbitmq/Dockerfile.j2 @@ -15,16 +15,8 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {% if base_package_type == 'rpm' %} {% set rabbitmq_packages = [ 'hostname', + 'rabbitmq-server-3.8.*' ] %} - {% if distro_package_manager == 'dnf' %} - {% set rabbitmq_packages = rabbitmq_packages + [ - 'rabbitmq-server-3.8.*' - ] %} - {% else %} - {% set rabbitmq_packages = rabbitmq_packages + [ - 'rabbitmq-server-3.8.*' - ] %} - {% endif %} {% elif base_package_type == 'deb' %} {% set rabbitmq_packages = [ diff --git a/docker/rally/Dockerfile.j2 b/docker/rally/Dockerfile.j2 index c6aa19fbff..26ea51f36c 100644 --- a/docker/rally/Dockerfile.j2 +++ b/docker/rally/Dockerfile.j2 @@ -13,18 +13,9 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {% if base_package_type == 'rpm' %} {% set rally_packages = [ - 'openstack-rally' - ] %} - - {% if distro_python_version.startswith('3') %} - {% set rally_packages = rally_packages + [ + 'openstack-rally', 'python3-os-testr' ] %} - {% else %} - {% set rally_packages = rally_packages + [ - 'python-os-testr' - ] %} - {% endif %} {% elif base_package_type == 'deb' %} {% set rally_packages = [ 'python-os-testr', diff --git a/docker/sahara/sahara-base/Dockerfile.j2 b/docker/sahara/sahara-base/Dockerfile.j2 index ee7e43c3c3..5d7d7a5e5b 100644 --- a/docker/sahara/sahara-base/Dockerfile.j2 +++ b/docker/sahara/sahara-base/Dockerfile.j2 @@ -12,9 +12,8 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {% if install_type == 'binary' %} {% if base_package_type == 'rpm' %} - {% set sahara_base_packages = ['openstack-sahara-common'] %} - {% if distro_python_version.startswith('3') %} - {% set sahara_base_packages = sahara_base_packages + [ + {% set sahara_base_packages = [ + 'openstack-sahara-common', 'python3-sahara-plugin-ambari', 'python3-sahara-plugin-cdh', 'python3-sahara-plugin-mapr', @@ -22,16 +21,6 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build 'python3-sahara-plugin-storm', 'python3-sahara-plugin-vanilla' ] %} - {% else %} - {% set sahara_base_packages = sahara_base_packages + [ - 'python2-sahara-plugin-ambari', - 'python2-sahara-plugin-cdh', - 'python2-sahara-plugin-mapr', - 'python2-sahara-plugin-spark', - 'python2-sahara-plugin-storm', - 'python2-sahara-plugin-vanilla' - ] %} - {% endif %} {% elif base_package_type == 'deb' %} {% set sahara_base_packages = ['sahara-common'] %} {% endif %} diff --git a/docker/sensu/sensu-client/Dockerfile.j2 b/docker/sensu/sensu-client/Dockerfile.j2 index e295aed8db..f0bda508ea 100644 --- a/docker/sensu/sensu-client/Dockerfile.j2 +++ b/docker/sensu/sensu-client/Dockerfile.j2 @@ -18,18 +18,9 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build 'make', 'mariadb', 'ntp', + 'python3-pymongo', 'ruby-devel' ] %} - - {% if distro_python_version.startswith('3') %} - {% set sensu_client_packages = sensu_client_packages + [ - 'python3-pymongo' - ] %} - {% else %} - {% set sensu_client_packages = sensu_client_packages + [ - 'python-pymongo' - ] %} - {% endif %} {% elif base_package_type == 'deb' %} {% set sensu_client_packages = [ 'build-essential', diff --git a/docker/swift/swift-proxy-server/Dockerfile.j2 b/docker/swift/swift-proxy-server/Dockerfile.j2 index b7d0f0bca2..8a2b903ed5 100644 --- a/docker/swift/swift-proxy-server/Dockerfile.j2 +++ b/docker/swift/swift-proxy-server/Dockerfile.j2 @@ -10,17 +10,9 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {% if install_type == 'binary' %} {% if base_package_type == 'rpm' %} {% set swift_proxy_server_packages = [ - 'openstack-swift-proxy' - ] %} - {% if distro_python_version.startswith('3') %} - {% set swift_proxy_server_packages = swift_proxy_server_packages + [ + 'openstack-swift-proxy', 'python3-ceilometermiddleware' ] %} - {% else %} - {% set swift_proxy_server_packages = swift_proxy_server_packages + [ - 'python-ceilometermiddleware' - ] %} - {% endif %} {% elif base_package_type == 'deb' %} {% if base_distro == 'debian' %} {% set swift_proxy_server_packages = [ diff --git a/docker/tacker/tacker-base/Dockerfile.j2 b/docker/tacker/tacker-base/Dockerfile.j2 index 5e1456d8cc..016594ffeb 100644 --- a/docker/tacker/tacker-base/Dockerfile.j2 +++ b/docker/tacker/tacker-base/Dockerfile.j2 @@ -13,17 +13,9 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {% if base_package_type == 'rpm' %} {% set tacker_base_packages = [ - 'openstack-tacker-common' - ] %} - {% if distro_python_version.startswith('3') %} - {% set tacker_base_packages = tacker_base_packages + [ + 'openstack-tacker-common', 'python3-networking-sfc' ] %} - {% else %} - {% set tacker_base_packages = tacker_base_packages + [ - 'python-networking-sfc' - ] %} - {% endif %} {% elif base_package_type == 'deb' %} diff --git a/docker/telegraf/Dockerfile.j2 b/docker/telegraf/Dockerfile.j2 index a7ec9c7c75..1c2f4ef4d3 100644 --- a/docker/telegraf/Dockerfile.j2 +++ b/docker/telegraf/Dockerfile.j2 @@ -9,11 +9,6 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {{ macros.configure_user(name='telegraf', homedir='/etc/telegraf') }} -{# NOTE(mgoddard): EPEL required for python2-pip package. python3-pip available in CentOS8 #} -{% if distro_package_manager == 'yum' %} -{{ macros.enable_extra_repos(['epel']) }} -{% endif %} - {{ macros.enable_extra_repos(['influxdb']) }} {% set telegraf_packages = [ @@ -24,17 +19,9 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {% if base_package_type == 'rpm' %} {% set telegraf_packages = telegraf_packages + [ - 'collectd' - ] %} - {% if distro_python_version.startswith('3') %} - {% set telegraf_packages = telegraf_packages + [ + 'collectd', 'python3-pip' ] %} - {% else %} - {% set telegraf_packages = telegraf_packages + [ - 'python2-pip' - ] %} - {% endif %} {% elif base_package_type == 'deb' %} {% set telegraf_packages = telegraf_packages + [ 'collectd-core', diff --git a/docker/tgtd/Dockerfile.j2 b/docker/tgtd/Dockerfile.j2 index e0e7f025b5..5b9348e304 100644 --- a/docker/tgtd/Dockerfile.j2 +++ b/docker/tgtd/Dockerfile.j2 @@ -9,12 +9,8 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {% if base_package_type == 'rpm' %} -{% if distro_package_manager == 'dnf' %} RUN echo 'Not available for {{ base_distro }}' \ && /bin/false -{% else %} -RUN sed -i '1 i include /var/lib/cinder/volumes/*' /etc/tgt/tgtd.conf -{% endif %} {% elif base_package_type == 'deb' %} {% set tgtd_packages = ['tgt'] %} diff --git a/docker/tripleoclient/Dockerfile.j2 b/docker/tripleoclient/Dockerfile.j2 index 09f4a58d4e..be406c7be5 100644 --- a/docker/tripleoclient/Dockerfile.j2 +++ b/docker/tripleoclient/Dockerfile.j2 @@ -15,22 +15,11 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build 'openssh-clients', 'openstack-tripleo-validations', 'puppet-tripleo', + 'python3-openstackclient', + 'python3-tripleoclient', 'xfsprogs' ] %} - {% if distro_python_version.startswith('3') %} - {% set tripleoclient_packages = tripleoclient_packages + [ - 'python3-openstackclient', - 'python3-tripleoclient' - ] %} - {% else %} - {% set tripleoclient_packages = tripleoclient_packages + [ - 'python-ipaddr', - 'python-openstackclient', - 'python-tripleoclient' - ] %} - {% endif %} - {{ macros.install_packages(tripleoclient_packages | customizable("packages")) }} {% else %} diff --git a/docker/vitrage/vitrage-api/Dockerfile.j2 b/docker/vitrage/vitrage-api/Dockerfile.j2 index b4b0064809..169a4b12bc 100644 --- a/docker/vitrage/vitrage-api/Dockerfile.j2 +++ b/docker/vitrage/vitrage-api/Dockerfile.j2 @@ -14,20 +14,10 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {% set vitrage_api_packages = [ 'httpd', 'mod_ssl', - 'openstack-vitrage-api' - ] %} - - {% if distro_python_version.startswith('3') %} - {% set vitrage_api_packages = vitrage_api_packages + [ + 'openstack-vitrage-api', 'python3-ldappool', 'python3-mod_wsgi' ] %} - {% else %} - {% set vitrage_api_packages = vitrage_api_packages + [ - 'mod_wsgi', - 'python2-ldappool' - ] %} - {% endif %} {{ macros.install_packages(vitrage_api_packages | customizable("packages")) }} RUN sed -i -r 's,^(Listen 80),#\1,' /etc/httpd/conf/httpd.conf \ diff --git a/docker/vitrage/vitrage-base/Dockerfile.j2 b/docker/vitrage/vitrage-base/Dockerfile.j2 index bf53705c9c..9c6188ffce 100644 --- a/docker/vitrage/vitrage-base/Dockerfile.j2 +++ b/docker/vitrage/vitrage-base/Dockerfile.j2 @@ -47,19 +47,9 @@ RUN echo '{{ install_type }} not yet available for {{ base_distro }}' \ {% set vitrage_base_packages = [ 'httpd', 'mod_ssl', - ] %} - {% if distro_python_version.startswith('3') %} - {% set vitrage_base_packages = vitrage_base_packages + [ 'python3-ldappool', 'python3-mod_wsgi' ] %} - {% else %} - {% set vitrage_base_packages = vitrage_base_packages + [ - 'mod_wsgi', - 'python2-ldappool' - ] %} - {% endif %} - {{ macros.install_packages(vitrage_base_packages | customizable("packages")) }} RUN sed -i -r 's,^(Listen 80),#\1,' /etc/httpd/conf/httpd.conf \ diff --git a/docker/zaqar/zaqar-base/Dockerfile.j2 b/docker/zaqar/zaqar-base/Dockerfile.j2 index 47833b5ee7..c89f8cb0aa 100644 --- a/docker/zaqar/zaqar-base/Dockerfile.j2 +++ b/docker/zaqar/zaqar-base/Dockerfile.j2 @@ -16,19 +16,9 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build 'openstack-zaqar', 'httpd', 'mod_ssl', - ] %} - - {% if distro_python_version.startswith('3') %} - {% set zaqar_base_packages = zaqar_base_packages + [ 'python3-ldappool', 'python3-mod_wsgi' ] %} - {% else %} - {% set zaqar_base_packages = zaqar_base_packages + [ - 'mod_wsgi', - 'python2-ldappool' - ] %} - {% endif %} {{ macros.install_packages(zaqar_base_packages | customizable("packages")) }} \ && mkdir -p /var/www/cgi-bin/zaqar \ @@ -58,18 +48,9 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {% set zaqar_base_packages = [ 'httpd', 'mod_ssl', - ] %} - {% if distro_python_version.startswith('3') %} - {% set zaqar_base_packages = zaqar_base_packages + [ 'python3-ldappool', 'python3-mod_wsgi' ] %} - {% else %} - {% set zaqar_base_packages = zaqar_base_packages + [ - 'mod_wsgi', - 'python2-ldappool' - ] %} - {% endif %} {{ macros.install_packages(zaqar_base_packages | customizable("packages")) }} \ && sed -i -r 's,^(Listen 80),#\1,' /etc/httpd/conf/httpd.conf \ diff --git a/docker/zun/zun-base/Dockerfile.j2 b/docker/zun/zun-base/Dockerfile.j2 index b3c4946b87..0af49daba1 100644 --- a/docker/zun/zun-base/Dockerfile.j2 +++ b/docker/zun/zun-base/Dockerfile.j2 @@ -22,18 +22,9 @@ RUN echo '{{ install_type }} not yet available for {{ base_distro }}' \ 'httpd', 'mod_ssl', 'numactl', - ] %} - {% if distro_python_version.startswith('3') %} - {% set zun_base_packages = zun_base_packages + [ 'python3-ldappool', 'python3-mod_wsgi' ] %} - {% else %} - {% set zun_base_packages = zun_base_packages + [ - 'mod_wsgi', - 'python2-ldappool' - ] %} - {% endif %} {{ macros.install_packages(zun_base_packages | customizable("packages")) }} RUN mkdir -p /var/www/cgi-bin/zun \ diff --git a/kolla/common/config.py b/kolla/common/config.py index c086b6b15e..2746fddea3 100755 --- a/kolla/common/config.py +++ b/kolla/common/config.py @@ -13,7 +13,6 @@ import itertools import os -from distutils.version import LooseVersion from oslo_config import cfg from oslo_config import types @@ -34,17 +33,12 @@ DISTRO_RELEASE = { 'debian': '10', 'ubuntu': '18.04', } -# NOTE(mgoddard): The default release is set to 'train' for CentOS/RHEL 7 due -# to master dropping support for Python 2. OPENSTACK_RELEASE = 'master' # This is noarch repository so we will use it on all architectures -DELOREAN = \ - "https://trunk.rdoproject.org/centos7/current-passed-ci/delorean.repo" -DELOREAN_DEPS = "https://trunk.rdoproject.org/centos7/delorean-deps.repo" -DELOREAN_CENTOS8 = "https://trunk.rdoproject.org/centos8-master/" \ +DELOREAN = "https://trunk.rdoproject.org/centos8-master/" \ "consistent/delorean.repo" -DELOREAN_DEPS_CENTOS8 = "https://trunk.rdoproject.org/centos8-master/" \ +DELOREAN_DEPS = "https://trunk.rdoproject.org/centos8-master/" \ "delorean-deps.repo" INSTALL_TYPE_CHOICES = ['binary', 'source', 'rdo', 'rhos'] @@ -1242,15 +1236,6 @@ def parse(conf, args, usage=None, prog=None, # NOTE(jeffrey4l): set the default base tag based on the # base option conf.set_default('base_tag', DEFAULT_BASE_TAGS.get(conf.base)) - # TODO(mgoddard): Remove this 'if' when CentOS 7 is no longer supported. - if conf.base in ['centos', 'rhel']: - if LooseVersion(conf.base_tag) >= LooseVersion('8'): - # Use CentOS 8 Delorean repos. - conf.set_default('rpm_setup_config', [DELOREAN_CENTOS8, - DELOREAN_DEPS_CENTOS8]) - else: - # Use Train packages on CentOS 7 due to python 2 drop. - conf.set_default('openstack_release', 'train') prefix = '' if conf.openstack_release == 'master' else 'stable-' openstack_branch = '{}{}'.format(prefix, conf.openstack_release) conf.set_default('openstack_branch', openstack_branch) diff --git a/kolla/image/build.py b/kolla/image/build.py index b13ff5cab1..7f5c833e43 100755 --- a/kolla/image/build.py +++ b/kolla/image/build.py @@ -28,7 +28,6 @@ import tempfile import threading import time -from distutils.version import LooseVersion from distutils.version import StrictVersion import docker import git @@ -135,12 +134,7 @@ UNBUILDABLE_IMAGES = { }, 'centos': { - "ovsdpdk", - }, - - # NOTE(mgoddard): Mark images with missing dependencies as unbuildable for - # CentOS 8. - 'centos8': { + "cyborg-base", # package only for CentOS 7 "elasticsearch", # Missing elasticsearch repo "hacluster-pcs", # Missing crmsh package "kibana", # Missing elasticsearch repo @@ -152,7 +146,7 @@ UNBUILDABLE_IMAGES = { "tgtd", # Not supported on CentOS 8 }, - 'centos8+source': { + 'centos+source': { "cyborg-agent", # opae-sdk does not support CentOS 8 }, @@ -732,9 +726,7 @@ class KollaWorker(object): deb_base = ['ubuntu', 'debian'] deb_type = ['source', 'binary'] - if self.base in rh_base and self.base_tag.startswith('7'): - self.conf.distro_python_version = "2.7" - elif self.base in rh_base and self.base_tag.startswith('8'): + if self.base in rh_base: self.conf.distro_python_version = "3.6" elif self.base in ['debian']: self.conf.distro_python_version = "3.7" @@ -747,10 +739,7 @@ class KollaWorker(object): if self.conf.distro_package_manager is not None: package_manager = self.conf.distro_package_manager elif self.base in rh_base: - if LooseVersion(self.base_tag) >= LooseVersion('8'): - package_manager = 'dnf' - else: - package_manager = 'yum' + package_manager = 'dnf' elif self.base in deb_base: package_manager = 'apt' self.distro_package_manager = package_manager @@ -1057,13 +1046,7 @@ class KollaWorker(object): filter_ += self.conf.profiles[profile] # mark unbuildable images and their children - - # NOTE(mgoddard): Use a base of centos8 to allow a different set of - # unbuildable images for CentOS 8. - # TODO(mgoddard): Remove this after CentOS 8 transition. base = self.base - if base == 'centos' and self.distro_package_manager == 'dnf': - base = 'centos8' tag_element = r'(%s|%s|%s)' % (base, self.install_type, diff --git a/kolla/template/methods.py b/kolla/template/methods.py index fb470a65f7..19fcf4e22f 100644 --- a/kolla/template/methods.py +++ b/kolla/template/methods.py @@ -100,11 +100,6 @@ def handle_repos(context, reponames, mode): base_package_type = context.get('base_package_type') base_distro = context.get('base_distro') base_arch = context.get('base_arch') - distro_package_manager = context.get('distro_package_manager') - - # TODO(mgoddard): Remove this when CentOS 7 support is no longer present. - if base_distro == 'centos' and distro_package_manager == 'dnf': - base_distro = 'centos8' commands = '' @@ -130,11 +125,8 @@ def handle_repos(context, reponames, mode): if base_package_type == 'rpm' and commands: # NOTE(hrw): if commands is empty then no repos are enabled # otherwise we need to add command to handle repositories - if distro_package_manager == 'yum': - commands = 'yum-config-manager %s' % commands - elif distro_package_manager == 'dnf': - # NOTE(hrw) dnf errors out if we enable unknown repo - commands = 'dnf config-manager %s || true' % commands + # NOTE(hrw) dnf errors out if we enable unknown repo + commands = 'dnf config-manager %s || true' % commands elif base_package_type == 'deb': # NOTE(hrw): Debian commands end with '&&' commands = commands[0:-4] diff --git a/kolla/template/repos.yaml b/kolla/template/repos.yaml index 760d6d6bb8..ee0362d1b7 100644 --- a/kolla/template/repos.yaml +++ b/kolla/template/repos.yaml @@ -1,57 +1,45 @@ --- -# TODO(mgoddard): Remove this when CentOS 7 support is no longer present. +# TODO(mnasiadka): Rework the repo list once Ceph Octopus is released centos: ceph: "centos-ceph-nautilus" elasticsearch: "elasticsearch-kibana-logstash-5.x" epel: "epel" + epel-modular: "epel-modular" erlang: "rabbitmq_rabbitmq-erlang" extras: "extras" grafana: "grafana" - hacluster: "network_ha-clustering_Stable" + hacluster: "HighAvailability" influxdb: "influxdb" kibana: "elasticsearch-kibana-logstash-5.x" nfs-ganesha: "centos-nfs-ganesha28" - opendaylight: "opendaylight" opstools: "centos-release-opstools" rabbitmq: "rabbitmq_rabbitmq-server" td-agent: "treasuredata" -# TODO(mgoddard): Remove this when CentOS 7 support is no longer present. centos-aarch64: ceph: "centos-ceph-nautilus" elasticsearch: "elasticsearch-kibana-logstash-5.x" epel: "epel" + epel-modular: "epel-modular" erlang: "rabbitmq_rabbitmq-erlang" extras: "extras" grafana: "grafana" + hacluster: "HighAvailability" nfs-ganesha: "centos-nfs-ganesha28" - opendaylight: "opendaylight" opstools: "centos-release-opstools" rabbitmq: "rabbitmq_rabbitmq-server" -# TODO(mgoddard): Remove this when CentOS 7 support is no longer present. centos-ppc64le: ceph: "centos-ceph-nautilus" elasticsearch: "elasticsearch-kibana-logstash-5.x" epel: "epel" + epel-modular: "epel-modular" extras: "extras" + hacluster: "HighAvailability" nfs-ganesha: "centos-nfs-ganesha28" opstools: "centos-release-opstools" rabbitmq: "rabbitmq_rabbitmq-server" -# TODO(mnasiadka): Rework the repo list once Ceph Octopus is released -centos8: - ceph: "centos-ceph-nautilus" - epel-modular: "epel-modular" - epel: "epel" - erlang: "rabbitmq_rabbitmq-erlang" - grafana: "grafana" - hacluster: "HighAvailability" - influxdb: "influxdb" - nfs-ganesha: "centos-nfs-ganesha28" - rabbitmq: "rabbitmq_rabbitmq-server" - td-agent: "treasuredata" - # NOTE(hrw): empty dict to avoid TypeError rhel: {} diff --git a/kolla/tests/test_build.py b/kolla/tests/test_build.py index 1b633de4cb..ad5e47600f 100644 --- a/kolla/tests/test_build.py +++ b/kolla/tests/test_build.py @@ -551,19 +551,12 @@ class KollaWorkerTest(base.TestCase): kolla = build.KollaWorker(self.conf) self.assertEqual('3.6', kolla.distro_python_version) - def test_build_distro_python_version_centos7(self): - """check distro_python_version for CentOS 7.6.1810""" + def test_build_distro_python_version_centos(self): + """check distro_python_version for CentOS 8.0.1905""" self.conf.set_override('base', 'centos') - self.conf.set_override('base_tag', '7.6.1810') + self.conf.set_override('base_tag', '8.0.1905') kolla = build.KollaWorker(self.conf) - self.assertEqual('2.7', kolla.distro_python_version) - - def test_build_distro_python_version_rhel7(self): - """check distro_python_version for RHEL7""" - self.conf.set_override('base', 'rhel') - self.conf.set_override('base_tag', '7') - kolla = build.KollaWorker(self.conf) - self.assertEqual('2.7', kolla.distro_python_version) + self.assertEqual('3.6', kolla.distro_python_version) def test_build_distro_package_manager(self): """check distro_package_manager conf value is taken""" @@ -585,20 +578,6 @@ class KollaWorkerTest(base.TestCase): kolla = build.KollaWorker(self.conf) self.assertEqual('dnf', kolla.distro_package_manager) - def test_build_distro_package_manager_rhel7(self): - """check distro_package_manager yum for rhel7""" - self.conf.set_override('base', 'rhel') - self.conf.set_override('base_tag', '7') - kolla = build.KollaWorker(self.conf) - self.assertEqual('yum', kolla.distro_package_manager) - - def test_build_distro_package_manager_rhel7_minor(self): - """check distro_package_manager yum for rhel7""" - self.conf.set_override('base', 'rhel') - self.conf.set_override('base_tag', '7.6.1801') - kolla = build.KollaWorker(self.conf) - self.assertEqual('yum', kolla.distro_package_manager) - def test_build_distro_package_manager_debian(self): """check distro_package_manager apt for debian""" self.conf.set_override('base', 'debian') diff --git a/kolla/tests/test_methods.py b/kolla/tests/test_methods.py index c33aba7f9b..d2f6ac2836 100644 --- a/kolla/tests/test_methods.py +++ b/kolla/tests/test_methods.py @@ -27,7 +27,6 @@ class MethodsTest(base.TestCase): 'base_arch': 'x86_64', 'base_distro': 'rhel', 'base_package_type': 'rpm', - 'distro_package_manager': 'yum' } result = methods.handle_repos(template_vars, ['grafana'], 'enable') @@ -39,11 +38,10 @@ class MethodsTest(base.TestCase): 'base_arch': 'x86_64', 'base_distro': 'centos', 'base_package_type': 'rpm', - 'distro_package_manager': 'yum' } result = methods.handle_repos(template_vars, ['grafana'], 'enable') - expectCmd = 'RUN yum-config-manager --enable grafana' + expectCmd = 'RUN dnf config-manager --enable grafana || true' self.assertEqual(expectCmd, result) def test_enable_repos_centos_missing_repo(self): @@ -51,7 +49,6 @@ class MethodsTest(base.TestCase): 'base_arch': 'x86_64', 'base_distro': 'centos', 'base_package_type': 'rpm', - 'distro_package_manager': 'yum' } result = methods.handle_repos(template_vars, ['missing_repo'], @@ -64,13 +61,12 @@ class MethodsTest(base.TestCase): 'base_arch': 'x86_64', 'base_distro': 'centos', 'base_package_type': 'rpm', - 'distro_package_manager': 'yum' } result = methods.handle_repos(template_vars, ['grafana', 'ceph'], 'enable') - expectCmd = 'RUN yum-config-manager --enable grafana ' - expectCmd += '--enable centos-ceph-nautilus' + expectCmd = 'RUN dnf config-manager --enable grafana ' + expectCmd += '--enable centos-ceph-nautilus || true' self.assertEqual(expectCmd, result) def test_enable_repos_debian(self): @@ -118,11 +114,10 @@ class MethodsTest(base.TestCase): 'base_arch': 'x86_64', 'base_distro': 'centos', 'base_package_type': 'rpm', - 'distro_package_manager': 'yum' } result = methods.handle_repos(template_vars, ['grafana'], 'disable') - expectCmd = 'RUN yum-config-manager --disable grafana' + expectCmd = 'RUN dnf config-manager --disable grafana || true' self.assertEqual(expectCmd, result) def test_disable_repos_centos_multiple(self): @@ -130,13 +125,12 @@ class MethodsTest(base.TestCase): 'base_arch': 'x86_64', 'base_distro': 'centos', 'base_package_type': 'rpm', - 'distro_package_manager': 'yum' } result = methods.handle_repos(template_vars, ['grafana', 'ceph'], 'disable') - expectCmd = 'RUN yum-config-manager --disable grafana ' - expectCmd += '--disable centos-ceph-nautilus' + expectCmd = 'RUN dnf config-manager --disable grafana ' + expectCmd += '--disable centos-ceph-nautilus || true' self.assertEqual(expectCmd, result) # NOTE(hrw): there is no disabling of repos for Debian/Ubuntu diff --git a/tests/templates/template_overrides.j2 b/tests/templates/template_overrides.j2 index d7ea2dcb95..8de37a66ae 100644 --- a/tests/templates/template_overrides.j2 +++ b/tests/templates/template_overrides.j2 @@ -30,36 +30,13 @@ RUN sed -i \ -e "/^mirrorlist/ d" \ -e "s|^#baseurl=http://mirror.centos.org|baseurl=http://{{ nodepool_mirror_host }}|" \ /etc/yum.repos.d/CentOS-*.repo -{% raw %} -{% if distro_package_manager == 'yum' %} -{% endraw %} -# FIXME(mgoddard): No crmsh or opendaylight CentOS 8 repos yet. -RUN sed -i \ - -e "s|http://download.opensuse.org|http://{{ nodepool_mirror_host }}/opensuse|" \ - /etc/yum.repos.d/crmsh.repo \ - && sed -i \ - -e "s|https://cbs.centos.org/repos|{{ nodepool_cbs_centos_proxy }}|g" \ - /etc/yum.repos.d/opendaylight.repo -{% raw %} -{% endif %} -{% endraw %} - {% raw %} {% endblock %} {% block base_centos_repo_overrides_post_rpm %} {% endraw %} -{% raw %} -{% if distro_package_manager == 'yum' %} -{% endraw %} # FIXME(mgoddard): No CentOS8 RDO repos mirrored yet. -RUN sed -i \ - -e "s|https://trunk.rdoproject.org|{{ nodepool_rdo_proxy }}|g" \ - /etc/yum.repos.d/delorean*.repo -{% raw %} -{% endif %} -{% endraw %} {% raw %} {% endblock %}