aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcin Juszkiewicz <marcin.juszkiewicz@linaro.org>2019-01-08 17:09:52 +0000
committerMarcin Juszkiewicz <marcin.juszkiewicz@linaro.org>2019-02-28 13:06:24 +0100
commit43b74ccc157c0b50138c3785ed91dab504895571 (patch)
tree254f39fc86d73dd67a60a8810cb7f996b7f0061b
parent8fcd7ea9123840be5fdf382fefe9811086b724b7 (diff)
downloadkolla-43b74ccc157c0b50138c3785ed91dab504895571.tar.gz
kolla-43b74ccc157c0b50138c3785ed91dab504895571.zip
debian/ubuntu: make use of Python3 based packages
Both Ubuntu Stein UCA and Debian 'buster' migrated their OpenStack packages to Python 3. Note that Debian 'buster' is not released yet and contains Rocky packages. Stein ones will be available later. Co-Authored-By: Lee Yarwood <lyarwood@redhat.com> Co-Authored-By: Eduardo Gonzalez <dabarren@gmail.com> Change-Id: I160f79cc57f54ec3eac857c5babd1a6e2656d228
-rw-r--r--docker/aodh/aodh-base/Dockerfile.j28
-rw-r--r--docker/barbican/barbican-api/Dockerfile.j22
-rw-r--r--docker/base/sources.list.ubuntu2
-rw-r--r--docker/base/sources.list.ubuntu.aarch642
-rw-r--r--docker/base/sources.list.ubuntu.ppc64le2
-rw-r--r--docker/ceilometer/ceilometer-base/Dockerfile.j22
-rw-r--r--docker/cinder/cinder-api/Dockerfile.j22
-rw-r--r--docker/gnocchi/gnocchi-base/Dockerfile.j213
-rw-r--r--docker/horizon/Dockerfile.j215
-rw-r--r--docker/ironic/ironic-conductor/Dockerfile.j24
-rw-r--r--docker/keystone/keystone-base/Dockerfile.j24
-rw-r--r--docker/macros.j27
-rw-r--r--docker/neutron/neutron-base/Dockerfile.j214
-rw-r--r--docker/neutron/neutron-lbaas-agent/Dockerfile.j22
-rw-r--r--docker/neutron/neutron-metadata-agent-ovn/Dockerfile.j22
-rw-r--r--docker/neutron/neutron-server-opendaylight/Dockerfile.j225
-rw-r--r--docker/neutron/neutron-server-ovn/Dockerfile.j213
-rw-r--r--docker/neutron/neutron-server/Dockerfile.j26
-rw-r--r--docker/nova/nova-base/Dockerfile.j23
-rw-r--r--docker/ovn/ovn-base/Dockerfile.j28
-rw-r--r--docker/placement/placement-api/Dockerfile.j22
-rw-r--r--docker/zaqar/zaqar-base/Dockerfile.j24
-rwxr-xr-xkolla/image/build.py1
23 files changed, 77 insertions, 66 deletions
diff --git a/docker/aodh/aodh-base/Dockerfile.j2 b/docker/aodh/aodh-base/Dockerfile.j2
index 83d3d7ccf..a54cbd76b 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 f9f6b7afc..fce0e001b 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 d5c1f2087..f4eaa9b50 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 9b289b132..812fc59f8 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 9b289b132..812fc59f8 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 6e25b7c26..8182ba045 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 b0135b42d..ddc493d5b 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 aa15bc289..1d3432bc8 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 90b0f0b36..0fbeb39db 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 a9c5854a4..720eb4bfd 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 df11edaa8..a9160478a 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 171d9564c..5386dca75 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 4faa65595..2b7be6256 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 0ab48a89a..5e8f135c7 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 1015f3b6e..b5daf3165 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 35ddf01aa..8cabc0a3c 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 5d855cb71..24525ff46 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 8d443bc9f..0ec432045 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 de9e6a20f..ae230035e 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 b2fee7bcb..be4f15718 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 7c84e42f8..b573a36d7 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 0255b4a31..c75f7f39a 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 b3ed5e5c2..0306d9b2b 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",