diff options
| author | Alex Schultz <aschultz@redhat.com> | 2019-01-15 16:58:25 -0700 |
|---|---|---|
| committer | Alex Schultz <aschultz@redhat.com> | 2019-01-17 08:23:41 -0700 |
| commit | ae1322ec10861678abe1137f3013030b34335bc7 (patch) | |
| tree | e3181569502d82f6b207dd258cffdb8058dc60ff /docker/nova | |
| parent | fca732b81e4eb5daa56da16e338bdd305a56d5bd (diff) | |
| download | kolla-ae1322ec10861678abe1137f3013030b34335bc7.tar.gz kolla-ae1322ec10861678abe1137f3013030b34335bc7.zip | |
Use base_package_type
This change updates the docker files to use base_package_type instead
of doing specific distro checks for the rhel/deb generic cases. The
base_distro is still available and is used when a specific distro needs
a customization but if the differences are purely rpm vs deb, then the
base_package_type can be used.
Change-Id: I8d720bb185df65a0178061ccf20b1ab2265da2c5
Diffstat (limited to 'docker/nova')
| -rw-r--r-- | docker/nova/nova-api/Dockerfile.j2 | 8 | ||||
| -rw-r--r-- | docker/nova/nova-base/Dockerfile.j2 | 10 | ||||
| -rw-r--r-- | docker/nova/nova-compute-ironic/Dockerfile.j2 | 4 | ||||
| -rw-r--r-- | docker/nova/nova-compute/Dockerfile.j2 | 8 | ||||
| -rw-r--r-- | docker/nova/nova-conductor/Dockerfile.j2 | 4 | ||||
| -rw-r--r-- | docker/nova/nova-consoleauth/Dockerfile.j2 | 4 | ||||
| -rw-r--r-- | docker/nova/nova-libvirt/Dockerfile.j2 | 6 | ||||
| -rw-r--r-- | docker/nova/nova-novncproxy/Dockerfile.j2 | 4 | ||||
| -rw-r--r-- | docker/nova/nova-placement-api/Dockerfile.j2 | 8 | ||||
| -rw-r--r-- | docker/nova/nova-scheduler/Dockerfile.j2 | 4 | ||||
| -rw-r--r-- | docker/nova/nova-serialproxy/Dockerfile.j2 | 4 | ||||
| -rw-r--r-- | docker/nova/nova-spicehtml5proxy/Dockerfile.j2 | 8 | ||||
| -rw-r--r-- | docker/nova/nova-ssh/Dockerfile.j2 | 2 |
13 files changed, 37 insertions, 37 deletions
diff --git a/docker/nova/nova-api/Dockerfile.j2 b/docker/nova/nova-api/Dockerfile.j2 index 2effdb308..2bd2a0cfb 100644 --- a/docker/nova/nova-api/Dockerfile.j2 +++ b/docker/nova/nova-api/Dockerfile.j2 @@ -6,7 +6,7 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {% import "macros.j2" as macros with context %} {% if install_type == 'binary' %} - {% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} + {% if base_package_type == 'rpm' %} {% set nova_api_packages = [ 'httpd', @@ -18,7 +18,7 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build 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 - {% elif base_distro in ['debian', 'ubuntu'] %} + {% elif base_package_type == 'deb' %} {% set nova_api_packages = [ 'apache2', @@ -33,7 +33,7 @@ RUN echo > /etc/apache2/ports.conf {% elif install_type == 'source' %} - {% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} + {% if base_package_type == 'rpm' %} {% set nova_api_packages = [ 'httpd', @@ -44,7 +44,7 @@ RUN echo > /etc/apache2/ports.conf 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 - {% elif base_distro in ['debian', 'ubuntu'] %} + {% elif base_package_type == 'deb' %} {% set nova_api_packages = [ 'apache2', diff --git a/docker/nova/nova-base/Dockerfile.j2 b/docker/nova/nova-base/Dockerfile.j2 index 73f3ca02e..26f2cfdf6 100644 --- a/docker/nova/nova-base/Dockerfile.j2 +++ b/docker/nova/nova-base/Dockerfile.j2 @@ -8,7 +8,7 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {{ macros.configure_user(name='nova', groups='qemu') }} {% if install_type == 'binary' %} - {% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} + {% if base_package_type == 'rpm' %} {% set nova_base_packages = [ 'bridge-utils', @@ -30,7 +30,7 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {# NOTE(Jeffrey4l): no packages for ppc64le #} {% endif %} - {% elif base_distro in ['debian', 'ubuntu'] %} + {% elif base_package_type == 'deb' %} {% set nova_base_packages = [ 'bridge-utils', @@ -54,7 +54,7 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {{ macros.install_packages(nova_base_packages | customizable("packages")) }} {% elif install_type == 'source' %} - {% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} + {% if base_package_type == 'rpm' %} {% set nova_base_packages = [ 'bridge-utils', @@ -72,7 +72,7 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {# NOTE(Jeffrey4l): no packages for ppc64le #} {% endif %} - {% elif base_distro in ['debian', 'ubuntu'] %} + {% elif base_package_type == 'deb' %} {% set nova_base_packages = [ 'bridge-utils', @@ -128,7 +128,7 @@ RUN chmod 750 /etc/sudoers.d \ {% endif %} -{% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} +{% if base_package_type == 'rpm' %} {% if base_arch == 'x86_64' %} # 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 diff --git a/docker/nova/nova-compute-ironic/Dockerfile.j2 b/docker/nova/nova-compute-ironic/Dockerfile.j2 index bc387d039..cf2d6738c 100644 --- a/docker/nova/nova-compute-ironic/Dockerfile.j2 +++ b/docker/nova/nova-compute-ironic/Dockerfile.j2 @@ -8,7 +8,7 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {% set nova_compute_ironic_packages = ['genisoimage'] %} {% if install_type == 'binary' %} - {% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} + {% if base_package_type == 'rpm' %} {% set nova_compute_ironic_packages = nova_compute_ironic_packages + [ 'nvme-cli', @@ -16,7 +16,7 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build ] %} {{ macros.install_packages(nova_compute_ironic_packages | customizable("packages")) }} - {% elif base_distro in ['debian', 'ubuntu'] %} + {% elif base_package_type == 'deb' %} {% set nova_compute_ironic_packages = nova_compute_ironic_packages + [ 'nova-compute' diff --git a/docker/nova/nova-compute/Dockerfile.j2 b/docker/nova/nova-compute/Dockerfile.j2 index 702d2cbbb..03741d034 100644 --- a/docker/nova/nova-compute/Dockerfile.j2 +++ b/docker/nova/nova-compute/Dockerfile.j2 @@ -6,7 +6,7 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {% import "macros.j2" as macros with context %} {% if install_type == 'binary' %} - {% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} + {% if base_package_type == 'rpm' %} {% set nova_compute_packages = [ 'ceph-common', @@ -28,7 +28,7 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {{ macros.install_packages(nova_compute_packages | customizable("packages")) }} - {% elif base_distro in ['debian', 'ubuntu'] %} + {% elif base_package_type == 'deb' %} # ironic as workaround https://bugs.launchpad.net/packstack/+bug/1430388 {% set nova_compute_packages = [ @@ -63,7 +63,7 @@ RUN rm -f /etc/nova/nova-compute.conf {% endif %} {% elif install_type == 'source' %} - {% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} + {% if base_package_type == 'rpm' %} {% set nova_compute_packages = [ 'ceph-common', @@ -84,7 +84,7 @@ RUN rm -f /etc/nova/nova-compute.conf 'targetcli' ] %} - {% elif base_distro in ['debian', 'ubuntu'] %} + {% elif base_package_type == 'deb' %} {% set nova_compute_packages = [ 'ceph-common', diff --git a/docker/nova/nova-conductor/Dockerfile.j2 b/docker/nova/nova-conductor/Dockerfile.j2 index 8c238687f..3f0dd9d76 100644 --- a/docker/nova/nova-conductor/Dockerfile.j2 +++ b/docker/nova/nova-conductor/Dockerfile.j2 @@ -6,13 +6,13 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {% import "macros.j2" as macros with context %} {% if install_type == 'binary' %} - {% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} + {% if base_package_type == 'rpm' %} {% set nova_conductor_packages = [ 'openstack-nova-conductor' ] %} - {% elif base_distro in ['debian', 'ubuntu'] %} + {% elif base_package_type == 'deb' %} {% set nova_conductor_packages = [ 'nova-conductor' diff --git a/docker/nova/nova-consoleauth/Dockerfile.j2 b/docker/nova/nova-consoleauth/Dockerfile.j2 index 2c7835f9f..9e8613f6c 100644 --- a/docker/nova/nova-consoleauth/Dockerfile.j2 +++ b/docker/nova/nova-consoleauth/Dockerfile.j2 @@ -6,13 +6,13 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {% import "macros.j2" as macros with context %} {% if install_type == 'binary' %} - {% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} + {% if base_package_type == 'rpm' %} {% set nova_consoleauth_packages = [ 'openstack-nova-console' ] %} - {% elif base_distro in ['debian', 'ubuntu'] %} + {% elif base_package_type == 'deb' %} {% set nova_consoleauth_packages = [ 'nova-consoleauth', diff --git a/docker/nova/nova-libvirt/Dockerfile.j2 b/docker/nova/nova-libvirt/Dockerfile.j2 index f62fe90dc..be503849e 100644 --- a/docker/nova/nova-libvirt/Dockerfile.j2 +++ b/docker/nova/nova-libvirt/Dockerfile.j2 @@ -7,7 +7,7 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {{ macros.configure_user(name='nova', groups='qemu') }} -{% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} +{% if base_package_type == 'rpm' %} {% set nova_libvirt_packages = [ 'ceph-common', @@ -30,7 +30,7 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build ] %} {% endif %} -{% elif base_distro in ['debian', 'ubuntu'] %} +{% elif base_package_type == 'deb' %} {% set nova_libvirt_packages = [ 'ceph-common', @@ -66,7 +66,7 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {{ macros.install_packages(nova_libvirt_packages | customizable("packages")) }} -{% if base_distro in ['debian', 'ubuntu'] %} +{% if base_package_type == 'deb' %} RUN rm -f /etc/libvirt/qemu/networks/default.xml /etc/libvirt/qemu/networks/autostart/default.xml diff --git a/docker/nova/nova-novncproxy/Dockerfile.j2 b/docker/nova/nova-novncproxy/Dockerfile.j2 index 9f064c975..b87c350f6 100644 --- a/docker/nova/nova-novncproxy/Dockerfile.j2 +++ b/docker/nova/nova-novncproxy/Dockerfile.j2 @@ -6,14 +6,14 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {% import "macros.j2" as macros with context %} {% if install_type == 'binary' %} - {% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} + {% if base_package_type == 'rpm' %} {% set nova_novncproxy_packages = [ 'novnc', 'openstack-nova-novncproxy' ] %} - {% elif base_distro in ['debian', 'ubuntu'] %} + {% elif base_package_type == 'deb' %} {% set nova_novncproxy_packages = [ 'nova-novncproxy' diff --git a/docker/nova/nova-placement-api/Dockerfile.j2 b/docker/nova/nova-placement-api/Dockerfile.j2 index f1ccac57c..ef76e4fb9 100644 --- a/docker/nova/nova-placement-api/Dockerfile.j2 +++ b/docker/nova/nova-placement-api/Dockerfile.j2 @@ -6,7 +6,7 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {% import "macros.j2" as macros with context %} {% if install_type == 'binary' %} - {% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} + {% if base_package_type == 'rpm' %} {% set nova_placement_api_packages = [ 'httpd', @@ -19,7 +19,7 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build 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 - {% elif base_distro in ['debian', 'ubuntu'] %} + {% elif base_package_type == 'deb' %} {% set nova_placement_api_packages = [ 'apache2', @@ -32,7 +32,7 @@ RUN truncate -s 0 /etc/apache2/ports.conf {% endif %} {% elif install_type == 'source' %} - {% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} + {% if base_package_type == 'rpm' %} {% set nova_placement_api_packages = [ 'httpd', @@ -43,7 +43,7 @@ RUN truncate -s 0 /etc/apache2/ports.conf {{ macros.install_packages(nova_placement_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 - {% elif base_distro in ['debian', 'ubuntu'] %} + {% elif base_package_type == 'deb' %} {% set nova_placement_api_packages = [ 'apache2', diff --git a/docker/nova/nova-scheduler/Dockerfile.j2 b/docker/nova/nova-scheduler/Dockerfile.j2 index d009e1072..0933e48d3 100644 --- a/docker/nova/nova-scheduler/Dockerfile.j2 +++ b/docker/nova/nova-scheduler/Dockerfile.j2 @@ -6,13 +6,13 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {% import "macros.j2" as macros with context %} {% if install_type == 'binary' %} - {% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} + {% if base_package_type == 'rpm' %} {% set nova_scheduler_packages = [ 'openstack-nova-scheduler' ] %} - {% elif base_distro in ['debian', 'ubuntu'] %} + {% elif base_package_type == 'deb' %} {% set nova_scheduler_packages = [ 'nova-scheduler' diff --git a/docker/nova/nova-serialproxy/Dockerfile.j2 b/docker/nova/nova-serialproxy/Dockerfile.j2 index 0b1450aed..e3aa198be 100644 --- a/docker/nova/nova-serialproxy/Dockerfile.j2 +++ b/docker/nova/nova-serialproxy/Dockerfile.j2 @@ -6,11 +6,11 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {% import "macros.j2" as macros with context %} {% if install_type == 'binary' %} - {% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} + {% if base_package_type == 'rpm' %} {% set nova_serialproxy_packages = [ 'openstack-nova-serialproxy' ] %} - {% elif base_distro in ['debian', 'ubuntu'] %} + {% elif base_package_type == 'deb' %} {% set nova_serialproxy_packages = [ 'nova-serialproxy' ] %} diff --git a/docker/nova/nova-spicehtml5proxy/Dockerfile.j2 b/docker/nova/nova-spicehtml5proxy/Dockerfile.j2 index f630cb33f..8003ac9b7 100644 --- a/docker/nova/nova-spicehtml5proxy/Dockerfile.j2 +++ b/docker/nova/nova-spicehtml5proxy/Dockerfile.j2 @@ -6,7 +6,7 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {% import "macros.j2" as macros with context %} {% if install_type == 'binary' %} - {% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} + {% if base_package_type == 'rpm' %} {% set nova_spicehtml5proxy_packages = [ 'numpy', @@ -14,7 +14,7 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build 'spice-html5' ] %} - {% elif base_distro in ['debian', 'ubuntu'] %} + {% elif base_package_type == 'deb' %} {% set nova_spicehtml5proxy_packages = [ 'nova-spiceproxy', @@ -24,14 +24,14 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {% endif %} {% elif install_type == 'source' %} - {% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} + {% if base_package_type == 'rpm' %} {% set nova_spicehtml5proxy_packages = [ 'numpy', 'spice-html5' ] %} - {% elif base_distro in ['debian', 'ubuntu'] %} + {% elif base_package_type == 'deb' %} {% set nova_spicehtml5proxy_packages = [ 'spice-html5', diff --git a/docker/nova/nova-ssh/Dockerfile.j2 b/docker/nova/nova-ssh/Dockerfile.j2 index f14f1068b..a032cb6e7 100644 --- a/docker/nova/nova-ssh/Dockerfile.j2 +++ b/docker/nova/nova-ssh/Dockerfile.j2 @@ -11,7 +11,7 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build 'openssh-server' ] %} -{% if base_distro in ['debian', 'ubuntu'] %} +{% if base_package_type == 'deb' %} RUN mkdir -p /var/run/sshd \ && chmod 0755 /var/run/sshd |
