From a9d08726f5a48eef77c04ea1acefc00d93ce7076 Mon Sep 17 00:00:00 2001 From: Shaun Smekel Date: Fri, 12 Aug 2016 08:24:11 +1000 Subject: [PATCH] Handle empty package list for install_packages Currently if the install_packages macro is run with an empty package list, it will add a yum or apt-get command with no packages listed. This bug fix aims to omit this line when no packages have been given, or, the operator wants to use the "_override" / "_remove" functionality to disable all packages being installed in a Dockerfile. Co-Authored-By: Paul Bourke Change-Id: Ifaaaebfccc3adb0f2f68a35ac08e59378bc87fdb Closes-bug: 1612446 --- docker/aodh/aodh-api/Dockerfile.j2 | 2 +- docker/aodh/aodh-base/Dockerfile.j2 | 2 +- docker/aodh/aodh-evaluator/Dockerfile.j2 | 2 +- docker/aodh/aodh-expirer/Dockerfile.j2 | 2 +- docker/aodh/aodh-listener/Dockerfile.j2 | 2 +- docker/aodh/aodh-notifier/Dockerfile.j2 | 2 +- .../ceilometer/ceilometer-api/Dockerfile.j2 | 2 +- .../ceilometer/ceilometer-base/Dockerfile.j2 | 2 +- .../ceilometer-central/Dockerfile.j2 | 2 +- .../ceilometer-collector/Dockerfile.j2 | 2 +- .../ceilometer-compute/Dockerfile.j2 | 2 +- .../ceilometer-notification/Dockerfile.j2 | 2 +- docker/ceph/ceph-base/Dockerfile.j2 | 2 +- docker/cinder/cinder-api/Dockerfile.j2 | 2 +- docker/cinder/cinder-backup/Dockerfile.j2 | 2 +- docker/cinder/cinder-base/Dockerfile.j2 | 4 ++-- docker/cinder/cinder-rpcbind/Dockerfile.j2 | 2 +- docker/cinder/cinder-scheduler/Dockerfile.j2 | 2 +- docker/cinder/cinder-volume/Dockerfile.j2 | 6 +++--- docker/cron/Dockerfile.j2 | 2 +- docker/designate/designate-api/Dockerfile.j2 | 2 +- .../designate-backend-bind9/Dockerfile.j2 | 4 ++-- docker/designate/designate-base/Dockerfile.j2 | 4 ++-- .../designate/designate-central/Dockerfile.j2 | 2 +- docker/designate/designate-mdns/Dockerfile.j2 | 2 +- .../designate-pool-manager/Dockerfile.j2 | 2 +- docker/designate/designate-sink/Dockerfile.j2 | 2 +- docker/glance/glance-base/Dockerfile.j2 | 4 ++-- docker/gnocchi/gnocchi-api/Dockerfile.j2 | 2 +- docker/gnocchi/gnocchi-base/Dockerfile.j2 | 2 +- docker/gnocchi/gnocchi-metricd/Dockerfile.j2 | 2 +- docker/gnocchi/gnocchi-statsd/Dockerfile.j2 | 2 +- docker/haproxy/Dockerfile.j2 | 2 +- docker/heat/heat-api-cfn/Dockerfile.j2 | 2 +- docker/heat/heat-api/Dockerfile.j2 | 2 +- docker/heat/heat-base/Dockerfile.j2 | 2 +- docker/heat/heat-engine/Dockerfile.j2 | 2 +- docker/heka/Dockerfile.j2 | 2 +- docker/horizon/Dockerfile.j2 | 8 ++++---- docker/influxdb/Dockerfile.j2 | 2 +- docker/iscsid/Dockerfile.j2 | 2 +- docker/keepalived/Dockerfile.j2 | 2 +- docker/keystone/Dockerfile.j2 | 8 ++++---- docker/kolla-toolbox/Dockerfile.j2 | 2 +- docker/macros.j2 | 20 ++++++++++--------- docker/magnum/magnum-api/Dockerfile.j2 | 2 +- docker/magnum/magnum-base/Dockerfile.j2 | 2 +- docker/magnum/magnum-conductor/Dockerfile.j2 | 2 +- docker/manila/manila-api/Dockerfile.j2 | 2 +- docker/manila/manila-base/Dockerfile.j2 | 4 ++-- docker/manila/manila-scheduler/Dockerfile.j2 | 2 +- docker/manila/manila-share/Dockerfile.j2 | 2 +- docker/memcached/Dockerfile.j2 | 4 ++-- docker/mistral/mistral-api/Dockerfile.j2 | 2 +- docker/mistral/mistral-base/Dockerfile.j2 | 2 +- docker/mistral/mistral-engine/Dockerfile.j2 | 2 +- docker/mistral/mistral-executor/Dockerfile.j2 | 2 +- docker/mongodb/Dockerfile.j2 | 2 +- docker/multipathd/Dockerfile.j2 | 2 +- docker/murano/murano-api/Dockerfile.j2 | 2 +- docker/murano/murano-base/Dockerfile.j2 | 2 +- docker/murano/murano-engine/Dockerfile.j2 | 2 +- .../neutron-metering-agent/Dockerfile.j2 | 2 +- docker/openstack-base/Dockerfile.j2 | 6 +++--- .../openvswitch-base/Dockerfile.j2 | 2 +- docker/rally/Dockerfile.j2 | 2 +- docker/sahara/sahara-api/Dockerfile.j2 | 2 +- docker/sahara/sahara-base/Dockerfile.j2 | 2 +- docker/sahara/sahara-engine/Dockerfile.j2 | 2 +- docker/swift/swift-account/Dockerfile.j2 | 2 +- docker/swift/swift-base/Dockerfile.j2 | 4 ++-- docker/swift/swift-container/Dockerfile.j2 | 2 +- docker/swift/swift-object/Dockerfile.j2 | 2 +- docker/swift/swift-proxy-server/Dockerfile.j2 | 2 +- docker/swift/swift-rsyncd/Dockerfile.j2 | 2 +- docker/telegraf/Dockerfile.j2 | 2 +- docker/tempest/Dockerfile.j2 | 2 +- docker/tgtd/Dockerfile.j2 | 4 ++-- docker/trove/trove-api/Dockerfile.j2 | 2 +- docker/trove/trove-base/Dockerfile.j2 | 2 +- docker/trove/trove-conductor/Dockerfile.j2 | 2 +- docker/trove/trove-guestagent/Dockerfile.j2 | 2 +- docker/trove/trove-taskmanager/Dockerfile.j2 | 2 +- docker/zaqar/Dockerfile.j2 | 2 +- 84 files changed, 112 insertions(+), 110 deletions(-) diff --git a/docker/aodh/aodh-api/Dockerfile.j2 b/docker/aodh/aodh-api/Dockerfile.j2 index 939cd3742d..ccb757c5bb 100644 --- a/docker/aodh/aodh-api/Dockerfile.j2 +++ b/docker/aodh/aodh-api/Dockerfile.j2 @@ -8,7 +8,7 @@ MAINTAINER {{ maintainer }} {% elif base_distro in ['ubuntu'] %} {% set aodh_api_packages = ['aodh-api'] %} {% endif %} -RUN {{ macros.install_packages(aodh_api_packages | customizable("packages")) }} +{{ macros.install_packages(aodh_api_packages | customizable("packages")) }} {% endif %} COPY extend_start.sh /usr/local/bin/kolla_aodh_extend_start diff --git a/docker/aodh/aodh-base/Dockerfile.j2 b/docker/aodh/aodh-base/Dockerfile.j2 index 9ab6002cf4..effbf67ba6 100644 --- a/docker/aodh/aodh-base/Dockerfile.j2 +++ b/docker/aodh/aodh-base/Dockerfile.j2 @@ -10,7 +10,7 @@ MAINTAINER {{ maintainer }} {% elif base_distro in ['ubuntu'] %} {% set aodh_base_packages = ['aodh-common'] %} {% endif %} -RUN {{ macros.install_packages(aodh_base_packages | customizable("packages")) }} +{{ macros.install_packages(aodh_base_packages | customizable("packages")) }} {% elif install_type == 'source' %} diff --git a/docker/aodh/aodh-evaluator/Dockerfile.j2 b/docker/aodh/aodh-evaluator/Dockerfile.j2 index c2c3596272..f6b258f73e 100644 --- a/docker/aodh/aodh-evaluator/Dockerfile.j2 +++ b/docker/aodh/aodh-evaluator/Dockerfile.j2 @@ -9,7 +9,7 @@ MAINTAINER {{ maintainer }} {% elif base_distro in ['ubuntu'] %} {% set aodh_evaluator_packages = ['aodh-evaluator'] %} {% endif %} -RUN {{ macros.install_packages(aodh_evaluator_packages | customizable("packages")) }} +{{ macros.install_packages(aodh_evaluator_packages | customizable("packages")) }} {% endif %} {% block aodh_evaluator_footer %}{% endblock %} diff --git a/docker/aodh/aodh-expirer/Dockerfile.j2 b/docker/aodh/aodh-expirer/Dockerfile.j2 index 8c7ef8433c..e893dd06b3 100644 --- a/docker/aodh/aodh-expirer/Dockerfile.j2 +++ b/docker/aodh/aodh-expirer/Dockerfile.j2 @@ -9,7 +9,7 @@ MAINTAINER {{ maintainer }} {% elif base_distro in ['ubuntu'] %} {% set aodh_expirer_packages = ['aodh-expirer'] %} {% endif %} -RUN {{ macros.install_packages(aodh_expirer_packages | customizable("packages")) }} +{{ macros.install_packages(aodh_expirer_packages | customizable("packages")) }} {% endif %} {% block aodh_expirer_footer %}{% endblock %} diff --git a/docker/aodh/aodh-listener/Dockerfile.j2 b/docker/aodh/aodh-listener/Dockerfile.j2 index b3a565c69b..2d2afcf9bd 100644 --- a/docker/aodh/aodh-listener/Dockerfile.j2 +++ b/docker/aodh/aodh-listener/Dockerfile.j2 @@ -9,7 +9,7 @@ MAINTAINER {{ maintainer }} {% elif base_distro in ['ubuntu'] %} {% set aodh_listener_packages = ['aodh-listener'] %} {% endif %} -RUN {{ macros.install_packages(aodh_listener_packages | customizable("packages")) }} +{{ macros.install_packages(aodh_listener_packages | customizable("packages")) }} {% endif %} {% block aodh_listener_footer %}{% endblock %} diff --git a/docker/aodh/aodh-notifier/Dockerfile.j2 b/docker/aodh/aodh-notifier/Dockerfile.j2 index c70ea15996..8775a3a1a6 100644 --- a/docker/aodh/aodh-notifier/Dockerfile.j2 +++ b/docker/aodh/aodh-notifier/Dockerfile.j2 @@ -9,7 +9,7 @@ MAINTAINER {{ maintainer }} {% elif base_distro in ['ubuntu'] %} {% set aodh_notifier_packages = ['aodh-notifier'] %} {% endif %} -RUN {{ macros.install_packages(aodh_notifier_packages | customizable("packages")) }} +{{ macros.install_packages(aodh_notifier_packages | customizable("packages")) }} {% endif %} {% block aodh_notifier_footer %}{% endblock %} diff --git a/docker/ceilometer/ceilometer-api/Dockerfile.j2 b/docker/ceilometer/ceilometer-api/Dockerfile.j2 index e80f3f7cf9..6e65a658e2 100644 --- a/docker/ceilometer/ceilometer-api/Dockerfile.j2 +++ b/docker/ceilometer/ceilometer-api/Dockerfile.j2 @@ -10,7 +10,7 @@ MAINTAINER {{ maintainer }} {% set ceilometer_api_packages = ['ceilometer-api'] %} {% endif %} -RUN {{ macros.install_packages(ceilometer_api_packages | customizable("packages")) }} +{{ macros.install_packages(ceilometer_api_packages | customizable("packages")) }} {% endif %} diff --git a/docker/ceilometer/ceilometer-base/Dockerfile.j2 b/docker/ceilometer/ceilometer-base/Dockerfile.j2 index 3e105906d8..8c7f8d15ac 100644 --- a/docker/ceilometer/ceilometer-base/Dockerfile.j2 +++ b/docker/ceilometer/ceilometer-base/Dockerfile.j2 @@ -17,7 +17,7 @@ MAINTAINER {{ maintainer }} ] %} {% endif %} -RUN {{ macros.install_packages(ceilometer_base_packages | customizable("packages")) }} +{{ macros.install_packages(ceilometer_base_packages | customizable("packages")) }} {% elif install_type == 'source' %} diff --git a/docker/ceilometer/ceilometer-central/Dockerfile.j2 b/docker/ceilometer/ceilometer-central/Dockerfile.j2 index 26d4436971..46bcc5540c 100644 --- a/docker/ceilometer/ceilometer-central/Dockerfile.j2 +++ b/docker/ceilometer/ceilometer-central/Dockerfile.j2 @@ -10,7 +10,7 @@ MAINTAINER {{ maintainer }} {% set ceilometer_central_packages = ['ceilometer-agent-central'] %} {% endif %} -RUN {{ macros.install_packages(ceilometer_central_packages | customizable("packages")) }} +{{ macros.install_packages(ceilometer_central_packages | customizable("packages")) }} {% endif %} diff --git a/docker/ceilometer/ceilometer-collector/Dockerfile.j2 b/docker/ceilometer/ceilometer-collector/Dockerfile.j2 index e5f53f55e1..164ed1e76c 100644 --- a/docker/ceilometer/ceilometer-collector/Dockerfile.j2 +++ b/docker/ceilometer/ceilometer-collector/Dockerfile.j2 @@ -10,7 +10,7 @@ MAINTAINER {{ maintainer }} {% set ceilometer_collector_packages = ['ceilometer-collector'] %} {% endif %} -RUN {{ macros.install_packages(ceilometer_collector_packages | customizable("packages")) }} +{{ macros.install_packages(ceilometer_collector_packages | customizable("packages")) }} {% endif %} diff --git a/docker/ceilometer/ceilometer-compute/Dockerfile.j2 b/docker/ceilometer/ceilometer-compute/Dockerfile.j2 index 0bdd061452..d1b63ac211 100644 --- a/docker/ceilometer/ceilometer-compute/Dockerfile.j2 +++ b/docker/ceilometer/ceilometer-compute/Dockerfile.j2 @@ -16,7 +16,7 @@ MAINTAINER {{ maintainer }} ] %} {% endif %} -RUN {{ macros.install_packages(ceilometer_compute_packages | customizable("packages")) }} +{{ macros.install_packages(ceilometer_compute_packages | customizable("packages")) }} {% elif install_type == 'source' %} {% if base_distro in ['centos', 'fedora', 'oraclelinux', 'rhel'] %} diff --git a/docker/ceilometer/ceilometer-notification/Dockerfile.j2 b/docker/ceilometer/ceilometer-notification/Dockerfile.j2 index dabeeafa82..edf6ac2dda 100644 --- a/docker/ceilometer/ceilometer-notification/Dockerfile.j2 +++ b/docker/ceilometer/ceilometer-notification/Dockerfile.j2 @@ -10,7 +10,7 @@ MAINTAINER {{ maintainer }} {% set ceilometer_notification_packages = ['ceilometer-agent-notification'] %} {% endif %} -RUN {{ macros.install_packages(ceilometer_notification_packages | customizable("packages")) }} +{{ macros.install_packages(ceilometer_notification_packages | customizable("packages")) }} {% endif %} diff --git a/docker/ceph/ceph-base/Dockerfile.j2 b/docker/ceph/ceph-base/Dockerfile.j2 index ce354587ca..ebd18d44d9 100644 --- a/docker/ceph/ceph-base/Dockerfile.j2 +++ b/docker/ceph/ceph-base/Dockerfile.j2 @@ -19,7 +19,7 @@ MAINTAINER {{ maintainer }} 'btrfs-tools' ] %} {% endif %} -RUN {{ macros.install_packages(ceph_base_packages | customizable("packages")) }} +{{ macros.install_packages(ceph_base_packages | customizable("packages")) }} COPY extend_start.sh /usr/local/bin/kolla_extend_start RUN chmod 755 /usr/local/bin/kolla_extend_start diff --git a/docker/cinder/cinder-api/Dockerfile.j2 b/docker/cinder/cinder-api/Dockerfile.j2 index 3d8d082599..629de733fc 100644 --- a/docker/cinder/cinder-api/Dockerfile.j2 +++ b/docker/cinder/cinder-api/Dockerfile.j2 @@ -19,7 +19,7 @@ MAINTAINER {{ maintainer }} {% endif %} -RUN {{ macros.install_packages(cinder_api_packages | customizable("packages")) }} +{{ macros.install_packages(cinder_api_packages | customizable("packages")) }} {% endif %} diff --git a/docker/cinder/cinder-backup/Dockerfile.j2 b/docker/cinder/cinder-backup/Dockerfile.j2 index e187693f6a..4cec33a551 100644 --- a/docker/cinder/cinder-backup/Dockerfile.j2 +++ b/docker/cinder/cinder-backup/Dockerfile.j2 @@ -10,7 +10,7 @@ MAINTAINER {{ maintainer }} 'cinder-backup' ] %} -RUN {{ macros.install_packages(cinder_backup_packages | customizable("packages")) }} +{{ macros.install_packages(cinder_backup_packages | customizable("packages")) }} {% endif %} {% endif %} diff --git a/docker/cinder/cinder-base/Dockerfile.j2 b/docker/cinder/cinder-base/Dockerfile.j2 index e6749442e3..ac9922d03b 100644 --- a/docker/cinder/cinder-base/Dockerfile.j2 +++ b/docker/cinder/cinder-base/Dockerfile.j2 @@ -23,7 +23,7 @@ MAINTAINER {{ maintainer }} {% endif %} -RUN {{ macros.install_packages(cinder_base_packages | customizable("packages")) }} +{{ macros.install_packages(cinder_base_packages | customizable("packages")) }} {% elif install_type == 'source' %} {% if base_distro in ['centos', 'fedora', 'oraclelinux', 'rhel'] %} @@ -44,7 +44,7 @@ RUN {{ macros.install_packages(cinder_base_packages | customizable("packages")) {% endif %} -RUN {{ macros.install_packages(cinder_base_packages | customizable("packages")) }} +{{ macros.install_packages(cinder_base_packages | customizable("packages")) }} ADD cinder-base-archive /cinder-base-source RUN ln -s cinder-base-source/* cinder \ diff --git a/docker/cinder/cinder-rpcbind/Dockerfile.j2 b/docker/cinder/cinder-rpcbind/Dockerfile.j2 index eede97c8ef..3a9c1b53ae 100644 --- a/docker/cinder/cinder-rpcbind/Dockerfile.j2 +++ b/docker/cinder/cinder-rpcbind/Dockerfile.j2 @@ -18,7 +18,7 @@ MAINTAINER {{ maintainer }} {% endif %} -RUN {{ macros.install_packages(cinder_rpcbind_packages | customizable("packages")) }} +{{ macros.install_packages(cinder_rpcbind_packages | customizable("packages")) }} {% block cinder_rpcbind_footer %}{% endblock %} {% block footer %}{% endblock %} diff --git a/docker/cinder/cinder-scheduler/Dockerfile.j2 b/docker/cinder/cinder-scheduler/Dockerfile.j2 index aa53456847..9233d09ca0 100644 --- a/docker/cinder/cinder-scheduler/Dockerfile.j2 +++ b/docker/cinder/cinder-scheduler/Dockerfile.j2 @@ -10,7 +10,7 @@ MAINTAINER {{ maintainer }} 'cinder-scheduler' ] %} -RUN {{ macros.install_packages(cinder_scheduler_packages | customizable("packages")) }} +{{ macros.install_packages(cinder_scheduler_packages | customizable("packages")) }} {% endif %} {% endif %} diff --git a/docker/cinder/cinder-volume/Dockerfile.j2 b/docker/cinder/cinder-volume/Dockerfile.j2 index 8cb7e28b51..329ef49b49 100644 --- a/docker/cinder/cinder-volume/Dockerfile.j2 +++ b/docker/cinder/cinder-volume/Dockerfile.j2 @@ -9,7 +9,7 @@ MAINTAINER {{ maintainer }} 'scsi-target-utils' ] %} -RUN {{ macros.install_packages(cinder_volume_packages | customizable("packages")) }} +{{ macros.install_packages(cinder_volume_packages | customizable("packages")) }} {% block cinder_volume_redhat_setup %} RUN sed -i '1 i include /var/lib/cinder/volumes/*' /etc/tgt/tgtd.conf @@ -21,7 +21,7 @@ RUN sed -i '1 i include /var/lib/cinder/volumes/*' /etc/tgt/tgtd.conf 'tgt' ] %} -RUN {{ macros.install_packages(cinder_volume_packages | customizable("packages")) }} +{{ macros.install_packages(cinder_volume_packages | customizable("packages")) }} {% block cinder_volume_ubuntu_setup %} RUN sed -i '1 i include /var/lib/cinder/volumes/*' /etc/tgt/targets.conf @@ -36,7 +36,7 @@ RUN sed -i '1 i include /var/lib/cinder/volumes/*' /etc/tgt/targets.conf 'cinder-volume' ] %} -RUN {{ macros.install_packages(cinder_volume_packages | customizable("packages")) }} +{{ macros.install_packages(cinder_volume_packages | customizable("packages")) }} {% endif %} {% endif %} diff --git a/docker/cron/Dockerfile.j2 b/docker/cron/Dockerfile.j2 index 4089432555..6921ee1b64 100644 --- a/docker/cron/Dockerfile.j2 +++ b/docker/cron/Dockerfile.j2 @@ -14,7 +14,7 @@ MAINTAINER {{ maintainer }} ] %} {% endif %} -RUN {{ macros.install_packages(cron_packages | customizable("packages")) }} +{{ macros.install_packages(cron_packages | customizable("packages")) }} COPY extend_start.sh /usr/local/bin/kolla_extend_start RUN chmod 755 /usr/local/bin/kolla_extend_start diff --git a/docker/designate/designate-api/Dockerfile.j2 b/docker/designate/designate-api/Dockerfile.j2 index 893612e84c..9a69e9b28c 100644 --- a/docker/designate/designate-api/Dockerfile.j2 +++ b/docker/designate/designate-api/Dockerfile.j2 @@ -8,7 +8,7 @@ MAINTAINER {{ maintainer }} {% elif base_distro in ['ubuntu'] %} {% set designate_api_packages = ['designate-api'] %} {% endif %} -RUN {{ macros.install_packages(designate_api_packages | customizable("packages")) }} +{{ macros.install_packages(designate_api_packages | customizable("packages")) }} {% endif %} {% block designate_api_footer %}{% endblock %} diff --git a/docker/designate/designate-backend-bind9/Dockerfile.j2 b/docker/designate/designate-backend-bind9/Dockerfile.j2 index 53b0672c23..975d82c372 100644 --- a/docker/designate/designate-backend-bind9/Dockerfile.j2 +++ b/docker/designate/designate-backend-bind9/Dockerfile.j2 @@ -6,14 +6,14 @@ MAINTAINER {{ maintainer }} {% if base_distro in ['centos', 'fedora', 'oraclelinux', 'rhel'] %} {% set designate_backend_bind9_packages = ['bind'] %} -RUN {{ macros.install_packages(designate_backend_bind9_packages | customizable("packages")) }} +{{ macros.install_packages(designate_backend_bind9_packages | customizable("packages")) }} RUN mkdir -p /var/lib/kolla/ \ && cp -pr /var/named /var/lib/kolla/var-named {% elif base_distro in ['ubuntu'] %} {% set designate_backend_bind9_packages = ['bind9'] %} -RUN {{ macros.install_packages(designate_backend_bind9_packages | customizable("packages")) }} +{{ macros.install_packages(designate_backend_bind9_packages | customizable("packages")) }} {% endif %} {% endif %} diff --git a/docker/designate/designate-base/Dockerfile.j2 b/docker/designate/designate-base/Dockerfile.j2 index 3fccb13eab..2ae661d051 100644 --- a/docker/designate/designate-base/Dockerfile.j2 +++ b/docker/designate/designate-base/Dockerfile.j2 @@ -17,7 +17,7 @@ MAINTAINER {{ maintainer }} 'python2-suds' ] %} -RUN {{ macros.install_packages(designate_base_packages | customizable("packages")) }} +{{ macros.install_packages(designate_base_packages | customizable("packages")) }} RUN cp /etc/designate/policy.json /tmp/ \ && rpm -e openstack-designate-api \ && mv /tmp/policy.json /etc/designate/ \ @@ -29,7 +29,7 @@ RUN cp /etc/designate/policy.json /tmp/ \ 'python-tooz' ] %} -RUN {{ macros.install_packages(designate_base_packages | customizable("packages")) }} +{{ macros.install_packages(designate_base_packages | customizable("packages")) }} {% endif %} {% elif install_type == 'source' %} diff --git a/docker/designate/designate-central/Dockerfile.j2 b/docker/designate/designate-central/Dockerfile.j2 index 1775ea5e40..858fbe7231 100644 --- a/docker/designate/designate-central/Dockerfile.j2 +++ b/docker/designate/designate-central/Dockerfile.j2 @@ -8,7 +8,7 @@ MAINTAINER {{ maintainer }} {% elif base_distro in ['ubuntu']%} {% set designate_central_packages = ['designate-central'] %} {% endif %} -RUN {{ macros.install_packages(designate_central_packages | customizable("packages")) }} +{{ macros.install_packages(designate_central_packages | customizable("packages")) }} {% endif %} COPY extend_start.sh /usr/local/bin/kolla_extend_start diff --git a/docker/designate/designate-mdns/Dockerfile.j2 b/docker/designate/designate-mdns/Dockerfile.j2 index 548f4c5448..660184b7fe 100644 --- a/docker/designate/designate-mdns/Dockerfile.j2 +++ b/docker/designate/designate-mdns/Dockerfile.j2 @@ -8,7 +8,7 @@ MAINTAINER {{ maintainer }} {% elif base_distro in ['ubuntu'] %} {% set designate_mdns_packages = ['designate-mdns'] %} {% endif %} -RUN {{ macros.install_packages(designate_mdns_packages | customizable("packages")) }} +{{ macros.install_packages(designate_mdns_packages | customizable("packages")) }} {% endif %} {% block designate_mdns_footer %}{% endblock %} diff --git a/docker/designate/designate-pool-manager/Dockerfile.j2 b/docker/designate/designate-pool-manager/Dockerfile.j2 index d5ee01a5aa..37776f4771 100644 --- a/docker/designate/designate-pool-manager/Dockerfile.j2 +++ b/docker/designate/designate-pool-manager/Dockerfile.j2 @@ -15,7 +15,7 @@ MAINTAINER {{ maintainer }} 'designate-pool-manager' ] %} {% endif %} -RUN {{ macros.install_packages(designate_pool_manager_packages | customizable("packages")) }} +{{ macros.install_packages(designate_pool_manager_packages | customizable("packages")) }} {% endif %} {% block designate_pool_manager_footer %}{% endblock %} diff --git a/docker/designate/designate-sink/Dockerfile.j2 b/docker/designate/designate-sink/Dockerfile.j2 index 8802d73d45..4c1821c9c3 100644 --- a/docker/designate/designate-sink/Dockerfile.j2 +++ b/docker/designate/designate-sink/Dockerfile.j2 @@ -14,7 +14,7 @@ MAINTAINER {{ maintainer }} 'designateclient' ] %} {% endif %} -RUN {{ macros.install_packages(designate_sink_packages | customizable("packages")) }} +{{ macros.install_packages(designate_sink_packages | customizable("packages")) }} {% endif %} {% block designate_sink_footer %}{% endblock %} diff --git a/docker/glance/glance-base/Dockerfile.j2 b/docker/glance/glance-base/Dockerfile.j2 index 7e7f9fb7d9..e645ae53de 100644 --- a/docker/glance/glance-base/Dockerfile.j2 +++ b/docker/glance/glance-base/Dockerfile.j2 @@ -18,7 +18,7 @@ MAINTAINER {{ maintainer }} ] %} {% endif %} -RUN {{ macros.install_packages(glance_base_packages | customizable("packages")) }} +{{ macros.install_packages(glance_base_packages | customizable("packages")) }} {% elif install_type == 'source' %} {% set glance_base_packages = [ @@ -26,7 +26,7 @@ RUN {{ macros.install_packages(glance_base_packages | customizable("packages")) 'python-rados' ] %} -RUN {{ macros.install_packages(glance_base_packages | customizable("packages")) }} +{{ macros.install_packages(glance_base_packages | customizable("packages")) }} ADD glance-base-archive /glance-base-source RUN ln -s glance-base-source/* glance \ diff --git a/docker/gnocchi/gnocchi-api/Dockerfile.j2 b/docker/gnocchi/gnocchi-api/Dockerfile.j2 index 6c4ac2530a..29482f237a 100644 --- a/docker/gnocchi/gnocchi-api/Dockerfile.j2 +++ b/docker/gnocchi/gnocchi-api/Dockerfile.j2 @@ -12,7 +12,7 @@ MAINTAINER {{ maintainer }} {% elif base_distro in ['ubuntu'] %} {% set gnocchi_api_packages = ['gnocchi-api'] %} {% endif %} -RUN {{ macros.install_packages(gnocchi_api_packages | customizable("packages")) }} +{{ macros.install_packages(gnocchi_api_packages | customizable("packages")) }} {% endif %} COPY extend_start.sh /usr/local/bin/kolla_gnocchi_extend_start diff --git a/docker/gnocchi/gnocchi-base/Dockerfile.j2 b/docker/gnocchi/gnocchi-base/Dockerfile.j2 index 3c6d0f33e2..16ecfa031e 100644 --- a/docker/gnocchi/gnocchi-base/Dockerfile.j2 +++ b/docker/gnocchi/gnocchi-base/Dockerfile.j2 @@ -10,7 +10,7 @@ MAINTAINER {{ maintainer }} {% elif base_distro in ['ubuntu'] %} {% set gnocchi_base_packages = ['gnocchi-common'] %} {% endif %} -RUN {{ macros.install_packages(gnocchi_base_packages | customizable("packages")) }} +{{ macros.install_packages(gnocchi_base_packages | customizable("packages")) }} {% elif install_type == 'source' %} diff --git a/docker/gnocchi/gnocchi-metricd/Dockerfile.j2 b/docker/gnocchi/gnocchi-metricd/Dockerfile.j2 index 19c1b1e0c5..7e791dca27 100644 --- a/docker/gnocchi/gnocchi-metricd/Dockerfile.j2 +++ b/docker/gnocchi/gnocchi-metricd/Dockerfile.j2 @@ -9,7 +9,7 @@ MAINTAINER {{ maintainer }} {% elif base_distro in ['ubuntu'] %} {% set gnocchi_metricd_packages = ['gnocchi-metricd'] %} {% endif %} -RUN {{ macros.install_packages(gnocchi_metricd_packages | customizable("packages")) }} +{{ macros.install_packages(gnocchi_metricd_packages | customizable("packages")) }} {% endif %} {% block gnocchi_metricd_footer %}{% endblock %} diff --git a/docker/gnocchi/gnocchi-statsd/Dockerfile.j2 b/docker/gnocchi/gnocchi-statsd/Dockerfile.j2 index 1bd44e0abb..1b46b789ab 100644 --- a/docker/gnocchi/gnocchi-statsd/Dockerfile.j2 +++ b/docker/gnocchi/gnocchi-statsd/Dockerfile.j2 @@ -7,7 +7,7 @@ MAINTAINER {{ maintainer }} {% if base_distro in ['centos', 'fedora', 'oraclelinux', 'rhel'] %} {% set gnocchi_statsd_packages = ['openstack-gnocchi-statsd'] %} {% endif %} -RUN {{ macros.install_packages(gnocchi_statsd_packages | customizable("packages")) }} +{{ macros.install_packages(gnocchi_statsd_packages | customizable("packages")) }} {% endif %} {% block gnocchi_statsd_footer %}{% endblock %} diff --git a/docker/haproxy/Dockerfile.j2 b/docker/haproxy/Dockerfile.j2 index e1539d3b7b..c6561a0646 100644 --- a/docker/haproxy/Dockerfile.j2 +++ b/docker/haproxy/Dockerfile.j2 @@ -4,7 +4,7 @@ MAINTAINER {{ maintainer }} {% import "macros.j2" as macros with context %} {% set haproxy_packages = ['haproxy'] %} -RUN {{ macros.install_packages(haproxy_packages | customizable("packages")) }} +{{ macros.install_packages(haproxy_packages | customizable("packages")) }} RUN usermod -a -G kolla haproxy \ && mkdir -p /var/lib/kolla/haproxy \ diff --git a/docker/heat/heat-api-cfn/Dockerfile.j2 b/docker/heat/heat-api-cfn/Dockerfile.j2 index ca5ff51029..501622cb69 100644 --- a/docker/heat/heat-api-cfn/Dockerfile.j2 +++ b/docker/heat/heat-api-cfn/Dockerfile.j2 @@ -9,7 +9,7 @@ MAINTAINER {{ maintainer }} {% elif base_distro in ['ubuntu'] %} {% set heat_api_cfn_packages = ['heat-api-cfn'] %} {% endif %} -RUN {{ macros.install_packages(heat_api_cfn_packages | customizable("packages")) }} +{{ macros.install_packages(heat_api_cfn_packages | customizable("packages")) }} {% endif %} {% block heat_api_cfn_footer %}{% endblock %} diff --git a/docker/heat/heat-api/Dockerfile.j2 b/docker/heat/heat-api/Dockerfile.j2 index 22cae4177b..5adf39578b 100644 --- a/docker/heat/heat-api/Dockerfile.j2 +++ b/docker/heat/heat-api/Dockerfile.j2 @@ -8,7 +8,7 @@ MAINTAINER {{ maintainer }} {% elif base_distro in ['ubuntu'] %} {% set heat_api_packages = ['heat-api'] %} {% endif %} -RUN {{ macros.install_packages(heat_api_packages | customizable("packages")) }} +{{ macros.install_packages(heat_api_packages | customizable("packages")) }} {% endif %} COPY extend_start.sh /usr/local/bin/kolla_heat_extend_start diff --git a/docker/heat/heat-base/Dockerfile.j2 b/docker/heat/heat-base/Dockerfile.j2 index 23287ee09d..9faae2ab39 100644 --- a/docker/heat/heat-base/Dockerfile.j2 +++ b/docker/heat/heat-base/Dockerfile.j2 @@ -10,7 +10,7 @@ MAINTAINER {{ maintainer }} {% elif base_distro in ['ubuntu'] %} {% set heat_base_packages = ['heat-common'] %} {% endif %} -RUN {{ macros.install_packages(heat_base_packages | customizable("packages")) }} +{{ macros.install_packages(heat_base_packages | customizable("packages")) }} {% elif install_type == 'source' %} diff --git a/docker/heat/heat-engine/Dockerfile.j2 b/docker/heat/heat-engine/Dockerfile.j2 index e0d5ede546..8f9ed23f7e 100644 --- a/docker/heat/heat-engine/Dockerfile.j2 +++ b/docker/heat/heat-engine/Dockerfile.j2 @@ -13,7 +13,7 @@ MAINTAINER {{ maintainer }} {% elif base_distro in ['ubuntu'] %} {% set heat_engine_packages = ['heat-engine'] %} {% endif %} -RUN {{ macros.install_packages(heat_engine_packages | customizable("packages")) }} +{{ macros.install_packages(heat_engine_packages | customizable("packages")) }} {% endif %} {% block heat_engine_footer %}{% endblock %} diff --git a/docker/heka/Dockerfile.j2 b/docker/heka/Dockerfile.j2 index 0162b57262..eba6583839 100644 --- a/docker/heka/Dockerfile.j2 +++ b/docker/heka/Dockerfile.j2 @@ -16,7 +16,7 @@ RUN useradd --user-group heka \ ] %} {% endif %} -RUN {{ macros.install_packages(heka_packages | customizable("packages")) }} +{{ macros.install_packages(heka_packages | customizable("packages")) }} COPY plugins/modules /usr/share/heka/lua_modules/ COPY plugins/decoders /usr/share/heka/lua_decoders/ diff --git a/docker/horizon/Dockerfile.j2 b/docker/horizon/Dockerfile.j2 index 40b8117e20..6f680b5164 100644 --- a/docker/horizon/Dockerfile.j2 +++ b/docker/horizon/Dockerfile.j2 @@ -13,7 +13,7 @@ MAINTAINER {{ maintainer }} 'gettext' ] %} -RUN {{ macros.install_packages(horizon_packages | customizable("packages")) }} +{{ macros.install_packages(horizon_packages | customizable("packages")) }} {% block horizon_redhat_binary_setup %} RUN useradd --user-group horizon \ @@ -38,7 +38,7 @@ RUN useradd --user-group horizon \ 'gettext' ] %} -RUN {{ macros.install_packages(horizon_packages | customizable("packages")) }} +{{ macros.install_packages(horizon_packages | customizable("packages")) }} {% block horizon_ubuntu_binary_setup %} RUN echo > /etc/apache2/ports.conf \ @@ -69,7 +69,7 @@ RUN echo > /etc/apache2/ports.conf \ 'gettext' ] %} -RUN {{ macros.install_packages(horizon_packages | customizable("packages")) }} +{{ macros.install_packages(horizon_packages | customizable("packages")) }} {% block horizon_redhat_source_setup %} RUN sed -i -r 's,^(Listen 80),#\1,' /etc/httpd/conf/httpd.conf @@ -83,7 +83,7 @@ RUN sed -i -r 's,^(Listen 80),#\1,' /etc/httpd/conf/httpd.conf 'gettext' ] %} -RUN {{ macros.install_packages(horizon_packages | customizable("packages")) }} +{{ macros.install_packages(horizon_packages | customizable("packages")) }} {% block horizon_ubuntu_source_setup %} RUN echo > /etc/apache2/ports.conf \ diff --git a/docker/influxdb/Dockerfile.j2 b/docker/influxdb/Dockerfile.j2 index 1550306eaf..fc1d9fe2c0 100644 --- a/docker/influxdb/Dockerfile.j2 +++ b/docker/influxdb/Dockerfile.j2 @@ -3,7 +3,7 @@ MAINTAINER {{ maintainer }} {% import "macros.j2" as macros with context %} {% set influxdb_packages = ['influxdb'] %} -RUN {{ macros.install_packages(influxdb_packages | customizable("packages")) }} +{{ macros.install_packages(influxdb_packages | customizable("packages")) }} COPY influxdb_sudoers /etc/sudoers.d/kolla_influxdb_sudoers RUN chmod 750 /etc/sudoers.d \ diff --git a/docker/iscsid/Dockerfile.j2 b/docker/iscsid/Dockerfile.j2 index 9b6e43e251..7f4425964e 100644 --- a/docker/iscsid/Dockerfile.j2 +++ b/docker/iscsid/Dockerfile.j2 @@ -19,7 +19,7 @@ MAINTAINER {{ maintainer }} {% endif %} -RUN {{ macros.install_packages(iscsid_packages | customizable("packages")) }} +{{ macros.install_packages(iscsid_packages | customizable("packages")) }} COPY extend_start.sh /usr/local/bin/kolla_extend_start RUN chmod 755 /usr/local/bin/kolla_extend_start \ diff --git a/docker/keepalived/Dockerfile.j2 b/docker/keepalived/Dockerfile.j2 index a776e4f6d8..ea1d1b47d2 100644 --- a/docker/keepalived/Dockerfile.j2 +++ b/docker/keepalived/Dockerfile.j2 @@ -14,7 +14,7 @@ MAINTAINER {{ maintainer }} 'socat' ] %} {% endif %} -RUN {{ macros.install_packages(keepalived_packages | customizable("packages")) }} +{{ macros.install_packages(keepalived_packages | customizable("packages")) }} COPY check_alive.sh / diff --git a/docker/keystone/Dockerfile.j2 b/docker/keystone/Dockerfile.j2 index 15088bd7d1..d499dbbafd 100644 --- a/docker/keystone/Dockerfile.j2 +++ b/docker/keystone/Dockerfile.j2 @@ -13,7 +13,7 @@ MAINTAINER {{ maintainer }} 'python-ldappool' ] %} -RUN {{ macros.install_packages(keystone_packages | customizable("packages")) }} +{{ macros.install_packages(keystone_packages | customizable("packages")) }} RUN mkdir -p /var/www/cgi-bin/keystone \ && cp -a /usr/share/keystone/keystone.wsgi /var/www/cgi-bin/keystone/main \ && cp -a /usr/share/keystone/keystone.wsgi /var/www/cgi-bin/keystone/admin \ @@ -28,7 +28,7 @@ RUN mkdir -p /var/www/cgi-bin/keystone \ 'python-ldappool' ] %} -RUN {{ macros.install_packages(keystone_packages | customizable("packages")) }} +{{ macros.install_packages(keystone_packages | customizable("packages")) }} RUN mkdir -p /var/www/cgi-bin/keystone \ && cp -a /usr/share/keystone/wsgi.py /var/www/cgi-bin/keystone/main \ && cp -a /usr/share/keystone/wsgi.py /var/www/cgi-bin/keystone/admin \ @@ -43,7 +43,7 @@ RUN mkdir -p /var/www/cgi-bin/keystone \ 'mod_wsgi', 'python-ldappool' ] %} -RUN {{ macros.install_packages(keystone_packages | customizable("packages")) }} +{{ macros.install_packages(keystone_packages | customizable("packages")) }} RUN sed -i -r 's,^(Listen 80),#\1,' /etc/httpd/conf/httpd.conf {% elif base_distro in ['ubuntu', 'debian'] %} @@ -53,7 +53,7 @@ RUN sed -i -r 's,^(Listen 80),#\1,' /etc/httpd/conf/httpd.conf 'libapache2-mod-wsgi', 'python-ldappool' ] %} -RUN {{ macros.install_packages(keystone_packages | customizable("packages")) }} +{{ macros.install_packages(keystone_packages | customizable("packages")) }} RUN echo > /etc/apache2/ports.conf {% endif %} diff --git a/docker/kolla-toolbox/Dockerfile.j2 b/docker/kolla-toolbox/Dockerfile.j2 index a983df7981..44611c059a 100644 --- a/docker/kolla-toolbox/Dockerfile.j2 +++ b/docker/kolla-toolbox/Dockerfile.j2 @@ -42,7 +42,7 @@ MAINTAINER {{ maintainer }} {% endif %} {% endif %} -RUN {{ macros.install_packages(kolla_toolbox_packages | customizable("packages")) }} +{{ macros.install_packages(kolla_toolbox_packages | customizable("packages")) }} RUN curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py \ && python get-pip.py \ diff --git a/docker/macros.j2 b/docker/macros.j2 index 5cdb12b4cc..494feb2f49 100644 --- a/docker/macros.j2 +++ b/docker/macros.j2 @@ -1,12 +1,14 @@ {% macro install_packages(packages) -%} -{% if base_distro in ['centos', 'fedora', 'oraclelinux', 'rhel'] -%} - yum -y install {{ packages | join(' ') }} && yum clean all -{%- elif base_distro in ['ubuntu', 'debian'] -%} - {#- - debian_package_install is a utility method to build up an appropriate - set of commands to install packages in a debian-based environment that - may include URL links to a .deb package (e.g, heka) - -#} - {{ debian_package_install(packages) }} +{% if packages is defined and packages|length > 0 -%} + {% if base_distro in ['centos', 'fedora', 'oraclelinux', 'rhel'] -%} + RUN yum -y install {{ packages | join(' ') }} && yum clean all + {%- elif base_distro in ['ubuntu', 'debian'] -%} + {#- + debian_package_install is a utility method to build up an appropriate + set of commands to install packages in a debian-based environment that + may include URL links to a .deb package (e.g, heka) + -#} + RUN {{ debian_package_install(packages) }} + {%- endif %} {%- endif %} {%- endmacro %} diff --git a/docker/magnum/magnum-api/Dockerfile.j2 b/docker/magnum/magnum-api/Dockerfile.j2 index 8a4847c3a9..e230b72e9b 100644 --- a/docker/magnum/magnum-api/Dockerfile.j2 +++ b/docker/magnum/magnum-api/Dockerfile.j2 @@ -8,7 +8,7 @@ MAINTAINER {{ maintainer }} {% elif base_distro in ['ubuntu'] %} {% set magnum_api_packages = ['magnum-api'] %} {% endif %} -RUN {{ macros.install_packages(magnum_api_packages | customizable("packages")) }} +{{ macros.install_packages(magnum_api_packages | customizable("packages")) }} {% endif %} COPY extend_start.sh /usr/local/bin/kolla_magnum_extend_start diff --git a/docker/magnum/magnum-base/Dockerfile.j2 b/docker/magnum/magnum-base/Dockerfile.j2 index 1e7dcb8af9..7fd1211dc1 100644 --- a/docker/magnum/magnum-base/Dockerfile.j2 +++ b/docker/magnum/magnum-base/Dockerfile.j2 @@ -10,7 +10,7 @@ RUN curl -L https://trunk.rdoproject.org/centos7/current/delorean.repo -o /etc/y {% elif base_distro in ['ubuntu'] %} {% set magnum_base_packages = ['magnum-common'] %} {% endif %} -RUN {{ macros.install_packages(magnum_base_packages | customizable("packages")) }} +{{ macros.install_packages(magnum_base_packages | customizable("packages")) }} {% elif install_type == 'source' %} diff --git a/docker/magnum/magnum-conductor/Dockerfile.j2 b/docker/magnum/magnum-conductor/Dockerfile.j2 index e6e41b2c12..3284ab461d 100644 --- a/docker/magnum/magnum-conductor/Dockerfile.j2 +++ b/docker/magnum/magnum-conductor/Dockerfile.j2 @@ -14,7 +14,7 @@ MAINTAINER {{ maintainer }} ] %} {% endif %} -RUN {{ macros.install_packages(magnum_conductor_packages | customizable("packages")) }} +{{ macros.install_packages(magnum_conductor_packages | customizable("packages")) }} # Install kubectl binary RUN curl -Lo /usr/local/bin/kubectl https://storage.googleapis.com/kubernetes-release/release/v1.2.0/bin/linux/amd64/kubectl \ diff --git a/docker/manila/manila-api/Dockerfile.j2 b/docker/manila/manila-api/Dockerfile.j2 index 813c8d6342..9338861c0b 100644 --- a/docker/manila/manila-api/Dockerfile.j2 +++ b/docker/manila/manila-api/Dockerfile.j2 @@ -10,7 +10,7 @@ MAINTAINER {{ maintainer }} 'manila-api' ] %} -RUN {{ macros.install_packages(manila_api_packages | customizable("packages")) }} +{{ macros.install_packages(manila_api_packages | customizable("packages")) }} {% endif%} {% endif%} diff --git a/docker/manila/manila-base/Dockerfile.j2 b/docker/manila/manila-base/Dockerfile.j2 index a162f62a29..1ba4007e36 100644 --- a/docker/manila/manila-base/Dockerfile.j2 +++ b/docker/manila/manila-base/Dockerfile.j2 @@ -20,7 +20,7 @@ MAINTAINER {{ maintainer }} {% endif %} -RUN {{ macros.install_packages(manila_base_packages | customizable("packages")) }} +{{ macros.install_packages(manila_base_packages | customizable("packages")) }} {% elif install_type == 'source' %} {% if base_distro in ['centos', 'fedora', 'oraclelinux', 'rhel'] %} @@ -33,7 +33,7 @@ RUN {{ macros.install_packages(manila_base_packages | customizable("packages")) {% endif %} -RUN {{ macros.install_packages(manila_base_packages | customizable("packages")) }} +{{ macros.install_packages(manila_base_packages | customizable("packages")) }} ADD manila-base-archive /manila-base-source RUN ln -s manila-base-source/* manila \ diff --git a/docker/manila/manila-scheduler/Dockerfile.j2 b/docker/manila/manila-scheduler/Dockerfile.j2 index a9fb40d6b3..4eba220198 100644 --- a/docker/manila/manila-scheduler/Dockerfile.j2 +++ b/docker/manila/manila-scheduler/Dockerfile.j2 @@ -10,7 +10,7 @@ MAINTAINER {{ maintainer }} 'manila-scheduler' ] %} -RUN {{ macros.install_packages(manila_scheduler_packages | customizable("packages")) }} +{{ macros.install_packages(manila_scheduler_packages | customizable("packages")) }} {% endif%} {% endif%} diff --git a/docker/manila/manila-share/Dockerfile.j2 b/docker/manila/manila-share/Dockerfile.j2 index 53732f4f73..81f12907c6 100644 --- a/docker/manila/manila-share/Dockerfile.j2 +++ b/docker/manila/manila-share/Dockerfile.j2 @@ -10,7 +10,7 @@ MAINTAINER {{ maintainer }} 'openstack-manila-share' ] %} -RUN {{ macros.install_packages(manila_share_packages | customizable("packages")) }} +{{ macros.install_packages(manila_share_packages | customizable("packages")) }} {% endif %} {% endif %} diff --git a/docker/memcached/Dockerfile.j2 b/docker/memcached/Dockerfile.j2 index 429b19748d..5ebab7fc50 100644 --- a/docker/memcached/Dockerfile.j2 +++ b/docker/memcached/Dockerfile.j2 @@ -7,14 +7,14 @@ MAINTAINER {{ maintainer }} {% set user = 'memcached' %} {% set memcached_packages = ['memcached'] %} -RUN {{ macros.install_packages(memcached_packages | customizable("packages")) }} \ +{{ macros.install_packages(memcached_packages | customizable("packages")) }} \ && usermod -a -G kolla {{ user }} {% elif base_distro in ['ubuntu', 'debian'] %} {% set user = 'memcache' %} {% set memcached_packages = ['memcached'] %} -RUN {{ macros.install_packages(memcached_packages | customizable("packages")) }} \ +{{ macros.install_packages(memcached_packages | customizable("packages")) }} \ && usermod -a -G kolla {{ user }} {% endif %} diff --git a/docker/mistral/mistral-api/Dockerfile.j2 b/docker/mistral/mistral-api/Dockerfile.j2 index ed90c8b0bb..80f0c78713 100644 --- a/docker/mistral/mistral-api/Dockerfile.j2 +++ b/docker/mistral/mistral-api/Dockerfile.j2 @@ -8,7 +8,7 @@ MAINTAINER {{ maintainer }} {% elif base_distro in ['ubuntu'] %} {% set mistral_api_packages = ['mistral-api'] %} {% endif %} -RUN {{ macros.install_packages(mistral_api_packages | customizable("packages")) }} +{{ macros.install_packages(mistral_api_packages | customizable("packages")) }} {% endif %} COPY extend_start.sh /usr/local/bin/kolla_mistral_extend_start diff --git a/docker/mistral/mistral-base/Dockerfile.j2 b/docker/mistral/mistral-base/Dockerfile.j2 index a312867991..5c7c90ed7e 100644 --- a/docker/mistral/mistral-base/Dockerfile.j2 +++ b/docker/mistral/mistral-base/Dockerfile.j2 @@ -10,7 +10,7 @@ MAINTAINER {{ maintainer }} {% elif base_distro in ['ubuntu'] %} {% set mistral_base_packages = ['mistral-common'] %} {% endif %} -RUN {{ macros.install_packages(mistral_base_packages | customizable("packages")) }} +{{ macros.install_packages(mistral_base_packages | customizable("packages")) }} {% elif install_type == 'source' %} diff --git a/docker/mistral/mistral-engine/Dockerfile.j2 b/docker/mistral/mistral-engine/Dockerfile.j2 index f12f3d8684..ed55401ebc 100644 --- a/docker/mistral/mistral-engine/Dockerfile.j2 +++ b/docker/mistral/mistral-engine/Dockerfile.j2 @@ -9,7 +9,7 @@ MAINTAINER {{ maintainer }} {% elif base_distro in ['ubuntu'] %} {% set mistral_engine_packages = ['mistral-engine'] %} {% endif %} -RUN {{ macros.install_packages(mistral_engine_packages | customizable("packages")) }} +{{ macros.install_packages(mistral_engine_packages | customizable("packages")) }} {% endif %} {% block mistral_engine_footer %}{% endblock %} diff --git a/docker/mistral/mistral-executor/Dockerfile.j2 b/docker/mistral/mistral-executor/Dockerfile.j2 index 3ab176bd73..e52af60932 100644 --- a/docker/mistral/mistral-executor/Dockerfile.j2 +++ b/docker/mistral/mistral-executor/Dockerfile.j2 @@ -9,7 +9,7 @@ MAINTAINER {{ maintainer }} {% elif base_distro in ['ubuntu'] %} {% set mistral_executor_packages = ['mistral-executor'] %} {% endif %} -RUN {{ macros.install_packages(mistral_executor_packages | customizable("packages")) }} +{{ macros.install_packages(mistral_executor_packages | customizable("packages")) }} {% endif %} {% block mistral_executor_footer %}{% endblock %} diff --git a/docker/mongodb/Dockerfile.j2 b/docker/mongodb/Dockerfile.j2 index 86b74e76c2..727667bee2 100644 --- a/docker/mongodb/Dockerfile.j2 +++ b/docker/mongodb/Dockerfile.j2 @@ -14,7 +14,7 @@ MAINTAINER {{ maintainer }} ] %} {% endif %} -RUN {{ macros.install_packages(mongodb_packages | customizable("packages")) }} +{{ macros.install_packages(mongodb_packages | customizable("packages")) }} RUN mkdir -p /var/lib/mongodb /home/mongodb \ && chown -R mongodb: /var/lib/mongodb /home/mongodb diff --git a/docker/multipathd/Dockerfile.j2 b/docker/multipathd/Dockerfile.j2 index 521ae13e22..66a6754809 100644 --- a/docker/multipathd/Dockerfile.j2 +++ b/docker/multipathd/Dockerfile.j2 @@ -9,7 +9,7 @@ MAINTAINER {{ maintainer }} {% set multipathd_packages = ['multipath-tools'] %} {% endif %} -RUN {{ macros.install_packages(multipathd_packages | customizable("packages")) }} +{{ macros.install_packages(multipathd_packages | customizable("packages")) }} {% block multipathd_footer %}{% endblock %} {% block footer %}{% endblock %} diff --git a/docker/murano/murano-api/Dockerfile.j2 b/docker/murano/murano-api/Dockerfile.j2 index 9d2890597f..611d3131ca 100644 --- a/docker/murano/murano-api/Dockerfile.j2 +++ b/docker/murano/murano-api/Dockerfile.j2 @@ -9,7 +9,7 @@ MAINTAINER {{ maintainer }} {% set murano_api_packages = ['murano-api'] %} {% endif %} -RUN {{ macros.install_packages(murano_api_packages | customizable("packages")) }} +{{ macros.install_packages(murano_api_packages | customizable("packages")) }} {% endif %} diff --git a/docker/murano/murano-base/Dockerfile.j2 b/docker/murano/murano-base/Dockerfile.j2 index b9fe141d1b..5649cc56b9 100644 --- a/docker/murano/murano-base/Dockerfile.j2 +++ b/docker/murano/murano-base/Dockerfile.j2 @@ -11,7 +11,7 @@ MAINTAINER {{ maintainer }} {% set murano_base_packages = ['murano-common'] %} {% endif %} -RUN {{ macros.install_packages(murano_base_packages | customizable("packages")) }} +{{ macros.install_packages(murano_base_packages | customizable("packages")) }} {% elif install_type == 'source' %} diff --git a/docker/murano/murano-engine/Dockerfile.j2 b/docker/murano/murano-engine/Dockerfile.j2 index 9a2395ad59..825831e49e 100644 --- a/docker/murano/murano-engine/Dockerfile.j2 +++ b/docker/murano/murano-engine/Dockerfile.j2 @@ -10,7 +10,7 @@ MAINTAINER {{ maintainer }} {% set murano_engine_packages = ['murano-engine'] %} {% endif %} -RUN {{ macros.install_packages(murano_engine_packages | customizable("packages")) }} +{{ macros.install_packages(murano_engine_packages | customizable("packages")) }} {% endif %} diff --git a/docker/neutron/neutron-metering-agent/Dockerfile.j2 b/docker/neutron/neutron-metering-agent/Dockerfile.j2 index ad40833fae..bed3fefe4b 100644 --- a/docker/neutron/neutron-metering-agent/Dockerfile.j2 +++ b/docker/neutron/neutron-metering-agent/Dockerfile.j2 @@ -10,7 +10,7 @@ MAINTAINER {{ maintainer }} {% set neutron_metering_agent_packages = ['neutron-metering-agent'] %} {% endif %} -RUN {{ macros.install_packages(neutron_metering_agent_packages | customizable("packages")) }} +{{ macros.install_packages(neutron_metering_agent_packages | customizable("packages")) }} {% endif %} diff --git a/docker/openstack-base/Dockerfile.j2 b/docker/openstack-base/Dockerfile.j2 index 9b58097864..300adbec77 100644 --- a/docker/openstack-base/Dockerfile.j2 +++ b/docker/openstack-base/Dockerfile.j2 @@ -10,7 +10,7 @@ MAINTAINER {{ maintainer }} 'openssl' ] %} -RUN {{ macros.install_packages(openstack_base_packages) }} +{{ macros.install_packages(openstack_base_packages) }} {% endif %} {% if install_type == 'binary' %} @@ -185,7 +185,7 @@ ENV DEBIAN_FRONTEND noninteractive ] %} {% endif %} -RUN {{ macros.install_packages(openstack_base_packages | customizable("packages")) }} +{{ macros.install_packages(openstack_base_packages | customizable("packages")) }} {% elif install_type == 'source' %} {% if base_distro in ['fedora', 'centos', 'oraclelinux', 'rhel'] %} @@ -221,7 +221,7 @@ RUN {{ macros.install_packages(openstack_base_packages | customizable("packages" ] %} {% endif %} -RUN {{ macros.install_packages(openstack_base_packages | customizable("packages")) }} +{{ macros.install_packages(openstack_base_packages | customizable("packages")) }} ADD openstack-base-archive /openstack-base-source RUN ln -s openstack-base-source/* /requirements \ && mkdir -p /var/lib/kolla \ diff --git a/docker/openvswitch/openvswitch-base/Dockerfile.j2 b/docker/openvswitch/openvswitch-base/Dockerfile.j2 index bff6d411bf..b41cc26344 100644 --- a/docker/openvswitch/openvswitch-base/Dockerfile.j2 +++ b/docker/openvswitch/openvswitch-base/Dockerfile.j2 @@ -9,7 +9,7 @@ MAINTAINER {{ maintainer }} {% set openvswitch_base_packages = ['openvswitch-switch'] %} {% endif %} -RUN {{ macros.install_packages(openvswitch_base_packages | customizable("packages")) }} +{{ macros.install_packages(openvswitch_base_packages | customizable("packages")) }} COPY extend_start.sh /usr/local/bin/kolla_extend_start diff --git a/docker/rally/Dockerfile.j2 b/docker/rally/Dockerfile.j2 index e97e131740..77950d8556 100644 --- a/docker/rally/Dockerfile.j2 +++ b/docker/rally/Dockerfile.j2 @@ -12,7 +12,7 @@ RUN useradd --user-group rally {% elif base_distro in ['ubuntu'] %} {% set rally_packages = ['rally'] %} {% endif %} -RUN {{ macros.install_packages(rally_packages | customizable("packages")) }} +{{ macros.install_packages(rally_packages | customizable("packages")) }} {% elif install_type == 'source' %} ADD rally-archive /rally-source diff --git a/docker/sahara/sahara-api/Dockerfile.j2 b/docker/sahara/sahara-api/Dockerfile.j2 index c821695749..4412805119 100644 --- a/docker/sahara/sahara-api/Dockerfile.j2 +++ b/docker/sahara/sahara-api/Dockerfile.j2 @@ -8,7 +8,7 @@ MAINTAINER {{ maintainer }} {% elif base_distro in ['ubuntu'] %} {% set sahara_api_packages = ['sahara-api'] %} {% endif %} -RUN {{ macros.install_packages(sahara_api_packages | customizable("packages")) }} +{{ macros.install_packages(sahara_api_packages | customizable("packages")) }} {% endif %} COPY extend_start.sh /usr/local/bin/kolla_extend_start diff --git a/docker/sahara/sahara-base/Dockerfile.j2 b/docker/sahara/sahara-base/Dockerfile.j2 index 1104a76cf4..3ea53e0399 100644 --- a/docker/sahara/sahara-base/Dockerfile.j2 +++ b/docker/sahara/sahara-base/Dockerfile.j2 @@ -10,7 +10,7 @@ MAINTAINER {{ maintainer }} {% elif base_distro in ['ubuntu'] %} {% set sahara_base_packages = ['sahara-common'] %} {% endif %} -RUN {{ macros.install_packages(sahara_base_packages | customizable("packages")) }} +{{ macros.install_packages(sahara_base_packages | customizable("packages")) }} {% elif install_type == 'source' %} diff --git a/docker/sahara/sahara-engine/Dockerfile.j2 b/docker/sahara/sahara-engine/Dockerfile.j2 index 251eef2e86..aa5803890c 100644 --- a/docker/sahara/sahara-engine/Dockerfile.j2 +++ b/docker/sahara/sahara-engine/Dockerfile.j2 @@ -9,7 +9,7 @@ MAINTAINER {{ maintainer }} {% elif base_distro in ['ubuntu'] %} {% set sahara_engine_packages = ['sahara-engine'] %} {% endif %} -RUN {{ macros.install_packages(sahara_engine_packages | customizable("packages")) }} +{{ macros.install_packages(sahara_engine_packages | customizable("packages")) }} {% endif %} {% block sahara_engine_footer %}{% endblock %} diff --git a/docker/swift/swift-account/Dockerfile.j2 b/docker/swift/swift-account/Dockerfile.j2 index 6fd31431f6..dacde88b09 100644 --- a/docker/swift/swift-account/Dockerfile.j2 +++ b/docker/swift/swift-account/Dockerfile.j2 @@ -10,7 +10,7 @@ MAINTAINER {{ maintainer }} {% set swift_acount_packages = ['swift-account'] %} {% endif %} -RUN {{ macros.install_packages(swift_acount_packages | customizable("packages")) }} +{{ macros.install_packages(swift_acount_packages | customizable("packages")) }} {% endif %} diff --git a/docker/swift/swift-base/Dockerfile.j2 b/docker/swift/swift-base/Dockerfile.j2 index 15bf9ee494..5fe04a0a25 100644 --- a/docker/swift/swift-base/Dockerfile.j2 +++ b/docker/swift/swift-base/Dockerfile.j2 @@ -10,7 +10,7 @@ MAINTAINER {{ maintainer }} {% set swift_base_packages = ['swift'] %} {% endif %} -RUN {{ macros.install_packages(swift_base_packages | customizable("packages")) }} +{{ macros.install_packages(swift_base_packages | customizable("packages")) }} {% elif install_type == 'source' %} {% if base_distro in ['centos', 'fedora', 'oraclelinux', 'rhel'] %} @@ -19,7 +19,7 @@ RUN {{ macros.install_packages(swift_base_packages | customizable("packages")) } {% set swift_base_packages = ['liberasurecode-dev'] %} {% endif %} -RUN {{ macros.install_packages(swift_base_packages | customizable("packages")) }} +{{ macros.install_packages(swift_base_packages | customizable("packages")) }} ADD swift-base-archive /swift-base-source RUN ln -s swift-base-source/* swift \ && useradd --user-group swift \ diff --git a/docker/swift/swift-container/Dockerfile.j2 b/docker/swift/swift-container/Dockerfile.j2 index cbce0c2bdb..c59cac0e9c 100644 --- a/docker/swift/swift-container/Dockerfile.j2 +++ b/docker/swift/swift-container/Dockerfile.j2 @@ -10,7 +10,7 @@ MAINTAINER {{ maintainer }} {% set swift_container_packages = ['swift-container'] %} {% endif %} -RUN {{ macros.install_packages(swift_container_packages | customizable("packages")) }} +{{ macros.install_packages(swift_container_packages | customizable("packages")) }} {% endif %} diff --git a/docker/swift/swift-object/Dockerfile.j2 b/docker/swift/swift-object/Dockerfile.j2 index e169f4de0c..d575af0472 100644 --- a/docker/swift/swift-object/Dockerfile.j2 +++ b/docker/swift/swift-object/Dockerfile.j2 @@ -10,7 +10,7 @@ MAINTAINER {{ maintainer }} {% set swift_object_packages = ['swift-object'] %} {% endif %} -RUN {{ macros.install_packages(swift_object_packages | customizable("packages")) }} +{{ macros.install_packages(swift_object_packages | customizable("packages")) }} {% endif %} diff --git a/docker/swift/swift-proxy-server/Dockerfile.j2 b/docker/swift/swift-proxy-server/Dockerfile.j2 index 6ba07b9026..54895ff651 100644 --- a/docker/swift/swift-proxy-server/Dockerfile.j2 +++ b/docker/swift/swift-proxy-server/Dockerfile.j2 @@ -10,7 +10,7 @@ MAINTAINER {{ maintainer }} {% set swift_proxy_server_packages = ['swift-proxy'] %} {% endif %} -RUN {{ macros.install_packages(swift_proxy_server_packages | customizable("packages")) }} +{{ macros.install_packages(swift_proxy_server_packages | customizable("packages")) }} {% endif %} diff --git a/docker/swift/swift-rsyncd/Dockerfile.j2 b/docker/swift/swift-rsyncd/Dockerfile.j2 index 74864edefe..b85a7a4927 100644 --- a/docker/swift/swift-rsyncd/Dockerfile.j2 +++ b/docker/swift/swift-rsyncd/Dockerfile.j2 @@ -9,7 +9,7 @@ MAINTAINER {{ maintainer }} {% set swift_rsyncd_packages = ['rsync'] %} {% endif %} -RUN {{ macros.install_packages(swift_rsyncd_packages | customizable("packages")) }} +{{ macros.install_packages(swift_rsyncd_packages | customizable("packages")) }} COPY extend_start.sh /usr/local/bin/kolla_extend_start RUN chmod 755 /usr/local/bin/kolla_extend_start diff --git a/docker/telegraf/Dockerfile.j2 b/docker/telegraf/Dockerfile.j2 index d93a997e2e..2e2811b7de 100644 --- a/docker/telegraf/Dockerfile.j2 +++ b/docker/telegraf/Dockerfile.j2 @@ -3,7 +3,7 @@ MAINTAINER {{ maintainer }} {% import "macros.j2" as macros with context %} {% set telegraf_packages = ['telegraf'] %} -RUN {{ macros.install_packages(telegraf_packages | customizable("packages")) }} +{{ macros.install_packages(telegraf_packages | customizable("packages")) }} COPY telegraf_sudoers /etc/sudoers.d/kolla_telegraf_sudoers RUN chmod 750 /etc/sudoers.d \ diff --git a/docker/tempest/Dockerfile.j2 b/docker/tempest/Dockerfile.j2 index 0e1f5edc18..08c6c2471b 100644 --- a/docker/tempest/Dockerfile.j2 +++ b/docker/tempest/Dockerfile.j2 @@ -10,7 +10,7 @@ MAINTAINER {{ maintainer }} {% set tempest_packages = ['tempest'] %} {% endif %} -RUN {{ macros.install_packages(tempest_packages | customizable("packages")) }} +{{ macros.install_packages(tempest_packages | customizable("packages")) }} {% elif install_type == 'source' %} diff --git a/docker/tgtd/Dockerfile.j2 b/docker/tgtd/Dockerfile.j2 index d919ec8da2..7115732d78 100644 --- a/docker/tgtd/Dockerfile.j2 +++ b/docker/tgtd/Dockerfile.j2 @@ -6,13 +6,13 @@ MAINTAINER {{ maintainer }} {% if base_distro in ['centos', 'fedora', 'oraclelinux', 'rhel'] %} {% set tgtd_packages = ['scsi-target-utils'] %} -RUN {{ macros.install_packages(tgtd_packages | customizable("packages")) }} +{{ macros.install_packages(tgtd_packages | customizable("packages")) }} RUN sed -i '1 i include /var/lib/cinder/volumes/*' /etc/tgt/tgtd.conf {% elif base_distro in ['ubuntu', 'debian'] %} {% set tgtd_packages = ['tgt'] %} -RUN {{ macros.install_packages(tgtd_packages | customizable("packages")) }} +{{ macros.install_packages(tgtd_packages | customizable("packages")) }} RUN sed -i '1 i include /var/lib/cinder/volumes/*' /etc/tgt/targets.conf {% endif %} diff --git a/docker/trove/trove-api/Dockerfile.j2 b/docker/trove/trove-api/Dockerfile.j2 index ed68f053ab..1a022b7f46 100644 --- a/docker/trove/trove-api/Dockerfile.j2 +++ b/docker/trove/trove-api/Dockerfile.j2 @@ -9,7 +9,7 @@ MAINTAINER {{ maintainer }} {% set trove_api_packages = ['trove-api'] %} {% endif %} -RUN {{ macros.install_packages(trove_api_packages | customizable("packages")) }} +{{ macros.install_packages(trove_api_packages | customizable("packages")) }} {% endif %} diff --git a/docker/trove/trove-base/Dockerfile.j2 b/docker/trove/trove-base/Dockerfile.j2 index 40a427f9bc..86521191fb 100644 --- a/docker/trove/trove-base/Dockerfile.j2 +++ b/docker/trove/trove-base/Dockerfile.j2 @@ -11,7 +11,7 @@ MAINTAINER {{ maintainer }} {% set trove_base_packages = ['trove-common'] %} {% endif %} -RUN {{ macros.install_packages(trove_base_packages | customizable("packages")) }} +{{ macros.install_packages(trove_base_packages | customizable("packages")) }} {% elif install_type == 'source' %} diff --git a/docker/trove/trove-conductor/Dockerfile.j2 b/docker/trove/trove-conductor/Dockerfile.j2 index d1e5832803..464a350238 100644 --- a/docker/trove/trove-conductor/Dockerfile.j2 +++ b/docker/trove/trove-conductor/Dockerfile.j2 @@ -10,7 +10,7 @@ MAINTAINER {{ maintainer }} {% set trove_conductor_packages = ['trove-conductor'] %} {% endif %} -RUN {{ macros.install_packages(trove_conductor_packages | customizable("packages")) }} +{{ macros.install_packages(trove_conductor_packages | customizable("packages")) }} {% endif %} diff --git a/docker/trove/trove-guestagent/Dockerfile.j2 b/docker/trove/trove-guestagent/Dockerfile.j2 index aff1af1fd0..56823fb8ef 100644 --- a/docker/trove/trove-guestagent/Dockerfile.j2 +++ b/docker/trove/trove-guestagent/Dockerfile.j2 @@ -10,7 +10,7 @@ MAINTAINER {{ maintainer }} {% set trove_guestagent_packages = ['trove-guestagent'] %} {% endif %} -RUN {{ macros.install_packages(trove_guestagent_packages | customizable("packages")) }} +{{ macros.install_packages(trove_guestagent_packages | customizable("packages")) }} {% endif %} diff --git a/docker/trove/trove-taskmanager/Dockerfile.j2 b/docker/trove/trove-taskmanager/Dockerfile.j2 index 1eb7bb7859..9930f3df2d 100644 --- a/docker/trove/trove-taskmanager/Dockerfile.j2 +++ b/docker/trove/trove-taskmanager/Dockerfile.j2 @@ -10,7 +10,7 @@ MAINTAINER {{ maintainer }} {% set trove_taskmanager_packages = ['trove-taskmanager'] %} {% endif %} -RUN {{ macros.install_packages(trove_taskmanager_packages | customizable("packages")) }} +{{ macros.install_packages(trove_taskmanager_packages | customizable("packages")) }} {% endif %} diff --git a/docker/zaqar/Dockerfile.j2 b/docker/zaqar/Dockerfile.j2 index 0d4e9d75d7..e60efdfa8b 100644 --- a/docker/zaqar/Dockerfile.j2 +++ b/docker/zaqar/Dockerfile.j2 @@ -13,7 +13,7 @@ MAINTAINER {{ maintainer }} 'zaqar-server' ] %} {% endif %} -RUN {{ macros.install_packages(zaqar_packages | customizable("packages")) }} +{{ macros.install_packages(zaqar_packages | customizable("packages")) }} {% elif install_type == 'source' %}