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/aodh | |
| 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/aodh')
| -rw-r--r-- | docker/aodh/aodh-api/Dockerfile.j2 | 4 | ||||
| -rw-r--r-- | docker/aodh/aodh-base/Dockerfile.j2 | 8 | ||||
| -rw-r--r-- | docker/aodh/aodh-evaluator/Dockerfile.j2 | 4 | ||||
| -rw-r--r-- | docker/aodh/aodh-expirer/Dockerfile.j2 | 4 | ||||
| -rw-r--r-- | docker/aodh/aodh-listener/Dockerfile.j2 | 4 | ||||
| -rw-r--r-- | docker/aodh/aodh-notifier/Dockerfile.j2 | 4 |
6 files changed, 14 insertions, 14 deletions
diff --git a/docker/aodh/aodh-api/Dockerfile.j2 b/docker/aodh/aodh-api/Dockerfile.j2 index b85483fda..abee6811e 100644 --- a/docker/aodh/aodh-api/Dockerfile.j2 +++ b/docker/aodh/aodh-api/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 aodh_api_packages = ['openstack-aodh-api'] %} - {% elif base_distro in ['debian', 'ubuntu'] %} + {% elif base_package_type == 'deb' %} {% set aodh_api_packages = ['aodh-api'] %} {% endif %} {{ macros.install_packages(aodh_api_packages | customizable("packages")) }} diff --git a/docker/aodh/aodh-base/Dockerfile.j2 b/docker/aodh/aodh-base/Dockerfile.j2 index 9ef1b1160..83d3d7ccf 100644 --- a/docker/aodh/aodh-base/Dockerfile.j2 +++ b/docker/aodh/aodh-base/Dockerfile.j2 @@ -8,7 +8,7 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {{ macros.configure_user(name='aodh') }} {% if install_type == 'binary' %} - {% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} + {% if base_package_type == 'rpm' %} {% set aodh_base_packages = [ 'httpd', @@ -23,7 +23,7 @@ RUN mkdir -p /var/www/cgi-bin/aodh \ && cp -a /usr/lib/python2.7/site-packages/aodh/api/app.wsgi /var/www/cgi-bin/aodh/ \ && 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 aodh_base_packages = [ 'aodh-common', @@ -40,7 +40,7 @@ RUN mkdir -p /var/www/cgi-bin/aodh \ {% endif %} {% elif install_type == 'source' %} - {% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} + {% if base_package_type == 'rpm' %} {% set aodh_base_packages = [ 'httpd', @@ -53,7 +53,7 @@ RUN mkdir -p /var/www/cgi-bin/aodh \ RUN mkdir -p /var/www/cgi-bin/aodh \ && 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 aodh_base_packages = [ 'apache2', diff --git a/docker/aodh/aodh-evaluator/Dockerfile.j2 b/docker/aodh/aodh-evaluator/Dockerfile.j2 index 5b6d13086..3e06be46a 100644 --- a/docker/aodh/aodh-evaluator/Dockerfile.j2 +++ b/docker/aodh/aodh-evaluator/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 aodh_evaluator_packages = ['openstack-aodh-evaluator'] %} - {% elif base_distro in ['debian', 'ubuntu'] %} + {% elif base_package_type == 'deb' %} {% set aodh_evaluator_packages = ['aodh-evaluator'] %} {% endif %} {{ macros.install_packages(aodh_evaluator_packages | customizable("packages")) }} diff --git a/docker/aodh/aodh-expirer/Dockerfile.j2 b/docker/aodh/aodh-expirer/Dockerfile.j2 index 1ba8d93b6..6b1d8400d 100644 --- a/docker/aodh/aodh-expirer/Dockerfile.j2 +++ b/docker/aodh/aodh-expirer/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 aodh_expirer_packages = ['openstack-aodh-expirer'] %} - {% elif base_distro in ['debian', 'ubuntu'] %} + {% elif base_package_type == 'deb' %} {% set aodh_expirer_packages = ['aodh-expirer'] %} {% endif %} {{ macros.install_packages(aodh_expirer_packages | customizable("packages")) }} diff --git a/docker/aodh/aodh-listener/Dockerfile.j2 b/docker/aodh/aodh-listener/Dockerfile.j2 index 728fd97f4..fef7b81ce 100644 --- a/docker/aodh/aodh-listener/Dockerfile.j2 +++ b/docker/aodh/aodh-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 aodh_listener_packages = ['openstack-aodh-listener'] %} - {% elif base_distro in ['debian', 'ubuntu'] %} + {% elif base_package_type == 'deb' %} {% set aodh_listener_packages = ['aodh-listener'] %} {% endif %} {{ macros.install_packages(aodh_listener_packages | customizable("packages")) }} diff --git a/docker/aodh/aodh-notifier/Dockerfile.j2 b/docker/aodh/aodh-notifier/Dockerfile.j2 index 41a311e01..7ecdb64f5 100644 --- a/docker/aodh/aodh-notifier/Dockerfile.j2 +++ b/docker/aodh/aodh-notifier/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 aodh_notifier_packages = ['openstack-aodh-notifier'] %} - {% elif base_distro in ['debian', 'ubuntu'] %} + {% elif base_package_type == 'deb' %} {% set aodh_notifier_packages = ['aodh-notifier'] %} {% endif %} {{ macros.install_packages(aodh_notifier_packages | customizable("packages")) }} |
