From 50dc394f4977d37e89c7c25f4f634a0708d69c85 Mon Sep 17 00:00:00 2001 From: ZhongShengping Date: Tue, 27 Mar 2018 09:10:03 +0800 Subject: [PATCH] Add support for installing binary packages for senlin There are senlin binary packages on redhat[1] and ubuntu systems[2]. [1]https://trunk.rdoproject.org/centos7-master/puppet-passed-ci/openstack-senlin-api-5.0.1-0.20180324005415.00641ad.el7.centos.noarch.rpm [2]http://ubuntu-cloud.archive.canonical.com/ubuntu/pool/main/s/senlin/senlin-api_5.0.0-0ubuntu1~cloud0_all.deb Closes-Bug: #1759094 Change-Id: Ic9ffe563924511edf80f0eeb2df3018a1111bb35 --- docker/senlin/senlin-api/Dockerfile.j2 | 13 ++++++++++--- docker/senlin/senlin-base/Dockerfile.j2 | 9 +++++++-- docker/senlin/senlin-engine/Dockerfile.j2 | 13 ++++++++++--- kolla/image/build.py | 4 ---- 4 files changed, 27 insertions(+), 12 deletions(-) diff --git a/docker/senlin/senlin-api/Dockerfile.j2 b/docker/senlin/senlin-api/Dockerfile.j2 index 969197ac57..ebc1453c7d 100644 --- a/docker/senlin/senlin-api/Dockerfile.j2 +++ b/docker/senlin/senlin-api/Dockerfile.j2 @@ -3,10 +3,17 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {% block senlin_api_header %}{% endblock %} -{% if install_type == 'binary' %} +{% import "macros.j2" as macros with context %} -RUN echo '{{ install_type }} not yet available for {{ base_distro }}' \ - && /bin/false +{% if install_type == 'binary' %} + {% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} + {% set senlin_api_packages = ['openstack-senlin-api'] %} + + {% elif base_distro in ['debian', 'ubuntu'] %} + {% set senlin_api_packages = ['senlin-api'] %} + {% endif %} + +{{ macros.install_packages(senlin_api_packages | customizable("packages")) }} {% endif %} diff --git a/docker/senlin/senlin-base/Dockerfile.j2 b/docker/senlin/senlin-base/Dockerfile.j2 index e2d2c1c599..46f9797d62 100644 --- a/docker/senlin/senlin-base/Dockerfile.j2 +++ b/docker/senlin/senlin-base/Dockerfile.j2 @@ -8,9 +8,14 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {{ macros.configure_user(name='senlin') }} {% if install_type == 'binary' %} + {% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} + {% set senlin_base_packages = ['openstack-senlin-common'] %} -RUN echo '{{ install_type }} not yet available for {{ base_distro }}' \ - && /bin/false + {% elif base_distro in ['debian', 'ubuntu'] %} + {% set senlin_base_packages = ['senlin-common'] %} + {% endif %} + +{{ macros.install_packages(senlin_base_packages | customizable("packages")) }} {% elif install_type == 'source' %} diff --git a/docker/senlin/senlin-engine/Dockerfile.j2 b/docker/senlin/senlin-engine/Dockerfile.j2 index 40a08ba05b..a31a041461 100644 --- a/docker/senlin/senlin-engine/Dockerfile.j2 +++ b/docker/senlin/senlin-engine/Dockerfile.j2 @@ -3,10 +3,17 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {% block senlin_engine_header %}{% endblock %} -{% if install_type == 'binary' %} +{% import "macros.j2" as macros with context %} -RUN echo '{{ install_type }} not yet available for {{ base_distro }}' \ - && /bin/false +{% if install_type == 'binary' %} + {% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} + {% set senlin_engine_packages = ['openstack-senlin-engine'] %} + + {% elif base_distro in ['debian', 'ubuntu'] %} + {% set senlin_engine_packages = ['senlin-engine'] %} + {% endif %} + +{{ macros.install_packages(senlin_engine_packages | customizable("packages")) }} {% endif %} diff --git a/kolla/image/build.py b/kolla/image/build.py index b1bc718d32..356b476bca 100755 --- a/kolla/image/build.py +++ b/kolla/image/build.py @@ -90,7 +90,6 @@ SKIPPED_IMAGES = { "nova-mksproxy", "ovsdpdk", "searchlight-base", - "senlin-base", "solum-base", "vmtp", "zun-base", @@ -120,7 +119,6 @@ SKIPPED_IMAGES = { "novajoin-base", "octavia-base", "searchlight-base", - "senlin-base", "solum-base", "tacker-base", "tripleo-ui", @@ -151,7 +149,6 @@ SKIPPED_IMAGES = { "novajoin-base", "octavia-base", "searchlight-base", - "senlin-base", "sensu-base", "solum-base", "tacker-base", @@ -178,7 +175,6 @@ SKIPPED_IMAGES = { "neutron-bgp-dragent", "ovsdpdk", "searchlight-base", - "senlin-base", "solum-base", "vmtp", "zun-base"