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/ironic | |
| 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/ironic')
| -rw-r--r-- | docker/ironic/ironic-api/Dockerfile.j2 | 12 | ||||
| -rw-r--r-- | docker/ironic/ironic-base/Dockerfile.j2 | 4 | ||||
| -rw-r--r-- | docker/ironic/ironic-conductor/Dockerfile.j2 | 8 | ||||
| -rw-r--r-- | docker/ironic/ironic-pxe/Dockerfile.j2 | 4 |
4 files changed, 14 insertions, 14 deletions
diff --git a/docker/ironic/ironic-api/Dockerfile.j2 b/docker/ironic/ironic-api/Dockerfile.j2 index 3aa5a0a4a..f7d391cb2 100644 --- a/docker/ironic/ironic-api/Dockerfile.j2 +++ b/docker/ironic/ironic-api/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 ironic_api_packages = [ 'httpd', 'mod_ssl', 'mod_wsgi', 'openstack-ironic-api' ] %} - {% elif base_distro in ['debian', 'ubuntu'] %} + {% elif base_package_type == 'deb' %} {% set ironic_api_packages = [ 'apache2', 'ironic-api', @@ -22,13 +22,13 @@ 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 ironic_api_packages = [ 'httpd', 'mod_ssl', 'mod_wsgi' ] %} - {% elif base_distro in ['debian', 'ubuntu'] %} + {% elif base_package_type == 'deb' %} {% set ironic_api_packages = [ 'apache2', 'libapache2-mod-wsgi' @@ -39,11 +39,11 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {{ macros.install_packages(ironic_api_packages | customizable("packages")) }} -{% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} +{% if base_package_type == 'rpm' %} 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' %} RUN echo > /etc/apache2/ports.conf {% endif %} diff --git a/docker/ironic/ironic-base/Dockerfile.j2 b/docker/ironic/ironic-base/Dockerfile.j2 index dfd9317ca..fac6acbc8 100644 --- a/docker/ironic/ironic-base/Dockerfile.j2 +++ b/docker/ironic/ironic-base/Dockerfile.j2 @@ -8,9 +8,9 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {{ macros.configure_user(name='ironic') }} {% if install_type == 'binary' %} - {% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} + {% if base_package_type == 'rpm' %} {% set ironic_base_packages = ['openstack-ironic-common'] %} - {% elif base_distro in ['debian', 'ubuntu'] %} + {% elif base_package_type == 'deb' %} {% set ironic_base_packages = ['ironic-common'] %} {% endif %} diff --git a/docker/ironic/ironic-conductor/Dockerfile.j2 b/docker/ironic/ironic-conductor/Dockerfile.j2 index d81204e7b..a9c5854a4 100644 --- a/docker/ironic/ironic-conductor/Dockerfile.j2 +++ b/docker/ironic/ironic-conductor/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' %} # TODO(Jeffrey4l): no python-oneviewclient {% set ironic_conductor_packages = [ 'ansible', @@ -40,7 +40,7 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build 'qemu-img' ] %} {% endif %} - {% elif base_distro in ['debian', 'ubuntu'] %} + {% elif base_package_type == 'deb' %} # TODO(jeffrey4l): no python-dracclient, python-oneviewclient, UcsSdk, # ImcSdk package, python-sushy, ironic-staging-drivers {% set ironic_conductor_packages = [ @@ -64,7 +64,7 @@ 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 ironic_conductor_packages = [ 'dosfstools', 'e2fsprogs', @@ -78,7 +78,7 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build 'util-linux', 'xfsprogs', ] %} - {% elif base_distro in ['debian', 'ubuntu'] %} + {% elif base_package_type == 'deb' %} {% set ironic_conductor_packages = [ 'bsdmainutils', 'dosfstools', diff --git a/docker/ironic/ironic-pxe/Dockerfile.j2 b/docker/ironic/ironic-pxe/Dockerfile.j2 index 28dcb5361..3b6937917 100644 --- a/docker/ironic/ironic-pxe/Dockerfile.j2 +++ b/docker/ironic/ironic-pxe/Dockerfile.j2 @@ -5,7 +5,7 @@ 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 ironic_pxe_packages = [ 'httpd', 'ipxe-bootimgs', @@ -31,7 +31,7 @@ ENV ironic_arch=aarch64 {{ macros.install_packages(ironic_pxe_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 ironic_pxe_packages = [ 'apache2', 'ipxe', |
