aboutsummaryrefslogtreecommitdiff
path: root/docker/nova
diff options
context:
space:
mode:
authorAlex Schultz <aschultz@redhat.com>2019-01-21 12:58:19 -0700
committerMark Goddard <mark@stackhpc.com>2019-03-12 17:48:18 +0000
commit3e5d8e2653db1c6c28cb428f81cd0bc332c623c3 (patch)
tree25de124db6ae7848cecb121ac414eb468bfd4d5c /docker/nova
parent8df6eb01184672ffdc752437ea4d98d13f16026e (diff)
downloadkolla-3e5d8e2653db1c6c28cb428f81cd0bc332c623c3.tar.gz
kolla-3e5d8e2653db1c6c28cb428f81cd0bc332c623c3.zip
Add python3 packages for RHEL systems
RDO is currently working on python3 support for the next version of CentOS/RHEL based systems. This package uses the distro_python3 flag that was added as part of I4028991bad92c0e8e21066cc4173c06ce5eba393 to use the python3 specific package names. This change only adds python3 package names for RHEL systems. Conflicts-With: https://review.openstack.org/#/c/636457/ Change-Id: Iad6b70b433a0dd1b0f8ae6790fd280594517661a Related-Blueprint: python3-support
Diffstat (limited to 'docker/nova')
-rw-r--r--docker/nova/nova-api/Dockerfile.j214
-rw-r--r--docker/nova/nova-base/Dockerfile.j212
-rw-r--r--docker/nova/nova-compute/Dockerfile.j217
-rw-r--r--docker/nova/nova-placement-api/Dockerfile.j212
-rw-r--r--docker/nova/nova-spicehtml5proxy/Dockerfile.j211
5 files changed, 57 insertions, 9 deletions
diff --git a/docker/nova/nova-api/Dockerfile.j2 b/docker/nova/nova-api/Dockerfile.j2
index 2bd2a0cfb..9024d9387 100644
--- a/docker/nova/nova-api/Dockerfile.j2
+++ b/docker/nova/nova-api/Dockerfile.j2
@@ -11,9 +11,14 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build
{% set nova_api_packages = [
'httpd',
'mod_ssl',
- 'mod_wsgi',
'openstack-nova-api'
] %}
+ {% 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 \
&& sed -i -r 's,^(Listen 443),#\1,' /etc/httpd/conf.d/ssl.conf
@@ -38,8 +43,13 @@ RUN echo > /etc/apache2/ports.conf
{% set nova_api_packages = [
'httpd',
'mod_ssl',
- '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 \
&& sed -i -r 's,^(Listen 443),#\1,' /etc/httpd/conf.d/ssl.conf
diff --git a/docker/nova/nova-base/Dockerfile.j2 b/docker/nova/nova-base/Dockerfile.j2
index cfbb5e5bb..f64664f65 100644
--- a/docker/nova/nova-base/Dockerfile.j2
+++ b/docker/nova/nova-base/Dockerfile.j2
@@ -12,10 +12,20 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build
{% set nova_base_packages = [
'openstack-nova-common',
- 'openvswitch',
+ 'openvswitch'
+ ] %}
+
+ {% if distro_python_version.startswith('3') %}
+ {% set nova_base_packages = nova_base_packages + [
+ 'python3-cinderclient',
+ 'python3-keystoneclient'
+ ] %}
+ {% else %}
+ {% set nova_base_packages = nova_base_packages + [
'python-cinderclient',
'python-keystoneclient'
] %}
+ {% endif %}
{% if base_arch == 'x86_64' %}
{% if base_distro in ['centos', 'oraclelinux', 'rhel'] and base_distro_tag.startswith('7') %}
diff --git a/docker/nova/nova-compute/Dockerfile.j2 b/docker/nova/nova-compute/Dockerfile.j2
index 03741d034..8f58e2b74 100644
--- a/docker/nova/nova-compute/Dockerfile.j2
+++ b/docker/nova/nova-compute/Dockerfile.j2
@@ -19,13 +19,24 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build
'openstack-nova-compute',
'openvswitch',
'parted',
- 'python-libguestfs',
- 'python-oslo-vmware',
- 'python-rtslib',
'sysfsutils',
'targetcli'
] %}
+ {% 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' %}
diff --git a/docker/nova/nova-placement-api/Dockerfile.j2 b/docker/nova/nova-placement-api/Dockerfile.j2
index ef76e4fb9..5c37e0a23 100644
--- a/docker/nova/nova-placement-api/Dockerfile.j2
+++ b/docker/nova/nova-placement-api/Dockerfile.j2
@@ -11,9 +11,13 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build
{% set nova_placement_api_packages = [
'httpd',
'mod_ssl',
- 'mod_wsgi',
'openstack-nova-placement-api'
] %}
+ {% if distro_python_version.startswith('3') %}
+ {% set nova_placement_api_packages = nova_placement_api_packages + ['python3-mod_wsgi'] %}
+ {% else %}
+ {% set nova_placement_api_packages = nova_placement_api_packages + ['mod_wsgi'] %}
+ {% endif %}
{{ macros.install_packages(nova_placement_api_packages | customizable("packages")) }}
RUN sed -i -r 's,^(Listen 80),#\1,' /etc/httpd/conf/httpd.conf \
@@ -37,8 +41,12 @@ RUN truncate -s 0 /etc/apache2/ports.conf
{% set nova_placement_api_packages = [
'httpd',
'mod_ssl',
- 'mod_wsgi'
] %}
+ {% if distro_python_version.startswith('3') %}
+ {% set nova_placement_api_packages = nova_placement_api_packages + ['python3-mod_wsgi'] %}
+ {% else %}
+ {% set nova_placement_api_packages = nova_placement_api_packages + ['mod_wsgi'] %}
+ {% endif %}
{{ macros.install_packages(nova_placement_api_packages | customizable("packages")) }}
RUN sed -i -r 's,^(Listen 80),#\1,' /etc/httpd/conf/httpd.conf \
diff --git a/docker/nova/nova-spicehtml5proxy/Dockerfile.j2 b/docker/nova/nova-spicehtml5proxy/Dockerfile.j2
index 8003ac9b7..57b439766 100644
--- a/docker/nova/nova-spicehtml5proxy/Dockerfile.j2
+++ b/docker/nova/nova-spicehtml5proxy/Dockerfile.j2
@@ -9,11 +9,20 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build
{% if base_package_type == 'rpm' %}
{% set nova_spicehtml5proxy_packages = [
- 'numpy',
'openstack-nova-spicehtml5proxy',
'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 = [