diff --git a/docker/aodh/aodh-base/Dockerfile.j2 b/docker/aodh/aodh-base/Dockerfile.j2 index 83d3d7ccfd..a54cbd76be 100644 --- a/docker/aodh/aodh-base/Dockerfile.j2 +++ b/docker/aodh/aodh-base/Dockerfile.j2 @@ -28,14 +28,14 @@ RUN mkdir -p /var/www/cgi-bin/aodh \ {% set aodh_base_packages = [ 'aodh-common', 'apache2', - 'libapache2-mod-wsgi', - 'python-aodh', - 'python-ldappool' + 'libapache2-mod-wsgi-py3', + 'python3-aodh', + 'python3-ldappool' ] %} {{ macros.install_packages(aodh_base_packages | customizable("packages")) }} RUN mkdir -p /var/www/cgi-bin/aodh \ - && cp -a /usr/lib/python2.7/dist-packages/aodh/api/app.wsgi /var/www/cgi-bin/aodh/ \ + && cp -a /usr/lib/python3/dist-packages/aodh/api/app.wsgi /var/www/cgi-bin/aodh/ \ && echo > /etc/apache2/ports.conf {% endif %} diff --git a/docker/barbican/barbican-api/Dockerfile.j2 b/docker/barbican/barbican-api/Dockerfile.j2 index f9f6b7afc4..fce0e001b8 100644 --- a/docker/barbican/barbican-api/Dockerfile.j2 +++ b/docker/barbican/barbican-api/Dockerfile.j2 @@ -24,7 +24,7 @@ RUN sed -i -r 's,^(Listen 80),#\1,' /etc/httpd/conf/httpd.conf \ {% set barbican_api_packages = [ 'apache2', 'barbican-api', - 'libapache2-mod-wsgi', + 'libapache2-mod-wsgi-py3', 'uwsgi-plugin-python' ] %} diff --git a/docker/base/sources.list.ubuntu b/docker/base/sources.list.ubuntu index d5c1f2087f..f4eaa9b506 100644 --- a/docker/base/sources.list.ubuntu +++ b/docker/base/sources.list.ubuntu @@ -10,7 +10,7 @@ deb http://archive.ubuntu.com/ubuntu/ bionic-backports main restricted universe # We need to add the repo for the updated packages they provide. The main ones # are qemu, libvirt, and openvswitch. -deb http://ubuntu-cloud.archive.canonical.com/ubuntu bionic-updates/rocky main +deb http://ubuntu-cloud.archive.canonical.com/ubuntu bionic-updates/stein main # Elasticsearch, Logstash & Kibana repo deb https://artifacts.elastic.co/packages/5.x/apt stable main diff --git a/docker/base/sources.list.ubuntu.aarch64 b/docker/base/sources.list.ubuntu.aarch64 index 9b289b1328..812fc59f84 100644 --- a/docker/base/sources.list.ubuntu.aarch64 +++ b/docker/base/sources.list.ubuntu.aarch64 @@ -8,4 +8,4 @@ deb http://ports.ubuntu.com/ bionic-backports main restricted universe multivers # We need to add the repo for the updated packages they provide. The main ones # are qemu, libvirt, and openvswitch. -deb http://ubuntu-cloud.archive.canonical.com/ubuntu bionic-updates/rocky main +deb http://ubuntu-cloud.archive.canonical.com/ubuntu bionic-updates/stein main diff --git a/docker/base/sources.list.ubuntu.ppc64le b/docker/base/sources.list.ubuntu.ppc64le index 9b289b1328..812fc59f84 100644 --- a/docker/base/sources.list.ubuntu.ppc64le +++ b/docker/base/sources.list.ubuntu.ppc64le @@ -8,4 +8,4 @@ deb http://ports.ubuntu.com/ bionic-backports main restricted universe multivers # We need to add the repo for the updated packages they provide. The main ones # are qemu, libvirt, and openvswitch. -deb http://ubuntu-cloud.archive.canonical.com/ubuntu bionic-updates/rocky main +deb http://ubuntu-cloud.archive.canonical.com/ubuntu bionic-updates/stein main diff --git a/docker/ceilometer/ceilometer-base/Dockerfile.j2 b/docker/ceilometer/ceilometer-base/Dockerfile.j2 index 6e25b7c26d..8182ba0451 100644 --- a/docker/ceilometer/ceilometer-base/Dockerfile.j2 +++ b/docker/ceilometer/ceilometer-base/Dockerfile.j2 @@ -20,7 +20,7 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {% set ceilometer_base_packages = [ 'ceilometer-common', 'python-gnocchiclient', - 'python-panko', + 'python3-panko', 'python-pymongo' ] %} {% endif %} diff --git a/docker/cinder/cinder-api/Dockerfile.j2 b/docker/cinder/cinder-api/Dockerfile.j2 index b0135b42d4..ddc493d5b8 100644 --- a/docker/cinder/cinder-api/Dockerfile.j2 +++ b/docker/cinder/cinder-api/Dockerfile.j2 @@ -23,7 +23,7 @@ RUN mkdir -p /var/www/cgi-bin/cinder \ {% set cinder_api_packages = [ 'apache2', 'cinder-api', - 'libapache2-mod-wsgi' + 'libapache2-mod-wsgi-py3' ] %} {{ macros.install_packages(cinder_api_packages | customizable("packages")) }} RUN mkdir -p /var/www/cgi-bin/cinder \ diff --git a/docker/gnocchi/gnocchi-base/Dockerfile.j2 b/docker/gnocchi/gnocchi-base/Dockerfile.j2 index aa15bc2897..1d3432bc8e 100644 --- a/docker/gnocchi/gnocchi-base/Dockerfile.j2 +++ b/docker/gnocchi/gnocchi-base/Dockerfile.j2 @@ -28,19 +28,20 @@ RUN sed -i -r 's,^(Listen 80),#\1,' /etc/httpd/conf/httpd.conf \ 'apache2', 'build-essential', 'gnocchi-common', - 'libapache2-mod-wsgi', + 'libapache2-mod-wsgi-py3', 'librados-dev', - 'python-dev', - 'python-ldappool', - 'python-rados', - 'python-setuptools' + 'python3-dev', + 'python3-ldappool', + 'python3-rados', + 'python3-setuptools', + 'python3-pip' ] %} {% set gnocchi_base_pip_packages = [ 'cradox' ] %} {{ macros.install_packages(gnocchi_base_packages | customizable("packages")) }} -RUN {{ macros.install_pip(gnocchi_base_pip_packages | customizable("pip_packages"), constraints=false) }} \ +RUN {{ macros.install_pip(gnocchi_base_pip_packages | customizable("pip_packages"), constraints=false, pip_version="pip3") }} \ && truncate -s 0 /etc/apache2/ports.conf {% endif %} diff --git a/docker/horizon/Dockerfile.j2 b/docker/horizon/Dockerfile.j2 index 90b0f0b36c..0fbeb39dbd 100644 --- a/docker/horizon/Dockerfile.j2 +++ b/docker/horizon/Dockerfile.j2 @@ -52,18 +52,17 @@ RUN sed -i -r 's,^(Listen 80),#\1,' /etc/httpd/conf/httpd.conf \ {% set horizon_packages = [ 'apache2', 'gettext', - 'libapache2-mod-wsgi', + 'libapache2-mod-wsgi-py3', 'locales', 'openstack-dashboard', - 'python-designate-dashboard', - 'python-heat-dashboard', - 'python-manila-ui', - 'python-murano-dashboard', - 'python-neutron-lbaas-dashboard', - 'python-sahara-dashboard', - 'python-trove-dashboard', + 'python3-designate-dashboard', + 'python3-heat-dashboard', + 'python3-manila-ui', + 'python3-sahara-dashboard', + 'python3-trove-dashboard', 'tzdata' ] %} + #NOTE(hrw): check for python-murano-dashboard python-neutron-lbaas-dashboard {{ macros.install_packages(horizon_packages | customizable("packages")) }} diff --git a/docker/ironic/ironic-conductor/Dockerfile.j2 b/docker/ironic/ironic-conductor/Dockerfile.j2 index a9c5854a43..720eb4bfd5 100644 --- a/docker/ironic/ironic-conductor/Dockerfile.j2 +++ b/docker/ironic/ironic-conductor/Dockerfile.j2 @@ -54,9 +54,9 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build 'parted', 'psmisc', 'python-ironic-inspector-client', - 'python-proliantutils', + 'python3-proliantutils', 'python-pysnmp4', - 'python-scciclient', + 'python3-scciclient', 'python-systemd', 'qemu-utils', 'shellinabox', diff --git a/docker/keystone/keystone-base/Dockerfile.j2 b/docker/keystone/keystone-base/Dockerfile.j2 index df11edaa81..a9160478af 100644 --- a/docker/keystone/keystone-base/Dockerfile.j2 +++ b/docker/keystone/keystone-base/Dockerfile.j2 @@ -33,8 +33,8 @@ RUN mkdir -p /var/www/cgi-bin/keystone \ 'keystone', 'libapache2-mod-auth-mellon', 'libapache2-mod-auth-openidc', - 'libapache2-mod-wsgi', - 'python-ldappool' + 'libapache2-mod-wsgi-py3', + 'python3-ldappool' ] %} {{ macros.install_packages(keystone_base_packages | customizable("packages")) }} diff --git a/docker/macros.j2 b/docker/macros.j2 index 171d9564c2..5386dca750 100644 --- a/docker/macros.j2 +++ b/docker/macros.j2 @@ -21,9 +21,12 @@ {% endif %} {%- endmacro %} -{% macro install_pip(packages, constraints = true) %} +{% macro install_pip(packages, constraints = true, pip_version = pip) %} {%- if packages is sequence and packages|length > 0 -%} - pip --no-cache-dir install --upgrade{{ ' ' }} +{%- if not pip_version -%} + {%- set pip_version = 'pip' -%} +{%- endif -%} + {{ pip_version }} --no-cache-dir install --upgrade{{ ' ' }} {%- if constraints %}-c /requirements/upper-constraints.txt {% endif -%} {{ packages | join(' ') }} {%- else -%} diff --git a/docker/neutron/neutron-base/Dockerfile.j2 b/docker/neutron/neutron-base/Dockerfile.j2 index 4faa65595e..2b7be6256e 100644 --- a/docker/neutron/neutron-base/Dockerfile.j2 +++ b/docker/neutron/neutron-base/Dockerfile.j2 @@ -41,29 +41,23 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build 'neutron-plugin-ml2', 'neutron-server', 'openvswitch-switch', - 'python-networking-sfc', + 'python3-networking-sfc', 'python-openvswitch', 'python-oslo.vmware' ] %} - {% if base_distro == 'debian' %} - - {% set neutron_base_packages = neutron_base_packages + [ - 'python-networking-vmware-nsx' - ] %} - - {% else %} + {% if base_distro == 'ubuntu' %} # FIXED(jeffrey4l): UCA rocky release is not include python-vmware-nsx # 13.0.0 package now. add 'python-vmware-nsx' into # neutron_base_packages list after UCA fixed the issue. {% set neutron_base_packages = neutron_base_packages + [ 'neutron-lbaas-common', - 'python-neutron-fwaas', + 'python3-neutron-fwaas', ] %} {% endif %} - + {{ macros.debian_haproxy_existing_user_fix() }} {% endif %} {{ macros.install_packages(neutron_base_packages | customizable("packages")) }} diff --git a/docker/neutron/neutron-lbaas-agent/Dockerfile.j2 b/docker/neutron/neutron-lbaas-agent/Dockerfile.j2 index 0ab48a89a9..5e8f135c7f 100644 --- a/docker/neutron/neutron-lbaas-agent/Dockerfile.j2 +++ b/docker/neutron/neutron-lbaas-agent/Dockerfile.j2 @@ -22,7 +22,7 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {% set neutron_lbaas_agent_packages = [ 'neutron-lbaas-common', 'neutron-lbaasv2-agent', - 'python-neutron-lbaas' + 'python3-neutron-lbaas' ] %} {% endif %} diff --git a/docker/neutron/neutron-metadata-agent-ovn/Dockerfile.j2 b/docker/neutron/neutron-metadata-agent-ovn/Dockerfile.j2 index 1015f3b6ed..b5daf31651 100644 --- a/docker/neutron/neutron-metadata-agent-ovn/Dockerfile.j2 +++ b/docker/neutron/neutron-metadata-agent-ovn/Dockerfile.j2 @@ -13,7 +13,7 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build ] %} {% elif base_package_type == 'deb' %} {% set neutron_metadata_agent_ovn_packages = [ - 'python-networking-ovn' + 'python3-networking-ovn' ] %} {% endif %} diff --git a/docker/neutron/neutron-server-opendaylight/Dockerfile.j2 b/docker/neutron/neutron-server-opendaylight/Dockerfile.j2 index 35ddf01aaf..8cabc0a3c9 100644 --- a/docker/neutron/neutron-server-opendaylight/Dockerfile.j2 +++ b/docker/neutron/neutron-server-opendaylight/Dockerfile.j2 @@ -8,17 +8,20 @@ USER root {% import "macros.j2" as macros with context %} {% if install_type == 'binary' %} - {% set neutron_server_opendaylight_packages = [ - 'python-networking-odl', - 'python-networking-bgpvpn', - 'python-networking-l2gw' - ] %} - -{% if base_distro in ['centos', 'rhel'] %} - {% set neutron_server_opendaylight_packages = neutron_server_opendaylight_packages + [ - 'python-networking-bgpvpn-heat' - ] %} -{% endif %} + {% if base_package_type == 'rpm' %} + {% set neutron_server_opendaylight_packages = [ + 'python-networking-odl', + 'python-networking-bgpvpn', + 'python-networking-l2gw', + 'python-networking-bgpvpn-heat' + ] %} + {% elif base_package_type == 'deb' %} + {% set neutron_server_opendaylight_packages = [ + 'python3-networking-odl', + 'python3-networking-bgpvpn', + 'python3-networking-l2gw', + ] %} + {% endif %} {{ macros.install_packages(neutron_server_opendaylight_packages | customizable("packages")) }} diff --git a/docker/neutron/neutron-server-ovn/Dockerfile.j2 b/docker/neutron/neutron-server-ovn/Dockerfile.j2 index 5d855cb71a..24525ff46c 100644 --- a/docker/neutron/neutron-server-ovn/Dockerfile.j2 +++ b/docker/neutron/neutron-server-ovn/Dockerfile.j2 @@ -8,10 +8,15 @@ USER root {% import "macros.j2" as macros with context %} {% if install_type == 'binary' %} - {% set neutron_server_ovn_packages = [ - 'python-networking-ovn', - ] %} - + {% if base_package_type == 'rpm' %} + {% set neutron_server_ovn_packages = [ + 'python-networking-ovn', + ] %} + {% elif base_package_type == 'deb' %} + {% set neutron_server_ovn_packages = [ + 'python3-networking-ovn', + ] %} + {% endif %} {{ macros.install_packages(neutron_server_ovn_packages | customizable("packages")) }} {% elif install_type == 'source' %} diff --git a/docker/neutron/neutron-server/Dockerfile.j2 b/docker/neutron/neutron-server/Dockerfile.j2 index 8d443bc9f4..0ec432045c 100644 --- a/docker/neutron/neutron-server/Dockerfile.j2 +++ b/docker/neutron/neutron-server/Dockerfile.j2 @@ -17,9 +17,9 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {% set neutron_server_packages = [ 'neutron-lbaasv2-agent', - 'python-neutron-dynamic-routing', - 'python-neutron-lbaas', - 'python-neutron-vpnaas' + 'python3-neutron-dynamic-routing', + 'python3-neutron-lbaas', + 'python3-neutron-vpnaas' ] %} {% endif %} diff --git a/docker/nova/nova-base/Dockerfile.j2 b/docker/nova/nova-base/Dockerfile.j2 index de9e6a20fb..ae230035e5 100644 --- a/docker/nova/nova-base/Dockerfile.j2 +++ b/docker/nova/nova-base/Dockerfile.j2 @@ -40,8 +40,9 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build 'bridge-utils', 'nova-common', 'openvswitch-switch', - 'python-nova' + 'python3-nova' ] %} + {% if base_arch == 'x86_64' %} {% set nova_base_packages = nova_base_packages + [ 'ovmf' diff --git a/docker/ovn/ovn-base/Dockerfile.j2 b/docker/ovn/ovn-base/Dockerfile.j2 index b2fee7bcba..be4f157189 100644 --- a/docker/ovn/ovn-base/Dockerfile.j2 +++ b/docker/ovn/ovn-base/Dockerfile.j2 @@ -10,7 +10,13 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build 'openvswitch-ovn-common', ] %} -{% elif base_package_type == 'deb' %} +{% elif base_distro in ['debian'] %} + # NOTE(hrw): 'ovn-common' is provided by 'openvswitch-common' + {% set ovn_base_packages = [ + 'openvswitch-common', + ] %} + +{% elif base_distro in ['ubuntu'] %} {% set ovn_base_packages = [ 'ovn-common', ] %} diff --git a/docker/placement/placement-api/Dockerfile.j2 b/docker/placement/placement-api/Dockerfile.j2 index 7c84e42f8b..b573a36d74 100644 --- a/docker/placement/placement-api/Dockerfile.j2 +++ b/docker/placement/placement-api/Dockerfile.j2 @@ -23,7 +23,7 @@ RUN sed -i -r 's,^(Listen 80),#\1,' /etc/httpd/conf/httpd.conf \ {% set placement_api_packages = [ 'apache2', - 'libapache2-mod-wsgi', + 'libapache2-mod-wsgi-py3', 'placement-api' ] %} diff --git a/docker/zaqar/zaqar-base/Dockerfile.j2 b/docker/zaqar/zaqar-base/Dockerfile.j2 index 0255b4a317..c75f7f39a5 100644 --- a/docker/zaqar/zaqar-base/Dockerfile.j2 +++ b/docker/zaqar/zaqar-base/Dockerfile.j2 @@ -30,13 +30,13 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build 'zaqar-common', 'apache2', 'libapache2-mod-wsgi', - 'python-ldappool' + 'python3-ldappool' ] %} {{ macros.install_packages(zaqar_base_packages | customizable("packages")) }} \ && mkdir -p /var/www/cgi-bin/zaqar \ && chown -R zaqar: /var/www/cgi-bin/zaqar \ - && cp -a /usr/lib/python2.7/dist-packages/zaqar/transport/wsgi/app.py /var/www/cgi-bin/zaqar/ \ + && cp -a /usr/lib/python3/dist-packages/zaqar/transport/wsgi/app.py /var/www/cgi-bin/zaqar/ \ && echo > /etc/apache2/ports.conf {% endif %} diff --git a/kolla/image/build.py b/kolla/image/build.py index b3ed5e5c27..0306d9b2bc 100755 --- a/kolla/image/build.py +++ b/kolla/image/build.py @@ -121,7 +121,6 @@ SKIPPED_IMAGES = { "nova-mksproxy", "novajoin-base", "octavia-base", - "placement-base", # There is no qdrouterd package for ubuntu bionic "qdrouterd", "searchlight-base",