From ae1322ec10861678abe1137f3013030b34335bc7 Mon Sep 17 00:00:00 2001 From: Alex Schultz Date: Tue, 15 Jan 2019 16:58:25 -0700 Subject: 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 --- docker/barbican/barbican-api/Dockerfile.j2 | 4 ++-- docker/barbican/barbican-base/Dockerfile.j2 | 8 ++++---- docker/barbican/barbican-keystone-listener/Dockerfile.j2 | 4 ++-- docker/barbican/barbican-worker/Dockerfile.j2 | 4 ++-- 4 files changed, 10 insertions(+), 10 deletions(-) (limited to 'docker/barbican') diff --git a/docker/barbican/barbican-api/Dockerfile.j2 b/docker/barbican/barbican-api/Dockerfile.j2 index 4a0d53faa..f9f6b7afc 100644 --- a/docker/barbican/barbican-api/Dockerfile.j2 +++ b/docker/barbican/barbican-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 barbican_api_packages = [ 'httpd', 'mod_ssl', @@ -20,7 +20,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 barbican_api_packages = [ 'apache2', 'barbican-api', diff --git a/docker/barbican/barbican-base/Dockerfile.j2 b/docker/barbican/barbican-base/Dockerfile.j2 index 06700527c..15ce1559a 100644 --- a/docker/barbican/barbican-base/Dockerfile.j2 +++ b/docker/barbican/barbican-base/Dockerfile.j2 @@ -8,18 +8,18 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {{ macros.configure_user(name='barbican', groups='nfast') }} {% if install_type == 'binary' %} - {% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} + {% if base_package_type == 'rpm' %} {% set barbican_base_packages = ['openstack-barbican-common'] %} - {% elif base_distro in ['debian', 'ubuntu'] %} + {% elif base_package_type == 'deb' %} {% set barbican_base_packages = ['barbican-common'] %} {% endif %} {{ macros.install_packages(barbican_base_packages | customizable("packages")) }} {% elif install_type == 'source' %} - {% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} + {% if base_package_type == 'rpm' %} {% set barbican_base_packages = ['uwsgi-plugin-python'] %} - {% elif base_distro in ['debian', 'ubuntu'] %} + {% elif base_package_type == 'deb' %} {% set barbican_base_packages = ['uwsgi-plugin-python'] %} {% endif %} diff --git a/docker/barbican/barbican-keystone-listener/Dockerfile.j2 b/docker/barbican/barbican-keystone-listener/Dockerfile.j2 index aee14d072..11eeb41fc 100644 --- a/docker/barbican/barbican-keystone-listener/Dockerfile.j2 +++ b/docker/barbican/barbican-keystone-listener/Dockerfile.j2 @@ -6,9 +6,9 @@ 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 barbican_keystone_listener_packages = ['openstack-barbican-keystone-listener'] %} - {% elif base_distro in ['debian', 'ubuntu'] %} + {% elif base_package_type == 'deb' %} {% set barbican_keystone_listener_packages = ['barbican-keystone-listener'] %} {% endif %} diff --git a/docker/barbican/barbican-worker/Dockerfile.j2 b/docker/barbican/barbican-worker/Dockerfile.j2 index ae5e77cf0..3d5cc148e 100644 --- a/docker/barbican/barbican-worker/Dockerfile.j2 +++ b/docker/barbican/barbican-worker/Dockerfile.j2 @@ -6,9 +6,9 @@ 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 barbican_worker_packages = ['openstack-barbican-worker'] %} - {% elif base_distro in ['debian', 'ubuntu'] %} + {% elif base_package_type == 'deb' %} {% set barbican_worker_packages = ['barbican-worker'] %} {% endif %} -- cgit v1.2.3