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/keystone/keystone-base/Dockerfile.j2 | 8 ++++---- docker/keystone/keystone-fernet/Dockerfile.j2 | 4 ++-- docker/keystone/keystone-ssh/Dockerfile.j2 | 4 ++-- docker/keystone/keystone/Dockerfile.j2 | 8 ++++---- 4 files changed, 12 insertions(+), 12 deletions(-) (limited to 'docker/keystone') diff --git a/docker/keystone/keystone-base/Dockerfile.j2 b/docker/keystone/keystone-base/Dockerfile.j2 index 1c0bad8fd..df11edaa8 100644 --- a/docker/keystone/keystone-base/Dockerfile.j2 +++ b/docker/keystone/keystone-base/Dockerfile.j2 @@ -8,7 +8,7 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {{ macros.configure_user(name='keystone') }} {% if install_type == 'binary' %} - {% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} + {% if base_package_type == 'rpm' %} {% set keystone_base_packages = [ 'httpd', 'mod_auth_mellon', @@ -27,7 +27,7 @@ RUN mkdir -p /var/www/cgi-bin/keystone \ && 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 keystone_base_packages = [ 'apache2', 'keystone', @@ -46,7 +46,7 @@ RUN mkdir -p /var/www/cgi-bin/keystone \ {% endif %} {% elif install_type == 'source' %} - {% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} + {% if base_package_type == 'rpm' %} {% set keystone_base_packages = [ 'httpd', 'mod_auth_mellon', @@ -59,7 +59,7 @@ RUN mkdir -p /var/www/cgi-bin/keystone \ 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 keystone_base_packages = [ 'apache2', 'libapache2-mod-auth-mellon', diff --git a/docker/keystone/keystone-fernet/Dockerfile.j2 b/docker/keystone/keystone-fernet/Dockerfile.j2 index f06751509..07baba979 100644 --- a/docker/keystone/keystone-fernet/Dockerfile.j2 +++ b/docker/keystone/keystone-fernet/Dockerfile.j2 @@ -5,13 +5,13 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {% import "macros.j2" as macros with context %} -{% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} +{% if base_package_type == 'rpm' %} {% set keystone_fernet_packages = [ 'cronie', 'openssh-clients', 'rsync' ] %} -{% elif base_distro in ['debian', 'ubuntu'] %} +{% elif base_package_type == 'deb' %} {% set keystone_fernet_packages = [ 'cron', 'openssh-client', diff --git a/docker/keystone/keystone-ssh/Dockerfile.j2 b/docker/keystone/keystone-ssh/Dockerfile.j2 index 6898c2e6e..233dedf7c 100644 --- a/docker/keystone/keystone-ssh/Dockerfile.j2 +++ b/docker/keystone/keystone-ssh/Dockerfile.j2 @@ -7,12 +7,12 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {{ macros.configure_user(name='keystone', shell='/bin/bash') }} -{% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} +{% if base_package_type == 'rpm' %} {% set keystone_ssh_packages = [ 'openssh-server', 'rsync' ] %} -{% elif base_distro in ['debian', 'ubuntu'] %} +{% elif base_package_type == 'deb' %} {% set keystone_ssh_packages = [ 'openssh-server', 'rsync' diff --git a/docker/keystone/keystone/Dockerfile.j2 b/docker/keystone/keystone/Dockerfile.j2 index 481892e81..bbcea3c63 100644 --- a/docker/keystone/keystone/Dockerfile.j2 +++ b/docker/keystone/keystone/Dockerfile.j2 @@ -11,12 +11,12 @@ RUN chmod 755 /usr/local/bin/kolla_extend_start /usr/local/bin/kolla_keystone_bo {% if install_type == 'binary' %} # TODO: oraclelinux fails to install these packages. Should be added when this is fixed. - {% if base_distro in ['centos', 'rhel'] %} + {% if base_package_type == 'rpm' and base_distro != 'oraclelinux' %} {% set keystone_packages = [ 'mod_auth_gssapi', 'python-requests-kerberos', ] %} - {% elif base_distro in ['debian', 'ubuntu'] %} + {% elif base_package_type == 'deb' %} {% set keystone_packages = [ 'libapache2-mod-auth-gssapi', 'python-requests-kerberos', @@ -24,11 +24,11 @@ RUN chmod 755 /usr/local/bin/kolla_extend_start /usr/local/bin/kolla_keystone_bo {% endif %} {{ macros.install_packages(keystone_packages | customizable("packages")) }} {% elif install_type == 'source' %} - {% if base_distro in ['centos', 'rhel'] %} + {% if base_package_type == 'rpm' and base_distro != 'oraclelinux' %} {% set keystone_packages = [ 'mod_auth_gssapi', ] %} - {% elif base_distro in ['debian', 'ubuntu'] %} + {% elif base_package_type == 'deb' %} {% set keystone_packages = [ 'libapache2-mod-auth-gssapi', ] %} -- cgit v1.2.3