From 630f437576c81c829f6d74cc33dcf830bbc89bef Mon Sep 17 00:00:00 2001 From: Vladislav Belogrudov Date: Fri, 28 Aug 2015 13:17:41 +0300 Subject: [PATCH] Add custom footer section to final image Dockefiles This patch allows to add instructions to final images like setting runtime environment variables or deleting build time HTTP proxies Change-Id: I23ad325e0898d77804a22038ddc618e1e49afd88 Partially-Implements: blueprint add-proxy-to-dockerfiles --- .../ceilometer/ceilometer-alarm/Dockerfile.j2 | 2 ++ docker_templates/ceilometer/ceilometer-api/Dockerfile.j2 | 2 ++ .../ceilometer/ceilometer-central/Dockerfile.j2 | 2 ++ .../ceilometer/ceilometer-collector/Dockerfile.j2 | 2 ++ .../ceilometer/ceilometer-compute/Dockerfile.j2 | 2 ++ .../ceilometer/ceilometer-notification/Dockerfile.j2 | 2 ++ docker_templates/cinder/cinder-api/Dockerfile.j2 | 2 ++ docker_templates/cinder/cinder-backup/Dockerfile.j2 | 2 ++ docker_templates/cinder/cinder-scheduler/Dockerfile.j2 | 2 ++ docker_templates/cinder/cinder-volume/Dockerfile.j2 | 2 ++ docker_templates/data/Dockerfile.j2 | 2 ++ docker_templates/designate/designate-api/Dockerfile.j2 | 2 ++ .../designate/designate-backend-bind9/Dockerfile.j2 | 2 ++ .../designate/designate-central/Dockerfile.j2 | 2 ++ docker_templates/designate/designate-mdns/Dockerfile.j2 | 2 ++ .../designate/designate-poolmanager/Dockerfile.j2 | 2 ++ docker_templates/designate/designate-sink/Dockerfile.j2 | 2 ++ docker_templates/galera/Dockerfile.j2 | 2 ++ docker_templates/glance/glance-api/Dockerfile.j2 | 2 ++ docker_templates/glance/glance-registry/Dockerfile.j2 | 2 ++ docker_templates/gnocchi/gnocchi-api/Dockerfile.j2 | 2 ++ docker_templates/gnocchi/gnocchi-statsd/Dockerfile.j2 | 2 ++ docker_templates/haproxy/Dockerfile.j2 | 2 ++ docker_templates/heat/heat-api-cfn/Dockerfile.j2 | 2 ++ docker_templates/heat/heat-api/Dockerfile.j2 | 2 ++ docker_templates/heat/heat-engine/Dockerfile.j2 | 2 ++ docker_templates/horizon/Dockerfile.j2 | 2 ++ docker_templates/ironic/ironic-api/Dockerfile.j2 | 2 ++ docker_templates/ironic/ironic-conductor/Dockerfile.j2 | 2 ++ docker_templates/ironic/ironic-discoverd/Dockerfile.j2 | 2 ++ docker_templates/keepalived/Dockerfile.j2 | 2 ++ docker_templates/keystone/Dockerfile.j2 | 2 ++ docker_templates/kolla-ansible/Dockerfile.j2 | 2 ++ docker_templates/magnum/magnum-api/Dockerfile.j2 | 2 ++ docker_templates/magnum/magnum-conductor/Dockerfile.j2 | 2 ++ docker_templates/memcached/Dockerfile.j2 | 2 ++ docker_templates/mongodb/Dockerfile.j2 | 2 ++ docker_templates/murano/murano-api/Dockerfile.j2 | 2 ++ docker_templates/murano/murano-engine/Dockerfile.j2 | 2 ++ docker_templates/neutron/neutron-agents/Dockerfile.j2 | 2 ++ .../neutron/neutron-linuxbridge-agent/Dockerfile.j2 | 2 ++ .../neutron/neutron-openvswitch-agent/Dockerfile.j2 | 2 ++ docker_templates/neutron/neutron-server/Dockerfile.j2 | 2 ++ docker_templates/nova/nova-api/Dockerfile.j2 | 2 ++ docker_templates/nova/nova-compute/Dockerfile.j2 | 2 ++ docker_templates/nova/nova-conductor/Dockerfile.j2 | 2 ++ docker_templates/nova/nova-consoleauth/Dockerfile.j2 | 2 ++ docker_templates/nova/nova-libvirt/Dockerfile.j2 | 2 ++ docker_templates/nova/nova-network/Dockerfile.j2 | 2 ++ docker_templates/nova/nova-novncproxy/Dockerfile.j2 | 2 ++ docker_templates/nova/nova-scheduler/Dockerfile.j2 | 2 ++ docker_templates/openvswitch/ovs-db-server/Dockerfile.j2 | 2 ++ docker_templates/openvswitch/ovs-vswitchd/Dockerfile.j2 | 2 ++ docker_templates/rabbitmq/Dockerfile.j2 | 2 ++ docker_templates/swift/swift-account-server/Dockerfile.j2 | 2 ++ .../swift/swift-container-server/Dockerfile.j2 | 2 ++ docker_templates/swift/swift-object-auditor/Dockerfile.j2 | 2 ++ docker_templates/swift/swift-object-expirer/Dockerfile.j2 | 2 ++ .../swift/swift-object-replicator/Dockerfile.j2 | 2 ++ docker_templates/swift/swift-object-server/Dockerfile.j2 | 2 ++ docker_templates/swift/swift-object-updater/Dockerfile.j2 | 2 ++ docker_templates/swift/swift-proxy-server/Dockerfile.j2 | 2 ++ docker_templates/zaqar/Dockerfile.j2 | 2 ++ kolla/cmd/build.py | 8 ++++++++ 64 files changed, 134 insertions(+) diff --git a/docker_templates/ceilometer/ceilometer-alarm/Dockerfile.j2 b/docker_templates/ceilometer/ceilometer-alarm/Dockerfile.j2 index bb53965595..aa62562ac0 100644 --- a/docker_templates/ceilometer/ceilometer-alarm/Dockerfile.j2 +++ b/docker_templates/ceilometer/ceilometer-alarm/Dockerfile.j2 @@ -14,3 +14,5 @@ COPY ./start.sh / COPY config-external.sh /opt/kolla/ CMD ["/start.sh"] + +{{ include_footer }} diff --git a/docker_templates/ceilometer/ceilometer-api/Dockerfile.j2 b/docker_templates/ceilometer/ceilometer-api/Dockerfile.j2 index cf9150af44..805e5e8eb0 100644 --- a/docker_templates/ceilometer/ceilometer-api/Dockerfile.j2 +++ b/docker_templates/ceilometer/ceilometer-api/Dockerfile.j2 @@ -14,3 +14,5 @@ COPY ./start.sh / COPY config-external.sh /opt/kolla/ CMD ["/start.sh"] + +{{ include_footer }} diff --git a/docker_templates/ceilometer/ceilometer-central/Dockerfile.j2 b/docker_templates/ceilometer/ceilometer-central/Dockerfile.j2 index b5322b3970..b45c5fac33 100644 --- a/docker_templates/ceilometer/ceilometer-central/Dockerfile.j2 +++ b/docker_templates/ceilometer/ceilometer-central/Dockerfile.j2 @@ -14,3 +14,5 @@ COPY ./start.sh / COPY config-external.sh /opt/kolla/ CMD ["/start.sh"] + +{{ include_footer }} diff --git a/docker_templates/ceilometer/ceilometer-collector/Dockerfile.j2 b/docker_templates/ceilometer/ceilometer-collector/Dockerfile.j2 index 44f10d6179..6f425e8559 100644 --- a/docker_templates/ceilometer/ceilometer-collector/Dockerfile.j2 +++ b/docker_templates/ceilometer/ceilometer-collector/Dockerfile.j2 @@ -14,3 +14,5 @@ COPY ./start.sh / COPY config-external.sh /opt/kolla/ CMD ["/start.sh"] + +{{ include_footer }} diff --git a/docker_templates/ceilometer/ceilometer-compute/Dockerfile.j2 b/docker_templates/ceilometer/ceilometer-compute/Dockerfile.j2 index c771743814..0487af710b 100644 --- a/docker_templates/ceilometer/ceilometer-compute/Dockerfile.j2 +++ b/docker_templates/ceilometer/ceilometer-compute/Dockerfile.j2 @@ -16,3 +16,5 @@ COPY ./start.sh / COPY config-external.sh /opt/kolla/ CMD ["/start.sh"] + +{{ include_footer }} diff --git a/docker_templates/ceilometer/ceilometer-notification/Dockerfile.j2 b/docker_templates/ceilometer/ceilometer-notification/Dockerfile.j2 index af220a3713..67fcfb50e3 100644 --- a/docker_templates/ceilometer/ceilometer-notification/Dockerfile.j2 +++ b/docker_templates/ceilometer/ceilometer-notification/Dockerfile.j2 @@ -14,3 +14,5 @@ COPY ./start.sh / COPY config-external.sh /opt/kolla/ CMD ["/start.sh"] + +{{ include_footer }} diff --git a/docker_templates/cinder/cinder-api/Dockerfile.j2 b/docker_templates/cinder/cinder-api/Dockerfile.j2 index 97ad23ac01..196f93bafa 100644 --- a/docker_templates/cinder/cinder-api/Dockerfile.j2 +++ b/docker_templates/cinder/cinder-api/Dockerfile.j2 @@ -14,3 +14,5 @@ COPY ./start.sh / COPY config-external.sh /opt/kolla/ CMD ["/start.sh"] + +{{ include_footer }} diff --git a/docker_templates/cinder/cinder-backup/Dockerfile.j2 b/docker_templates/cinder/cinder-backup/Dockerfile.j2 index 8ef8c045af..fa331b195f 100644 --- a/docker_templates/cinder/cinder-backup/Dockerfile.j2 +++ b/docker_templates/cinder/cinder-backup/Dockerfile.j2 @@ -5,3 +5,5 @@ COPY ./start.sh / COPY config-external.sh /opt/kolla/ CMD ["/start.sh"] + +{{ include_footer }} diff --git a/docker_templates/cinder/cinder-scheduler/Dockerfile.j2 b/docker_templates/cinder/cinder-scheduler/Dockerfile.j2 index 8ef8c045af..fa331b195f 100644 --- a/docker_templates/cinder/cinder-scheduler/Dockerfile.j2 +++ b/docker_templates/cinder/cinder-scheduler/Dockerfile.j2 @@ -5,3 +5,5 @@ COPY ./start.sh / COPY config-external.sh /opt/kolla/ CMD ["/start.sh"] + +{{ include_footer }} diff --git a/docker_templates/cinder/cinder-volume/Dockerfile.j2 b/docker_templates/cinder/cinder-volume/Dockerfile.j2 index 3e708be8a3..6393798bd9 100644 --- a/docker_templates/cinder/cinder-volume/Dockerfile.j2 +++ b/docker_templates/cinder/cinder-volume/Dockerfile.j2 @@ -15,3 +15,5 @@ COPY ./start.sh / COPY config-external.sh /opt/kolla/ CMD ["/start.sh"] + +{{ include_footer }} diff --git a/docker_templates/data/Dockerfile.j2 b/docker_templates/data/Dockerfile.j2 index 18933ef559..7fecdb0684 100644 --- a/docker_templates/data/Dockerfile.j2 +++ b/docker_templates/data/Dockerfile.j2 @@ -2,3 +2,5 @@ FROM {{ base_distro }}:{{ base_distro_tag }} MAINTAINER Kolla Project (https://launchpad.net/kolla) CMD /bin/sleep infinity + +{{ include_footer }} diff --git a/docker_templates/designate/designate-api/Dockerfile.j2 b/docker_templates/designate/designate-api/Dockerfile.j2 index 203d6f0ff9..75f4b06ee6 100644 --- a/docker_templates/designate/designate-api/Dockerfile.j2 +++ b/docker_templates/designate/designate-api/Dockerfile.j2 @@ -15,3 +15,5 @@ COPY start.sh /start.sh COPY config-external.sh /opt/kolla/ CMD ["/start.sh"] + +{{ include_footer }} diff --git a/docker_templates/designate/designate-backend-bind9/Dockerfile.j2 b/docker_templates/designate/designate-backend-bind9/Dockerfile.j2 index 4b215f8f0c..06f86c0433 100644 --- a/docker_templates/designate/designate-backend-bind9/Dockerfile.j2 +++ b/docker_templates/designate/designate-backend-bind9/Dockerfile.j2 @@ -15,3 +15,5 @@ COPY start.sh /start.sh COPY config-external.sh /opt/kolla/ CMD ["/start.sh"] + +{{ include_footer }} diff --git a/docker_templates/designate/designate-central/Dockerfile.j2 b/docker_templates/designate/designate-central/Dockerfile.j2 index e90c3bb2ee..771ff3c684 100644 --- a/docker_templates/designate/designate-central/Dockerfile.j2 +++ b/docker_templates/designate/designate-central/Dockerfile.j2 @@ -15,3 +15,5 @@ COPY start.sh /start.sh COPY config-external.sh /opt/kolla/ CMD ["/start.sh"] + +{{ include_footer }} diff --git a/docker_templates/designate/designate-mdns/Dockerfile.j2 b/docker_templates/designate/designate-mdns/Dockerfile.j2 index c93f1d9569..cc5f5fb89a 100644 --- a/docker_templates/designate/designate-mdns/Dockerfile.j2 +++ b/docker_templates/designate/designate-mdns/Dockerfile.j2 @@ -14,3 +14,5 @@ COPY start.sh /start.sh COPY config-external.sh /opt/kolla/ CMD ["/start.sh"] + +{{ include_footer }} diff --git a/docker_templates/designate/designate-poolmanager/Dockerfile.j2 b/docker_templates/designate/designate-poolmanager/Dockerfile.j2 index 5d1dabdda7..0fc968b90e 100644 --- a/docker_templates/designate/designate-poolmanager/Dockerfile.j2 +++ b/docker_templates/designate/designate-poolmanager/Dockerfile.j2 @@ -17,3 +17,5 @@ COPY start.sh /start.sh COPY config-external.sh /opt/kolla/ CMD ["/start.sh"] + +{{ include_footer }} diff --git a/docker_templates/designate/designate-sink/Dockerfile.j2 b/docker_templates/designate/designate-sink/Dockerfile.j2 index f74e36bbe8..c0ea23b2d2 100644 --- a/docker_templates/designate/designate-sink/Dockerfile.j2 +++ b/docker_templates/designate/designate-sink/Dockerfile.j2 @@ -16,3 +16,5 @@ COPY start.sh /start.sh COPY config-external.sh /opt/kolla/ CMD ["/start.sh"] + +{{ include_footer }} diff --git a/docker_templates/galera/Dockerfile.j2 b/docker_templates/galera/Dockerfile.j2 index 7856a7f243..acbb9bc51d 100644 --- a/docker_templates/galera/Dockerfile.j2 +++ b/docker_templates/galera/Dockerfile.j2 @@ -46,3 +46,5 @@ COPY config-external.sh /opt/kolla/ COPY start.sh / CMD ["/start.sh"] + +{{ include_footer }} diff --git a/docker_templates/glance/glance-api/Dockerfile.j2 b/docker_templates/glance/glance-api/Dockerfile.j2 index f652822f5e..e603a6c363 100644 --- a/docker_templates/glance/glance-api/Dockerfile.j2 +++ b/docker_templates/glance/glance-api/Dockerfile.j2 @@ -5,3 +5,5 @@ COPY start.sh / COPY config-external.sh /opt/kolla/ CMD ["/start.sh"] + +{{ include_footer }} diff --git a/docker_templates/glance/glance-registry/Dockerfile.j2 b/docker_templates/glance/glance-registry/Dockerfile.j2 index f652822f5e..e603a6c363 100644 --- a/docker_templates/glance/glance-registry/Dockerfile.j2 +++ b/docker_templates/glance/glance-registry/Dockerfile.j2 @@ -5,3 +5,5 @@ COPY start.sh / COPY config-external.sh /opt/kolla/ CMD ["/start.sh"] + +{{ include_footer }} diff --git a/docker_templates/gnocchi/gnocchi-api/Dockerfile.j2 b/docker_templates/gnocchi/gnocchi-api/Dockerfile.j2 index 9bb144ed71..9ca70113cd 100644 --- a/docker_templates/gnocchi/gnocchi-api/Dockerfile.j2 +++ b/docker_templates/gnocchi/gnocchi-api/Dockerfile.j2 @@ -17,3 +17,5 @@ COPY start.sh / COPY config-external.sh /opt/kolla/ CMD ["/start.sh"] + +{{ include_footer }} diff --git a/docker_templates/gnocchi/gnocchi-statsd/Dockerfile.j2 b/docker_templates/gnocchi/gnocchi-statsd/Dockerfile.j2 index 446c47d1c9..99f1374a28 100644 --- a/docker_templates/gnocchi/gnocchi-statsd/Dockerfile.j2 +++ b/docker_templates/gnocchi/gnocchi-statsd/Dockerfile.j2 @@ -14,3 +14,5 @@ COPY start.sh / COPY config-external.sh /opt/kolla/ CMD ["/start.sh"] + +{{ include_footer }} diff --git a/docker_templates/haproxy/Dockerfile.j2 b/docker_templates/haproxy/Dockerfile.j2 index 1a40d5d932..2858f436a9 100755 --- a/docker_templates/haproxy/Dockerfile.j2 +++ b/docker_templates/haproxy/Dockerfile.j2 @@ -23,3 +23,5 @@ COPY start.sh / COPY config-external.sh ensure_latest_config.sh /opt/kolla/ CMD ["/start.sh"] + +{{ include_footer }} diff --git a/docker_templates/heat/heat-api-cfn/Dockerfile.j2 b/docker_templates/heat/heat-api-cfn/Dockerfile.j2 index ecff87b009..f199c16cfd 100644 --- a/docker_templates/heat/heat-api-cfn/Dockerfile.j2 +++ b/docker_templates/heat/heat-api-cfn/Dockerfile.j2 @@ -21,3 +21,5 @@ COPY start.sh / COPY config-external.sh /opt/kolla/ CMD ["/start.sh"] + +{{ include_footer }} diff --git a/docker_templates/heat/heat-api/Dockerfile.j2 b/docker_templates/heat/heat-api/Dockerfile.j2 index 2688a32706..8a782d8d3b 100644 --- a/docker_templates/heat/heat-api/Dockerfile.j2 +++ b/docker_templates/heat/heat-api/Dockerfile.j2 @@ -21,3 +21,5 @@ COPY start.sh / COPY config-external.sh /opt/kolla/ CMD ["/start.sh"] + +{{ include_footer }} diff --git a/docker_templates/heat/heat-engine/Dockerfile.j2 b/docker_templates/heat/heat-engine/Dockerfile.j2 index d080fec6a4..5002d519d2 100644 --- a/docker_templates/heat/heat-engine/Dockerfile.j2 +++ b/docker_templates/heat/heat-engine/Dockerfile.j2 @@ -24,3 +24,5 @@ COPY start.sh / COPY config-external.sh /opt/kolla/ CMD ["/start.sh"] + +{{ include_footer }} diff --git a/docker_templates/horizon/Dockerfile.j2 b/docker_templates/horizon/Dockerfile.j2 index d05b21c158..2fe69b3d22 100644 --- a/docker_templates/horizon/Dockerfile.j2 +++ b/docker_templates/horizon/Dockerfile.j2 @@ -54,3 +54,5 @@ COPY start.sh / COPY config-external.sh /opt/kolla/ CMD ["/start.sh"] + +{{ include_footer }} diff --git a/docker_templates/ironic/ironic-api/Dockerfile.j2 b/docker_templates/ironic/ironic-api/Dockerfile.j2 index 3aa2322ef7..5bce3bddaf 100644 --- a/docker_templates/ironic/ironic-api/Dockerfile.j2 +++ b/docker_templates/ironic/ironic-api/Dockerfile.j2 @@ -15,3 +15,5 @@ COPY start.sh / COPY config-external.sh /opt/kolla/ CMD ["/start.sh"] + +{{ include_footer }} diff --git a/docker_templates/ironic/ironic-conductor/Dockerfile.j2 b/docker_templates/ironic/ironic-conductor/Dockerfile.j2 index 65c816d62c..d380332300 100644 --- a/docker_templates/ironic/ironic-conductor/Dockerfile.j2 +++ b/docker_templates/ironic/ironic-conductor/Dockerfile.j2 @@ -15,3 +15,5 @@ COPY start.sh / COPY config-external.sh /opt/kolla/ CMD ["/start.sh"] + +{{ include_footer }} diff --git a/docker_templates/ironic/ironic-discoverd/Dockerfile.j2 b/docker_templates/ironic/ironic-discoverd/Dockerfile.j2 index 6de58d8610..cb4e8b80f8 100644 --- a/docker_templates/ironic/ironic-discoverd/Dockerfile.j2 +++ b/docker_templates/ironic/ironic-discoverd/Dockerfile.j2 @@ -15,3 +15,5 @@ COPY start.sh / COPY config-external.sh /opt/kolla/ CMD ["/start.sh"] + +{{ include_footer }} diff --git a/docker_templates/keepalived/Dockerfile.j2 b/docker_templates/keepalived/Dockerfile.j2 index 3ad2a667ce..325e4c2c5c 100644 --- a/docker_templates/keepalived/Dockerfile.j2 +++ b/docker_templates/keepalived/Dockerfile.j2 @@ -22,3 +22,5 @@ COPY start.sh check_alive.sh / COPY config-external.sh /opt/kolla/ CMD ["/start.sh"] + +{{ include_footer }} diff --git a/docker_templates/keystone/Dockerfile.j2 b/docker_templates/keystone/Dockerfile.j2 index ec8144b914..a3b6861655 100644 --- a/docker_templates/keystone/Dockerfile.j2 +++ b/docker_templates/keystone/Dockerfile.j2 @@ -67,3 +67,5 @@ COPY start.sh / COPY config-external.sh /opt/kolla/ CMD ["/start.sh"] + +{{ include_footer }} diff --git a/docker_templates/kolla-ansible/Dockerfile.j2 b/docker_templates/kolla-ansible/Dockerfile.j2 index e95a90aa7e..9975f58738 100644 --- a/docker_templates/kolla-ansible/Dockerfile.j2 +++ b/docker_templates/kolla-ansible/Dockerfile.j2 @@ -34,3 +34,5 @@ RUN mkdir -p /etc/ansible /usr/share/ansible \ && echo 'localhost ansible_connection=local' > /etc/ansible/hosts COPY kolla_keystone_service.py kolla_keystone_user.py /usr/share/ansible/ + +{{ include_footer }} diff --git a/docker_templates/magnum/magnum-api/Dockerfile.j2 b/docker_templates/magnum/magnum-api/Dockerfile.j2 index 4da0f3a658..e208a115ed 100644 --- a/docker_templates/magnum/magnum-api/Dockerfile.j2 +++ b/docker_templates/magnum/magnum-api/Dockerfile.j2 @@ -15,3 +15,5 @@ COPY config-external.sh /opt/kolla/ CMD ["/start.sh"] + +{{ include_footer }} diff --git a/docker_templates/magnum/magnum-conductor/Dockerfile.j2 b/docker_templates/magnum/magnum-conductor/Dockerfile.j2 index 2f16603599..c143700854 100644 --- a/docker_templates/magnum/magnum-conductor/Dockerfile.j2 +++ b/docker_templates/magnum/magnum-conductor/Dockerfile.j2 @@ -19,3 +19,5 @@ COPY config-external.sh /opt/kolla/ CMD ["/start.sh"] + +{{ include_footer }} diff --git a/docker_templates/memcached/Dockerfile.j2 b/docker_templates/memcached/Dockerfile.j2 index dcf4bd0427..0c0111f7e1 100644 --- a/docker_templates/memcached/Dockerfile.j2 +++ b/docker_templates/memcached/Dockerfile.j2 @@ -17,3 +17,5 @@ COPY start.sh / COPY config-external.sh /opt/kolla/ CMD ["/start.sh"] + +{{ include_footer }} diff --git a/docker_templates/mongodb/Dockerfile.j2 b/docker_templates/mongodb/Dockerfile.j2 index 16f8cd2fcb..ee82f0b7a1 100644 --- a/docker_templates/mongodb/Dockerfile.j2 +++ b/docker_templates/mongodb/Dockerfile.j2 @@ -21,3 +21,5 @@ VOLUME /data/db VOLUME /var/log/mongodb ENTRYPOINT exec /bin/mongod --dbpath /data/db --logpath /var/log/mongodb/mongo.log --noprealloc --smallfiles + +{{ include_footer }} diff --git a/docker_templates/murano/murano-api/Dockerfile.j2 b/docker_templates/murano/murano-api/Dockerfile.j2 index 3136c77ad0..f1d7e1f42a 100644 --- a/docker_templates/murano/murano-api/Dockerfile.j2 +++ b/docker_templates/murano/murano-api/Dockerfile.j2 @@ -5,3 +5,5 @@ COPY config-external.sh /opt/kolla/ COPY start.sh / CMD ["/start.sh"] + +{{ include_footer }} diff --git a/docker_templates/murano/murano-engine/Dockerfile.j2 b/docker_templates/murano/murano-engine/Dockerfile.j2 index 3136c77ad0..f1d7e1f42a 100644 --- a/docker_templates/murano/murano-engine/Dockerfile.j2 +++ b/docker_templates/murano/murano-engine/Dockerfile.j2 @@ -5,3 +5,5 @@ COPY config-external.sh /opt/kolla/ COPY start.sh / CMD ["/start.sh"] + +{{ include_footer }} diff --git a/docker_templates/neutron/neutron-agents/Dockerfile.j2 b/docker_templates/neutron/neutron-agents/Dockerfile.j2 index cb4cec403f..590443e00e 100644 --- a/docker_templates/neutron/neutron-agents/Dockerfile.j2 +++ b/docker_templates/neutron/neutron-agents/Dockerfile.j2 @@ -31,3 +31,5 @@ COPY neutron-l3-agent/ /opt/kolla/neutron-l3-agent COPY neutron-metadata-agent/ /opt/kolla/neutron-metadata-agent CMD ["/usr/bin/supervisord"] + +{{ include_footer }} diff --git a/docker_templates/neutron/neutron-linuxbridge-agent/Dockerfile.j2 b/docker_templates/neutron/neutron-linuxbridge-agent/Dockerfile.j2 index cdac55369f..58d5ae6c38 100644 --- a/docker_templates/neutron/neutron-linuxbridge-agent/Dockerfile.j2 +++ b/docker_templates/neutron/neutron-linuxbridge-agent/Dockerfile.j2 @@ -24,3 +24,5 @@ COPY start.sh / COPY config-external.sh /opt/kolla/ CMD ["/start.sh"] + +{{ include_footer }} diff --git a/docker_templates/neutron/neutron-openvswitch-agent/Dockerfile.j2 b/docker_templates/neutron/neutron-openvswitch-agent/Dockerfile.j2 index 977f53d230..ad12e55111 100644 --- a/docker_templates/neutron/neutron-openvswitch-agent/Dockerfile.j2 +++ b/docker_templates/neutron/neutron-openvswitch-agent/Dockerfile.j2 @@ -28,3 +28,5 @@ COPY start.sh / COPY config-external.sh /opt/kolla/ CMD ["/start.sh"] + +{{ include_footer }} diff --git a/docker_templates/neutron/neutron-server/Dockerfile.j2 b/docker_templates/neutron/neutron-server/Dockerfile.j2 index 0c4a2cfa15..9cfe634c47 100644 --- a/docker_templates/neutron/neutron-server/Dockerfile.j2 +++ b/docker_templates/neutron/neutron-server/Dockerfile.j2 @@ -27,3 +27,5 @@ COPY start.sh / COPY config-external.sh /opt/kolla/ CMD ["/start.sh"] + +{{ include_footer }} diff --git a/docker_templates/nova/nova-api/Dockerfile.j2 b/docker_templates/nova/nova-api/Dockerfile.j2 index 1b1e119275..b906d19378 100644 --- a/docker_templates/nova/nova-api/Dockerfile.j2 +++ b/docker_templates/nova/nova-api/Dockerfile.j2 @@ -14,3 +14,5 @@ COPY start.sh / COPY config-external.sh /opt/kolla/ CMD ["/start.sh"] + +{{ include_footer }} diff --git a/docker_templates/nova/nova-compute/Dockerfile.j2 b/docker_templates/nova/nova-compute/Dockerfile.j2 index 214cde4fe5..a8a719023c 100644 --- a/docker_templates/nova/nova-compute/Dockerfile.j2 +++ b/docker_templates/nova/nova-compute/Dockerfile.j2 @@ -30,3 +30,5 @@ COPY start.sh / COPY config-external.sh /opt/kolla/ CMD ["/start.sh"] + +{{ include_footer }} diff --git a/docker_templates/nova/nova-conductor/Dockerfile.j2 b/docker_templates/nova/nova-conductor/Dockerfile.j2 index 572d2b46a0..0f42df5c99 100644 --- a/docker_templates/nova/nova-conductor/Dockerfile.j2 +++ b/docker_templates/nova/nova-conductor/Dockerfile.j2 @@ -15,3 +15,5 @@ COPY start.sh / COPY config-external.sh /opt/kolla/ CMD ["/start.sh"] + +{{ include_footer }} diff --git a/docker_templates/nova/nova-consoleauth/Dockerfile.j2 b/docker_templates/nova/nova-consoleauth/Dockerfile.j2 index c1e8cbffbf..1c8d9ea122 100644 --- a/docker_templates/nova/nova-consoleauth/Dockerfile.j2 +++ b/docker_templates/nova/nova-consoleauth/Dockerfile.j2 @@ -14,3 +14,5 @@ COPY start.sh / COPY config-external.sh /opt/kolla/ CMD ["/start.sh"] + +{{ include_footer }} diff --git a/docker_templates/nova/nova-libvirt/Dockerfile.j2 b/docker_templates/nova/nova-libvirt/Dockerfile.j2 index 29e0843c32..5ff5254260 100644 --- a/docker_templates/nova/nova-libvirt/Dockerfile.j2 +++ b/docker_templates/nova/nova-libvirt/Dockerfile.j2 @@ -28,3 +28,5 @@ COPY start.sh / COPY config-external.sh /opt/kolla/ CMD ["/start.sh"] + +{{ include_footer }} diff --git a/docker_templates/nova/nova-network/Dockerfile.j2 b/docker_templates/nova/nova-network/Dockerfile.j2 index 2f6adf18eb..60ea394aaf 100644 --- a/docker_templates/nova/nova-network/Dockerfile.j2 +++ b/docker_templates/nova/nova-network/Dockerfile.j2 @@ -24,3 +24,5 @@ COPY start.sh / COPY config-external.sh /opt/kolla/ CMD ["/start.sh"] + +{{ include_footer }} diff --git a/docker_templates/nova/nova-novncproxy/Dockerfile.j2 b/docker_templates/nova/nova-novncproxy/Dockerfile.j2 index 4ddc7e6c36..b798e00a67 100644 --- a/docker_templates/nova/nova-novncproxy/Dockerfile.j2 +++ b/docker_templates/nova/nova-novncproxy/Dockerfile.j2 @@ -30,3 +30,5 @@ COPY start.sh / COPY config-external.sh /opt/kolla/ CMD ["/start.sh"] + +{{ include_footer }} diff --git a/docker_templates/nova/nova-scheduler/Dockerfile.j2 b/docker_templates/nova/nova-scheduler/Dockerfile.j2 index 66b4910bc8..5dd0fd5074 100644 --- a/docker_templates/nova/nova-scheduler/Dockerfile.j2 +++ b/docker_templates/nova/nova-scheduler/Dockerfile.j2 @@ -14,3 +14,5 @@ COPY start.sh / COPY config-external.sh /opt/kolla/ CMD ["/start.sh"] + +{{ include_footer }} diff --git a/docker_templates/openvswitch/ovs-db-server/Dockerfile.j2 b/docker_templates/openvswitch/ovs-db-server/Dockerfile.j2 index 3d80329c3a..05c6a928bf 100644 --- a/docker_templates/openvswitch/ovs-db-server/Dockerfile.j2 +++ b/docker_templates/openvswitch/ovs-db-server/Dockerfile.j2 @@ -5,3 +5,5 @@ COPY start.sh / COPY config-external.sh /opt/kolla/ CMD ["/start.sh"] + +{{ include_footer }} diff --git a/docker_templates/openvswitch/ovs-vswitchd/Dockerfile.j2 b/docker_templates/openvswitch/ovs-vswitchd/Dockerfile.j2 index 7271044059..59079d3350 100644 --- a/docker_templates/openvswitch/ovs-vswitchd/Dockerfile.j2 +++ b/docker_templates/openvswitch/ovs-vswitchd/Dockerfile.j2 @@ -5,3 +5,5 @@ COPY start.sh / COPY ovs_ensure_configured.sh config-external.sh /opt/kolla/ CMD ["/start.sh"] + +{{ include_footer }} diff --git a/docker_templates/rabbitmq/Dockerfile.j2 b/docker_templates/rabbitmq/Dockerfile.j2 index 1c748eee0b..1baf2ce808 100644 --- a/docker_templates/rabbitmq/Dockerfile.j2 +++ b/docker_templates/rabbitmq/Dockerfile.j2 @@ -23,3 +23,5 @@ COPY start.sh / COPY config-rabbit.sh config-external.sh /opt/kolla/ CMD ["/start.sh"] + +{{ include_footer }} diff --git a/docker_templates/swift/swift-account-server/Dockerfile.j2 b/docker_templates/swift/swift-account-server/Dockerfile.j2 index 809091d4d2..7320de9f41 100644 --- a/docker_templates/swift/swift-account-server/Dockerfile.j2 +++ b/docker_templates/swift/swift-account-server/Dockerfile.j2 @@ -15,3 +15,5 @@ COPY start.sh / COPY config-external.sh /opt/kolla/ CMD ["/start.sh"] + +{{ include_footer }} diff --git a/docker_templates/swift/swift-container-server/Dockerfile.j2 b/docker_templates/swift/swift-container-server/Dockerfile.j2 index b4b43d8dc2..1a08c0f5dc 100644 --- a/docker_templates/swift/swift-container-server/Dockerfile.j2 +++ b/docker_templates/swift/swift-container-server/Dockerfile.j2 @@ -15,3 +15,5 @@ COPY start.sh / COPY config-external.sh /opt/kolla/ CMD ["/start.sh"] + +{{ include_footer }} diff --git a/docker_templates/swift/swift-object-auditor/Dockerfile.j2 b/docker_templates/swift/swift-object-auditor/Dockerfile.j2 index 637501586d..ab8a7adeeb 100644 --- a/docker_templates/swift/swift-object-auditor/Dockerfile.j2 +++ b/docker_templates/swift/swift-object-auditor/Dockerfile.j2 @@ -5,3 +5,5 @@ COPY start.sh / COPY config-external.sh /opt/kolla/ CMD ["/start.sh"] + +{{ include_footer }} diff --git a/docker_templates/swift/swift-object-expirer/Dockerfile.j2 b/docker_templates/swift/swift-object-expirer/Dockerfile.j2 index 8b211f2e44..af9f3eb580 100644 --- a/docker_templates/swift/swift-object-expirer/Dockerfile.j2 +++ b/docker_templates/swift/swift-object-expirer/Dockerfile.j2 @@ -16,3 +16,5 @@ COPY start.sh / COPY config-external.sh /opt/kolla/ CMD ["/start.sh"] + +{{ include_footer }} diff --git a/docker_templates/swift/swift-object-replicator/Dockerfile.j2 b/docker_templates/swift/swift-object-replicator/Dockerfile.j2 index 637501586d..ab8a7adeeb 100644 --- a/docker_templates/swift/swift-object-replicator/Dockerfile.j2 +++ b/docker_templates/swift/swift-object-replicator/Dockerfile.j2 @@ -5,3 +5,5 @@ COPY start.sh / COPY config-external.sh /opt/kolla/ CMD ["/start.sh"] + +{{ include_footer }} diff --git a/docker_templates/swift/swift-object-server/Dockerfile.j2 b/docker_templates/swift/swift-object-server/Dockerfile.j2 index 637501586d..ab8a7adeeb 100644 --- a/docker_templates/swift/swift-object-server/Dockerfile.j2 +++ b/docker_templates/swift/swift-object-server/Dockerfile.j2 @@ -5,3 +5,5 @@ COPY start.sh / COPY config-external.sh /opt/kolla/ CMD ["/start.sh"] + +{{ include_footer }} diff --git a/docker_templates/swift/swift-object-updater/Dockerfile.j2 b/docker_templates/swift/swift-object-updater/Dockerfile.j2 index 637501586d..ab8a7adeeb 100644 --- a/docker_templates/swift/swift-object-updater/Dockerfile.j2 +++ b/docker_templates/swift/swift-object-updater/Dockerfile.j2 @@ -5,3 +5,5 @@ COPY start.sh / COPY config-external.sh /opt/kolla/ CMD ["/start.sh"] + +{{ include_footer }} diff --git a/docker_templates/swift/swift-proxy-server/Dockerfile.j2 b/docker_templates/swift/swift-proxy-server/Dockerfile.j2 index b668f33e2b..54d024f8b7 100644 --- a/docker_templates/swift/swift-proxy-server/Dockerfile.j2 +++ b/docker_templates/swift/swift-proxy-server/Dockerfile.j2 @@ -12,3 +12,5 @@ RUN yum -y install openstack-swift-proxy && yum clean all COPY ./start.sh /start.sh COPY config-external.sh /opt/kolla/ CMD ["/start.sh"] + +{{ include_footer }} diff --git a/docker_templates/zaqar/Dockerfile.j2 b/docker_templates/zaqar/Dockerfile.j2 index fd4752f78b..4e3a0bc52c 100644 --- a/docker_templates/zaqar/Dockerfile.j2 +++ b/docker_templates/zaqar/Dockerfile.j2 @@ -28,3 +28,5 @@ COPY start.sh / COPY config-external.sh /opt/kolla/ CMD ["/start.sh"] + +{{ include_footer }} diff --git a/kolla/cmd/build.py b/kolla/cmd/build.py index d94d8b29bc..d3842d581d 100755 --- a/kolla/cmd/build.py +++ b/kolla/cmd/build.py @@ -249,6 +249,10 @@ def arg_parser(): help=('Path to custom file to be added at ' 'beginning of base Dockerfile'), type=str) + parser.add_argument('-I', '--include-footer', + help=('Path to custom file to be added at ' + 'end of Dockerfiles for final images'), + type=str) return vars(parser.parse_args()) @@ -281,6 +285,7 @@ class KollaWorker(object): self.config = ConfigParser.SafeConfigParser() self.config.read(os.path.join(self.base_dir, 'build.ini')) self.include_header = args['include_header'] + self.include_footer = args['include_footer'] self.regex = args['regex'] self.image_statuses_bad = dict() @@ -320,6 +325,9 @@ class KollaWorker(object): if self.include_header: with open(self.include_header, 'r') as f: values['include_header'] = f.read() + if self.include_footer: + with open(self.include_footer, 'r') as f: + values['include_footer'] = f.read() content = template.render(values) with open(os.path.join(path, 'Dockerfile'), 'w') as f: f.write(content)