From cbd42ca6e90cca2ff4b84f5e4e46224e6455e8b2 Mon Sep 17 00:00:00 2001 From: Sam Yaple Date: Fri, 28 Aug 2015 12:16:53 +0000 Subject: Move docker_templates to docker dir Updated build.py to reflect this change. Deprecate --template option and make it a noop. Change-Id: I7cd98d1ee684a4c64984a49597159868152683b2 Partially-Implements: blueprint remove-docker-dir --- README.rst | 3 +- docker/base/Dockerfile.j2 | 236 +++++++++++++++++++++ docker/base/kolla-common.sh | 22 ++ docker/base/mariadb.yum.repo | 5 + docker/base/sources.list | 22 ++ docker/ceilometer/ceilometer-alarm/Dockerfile.j2 | 18 ++ .../ceilometer/ceilometer-alarm/config-external.sh | 10 + docker/ceilometer/ceilometer-alarm/start.sh | 14 ++ docker/ceilometer/ceilometer-api/Dockerfile.j2 | 18 ++ .../ceilometer/ceilometer-api/config-external.sh | 10 + docker/ceilometer/ceilometer-api/start.sh | 21 ++ docker/ceilometer/ceilometer-base/Dockerfile.j2 | 21 ++ docker/ceilometer/ceilometer-central/Dockerfile.j2 | 18 ++ .../ceilometer-central/config-external.sh | 10 + docker/ceilometer/ceilometer-central/start.sh | 14 ++ .../ceilometer/ceilometer-collector/Dockerfile.j2 | 18 ++ .../ceilometer-collector/config-external.sh | 10 + docker/ceilometer/ceilometer-collector/start.sh | 14 ++ docker/ceilometer/ceilometer-compute/Dockerfile.j2 | 20 ++ .../ceilometer-compute/config-external.sh | 10 + docker/ceilometer/ceilometer-compute/start.sh | 14 ++ .../ceilometer-notification/Dockerfile.j2 | 18 ++ .../ceilometer-notification/config-external.sh | 10 + docker/ceilometer/ceilometer-notification/start.sh | 14 ++ docker/cinder/cinder-api/Dockerfile.j2 | 18 ++ docker/cinder/cinder-api/config-external.sh | 10 + docker/cinder/cinder-api/start.sh | 21 ++ docker/cinder/cinder-backup/Dockerfile.j2 | 9 + docker/cinder/cinder-backup/config-external.sh | 10 + docker/cinder/cinder-backup/start.sh | 14 ++ docker/cinder/cinder-base/Dockerfile.j2 | 49 +++++ docker/cinder/cinder-scheduler/Dockerfile.j2 | 9 + docker/cinder/cinder-scheduler/config-external.sh | 10 + docker/cinder/cinder-scheduler/start.sh | 14 ++ docker/cinder/cinder-volume/Dockerfile.j2 | 19 ++ docker/cinder/cinder-volume/config-external.sh | 10 + docker/cinder/cinder-volume/start.sh | 14 ++ docker/data/Dockerfile.j2 | 6 + docker/designate/designate-api/Dockerfile.j2 | 19 ++ docker/designate/designate-api/config-external.sh | 10 + docker/designate/designate-api/start.sh | 20 ++ .../designate-backend-bind9/Dockerfile.j2 | 19 ++ .../designate-backend-bind9/config-external.sh | 10 + docker/designate/designate-backend-bind9/start.sh | 13 ++ docker/designate/designate-base/Dockerfile.j2 | 37 ++++ docker/designate/designate-central/Dockerfile.j2 | 19 ++ .../designate/designate-central/config-external.sh | 10 + docker/designate/designate-central/start.sh | 13 ++ docker/designate/designate-mdns/Dockerfile.j2 | 18 ++ docker/designate/designate-mdns/config-external.sh | 10 + docker/designate/designate-mdns/start.sh | 13 ++ .../designate/designate-poolmanager/Dockerfile.j2 | 21 ++ .../designate-poolmanager/config-external.sh | 10 + docker/designate/designate-poolmanager/start.sh | 13 ++ docker/designate/designate-sink/Dockerfile.j2 | 20 ++ docker/designate/designate-sink/config-external.sh | 10 + docker/designate/designate-sink/start.sh | 13 ++ docker/galera/Dockerfile.j2 | 42 ++++ docker/galera/config-external.sh | 11 + docker/galera/config-galera.sh | 37 ++++ docker/galera/start.sh | 25 +++ docker/glance/glance-api/Dockerfile.j2 | 9 + docker/glance/glance-api/config-external.sh | 10 + docker/glance/glance-api/start.sh | 20 ++ docker/glance/glance-base/Dockerfile.j2 | 28 +++ docker/glance/glance-registry/Dockerfile.j2 | 9 + docker/glance/glance-registry/config-external.sh | 10 + docker/glance/glance-registry/start.sh | 13 ++ docker/gnocchi/gnocchi-api/Dockerfile.j2 | 21 ++ docker/gnocchi/gnocchi-api/config-external.sh | 10 + docker/gnocchi/gnocchi-api/start.sh | 21 ++ docker/gnocchi/gnocchi-base/Dockerfile.j2 | 25 +++ docker/gnocchi/gnocchi-statsd/Dockerfile.j2 | 18 ++ docker/gnocchi/gnocchi-statsd/config-external.sh | 10 + docker/gnocchi/gnocchi-statsd/start.sh | 14 ++ docker/haproxy/Dockerfile.j2 | 27 +++ docker/haproxy/config-external.sh | 10 + docker/haproxy/ensure_latest_config.sh | 12 ++ docker/haproxy/start.sh | 20 ++ docker/heat/heat-api-cfn/Dockerfile.j2 | 25 +++ docker/heat/heat-api-cfn/config-external.sh | 10 + docker/heat/heat-api-cfn/start.sh | 13 ++ docker/heat/heat-api/Dockerfile.j2 | 25 +++ docker/heat/heat-api/config-external.sh | 10 + docker/heat/heat-api/start.sh | 13 ++ docker/heat/heat-base/Dockerfile.j2 | 27 +++ docker/heat/heat-engine/Dockerfile.j2 | 28 +++ docker/heat/heat-engine/config-external.sh | 10 + docker/heat/heat-engine/start.sh | 20 ++ docker/horizon/Dockerfile.j2 | 58 +++++ docker/horizon/config-external.sh | 25 +++ docker/horizon/start.sh | 23 ++ docker/ironic/ironic-api/Dockerfile.j2 | 19 ++ docker/ironic/ironic-api/config-external.sh | 11 + docker/ironic/ironic-api/start.sh | 10 + docker/ironic/ironic-base/Dockerfile.j2 | 33 +++ docker/ironic/ironic-conductor/Dockerfile.j2 | 19 ++ docker/ironic/ironic-conductor/config-external.sh | 11 + docker/ironic/ironic-conductor/start.sh | 10 + docker/ironic/ironic-discoverd/Dockerfile.j2 | 19 ++ docker/ironic/ironic-discoverd/config-external.sh | 11 + docker/ironic/ironic-discoverd/start.sh | 10 + docker/keepalived/Dockerfile.j2 | 26 +++ docker/keepalived/check_alive.sh | 6 + docker/keepalived/config-external.sh | 10 + docker/keepalived/start.sh | 20 ++ docker/keystone/Dockerfile.j2 | 71 +++++++ docker/keystone/config-external.sh | 25 +++ docker/keystone/start.sh | 48 +++++ docker/kolla-ansible/Dockerfile.j2 | 38 ++++ docker/kolla-ansible/kolla_keystone_service.py | 84 ++++++++ docker/kolla-ansible/kolla_keystone_user.py | 83 ++++++++ docker/magnum/magnum-api/Dockerfile.j2 | 19 ++ docker/magnum/magnum-api/config-external.sh | 10 + docker/magnum/magnum-api/start.sh | 20 ++ docker/magnum/magnum-base/Dockerfile.j2 | 29 +++ docker/magnum/magnum-conductor/Dockerfile.j2 | 23 ++ docker/magnum/magnum-conductor/config-external.sh | 10 + docker/magnum/magnum-conductor/start.sh | 14 ++ docker/memcached/Dockerfile.j2 | 21 ++ docker/memcached/config-external.sh | 10 + docker/memcached/start.sh | 16 ++ docker/mongodb/Dockerfile.j2 | 25 +++ docker/murano/murano-api/Dockerfile.j2 | 9 + docker/murano/murano-api/config-external.sh | 10 + docker/murano/murano-api/start.sh | 20 ++ docker/murano/murano-base/Dockerfile.j2 | 19 ++ docker/murano/murano-engine/Dockerfile.j2 | 9 + docker/murano/murano-engine/config-external.sh | 10 + docker/murano/murano-engine/start.sh | 13 ++ docker/neutron/neutron-agents/Dockerfile.j2 | 35 +++ docker/neutron/neutron-agents/fwaas_driver.ini | 1 + .../neutron-dhcp-agent/config-external.sh | 13 ++ .../neutron-agents/neutron-dhcp-agent/start.sh | 37 ++++ .../neutron-l3-agent/config-external.sh | 23 ++ .../neutron-l3-agent/fwaas_driver.ini | 3 + .../neutron-agents/neutron-l3-agent/start.sh | 37 ++++ .../neutron-metadata-agent/config-external.sh | 13 ++ .../neutron-agents/neutron-metadata-agent/start.sh | 37 ++++ docker/neutron/neutron-agents/supervisord.conf | 40 ++++ docker/neutron/neutron-base/Dockerfile.j2 | 47 ++++ docker/neutron/neutron-base/config-sudoers.sh | 12 ++ docker/neutron/neutron-base/ip_wrapper.py | 66 ++++++ .../neutron-linuxbridge-agent/Dockerfile.j2 | 28 +++ .../neutron-linuxbridge-agent/config-external.sh | 20 ++ docker/neutron/neutron-linuxbridge-agent/start.sh | 14 ++ .../neutron-openvswitch-agent/Dockerfile.j2 | 32 +++ .../neutron-openvswitch-agent/config-external.sh | 20 ++ docker/neutron/neutron-openvswitch-agent/start.sh | 14 ++ docker/neutron/neutron-server/Dockerfile.j2 | 31 +++ docker/neutron/neutron-server/config-external.sh | 20 ++ docker/neutron/neutron-server/start.sh | 20 ++ docker/nova/nova-api/Dockerfile.j2 | 18 ++ docker/nova/nova-api/config-external.sh | 10 + docker/nova/nova-api/start.sh | 20 ++ docker/nova/nova-base/Dockerfile.j2 | 50 +++++ docker/nova/nova-compute/Dockerfile.j2 | 34 +++ docker/nova/nova-compute/config-external.sh | 10 + docker/nova/nova-compute/start.sh | 13 ++ docker/nova/nova-conductor/Dockerfile.j2 | 19 ++ docker/nova/nova-conductor/config-external.sh | 10 + docker/nova/nova-conductor/start.sh | 13 ++ docker/nova/nova-consoleauth/Dockerfile.j2 | 18 ++ docker/nova/nova-consoleauth/config-external.sh | 10 + docker/nova/nova-consoleauth/start.sh | 13 ++ docker/nova/nova-libvirt/Dockerfile.j2 | 32 +++ docker/nova/nova-libvirt/config-external.sh | 10 + docker/nova/nova-libvirt/start.sh | 20 ++ docker/nova/nova-network/Dockerfile.j2 | 28 +++ docker/nova/nova-network/config-external.sh | 10 + docker/nova/nova-network/start.sh | 13 ++ docker/nova/nova-novncproxy/Dockerfile.j2 | 34 +++ docker/nova/nova-novncproxy/config-external.sh | 10 + docker/nova/nova-novncproxy/start.sh | 13 ++ docker/nova/nova-scheduler/Dockerfile.j2 | 18 ++ docker/nova/nova-scheduler/config-external.sh | 10 + docker/nova/nova-scheduler/start.sh | 13 ++ docker/openvswitch/ovs-base/Dockerfile.j2 | 22 ++ docker/openvswitch/ovs-db-server/Dockerfile.j2 | 9 + .../openvswitch/ovs-db-server/config-external.sh | 3 + docker/openvswitch/ovs-db-server/start.sh | 25 +++ docker/openvswitch/ovs-vswitchd/Dockerfile.j2 | 9 + docker/openvswitch/ovs-vswitchd/config-external.sh | 3 + .../ovs-vswitchd/ovs_ensure_configured.sh | 17 ++ docker/openvswitch/ovs-vswitchd/start.sh | 19 ++ docker/rabbitmq/Dockerfile.j2 | 27 +++ docker/rabbitmq/config-external.sh | 19 ++ docker/rabbitmq/config-rabbit.sh | 7 + docker/rabbitmq/start.sh | 23 ++ docker/swift/swift-account-server/Dockerfile.j2 | 19 ++ .../swift/swift-account-server/config-external.sh | 19 ++ docker/swift/swift-account-server/start.sh | 16 ++ docker/swift/swift-base/Dockerfile.j2 | 29 +++ docker/swift/swift-base/build-swift-ring.py | 93 ++++++++ docker/swift/swift-base/config-swift.sh | 3 + docker/swift/swift-container-server/Dockerfile.j2 | 19 ++ .../swift-container-server/config-external.sh | 21 ++ docker/swift/swift-container-server/start.sh | 16 ++ docker/swift/swift-object-auditor/Dockerfile.j2 | 9 + .../swift/swift-object-auditor/config-external.sh | 18 ++ docker/swift/swift-object-auditor/start.sh | 16 ++ docker/swift/swift-object-base/Dockerfile.j2 | 14 ++ .../swift/swift-object-base/config-swift-object.sh | 72 +++++++ docker/swift/swift-object-expirer/Dockerfile.j2 | 20 ++ .../swift/swift-object-expirer/config-external.sh | 18 ++ docker/swift/swift-object-expirer/start.sh | 16 ++ docker/swift/swift-object-replicator/Dockerfile.j2 | 9 + .../swift-object-replicator/config-external.sh | 18 ++ docker/swift/swift-object-replicator/start.sh | 16 ++ docker/swift/swift-object-server/Dockerfile.j2 | 9 + .../swift/swift-object-server/config-external.sh | 27 +++ docker/swift/swift-object-server/start.sh | 16 ++ docker/swift/swift-object-updater/Dockerfile.j2 | 9 + .../swift/swift-object-updater/config-external.sh | 18 ++ docker/swift/swift-object-updater/start.sh | 16 ++ docker/swift/swift-proxy-server/Dockerfile.j2 | 16 ++ docker/swift/swift-proxy-server/config-external.sh | 33 +++ docker/swift/swift-proxy-server/start.sh | 16 ++ docker/zaqar/Dockerfile.j2 | 32 +++ docker/zaqar/config-external.sh | 10 + docker/zaqar/start.sh | 21 ++ docker_templates/base/Dockerfile.j2 | 236 --------------------- docker_templates/base/kolla-common.sh | 22 -- docker_templates/base/mariadb.yum.repo | 5 - docker_templates/base/sources.list | 22 -- .../ceilometer/ceilometer-alarm/Dockerfile.j2 | 18 -- .../ceilometer/ceilometer-alarm/config-external.sh | 10 - .../ceilometer/ceilometer-alarm/start.sh | 14 -- .../ceilometer/ceilometer-api/Dockerfile.j2 | 18 -- .../ceilometer/ceilometer-api/config-external.sh | 10 - .../ceilometer/ceilometer-api/start.sh | 21 -- .../ceilometer/ceilometer-base/Dockerfile.j2 | 21 -- .../ceilometer/ceilometer-central/Dockerfile.j2 | 18 -- .../ceilometer-central/config-external.sh | 10 - .../ceilometer/ceilometer-central/start.sh | 14 -- .../ceilometer/ceilometer-collector/Dockerfile.j2 | 18 -- .../ceilometer-collector/config-external.sh | 10 - .../ceilometer/ceilometer-collector/start.sh | 14 -- .../ceilometer/ceilometer-compute/Dockerfile.j2 | 20 -- .../ceilometer-compute/config-external.sh | 10 - .../ceilometer/ceilometer-compute/start.sh | 14 -- .../ceilometer-notification/Dockerfile.j2 | 18 -- .../ceilometer-notification/config-external.sh | 10 - .../ceilometer/ceilometer-notification/start.sh | 14 -- docker_templates/cinder/cinder-api/Dockerfile.j2 | 18 -- .../cinder/cinder-api/config-external.sh | 10 - docker_templates/cinder/cinder-api/start.sh | 21 -- .../cinder/cinder-backup/Dockerfile.j2 | 9 - .../cinder/cinder-backup/config-external.sh | 10 - docker_templates/cinder/cinder-backup/start.sh | 14 -- docker_templates/cinder/cinder-base/Dockerfile.j2 | 49 ----- .../cinder/cinder-scheduler/Dockerfile.j2 | 9 - .../cinder/cinder-scheduler/config-external.sh | 10 - docker_templates/cinder/cinder-scheduler/start.sh | 14 -- .../cinder/cinder-volume/Dockerfile.j2 | 19 -- .../cinder/cinder-volume/config-external.sh | 10 - docker_templates/cinder/cinder-volume/start.sh | 14 -- docker_templates/data/Dockerfile.j2 | 6 - .../designate/designate-api/Dockerfile.j2 | 19 -- .../designate/designate-api/config-external.sh | 10 - docker_templates/designate/designate-api/start.sh | 20 -- .../designate-backend-bind9/Dockerfile.j2 | 19 -- .../designate-backend-bind9/config-external.sh | 10 - .../designate/designate-backend-bind9/start.sh | 13 -- .../designate/designate-base/Dockerfile.j2 | 37 ---- .../designate/designate-central/Dockerfile.j2 | 19 -- .../designate/designate-central/config-external.sh | 10 - .../designate/designate-central/start.sh | 13 -- .../designate/designate-mdns/Dockerfile.j2 | 18 -- .../designate/designate-mdns/config-external.sh | 10 - docker_templates/designate/designate-mdns/start.sh | 13 -- .../designate/designate-poolmanager/Dockerfile.j2 | 21 -- .../designate-poolmanager/config-external.sh | 10 - .../designate/designate-poolmanager/start.sh | 13 -- .../designate/designate-sink/Dockerfile.j2 | 20 -- .../designate/designate-sink/config-external.sh | 10 - docker_templates/designate/designate-sink/start.sh | 13 -- docker_templates/galera/Dockerfile.j2 | 42 ---- docker_templates/galera/config-external.sh | 11 - docker_templates/galera/config-galera.sh | 37 ---- docker_templates/galera/start.sh | 25 --- docker_templates/glance/glance-api/Dockerfile.j2 | 9 - .../glance/glance-api/config-external.sh | 10 - docker_templates/glance/glance-api/start.sh | 20 -- docker_templates/glance/glance-base/Dockerfile.j2 | 28 --- .../glance/glance-registry/Dockerfile.j2 | 9 - .../glance/glance-registry/config-external.sh | 10 - docker_templates/glance/glance-registry/start.sh | 13 -- docker_templates/gnocchi/gnocchi-api/Dockerfile.j2 | 21 -- .../gnocchi/gnocchi-api/config-external.sh | 10 - docker_templates/gnocchi/gnocchi-api/start.sh | 21 -- .../gnocchi/gnocchi-base/Dockerfile.j2 | 25 --- .../gnocchi/gnocchi-statsd/Dockerfile.j2 | 18 -- .../gnocchi/gnocchi-statsd/config-external.sh | 10 - docker_templates/gnocchi/gnocchi-statsd/start.sh | 14 -- docker_templates/haproxy/Dockerfile.j2 | 27 --- docker_templates/haproxy/config-external.sh | 10 - docker_templates/haproxy/ensure_latest_config.sh | 12 -- docker_templates/haproxy/start.sh | 20 -- docker_templates/heat/heat-api-cfn/Dockerfile.j2 | 25 --- .../heat/heat-api-cfn/config-external.sh | 10 - docker_templates/heat/heat-api-cfn/start.sh | 13 -- docker_templates/heat/heat-api/Dockerfile.j2 | 25 --- docker_templates/heat/heat-api/config-external.sh | 10 - docker_templates/heat/heat-api/start.sh | 13 -- docker_templates/heat/heat-base/Dockerfile.j2 | 27 --- docker_templates/heat/heat-engine/Dockerfile.j2 | 28 --- .../heat/heat-engine/config-external.sh | 10 - docker_templates/heat/heat-engine/start.sh | 20 -- docker_templates/horizon/Dockerfile.j2 | 58 ----- docker_templates/horizon/config-external.sh | 25 --- docker_templates/horizon/start.sh | 23 -- docker_templates/ironic/ironic-api/Dockerfile.j2 | 19 -- .../ironic/ironic-api/config-external.sh | 11 - docker_templates/ironic/ironic-api/start.sh | 10 - docker_templates/ironic/ironic-base/Dockerfile.j2 | 33 --- .../ironic/ironic-conductor/Dockerfile.j2 | 19 -- .../ironic/ironic-conductor/config-external.sh | 11 - docker_templates/ironic/ironic-conductor/start.sh | 10 - .../ironic/ironic-discoverd/Dockerfile.j2 | 19 -- .../ironic/ironic-discoverd/config-external.sh | 11 - docker_templates/ironic/ironic-discoverd/start.sh | 10 - docker_templates/keepalived/Dockerfile.j2 | 26 --- docker_templates/keepalived/check_alive.sh | 6 - docker_templates/keepalived/config-external.sh | 10 - docker_templates/keepalived/start.sh | 20 -- docker_templates/keystone/Dockerfile.j2 | 71 ------- docker_templates/keystone/config-external.sh | 25 --- docker_templates/keystone/start.sh | 48 ----- docker_templates/kolla-ansible/Dockerfile.j2 | 38 ---- .../kolla-ansible/kolla_keystone_service.py | 84 -------- .../kolla-ansible/kolla_keystone_user.py | 83 -------- docker_templates/magnum/magnum-api/Dockerfile.j2 | 19 -- .../magnum/magnum-api/config-external.sh | 10 - docker_templates/magnum/magnum-api/start.sh | 20 -- docker_templates/magnum/magnum-base/Dockerfile.j2 | 29 --- .../magnum/magnum-conductor/Dockerfile.j2 | 23 -- .../magnum/magnum-conductor/config-external.sh | 10 - docker_templates/magnum/magnum-conductor/start.sh | 14 -- docker_templates/memcached/Dockerfile.j2 | 21 -- docker_templates/memcached/config-external.sh | 10 - docker_templates/memcached/start.sh | 16 -- docker_templates/mongodb/Dockerfile.j2 | 25 --- docker_templates/murano/murano-api/Dockerfile.j2 | 9 - .../murano/murano-api/config-external.sh | 10 - docker_templates/murano/murano-api/start.sh | 20 -- docker_templates/murano/murano-base/Dockerfile.j2 | 19 -- .../murano/murano-engine/Dockerfile.j2 | 9 - .../murano/murano-engine/config-external.sh | 10 - docker_templates/murano/murano-engine/start.sh | 13 -- .../neutron/neutron-agents/Dockerfile.j2 | 35 --- .../neutron/neutron-agents/fwaas_driver.ini | 1 - .../neutron-dhcp-agent/config-external.sh | 13 -- .../neutron-agents/neutron-dhcp-agent/start.sh | 37 ---- .../neutron-l3-agent/config-external.sh | 23 -- .../neutron-l3-agent/fwaas_driver.ini | 3 - .../neutron-agents/neutron-l3-agent/start.sh | 37 ---- .../neutron-metadata-agent/config-external.sh | 13 -- .../neutron-agents/neutron-metadata-agent/start.sh | 37 ---- .../neutron/neutron-agents/supervisord.conf | 40 ---- .../neutron/neutron-base/Dockerfile.j2 | 47 ---- .../neutron/neutron-base/config-sudoers.sh | 12 -- .../neutron/neutron-base/ip_wrapper.py | 66 ------ .../neutron-linuxbridge-agent/Dockerfile.j2 | 28 --- .../neutron-linuxbridge-agent/config-external.sh | 20 -- .../neutron/neutron-linuxbridge-agent/start.sh | 14 -- .../neutron-openvswitch-agent/Dockerfile.j2 | 32 --- .../neutron-openvswitch-agent/config-external.sh | 20 -- .../neutron/neutron-openvswitch-agent/start.sh | 14 -- .../neutron/neutron-server/Dockerfile.j2 | 31 --- .../neutron/neutron-server/config-external.sh | 20 -- docker_templates/neutron/neutron-server/start.sh | 20 -- docker_templates/nova/nova-api/Dockerfile.j2 | 18 -- docker_templates/nova/nova-api/config-external.sh | 10 - docker_templates/nova/nova-api/start.sh | 20 -- docker_templates/nova/nova-base/Dockerfile.j2 | 50 ----- docker_templates/nova/nova-compute/Dockerfile.j2 | 34 --- .../nova/nova-compute/config-external.sh | 10 - docker_templates/nova/nova-compute/start.sh | 13 -- docker_templates/nova/nova-conductor/Dockerfile.j2 | 19 -- .../nova/nova-conductor/config-external.sh | 10 - docker_templates/nova/nova-conductor/start.sh | 13 -- .../nova/nova-consoleauth/Dockerfile.j2 | 18 -- .../nova/nova-consoleauth/config-external.sh | 10 - docker_templates/nova/nova-consoleauth/start.sh | 13 -- docker_templates/nova/nova-libvirt/Dockerfile.j2 | 32 --- .../nova/nova-libvirt/config-external.sh | 10 - docker_templates/nova/nova-libvirt/start.sh | 20 -- docker_templates/nova/nova-network/Dockerfile.j2 | 28 --- .../nova/nova-network/config-external.sh | 10 - docker_templates/nova/nova-network/start.sh | 13 -- .../nova/nova-novncproxy/Dockerfile.j2 | 34 --- .../nova/nova-novncproxy/config-external.sh | 10 - docker_templates/nova/nova-novncproxy/start.sh | 13 -- docker_templates/nova/nova-scheduler/Dockerfile.j2 | 18 -- .../nova/nova-scheduler/config-external.sh | 10 - docker_templates/nova/nova-scheduler/start.sh | 13 -- .../openvswitch/ovs-base/Dockerfile.j2 | 22 -- .../openvswitch/ovs-db-server/Dockerfile.j2 | 9 - .../openvswitch/ovs-db-server/config-external.sh | 3 - .../openvswitch/ovs-db-server/start.sh | 25 --- .../openvswitch/ovs-vswitchd/Dockerfile.j2 | 9 - .../openvswitch/ovs-vswitchd/config-external.sh | 3 - .../ovs-vswitchd/ovs_ensure_configured.sh | 17 -- docker_templates/openvswitch/ovs-vswitchd/start.sh | 19 -- docker_templates/rabbitmq/Dockerfile.j2 | 27 --- docker_templates/rabbitmq/config-external.sh | 19 -- docker_templates/rabbitmq/config-rabbit.sh | 7 - docker_templates/rabbitmq/start.sh | 23 -- .../swift/swift-account-server/Dockerfile.j2 | 19 -- .../swift/swift-account-server/config-external.sh | 19 -- .../swift/swift-account-server/start.sh | 16 -- docker_templates/swift/swift-base/Dockerfile.j2 | 29 --- .../swift/swift-base/build-swift-ring.py | 93 -------- docker_templates/swift/swift-base/config-swift.sh | 3 - .../swift/swift-container-server/Dockerfile.j2 | 19 -- .../swift-container-server/config-external.sh | 21 -- .../swift/swift-container-server/start.sh | 16 -- .../swift/swift-object-auditor/Dockerfile.j2 | 9 - .../swift/swift-object-auditor/config-external.sh | 18 -- .../swift/swift-object-auditor/start.sh | 16 -- .../swift/swift-object-base/Dockerfile.j2 | 14 -- .../swift/swift-object-base/config-swift-object.sh | 72 ------- .../swift/swift-object-expirer/Dockerfile.j2 | 20 -- .../swift/swift-object-expirer/config-external.sh | 18 -- .../swift/swift-object-expirer/start.sh | 16 -- .../swift/swift-object-replicator/Dockerfile.j2 | 9 - .../swift-object-replicator/config-external.sh | 18 -- .../swift/swift-object-replicator/start.sh | 16 -- .../swift/swift-object-server/Dockerfile.j2 | 9 - .../swift/swift-object-server/config-external.sh | 27 --- .../swift/swift-object-server/start.sh | 16 -- .../swift/swift-object-updater/Dockerfile.j2 | 9 - .../swift/swift-object-updater/config-external.sh | 18 -- .../swift/swift-object-updater/start.sh | 16 -- .../swift/swift-proxy-server/Dockerfile.j2 | 16 -- .../swift/swift-proxy-server/config-external.sh | 33 --- docker_templates/swift/swift-proxy-server/start.sh | 16 -- docker_templates/zaqar/Dockerfile.j2 | 32 --- docker_templates/zaqar/config-external.sh | 10 - docker_templates/zaqar/start.sh | 21 -- kolla/cmd/build.py | 34 +-- setup.cfg | 1 - tox.ini | 2 +- 444 files changed, 4507 insertions(+), 4527 deletions(-) create mode 100755 docker/base/Dockerfile.j2 create mode 100644 docker/base/kolla-common.sh create mode 100644 docker/base/mariadb.yum.repo create mode 100644 docker/base/sources.list create mode 100644 docker/ceilometer/ceilometer-alarm/Dockerfile.j2 create mode 100644 docker/ceilometer/ceilometer-alarm/config-external.sh create mode 100755 docker/ceilometer/ceilometer-alarm/start.sh create mode 100644 docker/ceilometer/ceilometer-api/Dockerfile.j2 create mode 100644 docker/ceilometer/ceilometer-api/config-external.sh create mode 100755 docker/ceilometer/ceilometer-api/start.sh create mode 100644 docker/ceilometer/ceilometer-base/Dockerfile.j2 create mode 100644 docker/ceilometer/ceilometer-central/Dockerfile.j2 create mode 100644 docker/ceilometer/ceilometer-central/config-external.sh create mode 100755 docker/ceilometer/ceilometer-central/start.sh create mode 100644 docker/ceilometer/ceilometer-collector/Dockerfile.j2 create mode 100644 docker/ceilometer/ceilometer-collector/config-external.sh create mode 100755 docker/ceilometer/ceilometer-collector/start.sh create mode 100644 docker/ceilometer/ceilometer-compute/Dockerfile.j2 create mode 100644 docker/ceilometer/ceilometer-compute/config-external.sh create mode 100755 docker/ceilometer/ceilometer-compute/start.sh create mode 100644 docker/ceilometer/ceilometer-notification/Dockerfile.j2 create mode 100644 docker/ceilometer/ceilometer-notification/config-external.sh create mode 100755 docker/ceilometer/ceilometer-notification/start.sh create mode 100644 docker/cinder/cinder-api/Dockerfile.j2 create mode 100644 docker/cinder/cinder-api/config-external.sh create mode 100755 docker/cinder/cinder-api/start.sh create mode 100644 docker/cinder/cinder-backup/Dockerfile.j2 create mode 100644 docker/cinder/cinder-backup/config-external.sh create mode 100755 docker/cinder/cinder-backup/start.sh create mode 100644 docker/cinder/cinder-base/Dockerfile.j2 create mode 100644 docker/cinder/cinder-scheduler/Dockerfile.j2 create mode 100644 docker/cinder/cinder-scheduler/config-external.sh create mode 100755 docker/cinder/cinder-scheduler/start.sh create mode 100644 docker/cinder/cinder-volume/Dockerfile.j2 create mode 100755 docker/cinder/cinder-volume/config-external.sh create mode 100755 docker/cinder/cinder-volume/start.sh create mode 100644 docker/data/Dockerfile.j2 create mode 100644 docker/designate/designate-api/Dockerfile.j2 create mode 100644 docker/designate/designate-api/config-external.sh create mode 100755 docker/designate/designate-api/start.sh create mode 100644 docker/designate/designate-backend-bind9/Dockerfile.j2 create mode 100644 docker/designate/designate-backend-bind9/config-external.sh create mode 100755 docker/designate/designate-backend-bind9/start.sh create mode 100644 docker/designate/designate-base/Dockerfile.j2 create mode 100644 docker/designate/designate-central/Dockerfile.j2 create mode 100644 docker/designate/designate-central/config-external.sh create mode 100755 docker/designate/designate-central/start.sh create mode 100644 docker/designate/designate-mdns/Dockerfile.j2 create mode 100644 docker/designate/designate-mdns/config-external.sh create mode 100755 docker/designate/designate-mdns/start.sh create mode 100644 docker/designate/designate-poolmanager/Dockerfile.j2 create mode 100644 docker/designate/designate-poolmanager/config-external.sh create mode 100755 docker/designate/designate-poolmanager/start.sh create mode 100644 docker/designate/designate-sink/Dockerfile.j2 create mode 100644 docker/designate/designate-sink/config-external.sh create mode 100755 docker/designate/designate-sink/start.sh create mode 100644 docker/galera/Dockerfile.j2 create mode 100644 docker/galera/config-external.sh create mode 100755 docker/galera/config-galera.sh create mode 100755 docker/galera/start.sh create mode 100644 docker/glance/glance-api/Dockerfile.j2 create mode 100755 docker/glance/glance-api/config-external.sh create mode 100755 docker/glance/glance-api/start.sh create mode 100644 docker/glance/glance-base/Dockerfile.j2 create mode 100644 docker/glance/glance-registry/Dockerfile.j2 create mode 100755 docker/glance/glance-registry/config-external.sh create mode 100755 docker/glance/glance-registry/start.sh create mode 100644 docker/gnocchi/gnocchi-api/Dockerfile.j2 create mode 100644 docker/gnocchi/gnocchi-api/config-external.sh create mode 100755 docker/gnocchi/gnocchi-api/start.sh create mode 100644 docker/gnocchi/gnocchi-base/Dockerfile.j2 create mode 100644 docker/gnocchi/gnocchi-statsd/Dockerfile.j2 create mode 100644 docker/gnocchi/gnocchi-statsd/config-external.sh create mode 100755 docker/gnocchi/gnocchi-statsd/start.sh create mode 100755 docker/haproxy/Dockerfile.j2 create mode 100644 docker/haproxy/config-external.sh create mode 100755 docker/haproxy/ensure_latest_config.sh create mode 100755 docker/haproxy/start.sh create mode 100644 docker/heat/heat-api-cfn/Dockerfile.j2 create mode 100644 docker/heat/heat-api-cfn/config-external.sh create mode 100755 docker/heat/heat-api-cfn/start.sh create mode 100644 docker/heat/heat-api/Dockerfile.j2 create mode 100644 docker/heat/heat-api/config-external.sh create mode 100755 docker/heat/heat-api/start.sh create mode 100644 docker/heat/heat-base/Dockerfile.j2 create mode 100644 docker/heat/heat-engine/Dockerfile.j2 create mode 100644 docker/heat/heat-engine/config-external.sh create mode 100755 docker/heat/heat-engine/start.sh create mode 100644 docker/horizon/Dockerfile.j2 create mode 100644 docker/horizon/config-external.sh create mode 100755 docker/horizon/start.sh create mode 100644 docker/ironic/ironic-api/Dockerfile.j2 create mode 100644 docker/ironic/ironic-api/config-external.sh create mode 100755 docker/ironic/ironic-api/start.sh create mode 100644 docker/ironic/ironic-base/Dockerfile.j2 create mode 100644 docker/ironic/ironic-conductor/Dockerfile.j2 create mode 100644 docker/ironic/ironic-conductor/config-external.sh create mode 100755 docker/ironic/ironic-conductor/start.sh create mode 100644 docker/ironic/ironic-discoverd/Dockerfile.j2 create mode 100644 docker/ironic/ironic-discoverd/config-external.sh create mode 100755 docker/ironic/ironic-discoverd/start.sh create mode 100644 docker/keepalived/Dockerfile.j2 create mode 100755 docker/keepalived/check_alive.sh create mode 100755 docker/keepalived/config-external.sh create mode 100755 docker/keepalived/start.sh create mode 100644 docker/keystone/Dockerfile.j2 create mode 100644 docker/keystone/config-external.sh create mode 100755 docker/keystone/start.sh create mode 100644 docker/kolla-ansible/Dockerfile.j2 create mode 100644 docker/kolla-ansible/kolla_keystone_service.py create mode 100644 docker/kolla-ansible/kolla_keystone_user.py create mode 100644 docker/magnum/magnum-api/Dockerfile.j2 create mode 100644 docker/magnum/magnum-api/config-external.sh create mode 100755 docker/magnum/magnum-api/start.sh create mode 100644 docker/magnum/magnum-base/Dockerfile.j2 create mode 100644 docker/magnum/magnum-conductor/Dockerfile.j2 create mode 100644 docker/magnum/magnum-conductor/config-external.sh create mode 100755 docker/magnum/magnum-conductor/start.sh create mode 100644 docker/memcached/Dockerfile.j2 create mode 100644 docker/memcached/config-external.sh create mode 100755 docker/memcached/start.sh create mode 100644 docker/mongodb/Dockerfile.j2 create mode 100644 docker/murano/murano-api/Dockerfile.j2 create mode 100644 docker/murano/murano-api/config-external.sh create mode 100755 docker/murano/murano-api/start.sh create mode 100644 docker/murano/murano-base/Dockerfile.j2 create mode 100644 docker/murano/murano-engine/Dockerfile.j2 create mode 100644 docker/murano/murano-engine/config-external.sh create mode 100755 docker/murano/murano-engine/start.sh create mode 100644 docker/neutron/neutron-agents/Dockerfile.j2 create mode 120000 docker/neutron/neutron-agents/fwaas_driver.ini create mode 100755 docker/neutron/neutron-agents/neutron-dhcp-agent/config-external.sh create mode 100755 docker/neutron/neutron-agents/neutron-dhcp-agent/start.sh create mode 100755 docker/neutron/neutron-agents/neutron-l3-agent/config-external.sh create mode 100644 docker/neutron/neutron-agents/neutron-l3-agent/fwaas_driver.ini create mode 100755 docker/neutron/neutron-agents/neutron-l3-agent/start.sh create mode 100755 docker/neutron/neutron-agents/neutron-metadata-agent/config-external.sh create mode 100755 docker/neutron/neutron-agents/neutron-metadata-agent/start.sh create mode 100644 docker/neutron/neutron-agents/supervisord.conf create mode 100644 docker/neutron/neutron-base/Dockerfile.j2 create mode 100644 docker/neutron/neutron-base/config-sudoers.sh create mode 100755 docker/neutron/neutron-base/ip_wrapper.py create mode 100644 docker/neutron/neutron-linuxbridge-agent/Dockerfile.j2 create mode 100755 docker/neutron/neutron-linuxbridge-agent/config-external.sh create mode 100755 docker/neutron/neutron-linuxbridge-agent/start.sh create mode 100644 docker/neutron/neutron-openvswitch-agent/Dockerfile.j2 create mode 100755 docker/neutron/neutron-openvswitch-agent/config-external.sh create mode 100755 docker/neutron/neutron-openvswitch-agent/start.sh create mode 100644 docker/neutron/neutron-server/Dockerfile.j2 create mode 100755 docker/neutron/neutron-server/config-external.sh create mode 100755 docker/neutron/neutron-server/start.sh create mode 100644 docker/nova/nova-api/Dockerfile.j2 create mode 100755 docker/nova/nova-api/config-external.sh create mode 100755 docker/nova/nova-api/start.sh create mode 100644 docker/nova/nova-base/Dockerfile.j2 create mode 100644 docker/nova/nova-compute/Dockerfile.j2 create mode 100755 docker/nova/nova-compute/config-external.sh create mode 100755 docker/nova/nova-compute/start.sh create mode 100644 docker/nova/nova-conductor/Dockerfile.j2 create mode 100755 docker/nova/nova-conductor/config-external.sh create mode 100755 docker/nova/nova-conductor/start.sh create mode 100644 docker/nova/nova-consoleauth/Dockerfile.j2 create mode 100755 docker/nova/nova-consoleauth/config-external.sh create mode 100755 docker/nova/nova-consoleauth/start.sh create mode 100644 docker/nova/nova-libvirt/Dockerfile.j2 create mode 100755 docker/nova/nova-libvirt/config-external.sh create mode 100755 docker/nova/nova-libvirt/start.sh create mode 100644 docker/nova/nova-network/Dockerfile.j2 create mode 100755 docker/nova/nova-network/config-external.sh create mode 100755 docker/nova/nova-network/start.sh create mode 100644 docker/nova/nova-novncproxy/Dockerfile.j2 create mode 100755 docker/nova/nova-novncproxy/config-external.sh create mode 100755 docker/nova/nova-novncproxy/start.sh create mode 100644 docker/nova/nova-scheduler/Dockerfile.j2 create mode 100755 docker/nova/nova-scheduler/config-external.sh create mode 100755 docker/nova/nova-scheduler/start.sh create mode 100644 docker/openvswitch/ovs-base/Dockerfile.j2 create mode 100644 docker/openvswitch/ovs-db-server/Dockerfile.j2 create mode 100644 docker/openvswitch/ovs-db-server/config-external.sh create mode 100755 docker/openvswitch/ovs-db-server/start.sh create mode 100644 docker/openvswitch/ovs-vswitchd/Dockerfile.j2 create mode 100644 docker/openvswitch/ovs-vswitchd/config-external.sh create mode 100755 docker/openvswitch/ovs-vswitchd/ovs_ensure_configured.sh create mode 100755 docker/openvswitch/ovs-vswitchd/start.sh create mode 100644 docker/rabbitmq/Dockerfile.j2 create mode 100644 docker/rabbitmq/config-external.sh create mode 100644 docker/rabbitmq/config-rabbit.sh create mode 100755 docker/rabbitmq/start.sh create mode 100644 docker/swift/swift-account-server/Dockerfile.j2 create mode 100644 docker/swift/swift-account-server/config-external.sh create mode 100755 docker/swift/swift-account-server/start.sh create mode 100644 docker/swift/swift-base/Dockerfile.j2 create mode 100644 docker/swift/swift-base/build-swift-ring.py create mode 100755 docker/swift/swift-base/config-swift.sh create mode 100644 docker/swift/swift-container-server/Dockerfile.j2 create mode 100644 docker/swift/swift-container-server/config-external.sh create mode 100755 docker/swift/swift-container-server/start.sh create mode 100644 docker/swift/swift-object-auditor/Dockerfile.j2 create mode 100644 docker/swift/swift-object-auditor/config-external.sh create mode 100755 docker/swift/swift-object-auditor/start.sh create mode 100644 docker/swift/swift-object-base/Dockerfile.j2 create mode 100644 docker/swift/swift-object-base/config-swift-object.sh create mode 100644 docker/swift/swift-object-expirer/Dockerfile.j2 create mode 100644 docker/swift/swift-object-expirer/config-external.sh create mode 100755 docker/swift/swift-object-expirer/start.sh create mode 100644 docker/swift/swift-object-replicator/Dockerfile.j2 create mode 100644 docker/swift/swift-object-replicator/config-external.sh create mode 100755 docker/swift/swift-object-replicator/start.sh create mode 100644 docker/swift/swift-object-server/Dockerfile.j2 create mode 100644 docker/swift/swift-object-server/config-external.sh create mode 100755 docker/swift/swift-object-server/start.sh create mode 100644 docker/swift/swift-object-updater/Dockerfile.j2 create mode 100644 docker/swift/swift-object-updater/config-external.sh create mode 100755 docker/swift/swift-object-updater/start.sh create mode 100644 docker/swift/swift-proxy-server/Dockerfile.j2 create mode 100755 docker/swift/swift-proxy-server/config-external.sh create mode 100755 docker/swift/swift-proxy-server/start.sh create mode 100644 docker/zaqar/Dockerfile.j2 create mode 100644 docker/zaqar/config-external.sh create mode 100755 docker/zaqar/start.sh delete mode 100755 docker_templates/base/Dockerfile.j2 delete mode 100644 docker_templates/base/kolla-common.sh delete mode 100644 docker_templates/base/mariadb.yum.repo delete mode 100644 docker_templates/base/sources.list delete mode 100644 docker_templates/ceilometer/ceilometer-alarm/Dockerfile.j2 delete mode 100644 docker_templates/ceilometer/ceilometer-alarm/config-external.sh delete mode 100755 docker_templates/ceilometer/ceilometer-alarm/start.sh delete mode 100644 docker_templates/ceilometer/ceilometer-api/Dockerfile.j2 delete mode 100644 docker_templates/ceilometer/ceilometer-api/config-external.sh delete mode 100755 docker_templates/ceilometer/ceilometer-api/start.sh delete mode 100644 docker_templates/ceilometer/ceilometer-base/Dockerfile.j2 delete mode 100644 docker_templates/ceilometer/ceilometer-central/Dockerfile.j2 delete mode 100644 docker_templates/ceilometer/ceilometer-central/config-external.sh delete mode 100755 docker_templates/ceilometer/ceilometer-central/start.sh delete mode 100644 docker_templates/ceilometer/ceilometer-collector/Dockerfile.j2 delete mode 100644 docker_templates/ceilometer/ceilometer-collector/config-external.sh delete mode 100755 docker_templates/ceilometer/ceilometer-collector/start.sh delete mode 100644 docker_templates/ceilometer/ceilometer-compute/Dockerfile.j2 delete mode 100644 docker_templates/ceilometer/ceilometer-compute/config-external.sh delete mode 100755 docker_templates/ceilometer/ceilometer-compute/start.sh delete mode 100644 docker_templates/ceilometer/ceilometer-notification/Dockerfile.j2 delete mode 100644 docker_templates/ceilometer/ceilometer-notification/config-external.sh delete mode 100755 docker_templates/ceilometer/ceilometer-notification/start.sh delete mode 100644 docker_templates/cinder/cinder-api/Dockerfile.j2 delete mode 100644 docker_templates/cinder/cinder-api/config-external.sh delete mode 100755 docker_templates/cinder/cinder-api/start.sh delete mode 100644 docker_templates/cinder/cinder-backup/Dockerfile.j2 delete mode 100644 docker_templates/cinder/cinder-backup/config-external.sh delete mode 100755 docker_templates/cinder/cinder-backup/start.sh delete mode 100644 docker_templates/cinder/cinder-base/Dockerfile.j2 delete mode 100644 docker_templates/cinder/cinder-scheduler/Dockerfile.j2 delete mode 100644 docker_templates/cinder/cinder-scheduler/config-external.sh delete mode 100755 docker_templates/cinder/cinder-scheduler/start.sh delete mode 100644 docker_templates/cinder/cinder-volume/Dockerfile.j2 delete mode 100755 docker_templates/cinder/cinder-volume/config-external.sh delete mode 100755 docker_templates/cinder/cinder-volume/start.sh delete mode 100644 docker_templates/data/Dockerfile.j2 delete mode 100644 docker_templates/designate/designate-api/Dockerfile.j2 delete mode 100644 docker_templates/designate/designate-api/config-external.sh delete mode 100755 docker_templates/designate/designate-api/start.sh delete mode 100644 docker_templates/designate/designate-backend-bind9/Dockerfile.j2 delete mode 100644 docker_templates/designate/designate-backend-bind9/config-external.sh delete mode 100755 docker_templates/designate/designate-backend-bind9/start.sh delete mode 100644 docker_templates/designate/designate-base/Dockerfile.j2 delete mode 100644 docker_templates/designate/designate-central/Dockerfile.j2 delete mode 100644 docker_templates/designate/designate-central/config-external.sh delete mode 100755 docker_templates/designate/designate-central/start.sh delete mode 100644 docker_templates/designate/designate-mdns/Dockerfile.j2 delete mode 100644 docker_templates/designate/designate-mdns/config-external.sh delete mode 100755 docker_templates/designate/designate-mdns/start.sh delete mode 100644 docker_templates/designate/designate-poolmanager/Dockerfile.j2 delete mode 100644 docker_templates/designate/designate-poolmanager/config-external.sh delete mode 100755 docker_templates/designate/designate-poolmanager/start.sh delete mode 100644 docker_templates/designate/designate-sink/Dockerfile.j2 delete mode 100644 docker_templates/designate/designate-sink/config-external.sh delete mode 100755 docker_templates/designate/designate-sink/start.sh delete mode 100644 docker_templates/galera/Dockerfile.j2 delete mode 100644 docker_templates/galera/config-external.sh delete mode 100755 docker_templates/galera/config-galera.sh delete mode 100755 docker_templates/galera/start.sh delete mode 100644 docker_templates/glance/glance-api/Dockerfile.j2 delete mode 100755 docker_templates/glance/glance-api/config-external.sh delete mode 100755 docker_templates/glance/glance-api/start.sh delete mode 100644 docker_templates/glance/glance-base/Dockerfile.j2 delete mode 100644 docker_templates/glance/glance-registry/Dockerfile.j2 delete mode 100755 docker_templates/glance/glance-registry/config-external.sh delete mode 100755 docker_templates/glance/glance-registry/start.sh delete mode 100644 docker_templates/gnocchi/gnocchi-api/Dockerfile.j2 delete mode 100644 docker_templates/gnocchi/gnocchi-api/config-external.sh delete mode 100755 docker_templates/gnocchi/gnocchi-api/start.sh delete mode 100644 docker_templates/gnocchi/gnocchi-base/Dockerfile.j2 delete mode 100644 docker_templates/gnocchi/gnocchi-statsd/Dockerfile.j2 delete mode 100644 docker_templates/gnocchi/gnocchi-statsd/config-external.sh delete mode 100755 docker_templates/gnocchi/gnocchi-statsd/start.sh delete mode 100755 docker_templates/haproxy/Dockerfile.j2 delete mode 100644 docker_templates/haproxy/config-external.sh delete mode 100755 docker_templates/haproxy/ensure_latest_config.sh delete mode 100755 docker_templates/haproxy/start.sh delete mode 100644 docker_templates/heat/heat-api-cfn/Dockerfile.j2 delete mode 100644 docker_templates/heat/heat-api-cfn/config-external.sh delete mode 100755 docker_templates/heat/heat-api-cfn/start.sh delete mode 100644 docker_templates/heat/heat-api/Dockerfile.j2 delete mode 100644 docker_templates/heat/heat-api/config-external.sh delete mode 100755 docker_templates/heat/heat-api/start.sh delete mode 100644 docker_templates/heat/heat-base/Dockerfile.j2 delete mode 100644 docker_templates/heat/heat-engine/Dockerfile.j2 delete mode 100644 docker_templates/heat/heat-engine/config-external.sh delete mode 100755 docker_templates/heat/heat-engine/start.sh delete mode 100644 docker_templates/horizon/Dockerfile.j2 delete mode 100644 docker_templates/horizon/config-external.sh delete mode 100755 docker_templates/horizon/start.sh delete mode 100644 docker_templates/ironic/ironic-api/Dockerfile.j2 delete mode 100644 docker_templates/ironic/ironic-api/config-external.sh delete mode 100755 docker_templates/ironic/ironic-api/start.sh delete mode 100644 docker_templates/ironic/ironic-base/Dockerfile.j2 delete mode 100644 docker_templates/ironic/ironic-conductor/Dockerfile.j2 delete mode 100644 docker_templates/ironic/ironic-conductor/config-external.sh delete mode 100755 docker_templates/ironic/ironic-conductor/start.sh delete mode 100644 docker_templates/ironic/ironic-discoverd/Dockerfile.j2 delete mode 100644 docker_templates/ironic/ironic-discoverd/config-external.sh delete mode 100755 docker_templates/ironic/ironic-discoverd/start.sh delete mode 100644 docker_templates/keepalived/Dockerfile.j2 delete mode 100755 docker_templates/keepalived/check_alive.sh delete mode 100755 docker_templates/keepalived/config-external.sh delete mode 100755 docker_templates/keepalived/start.sh delete mode 100644 docker_templates/keystone/Dockerfile.j2 delete mode 100644 docker_templates/keystone/config-external.sh delete mode 100755 docker_templates/keystone/start.sh delete mode 100644 docker_templates/kolla-ansible/Dockerfile.j2 delete mode 100644 docker_templates/kolla-ansible/kolla_keystone_service.py delete mode 100644 docker_templates/kolla-ansible/kolla_keystone_user.py delete mode 100644 docker_templates/magnum/magnum-api/Dockerfile.j2 delete mode 100644 docker_templates/magnum/magnum-api/config-external.sh delete mode 100755 docker_templates/magnum/magnum-api/start.sh delete mode 100644 docker_templates/magnum/magnum-base/Dockerfile.j2 delete mode 100644 docker_templates/magnum/magnum-conductor/Dockerfile.j2 delete mode 100644 docker_templates/magnum/magnum-conductor/config-external.sh delete mode 100755 docker_templates/magnum/magnum-conductor/start.sh delete mode 100644 docker_templates/memcached/Dockerfile.j2 delete mode 100644 docker_templates/memcached/config-external.sh delete mode 100755 docker_templates/memcached/start.sh delete mode 100644 docker_templates/mongodb/Dockerfile.j2 delete mode 100644 docker_templates/murano/murano-api/Dockerfile.j2 delete mode 100644 docker_templates/murano/murano-api/config-external.sh delete mode 100755 docker_templates/murano/murano-api/start.sh delete mode 100644 docker_templates/murano/murano-base/Dockerfile.j2 delete mode 100644 docker_templates/murano/murano-engine/Dockerfile.j2 delete mode 100644 docker_templates/murano/murano-engine/config-external.sh delete mode 100755 docker_templates/murano/murano-engine/start.sh delete mode 100644 docker_templates/neutron/neutron-agents/Dockerfile.j2 delete mode 120000 docker_templates/neutron/neutron-agents/fwaas_driver.ini delete mode 100755 docker_templates/neutron/neutron-agents/neutron-dhcp-agent/config-external.sh delete mode 100755 docker_templates/neutron/neutron-agents/neutron-dhcp-agent/start.sh delete mode 100755 docker_templates/neutron/neutron-agents/neutron-l3-agent/config-external.sh delete mode 100644 docker_templates/neutron/neutron-agents/neutron-l3-agent/fwaas_driver.ini delete mode 100755 docker_templates/neutron/neutron-agents/neutron-l3-agent/start.sh delete mode 100755 docker_templates/neutron/neutron-agents/neutron-metadata-agent/config-external.sh delete mode 100755 docker_templates/neutron/neutron-agents/neutron-metadata-agent/start.sh delete mode 100644 docker_templates/neutron/neutron-agents/supervisord.conf delete mode 100644 docker_templates/neutron/neutron-base/Dockerfile.j2 delete mode 100644 docker_templates/neutron/neutron-base/config-sudoers.sh delete mode 100755 docker_templates/neutron/neutron-base/ip_wrapper.py delete mode 100644 docker_templates/neutron/neutron-linuxbridge-agent/Dockerfile.j2 delete mode 100755 docker_templates/neutron/neutron-linuxbridge-agent/config-external.sh delete mode 100755 docker_templates/neutron/neutron-linuxbridge-agent/start.sh delete mode 100644 docker_templates/neutron/neutron-openvswitch-agent/Dockerfile.j2 delete mode 100755 docker_templates/neutron/neutron-openvswitch-agent/config-external.sh delete mode 100755 docker_templates/neutron/neutron-openvswitch-agent/start.sh delete mode 100644 docker_templates/neutron/neutron-server/Dockerfile.j2 delete mode 100755 docker_templates/neutron/neutron-server/config-external.sh delete mode 100755 docker_templates/neutron/neutron-server/start.sh delete mode 100644 docker_templates/nova/nova-api/Dockerfile.j2 delete mode 100755 docker_templates/nova/nova-api/config-external.sh delete mode 100755 docker_templates/nova/nova-api/start.sh delete mode 100644 docker_templates/nova/nova-base/Dockerfile.j2 delete mode 100644 docker_templates/nova/nova-compute/Dockerfile.j2 delete mode 100755 docker_templates/nova/nova-compute/config-external.sh delete mode 100755 docker_templates/nova/nova-compute/start.sh delete mode 100644 docker_templates/nova/nova-conductor/Dockerfile.j2 delete mode 100755 docker_templates/nova/nova-conductor/config-external.sh delete mode 100755 docker_templates/nova/nova-conductor/start.sh delete mode 100644 docker_templates/nova/nova-consoleauth/Dockerfile.j2 delete mode 100755 docker_templates/nova/nova-consoleauth/config-external.sh delete mode 100755 docker_templates/nova/nova-consoleauth/start.sh delete mode 100644 docker_templates/nova/nova-libvirt/Dockerfile.j2 delete mode 100755 docker_templates/nova/nova-libvirt/config-external.sh delete mode 100755 docker_templates/nova/nova-libvirt/start.sh delete mode 100644 docker_templates/nova/nova-network/Dockerfile.j2 delete mode 100755 docker_templates/nova/nova-network/config-external.sh delete mode 100755 docker_templates/nova/nova-network/start.sh delete mode 100644 docker_templates/nova/nova-novncproxy/Dockerfile.j2 delete mode 100755 docker_templates/nova/nova-novncproxy/config-external.sh delete mode 100755 docker_templates/nova/nova-novncproxy/start.sh delete mode 100644 docker_templates/nova/nova-scheduler/Dockerfile.j2 delete mode 100755 docker_templates/nova/nova-scheduler/config-external.sh delete mode 100755 docker_templates/nova/nova-scheduler/start.sh delete mode 100644 docker_templates/openvswitch/ovs-base/Dockerfile.j2 delete mode 100644 docker_templates/openvswitch/ovs-db-server/Dockerfile.j2 delete mode 100644 docker_templates/openvswitch/ovs-db-server/config-external.sh delete mode 100755 docker_templates/openvswitch/ovs-db-server/start.sh delete mode 100644 docker_templates/openvswitch/ovs-vswitchd/Dockerfile.j2 delete mode 100644 docker_templates/openvswitch/ovs-vswitchd/config-external.sh delete mode 100755 docker_templates/openvswitch/ovs-vswitchd/ovs_ensure_configured.sh delete mode 100755 docker_templates/openvswitch/ovs-vswitchd/start.sh delete mode 100644 docker_templates/rabbitmq/Dockerfile.j2 delete mode 100644 docker_templates/rabbitmq/config-external.sh delete mode 100644 docker_templates/rabbitmq/config-rabbit.sh delete mode 100755 docker_templates/rabbitmq/start.sh delete mode 100644 docker_templates/swift/swift-account-server/Dockerfile.j2 delete mode 100644 docker_templates/swift/swift-account-server/config-external.sh delete mode 100755 docker_templates/swift/swift-account-server/start.sh delete mode 100644 docker_templates/swift/swift-base/Dockerfile.j2 delete mode 100644 docker_templates/swift/swift-base/build-swift-ring.py delete mode 100755 docker_templates/swift/swift-base/config-swift.sh delete mode 100644 docker_templates/swift/swift-container-server/Dockerfile.j2 delete mode 100644 docker_templates/swift/swift-container-server/config-external.sh delete mode 100755 docker_templates/swift/swift-container-server/start.sh delete mode 100644 docker_templates/swift/swift-object-auditor/Dockerfile.j2 delete mode 100644 docker_templates/swift/swift-object-auditor/config-external.sh delete mode 100755 docker_templates/swift/swift-object-auditor/start.sh delete mode 100644 docker_templates/swift/swift-object-base/Dockerfile.j2 delete mode 100644 docker_templates/swift/swift-object-base/config-swift-object.sh delete mode 100644 docker_templates/swift/swift-object-expirer/Dockerfile.j2 delete mode 100644 docker_templates/swift/swift-object-expirer/config-external.sh delete mode 100755 docker_templates/swift/swift-object-expirer/start.sh delete mode 100644 docker_templates/swift/swift-object-replicator/Dockerfile.j2 delete mode 100644 docker_templates/swift/swift-object-replicator/config-external.sh delete mode 100755 docker_templates/swift/swift-object-replicator/start.sh delete mode 100644 docker_templates/swift/swift-object-server/Dockerfile.j2 delete mode 100644 docker_templates/swift/swift-object-server/config-external.sh delete mode 100755 docker_templates/swift/swift-object-server/start.sh delete mode 100644 docker_templates/swift/swift-object-updater/Dockerfile.j2 delete mode 100644 docker_templates/swift/swift-object-updater/config-external.sh delete mode 100755 docker_templates/swift/swift-object-updater/start.sh delete mode 100644 docker_templates/swift/swift-proxy-server/Dockerfile.j2 delete mode 100755 docker_templates/swift/swift-proxy-server/config-external.sh delete mode 100755 docker_templates/swift/swift-proxy-server/start.sh delete mode 100644 docker_templates/zaqar/Dockerfile.j2 delete mode 100644 docker_templates/zaqar/config-external.sh delete mode 100755 docker_templates/zaqar/start.sh diff --git a/README.rst b/README.rst index 5bab37cf5..7bcc693c8 100644 --- a/README.rst +++ b/README.rst @@ -75,8 +75,7 @@ Directories - etc - Contains a reference etc directory structure which requires configuration of a small number of configuration variables to achieve a working All-in-One (AIO) deployment. -- docker\_templates - Contains jinja2 templates for the docker build - system. +- docker - Contains jinja2 templates for the docker build system. - tools - Contains tools for interacting with Kolla. - specs - Contains the Kolla communities key arguments about architectural shifts in the code base. diff --git a/docker/base/Dockerfile.j2 b/docker/base/Dockerfile.j2 new file mode 100755 index 000000000..b3b0c776a --- /dev/null +++ b/docker/base/Dockerfile.j2 @@ -0,0 +1,236 @@ +FROM {{ base_distro }}:{{ base_distro_tag }} +MAINTAINER Kolla Project (https://launchpad.net/kolla) + +{{ include_header }} + +ENV KOLLA_BASE_DISTRO {{ base_distro }} +ENV KOLLA_INSTALL_TYPE {{ install_type }} + +{% if base_distro in ['fedora', 'centos', 'oraclelinux'] %} + +# Turns on galera repos throughout the build +COPY mariadb.yum.repo /etc/yum.repos.d/MariaDB.repo + +RUN yum install -y http://www.percona.com/redir/downloads/percona-release/redhat/0.1-3/percona-release-0.1-3.noarch.rpm \ + && sed -i 's|$releasever|centos/latest|g' /etc/yum.repos.d/percona-release.repo + + {% if install_type == 'binary' %} + {% if base_distro in ['centos', 'oraclelinux'] %} + +# Set up repositories +# This repository provides all dependencies used by RDO OpenStack +RUN yum install -y https://rdoproject.org/repos/openstack-kilo/rdo-release-kilo.rpm + +# This repository provides latest packages built from trunk master into RPMs +RUN curl http://trunk.rdoproject.org/centos7/current/delorean.repo -o /etc/yum.repos.d/delorean-current.repo + +# This repository turns off auth in PAM so we can operate on Ubuntu 14.04 +RUN curl https://copr.fedoraproject.org/coprs/sdake/pam.noaudit/repo/epel-7/sdake-pam.noaudit-epel-7.repo -o /etc/yum.repos.d/sdake-pam.noaudit-epel-7.repo + +{% if base_distro == 'centos' %} +# CentOS 7.1 workaround for conflicting packages with libvirt +RUN rpm -e --nodeps systemd-container systemd-container-libs \ + && rpm -e --nodeps yum-plugin-fastestmirror \ + && yum -d 10 -y install systemd systemd-libs systemd-devel \ + && yum clean all +{% endif %} + +{% if base_distro == 'oraclelinux' %} +RUN yum install -y \ + yum-utils \ + https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm \ + && yum clean all +RUN yum-config-manager --enable ol7_optional_latest ol7_addons +{% endif %} + + # Endif for base_distro centos/oraclelinux + {% elif base_distro == 'fedora' %} + +# Set up repositories +RUN yum install -y https://rdo.fedorapeople.org/rdo-release.rpm \ + && yum -y install dnf dnf-plugins-core \ + && yum clean all \ + && dnf copr enable -y sdake/pam.noaudit + + # Endif for base_distro fedora + {% endif %} + +# Update packages +RUN yum update -y \ + && yum install -y epel-release \ + && yum clean all + +# Install base packages +RUN yum install -y \ + git \ + iproute \ + mariadb-libs \ + openssl \ + openstack-utils \ + pyparsing \ + python-alembic \ + python-amqp \ + python-amqplib \ + python-anyjson \ + python-boto \ + python-cheetah \ + python-cliff \ + python-cmd2 \ + python-croniter \ + python-crypto \ + python-d2to1 \ + python-docutils \ + python-dogpile-cache \ + python-dogpile-core \ + python-empy \ + python-eventlet \ + python-flask \ + python-futures \ + python-greenlet \ + python-httplib2 \ + python-iso8601 \ + python-itsdangerous \ + python-jinja2 \ + python-jsonpatch \ + python-jsonpath-rw \ + python-jsonpointer \ + python-jsonschema \ + python-keyring \ + python-kombu \ + python-ldap \ + python-lesscpy \ + python-lockfile \ + python-lxml \ + python-markdown \ + python-memcached \ + python-migrate \ + python-msgpack \ + python-netifaces \ + python-networkx \ + python-oauthlib \ + python-oslo-config \ + python-oslo-messaging \ + python-oslo-rootwrap \ + python-oslo-policy \ + python-paramiko \ + python-passlib \ + python-paste-deploy \ + python-pbr \ + python-pecan \ + python-pip \ + python-ply \ + python-prettytable \ + python-psutil \ + python-pycadf \ + python-pygments \ + python-pymongo \ + python-qpid \ + python-repoze-lru \ + python-requests \ + python-routes \ + python-simplegeneric \ + python-simplejson \ + python-singledispatch \ + python-six \ + python-sqlalchemy \ + python-stevedore \ + python-taskflow \ + python-versiontools \ + python-warlock \ + python-webob \ + python-websockify \ + python-webtest \ + python-werkzeug \ + python-wsme \ + && yum clean all + +# TODO(inc0): when oslo_service lands in delorean, change pip to yum +# necessary until https://bugzilla.redhat.com/show_bug.cgi?id=1229477 is fixed + +# This is dirty like zebra. This works around a bug in Ubuntu 14.04 LTS. The +# --net=host option does not work on ubuntu 14.04 because of a kernel bug. One +# workaround is to buid pam without authentication. +# See: +# https://registry.hub.docker.com/u/sequenceiq/pam/ +# +RUN rpm -e --nodeps pam \ + && yum -y install pam+noaudit \ + && yum clean all +# End dirty like zebra + + # Endif for install_type binary + {% elif install_type == 'source' %} + +# Update packages +RUN yum update -y \ + && yum install -y \ + epel-release \ + gcc \ + gcc-c++ \ + git \ + libffi-devel \ + libxml2-devel \ + libxslt-devel \ + mariadb-devel \ + mysql-devel \ + MySQL-python \ + openldap-devel \ + openssl \ + openssl-devel \ + postgresql \ + postgresql-devel \ + python-devel \ + python-oslo-policy \ + sqlite-devel \ + tar \ + && yum clean all + + # Endif for install_type source + {% endif %} + +# Endif for base_distro centos,fedora,oraclelinux +{% elif base_distro in ['ubuntu', 'debian'] %} + +# This will prevent questions from being asked during the install +ENV DEBIAN_FRONTEND noninteractive + +COPY sources.list /etc/apt/ + +RUN apt-key adv --recv-keys --keyserver hkp://keyserver.ubuntu.com 199369E5404BD5FC7D2FE43BCBCB082A1BB943DB \ + && apt-key adv --recv-keys --keyserver hkp://keyserver.ubuntu.com 391A9AA2147192839E9DB0315EDB1B62EC4926EA \ + && apt-key adv --recv-keys --keyserver hkp://keyserver.ubuntu.com F78372A06FF50C80464FC1B4F7B8CEA6056E8E56 \ + && apt-key adv --recv-keys --keyserver hkp://keyserver.ubuntu.com 430BDF5C56E7C94E848EE60C1C4CBDCDCD2EFD2A \ + && apt-key adv --recv-keys --keyserver hkp://keyserver.ubuntu.com 7D5C473EB80C00FC133071068A6844A29F68104E \ + && apt-get update \ + && apt-get upgrade -y \ + && apt-get dist-upgrade -y \ + && apt-get install -y --no-install-recommends \ + curl \ + ca-certificates \ + build-essential \ + python-dev \ + libssl-dev \ + python-mysqldb \ + libmariadbclient-dev \ + libxslt1-dev \ + libffi-dev \ + libyaml-dev \ + pkg-config \ + && apt-get clean \ + && sed -i "s|'purelib': '\$base/local/lib/python\$py_version_short/dist-packages',|'purelib': '\$base/lib/python\$py_version_short/dist-packages',|;s|'platlib': '\$platbase/local/lib/python\$py_version_short/dist-packages',|'platlib': '\$platbase/lib/python\$py_version_short/dist-packages',|;s|'headers': '\$base/local/include/python\$py_version_short/\$dist_name',|'headers': '\$base/include/python\$py_version_short/\$dist_name',|;s|'scripts': '\$base/local/bin',|'scripts': '\$base/bin',|;s|'data' : '\$base/local',|'data' : '\$base',|" /usr/lib/python2.7/distutils/command/install.py \ + && rm -rf /usr/lib/python2.7/site-packages \ + && ln -s dist-packages /usr/lib/python2.7/site-packages + +# Endif for base_distro ubuntu,debian +{% endif %} + +{% if install_type == 'source' %} + +RUN curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py \ + && python get-pip.py \ + && rm get-pip.py + +# Endif for install_type source +{% endif %} + +COPY kolla-common.sh /opt/kolla/ diff --git a/docker/base/kolla-common.sh b/docker/base/kolla-common.sh new file mode 100644 index 000000000..cc960ca24 --- /dev/null +++ b/docker/base/kolla-common.sh @@ -0,0 +1,22 @@ +#!/bin/bash + +set_configs() { + case $KOLLA_CONFIG_STRATEGY in + COPY_ALWAYS) + source /opt/kolla/config-external.sh + ;; + COPY_ONCE) + if [[ -f /configured ]]; then + echo 'INFO - This container has already been configured; Refusing to copy new configs' + else + source /opt/kolla/config-external.sh + touch /configured + fi + ;; + + *) + echo '$KOLLA_CONFIG_STRATEGY is not set properly' + exit 1 + ;; + esac +} diff --git a/docker/base/mariadb.yum.repo b/docker/base/mariadb.yum.repo new file mode 100644 index 000000000..564ce3f0e --- /dev/null +++ b/docker/base/mariadb.yum.repo @@ -0,0 +1,5 @@ +[mariadb] +name = MariaDB +baseurl = http://yum.mariadb.org/10.0/centos7-amd64 +gpgkey=https://yum.mariadb.org/RPM-GPG-KEY-MariaDB +gpgcheck=1 diff --git a/docker/base/sources.list b/docker/base/sources.list new file mode 100644 index 000000000..ccb6f8d25 --- /dev/null +++ b/docker/base/sources.list @@ -0,0 +1,22 @@ +# Default repos +deb http://archive.ubuntu.com/ubuntu/ trusty main restricted universe multiverse +deb http://archive.ubuntu.com/ubuntu/ trusty-updates main restricted universe multiverse +deb http://archive.ubuntu.com/ubuntu/ trusty-security main restricted universe multiverse + +# Backports have a lower priority and must be explictly installed to be used +deb http://archive.ubuntu.com/ubuntu/ trusty-backports main restricted universe multiverse + +# TODO(SamYaple): Switch this to the Liberty repo as soon as the update packages +# and actually start signing them. +# We need to add the Kilo repo for the updated packages they provide. The main +# ones are qemu, libvirt, and openvswitch. +deb http://ubuntu-cloud.archive.canonical.com/ubuntu trusty-updates/kilo main + +# MariaDB 10.0 repo +deb http://nyc2.mirrors.digitalocean.com/mariadb/repo/10.0/ubuntu trusty main + +# Percona repo (for xtrabackup) +deb http://repo.percona.com/apt trusty main + +# RabbitMQ repo. Despite the name, the 'testing' repo is the stable repo. +deb http://www.rabbitmq.com/debian/ testing main diff --git a/docker/ceilometer/ceilometer-alarm/Dockerfile.j2 b/docker/ceilometer/ceilometer-alarm/Dockerfile.j2 new file mode 100644 index 000000000..aa62562ac --- /dev/null +++ b/docker/ceilometer/ceilometer-alarm/Dockerfile.j2 @@ -0,0 +1,18 @@ +FROM {{ namespace }}/{{ base_distro }}-{{ install_type }}-ceilometer-base:{{ tag }} +MAINTAINER Kolla Project (https://launchpad.net/kolla) + +{% if install_type == 'binary' %} + {% if base_distro in ['fedora', 'centos', 'oraclelinux'] %} + +RUN yum install -y openstack-ceilometer-alarm \ + && yum clean all + + {% endif %} +{% endif %} + +COPY ./start.sh / +COPY config-external.sh /opt/kolla/ + +CMD ["/start.sh"] + +{{ include_footer }} diff --git a/docker/ceilometer/ceilometer-alarm/config-external.sh b/docker/ceilometer/ceilometer-alarm/config-external.sh new file mode 100644 index 000000000..2835bd5aa --- /dev/null +++ b/docker/ceilometer/ceilometer-alarm/config-external.sh @@ -0,0 +1,10 @@ +#!/bin/bash +SOURCE="/opt/kolla/ceilometer/ceilometer.conf" +TARGET="/etc/ceilometer/ceilometer.conf" +OWNER="ceilometer" + +if [[ -f "$SOURCE" ]]; then + cp $SOURCE $TARGET + chown ${OWNER}: $TARGET + chmod 0644 $TARGET +fi diff --git a/docker/ceilometer/ceilometer-alarm/start.sh b/docker/ceilometer/ceilometer-alarm/start.sh new file mode 100755 index 000000000..ab5501b23 --- /dev/null +++ b/docker/ceilometer/ceilometer-alarm/start.sh @@ -0,0 +1,14 @@ +#!/bin/bash + +set -o errexit + +CMD="/usr/bin/ceilometer-alarm" +ARGS="" + +# Loading common functions. +source /opt/kolla/kolla-common.sh + +# Execute config strategy +set_configs + +exec $CMD $ARGS diff --git a/docker/ceilometer/ceilometer-api/Dockerfile.j2 b/docker/ceilometer/ceilometer-api/Dockerfile.j2 new file mode 100644 index 000000000..805e5e8eb --- /dev/null +++ b/docker/ceilometer/ceilometer-api/Dockerfile.j2 @@ -0,0 +1,18 @@ +FROM {{ namespace }}/{{ base_distro }}-{{ install_type }}-ceilometer-base:{{ tag }} +MAINTAINER Kolla Project (https://launchpad.net/kolla) + +{% if install_type == 'binary' %} + {% if base_distro in ['fedora', 'centos', 'oraclelinux'] %} + +RUN yum install -y openstack-ceilometer-api \ + && yum clean all + + {% endif %} +{% endif %} + +COPY ./start.sh / +COPY config-external.sh /opt/kolla/ + +CMD ["/start.sh"] + +{{ include_footer }} diff --git a/docker/ceilometer/ceilometer-api/config-external.sh b/docker/ceilometer/ceilometer-api/config-external.sh new file mode 100644 index 000000000..2835bd5aa --- /dev/null +++ b/docker/ceilometer/ceilometer-api/config-external.sh @@ -0,0 +1,10 @@ +#!/bin/bash +SOURCE="/opt/kolla/ceilometer/ceilometer.conf" +TARGET="/etc/ceilometer/ceilometer.conf" +OWNER="ceilometer" + +if [[ -f "$SOURCE" ]]; then + cp $SOURCE $TARGET + chown ${OWNER}: $TARGET + chmod 0644 $TARGET +fi diff --git a/docker/ceilometer/ceilometer-api/start.sh b/docker/ceilometer/ceilometer-api/start.sh new file mode 100755 index 000000000..0f660e025 --- /dev/null +++ b/docker/ceilometer/ceilometer-api/start.sh @@ -0,0 +1,21 @@ +#!/bin/bash + +set -o errexit + +CMD="/usr/bin/ceilometer-api" +ARGS="" + +# Loading common functions. +source /opt/kolla/kolla-common.sh + +# Config-internal script exec out of this function, it does not return here. +set_configs + +# Bootstrap and exit if KOLLA_BOOTSTRAP variable is set. This catches all cases +# of the KOLLA_BOOTSTRAP variable being set, including empty. +if [[ "${!KOLLA_BOOTSTRAP[@]}" ]]; then + su -s /bin/sh -c "ceilometer-manage db_sync" ceilometer + exit 0 +fi + +exec $CMD $ARGS diff --git a/docker/ceilometer/ceilometer-base/Dockerfile.j2 b/docker/ceilometer/ceilometer-base/Dockerfile.j2 new file mode 100644 index 000000000..92a3b70d9 --- /dev/null +++ b/docker/ceilometer/ceilometer-base/Dockerfile.j2 @@ -0,0 +1,21 @@ +FROM {{ namespace }}/{{ base_distro }}-{{ install_type }}-base:{{ tag }} +MAINTAINER Kolla Project (https://launchpad.net/kolla) + +{% if install_type == 'binary' %} + {% if base_distro in ['ubuntu', 'debian'] %} + +RUN echo '{{ install_type }} not yet available for {{ base_distro }}' \ + && /bin/false + + {% endif %} +{% elif install_type == 'source' %} + +ADD ceilometer.tar / +RUN ln -s /ceilometer-* ceilometer \ + && useradd --user-group ceilometer \ + && pip --no-cache-dir install /ceilometer \ + && mkdir -p /etc/ceilometer /var/log/ceilometer /home/ceilometer \ + && cp -r /ceilometer/etc/* /etc/ceilometer/ \ + && chown -R ceilometer: /etc/ceilometer /var/log/ceilometer /home/ceilometer + +{% endif %} diff --git a/docker/ceilometer/ceilometer-central/Dockerfile.j2 b/docker/ceilometer/ceilometer-central/Dockerfile.j2 new file mode 100644 index 000000000..b45c5fac3 --- /dev/null +++ b/docker/ceilometer/ceilometer-central/Dockerfile.j2 @@ -0,0 +1,18 @@ +FROM {{ namespace }}/{{ base_distro }}-{{ install_type }}-ceilometer-base:{{ tag }} +MAINTAINER Kolla Project (https://launchpad.net/kolla) + +{% if install_type == 'binary' %} + {% if base_distro in ['fedora', 'centos', 'oraclelinux'] %} + +RUN yum install -y openstack-ceilometer-central \ + && yum clean all + + {% endif %} +{% endif %} + +COPY ./start.sh / +COPY config-external.sh /opt/kolla/ + +CMD ["/start.sh"] + +{{ include_footer }} diff --git a/docker/ceilometer/ceilometer-central/config-external.sh b/docker/ceilometer/ceilometer-central/config-external.sh new file mode 100644 index 000000000..2835bd5aa --- /dev/null +++ b/docker/ceilometer/ceilometer-central/config-external.sh @@ -0,0 +1,10 @@ +#!/bin/bash +SOURCE="/opt/kolla/ceilometer/ceilometer.conf" +TARGET="/etc/ceilometer/ceilometer.conf" +OWNER="ceilometer" + +if [[ -f "$SOURCE" ]]; then + cp $SOURCE $TARGET + chown ${OWNER}: $TARGET + chmod 0644 $TARGET +fi diff --git a/docker/ceilometer/ceilometer-central/start.sh b/docker/ceilometer/ceilometer-central/start.sh new file mode 100755 index 000000000..f2980a4d5 --- /dev/null +++ b/docker/ceilometer/ceilometer-central/start.sh @@ -0,0 +1,14 @@ +#!/bin/bash + +set -o errexit + +CMD="/usr/bin/ceilometer-agent-central" +ARGS="" + +# Loading common functions. +source /opt/kolla/kolla-common.sh + +# Execute config strategy +set_configs + +exec $CMD $ARGS diff --git a/docker/ceilometer/ceilometer-collector/Dockerfile.j2 b/docker/ceilometer/ceilometer-collector/Dockerfile.j2 new file mode 100644 index 000000000..6f425e855 --- /dev/null +++ b/docker/ceilometer/ceilometer-collector/Dockerfile.j2 @@ -0,0 +1,18 @@ +FROM {{ namespace }}/{{ base_distro }}-{{ install_type }}-ceilometer-base:{{ tag }} +MAINTAINER Kolla Project (https://launchpad.net/kolla) + +{% if install_type == 'binary' %} + {% if base_distro in ['fedora', 'centos', 'oraclelinux'] %} + +RUN yum install -y openstack-ceilometer-collector \ + && yum clean all + + {% endif %} +{% endif %} + +COPY ./start.sh / +COPY config-external.sh /opt/kolla/ + +CMD ["/start.sh"] + +{{ include_footer }} diff --git a/docker/ceilometer/ceilometer-collector/config-external.sh b/docker/ceilometer/ceilometer-collector/config-external.sh new file mode 100644 index 000000000..2835bd5aa --- /dev/null +++ b/docker/ceilometer/ceilometer-collector/config-external.sh @@ -0,0 +1,10 @@ +#!/bin/bash +SOURCE="/opt/kolla/ceilometer/ceilometer.conf" +TARGET="/etc/ceilometer/ceilometer.conf" +OWNER="ceilometer" + +if [[ -f "$SOURCE" ]]; then + cp $SOURCE $TARGET + chown ${OWNER}: $TARGET + chmod 0644 $TARGET +fi diff --git a/docker/ceilometer/ceilometer-collector/start.sh b/docker/ceilometer/ceilometer-collector/start.sh new file mode 100755 index 000000000..3a59c17d1 --- /dev/null +++ b/docker/ceilometer/ceilometer-collector/start.sh @@ -0,0 +1,14 @@ +#!/bin/bash + +set -o errexit + +CMD="/usr/bin/ceilometer-collector" +ARGS="" + +# Loading common functions. +source /opt/kolla/kolla-common.sh + +# Execute config strategy +set_configs + +exec $CMD $ARGS diff --git a/docker/ceilometer/ceilometer-compute/Dockerfile.j2 b/docker/ceilometer/ceilometer-compute/Dockerfile.j2 new file mode 100644 index 000000000..0487af710 --- /dev/null +++ b/docker/ceilometer/ceilometer-compute/Dockerfile.j2 @@ -0,0 +1,20 @@ +FROM {{ namespace }}/{{ base_distro }}-{{ install_type }}-ceilometer-base:{{ tag }} +MAINTAINER Kolla Project (https://launchpad.net/kolla) + +{% if install_type == 'binary' %} + {% if base_distro in ['fedora', 'centos', 'oraclelinux'] %} + +RUN yum install -y openstack-ceilometer-compute \ + python-ceilometerclient \ + python-pecan \ + && yum clean all + + {% endif %} +{% endif %} + +COPY ./start.sh / +COPY config-external.sh /opt/kolla/ + +CMD ["/start.sh"] + +{{ include_footer }} diff --git a/docker/ceilometer/ceilometer-compute/config-external.sh b/docker/ceilometer/ceilometer-compute/config-external.sh new file mode 100644 index 000000000..2835bd5aa --- /dev/null +++ b/docker/ceilometer/ceilometer-compute/config-external.sh @@ -0,0 +1,10 @@ +#!/bin/bash +SOURCE="/opt/kolla/ceilometer/ceilometer.conf" +TARGET="/etc/ceilometer/ceilometer.conf" +OWNER="ceilometer" + +if [[ -f "$SOURCE" ]]; then + cp $SOURCE $TARGET + chown ${OWNER}: $TARGET + chmod 0644 $TARGET +fi diff --git a/docker/ceilometer/ceilometer-compute/start.sh b/docker/ceilometer/ceilometer-compute/start.sh new file mode 100755 index 000000000..19d90be2f --- /dev/null +++ b/docker/ceilometer/ceilometer-compute/start.sh @@ -0,0 +1,14 @@ +#!/bin/bash + +set -o errexit + +CMD="/usr/bin/ceilometer-agent-compute" +ARGS="" + +# Loading common functions. +source /opt/kolla/kolla-common.sh + +# Execute config strategy +set_configs + +exec $CMD $ARGS diff --git a/docker/ceilometer/ceilometer-notification/Dockerfile.j2 b/docker/ceilometer/ceilometer-notification/Dockerfile.j2 new file mode 100644 index 000000000..67fcfb50e --- /dev/null +++ b/docker/ceilometer/ceilometer-notification/Dockerfile.j2 @@ -0,0 +1,18 @@ +FROM {{ namespace }}/{{ base_distro }}-{{ install_type }}-ceilometer-base:{{ tag }} +MAINTAINER Kolla Project (https://launchpad.net/kolla) + +{% if install_type == 'binary' %} + {% if base_distro in ['fedora', 'centos', 'oraclelinux'] %} + +RUN yum install -y openstack-ceilometer-notification \ + && yum clean all + + {% endif %} +{% endif %} + +COPY ./start.sh / +COPY config-external.sh /opt/kolla/ + +CMD ["/start.sh"] + +{{ include_footer }} diff --git a/docker/ceilometer/ceilometer-notification/config-external.sh b/docker/ceilometer/ceilometer-notification/config-external.sh new file mode 100644 index 000000000..2835bd5aa --- /dev/null +++ b/docker/ceilometer/ceilometer-notification/config-external.sh @@ -0,0 +1,10 @@ +#!/bin/bash +SOURCE="/opt/kolla/ceilometer/ceilometer.conf" +TARGET="/etc/ceilometer/ceilometer.conf" +OWNER="ceilometer" + +if [[ -f "$SOURCE" ]]; then + cp $SOURCE $TARGET + chown ${OWNER}: $TARGET + chmod 0644 $TARGET +fi diff --git a/docker/ceilometer/ceilometer-notification/start.sh b/docker/ceilometer/ceilometer-notification/start.sh new file mode 100755 index 000000000..8ce4b4488 --- /dev/null +++ b/docker/ceilometer/ceilometer-notification/start.sh @@ -0,0 +1,14 @@ +#!/bin/bash + +set -o errexit + +CMD="/usr/bin/ceilometer-agent-notification" +ARGS="" + +# Loading common functions. +source /opt/kolla/kolla-common.sh + +# Execute config strategy +set_configs + +exec $CMD $ARGS diff --git a/docker/cinder/cinder-api/Dockerfile.j2 b/docker/cinder/cinder-api/Dockerfile.j2 new file mode 100644 index 000000000..196f93baf --- /dev/null +++ b/docker/cinder/cinder-api/Dockerfile.j2 @@ -0,0 +1,18 @@ +FROM {{ namespace }}/{{ base_distro }}-{{ install_type }}-cinder-base:{{ tag }} +MAINTAINER Kolla Project (https://launchpad.net/kolla) + +{% if install_type == 'binary' %} + {% if base_distro in ['fedora', 'centos', 'oraclelinux'] %} + +RUN yum install -y python-keystone \ + && yum clean all + + {% endif %} +{% endif %} + +COPY ./start.sh / +COPY config-external.sh /opt/kolla/ + +CMD ["/start.sh"] + +{{ include_footer }} diff --git a/docker/cinder/cinder-api/config-external.sh b/docker/cinder/cinder-api/config-external.sh new file mode 100644 index 000000000..08d8cde0a --- /dev/null +++ b/docker/cinder/cinder-api/config-external.sh @@ -0,0 +1,10 @@ +#!/bin/bash +SOURCE="/opt/kolla/cinder-api/cinder.conf" +TARGET="/etc/cinder/cinder.conf" +OWNER="cinder" + +if [[ -f "$SOURCE" ]]; then + cp $SOURCE $TARGET + chown ${OWNER}: $TARGET + chmod 0644 $TARGET +fi diff --git a/docker/cinder/cinder-api/start.sh b/docker/cinder/cinder-api/start.sh new file mode 100755 index 000000000..6c61b3a4e --- /dev/null +++ b/docker/cinder/cinder-api/start.sh @@ -0,0 +1,21 @@ +#!/bin/bash + +set -o errexit + +CMD="/usr/bin/cinder-api" +ARGS="--config-file /etc/cinder/cinder.conf" + +# Loading common functions. +source /opt/kolla/kolla-common.sh + +# Execute config strategy +set_configs + +# Bootstrap and exit if KOLLA_BOOTSTRAP variable is set. This catches all cases +# of the KOLLA_BOOTSTRAP variable being set, including empty. +if [[ "${!KOLLA_BOOTSTRAP[@]}" ]]; then + su -s /bin/sh -c "cinder-manage db sync" cinder + exit 0 +fi + +exec $CMD $ARGS diff --git a/docker/cinder/cinder-backup/Dockerfile.j2 b/docker/cinder/cinder-backup/Dockerfile.j2 new file mode 100644 index 000000000..fa331b195 --- /dev/null +++ b/docker/cinder/cinder-backup/Dockerfile.j2 @@ -0,0 +1,9 @@ +FROM {{ namespace }}/{{ base_distro }}-{{ install_type }}-cinder-base:{{ tag }} +MAINTAINER Kolla Project (https://launchpad.net/kolla) + +COPY ./start.sh / +COPY config-external.sh /opt/kolla/ + +CMD ["/start.sh"] + +{{ include_footer }} diff --git a/docker/cinder/cinder-backup/config-external.sh b/docker/cinder/cinder-backup/config-external.sh new file mode 100644 index 000000000..ff4752492 --- /dev/null +++ b/docker/cinder/cinder-backup/config-external.sh @@ -0,0 +1,10 @@ +#!/bin/bash +SOURCE="/opt/kolla/cinder-backup/cinder.conf" +TARGET="/etc/cinder/cinder.conf" +OWNER="cinder" + +if [[ -f "$SOURCE" ]]; then + cp $SOURCE $TARGET + chown ${OWNER}: $TARGET + chmod 0644 $TARGET +fi diff --git a/docker/cinder/cinder-backup/start.sh b/docker/cinder/cinder-backup/start.sh new file mode 100755 index 000000000..7d9403f07 --- /dev/null +++ b/docker/cinder/cinder-backup/start.sh @@ -0,0 +1,14 @@ +#!/bin/bash + +set -o errexit + +CMD="/usr/bin/cinder-backup" +ARGS="--config-file /etc/cinder/cinder.conf" + +# Loading common functions. +source /opt/kolla/kolla-common.sh + +# Execute config strategy +set_configs + +exec $CMD $ARGS diff --git a/docker/cinder/cinder-base/Dockerfile.j2 b/docker/cinder/cinder-base/Dockerfile.j2 new file mode 100644 index 000000000..1cce34a9e --- /dev/null +++ b/docker/cinder/cinder-base/Dockerfile.j2 @@ -0,0 +1,49 @@ +FROM {{ namespace }}/{{ base_distro }}-{{ install_type }}-base:{{ tag }} +MAINTAINER Kolla Project (https://launchpad.net/kolla) + +{% if install_type == 'binary' %} + {% if base_distro in ['fedora', 'centos', 'oraclelinux'] %} + +RUN yum -y install openstack-cinder \ + python-automaton \ + lvm2 \ + && yum clean all \ + && sed -i "s|udev_rules = 1|udev_rules = 0|g" /etc/lvm/lvm.conf \ + && sed -i "s|udev_sync = 1|udev_sync = 0|g" /etc/lvm/lvm.conf + +# NOTE(sdake): The sed operations make LVM tools work inside a container - see +# https://groups.google.com/forum/#!topic/docker-user/n4Xtvsb4RAw + + {% elif base_distro in ['ubuntu', 'debian'] %} + +RUN echo '{{ install_type }} not yet available for {{ base_distro }}' \ + && /bin/false + + {% endif %} +{% elif install_type == 'source' %} + {% if base_distro in ['fedora', 'centos', 'oraclelinux'] %} + +RUN yum -y install lvm2 \ + && yum clean all + + {% elif base_distro in ['ubuntu', 'debian'] %} + +RUN apt-get install -y --no-install-recommends lvm2 \ + && apt-get clean + + {% endif %} + +ADD cinder.tar / +RUN ln -s /cinder-* cinder \ + && useradd --user-group cinder \ + && pip --no-cache-dir install /cinder \ + && mkdir -p /etc/cinder /var/log/cinder /home/cinder \ + && cp -r /cinder/etc/cinder/* /etc/cinder/ \ + && chown -R cinder: /etc/cinder /var/log/cinder /home/cinder \ + && sed -i "s|udev_rules = 1|udev_rules = 0|g" /etc/lvm/lvm.conf \ + && sed -i "s|udev_sync = 1|udev_sync = 0|g" /etc/lvm/lvm.conf + +# NOTE(sdake): The sed operations make LVM tools work inside a container - see +# https://groups.google.com/forum/#!topic/docker-user/n4Xtvsb4RAw + +{% endif %} diff --git a/docker/cinder/cinder-scheduler/Dockerfile.j2 b/docker/cinder/cinder-scheduler/Dockerfile.j2 new file mode 100644 index 000000000..fa331b195 --- /dev/null +++ b/docker/cinder/cinder-scheduler/Dockerfile.j2 @@ -0,0 +1,9 @@ +FROM {{ namespace }}/{{ base_distro }}-{{ install_type }}-cinder-base:{{ tag }} +MAINTAINER Kolla Project (https://launchpad.net/kolla) + +COPY ./start.sh / +COPY config-external.sh /opt/kolla/ + +CMD ["/start.sh"] + +{{ include_footer }} diff --git a/docker/cinder/cinder-scheduler/config-external.sh b/docker/cinder/cinder-scheduler/config-external.sh new file mode 100644 index 000000000..3c8ca26be --- /dev/null +++ b/docker/cinder/cinder-scheduler/config-external.sh @@ -0,0 +1,10 @@ +#!/bin/bash +SOURCE="/opt/kolla/cinder-scheduler/cinder.conf" +TARGET="/etc/cinder/cinder.conf" +OWNER="cinder" + +if [[ -f "$SOURCE" ]]; then + cp $SOURCE $TARGET + chown ${OWNER}: $TARGET + chmod 0644 $TARGET +fi diff --git a/docker/cinder/cinder-scheduler/start.sh b/docker/cinder/cinder-scheduler/start.sh new file mode 100755 index 000000000..759175e3f --- /dev/null +++ b/docker/cinder/cinder-scheduler/start.sh @@ -0,0 +1,14 @@ +#!/bin/bash + +set -o errexit + +CMD="/usr/bin/cinder-scheduler" +ARGS="--config-file /etc/cinder/cinder.conf" + +# Loading common functions. +source /opt/kolla/kolla-common.sh + +# Execute config strategy +set_configs + +exec $CMD $ARGS diff --git a/docker/cinder/cinder-volume/Dockerfile.j2 b/docker/cinder/cinder-volume/Dockerfile.j2 new file mode 100644 index 000000000..6393798bd --- /dev/null +++ b/docker/cinder/cinder-volume/Dockerfile.j2 @@ -0,0 +1,19 @@ +FROM {{ namespace }}/{{ base_distro }}-{{ install_type }}-cinder-base:{{ tag }} +MAINTAINER Kolla Project (https://launchpad.net/kolla) + +{% if install_type == 'binary' %} + {% if base_distro in ['fedora', 'centos', 'oraclelinux'] %} + +RUN yum install -y lvm2 \ + scsi-target-utils \ + && yum clean all + + {% endif %} +{% endif %} + +COPY ./start.sh / +COPY config-external.sh /opt/kolla/ + +CMD ["/start.sh"] + +{{ include_footer }} diff --git a/docker/cinder/cinder-volume/config-external.sh b/docker/cinder/cinder-volume/config-external.sh new file mode 100755 index 000000000..2f6b99fc9 --- /dev/null +++ b/docker/cinder/cinder-volume/config-external.sh @@ -0,0 +1,10 @@ +#!/bin/bash +SOURCE="/opt/kolla/cinder-volume/cinder.conf" +TARGET="/etc/cinder/cinder.conf" +OWNER="cinder" + +if [[ -f "$SOURCE" ]]; then + cp $SOURCE $TARGET + chown ${OWNER}: $TARGET + chmod 0644 $TARGET +fi diff --git a/docker/cinder/cinder-volume/start.sh b/docker/cinder/cinder-volume/start.sh new file mode 100755 index 000000000..a6874ce47 --- /dev/null +++ b/docker/cinder/cinder-volume/start.sh @@ -0,0 +1,14 @@ +#!/bin/bash + +set -o errexit + +CMD="/usr/bin/cinder-volume" +ARGS="--config-file /etc/cinder/cinder.conf" + +# Loading common functions. +source /opt/kolla/kolla-common.sh + +# Execute config strategy +set_configs + +exec $CMD $ARGS diff --git a/docker/data/Dockerfile.j2 b/docker/data/Dockerfile.j2 new file mode 100644 index 000000000..7fecdb068 --- /dev/null +++ b/docker/data/Dockerfile.j2 @@ -0,0 +1,6 @@ +FROM {{ base_distro }}:{{ base_distro_tag }} +MAINTAINER Kolla Project (https://launchpad.net/kolla) + +CMD /bin/sleep infinity + +{{ include_footer }} diff --git a/docker/designate/designate-api/Dockerfile.j2 b/docker/designate/designate-api/Dockerfile.j2 new file mode 100644 index 000000000..75f4b06ee --- /dev/null +++ b/docker/designate/designate-api/Dockerfile.j2 @@ -0,0 +1,19 @@ +FROM {{ namespace }}/{{ base_distro }}-{{ install_type }}-designate-base:{{ tag }} +MAINTAINER Kolla Project (https://launchpad.net.kolla) + +{% if install_type == 'binary' %} + {% if base_distro in ['centos', 'fedora', 'oraclelinux'] %} + +RUN yum install -y \ + openstack-designate-api \ + && yum clean all + + {% endif %} +{% endif %} + +COPY start.sh /start.sh +COPY config-external.sh /opt/kolla/ + +CMD ["/start.sh"] + +{{ include_footer }} diff --git a/docker/designate/designate-api/config-external.sh b/docker/designate/designate-api/config-external.sh new file mode 100644 index 000000000..ce302ea0c --- /dev/null +++ b/docker/designate/designate-api/config-external.sh @@ -0,0 +1,10 @@ +#!/bin/bash +SOURCE="/opt/kolla/designate/designate.conf" +TARGET="/etc/designate/designate.conf" +OWNER="designate" + +if [[ -f "$SOURCE" ]]; then + cp $SOURCE $TARGET + chown ${OWNER}: $TARGET + chmod 0644 $TARGET +fi diff --git a/docker/designate/designate-api/start.sh b/docker/designate/designate-api/start.sh new file mode 100755 index 000000000..fe556225b --- /dev/null +++ b/docker/designate/designate-api/start.sh @@ -0,0 +1,20 @@ +#!/bin/bash + +set -o errexit +CMD="/usr/bin/designate-api" +ARGS="" + +# Loading common functions. +source /opt/kolla/kolla-common.sh + +# Execute config strategy +set_configs + +# Bootstrap and exit if KOLLA_BOOTSTRAP variable is set. This catches all cases +# of the KOLLA_BOOTSTRAP variable being set, including empty. +if [[ "${!KOLLA_BOOTSTRAP[@]}" ]]; then + su -s /bin/sh -c "designate-manage db_sync" designate + exit 0 +fi + +exec $CMD $ARGS diff --git a/docker/designate/designate-backend-bind9/Dockerfile.j2 b/docker/designate/designate-backend-bind9/Dockerfile.j2 new file mode 100644 index 000000000..06f86c043 --- /dev/null +++ b/docker/designate/designate-backend-bind9/Dockerfile.j2 @@ -0,0 +1,19 @@ +FROM {{ namespace }}/{{ base_distro }}-{{ install_type }}-designate-base:{{ tag }} +MAINTAINER Kolla Project (https://launchpad.net.kolla) + +{% if install_type == 'binary' %} + {% if base_distro in ['centos', 'fedora', 'oraclelinux'] %} + +RUN yum install -y bind \ + && yum clean all \ + && cp -pr /var/named /opt/kolla/var-named + + {% endif %} +{% endif %} + +COPY start.sh /start.sh +COPY config-external.sh /opt/kolla/ + +CMD ["/start.sh"] + +{{ include_footer }} diff --git a/docker/designate/designate-backend-bind9/config-external.sh b/docker/designate/designate-backend-bind9/config-external.sh new file mode 100644 index 000000000..ce302ea0c --- /dev/null +++ b/docker/designate/designate-backend-bind9/config-external.sh @@ -0,0 +1,10 @@ +#!/bin/bash +SOURCE="/opt/kolla/designate/designate.conf" +TARGET="/etc/designate/designate.conf" +OWNER="designate" + +if [[ -f "$SOURCE" ]]; then + cp $SOURCE $TARGET + chown ${OWNER}: $TARGET + chmod 0644 $TARGET +fi diff --git a/docker/designate/designate-backend-bind9/start.sh b/docker/designate/designate-backend-bind9/start.sh new file mode 100755 index 000000000..11922974a --- /dev/null +++ b/docker/designate/designate-backend-bind9/start.sh @@ -0,0 +1,13 @@ +#!/bin/bash + +set -o errexit +CMD="/usr/sbin/named" +ARGS="-u named -g" + +# Execute config strategy +source /opt/kolla/kolla-common.sh + +# Execute config strategy +set_configs + +exec $CMD $ARGS diff --git a/docker/designate/designate-base/Dockerfile.j2 b/docker/designate/designate-base/Dockerfile.j2 new file mode 100644 index 000000000..3fec3a6f7 --- /dev/null +++ b/docker/designate/designate-base/Dockerfile.j2 @@ -0,0 +1,37 @@ +FROM {{ namespace }}/{{ base_distro }}-{{ install_type }}-base:{{ tag }} +MAINTAINER Kolla Project (https://launchpad.net.kolla) + +{% if install_type == 'binary' %} + {% if base_distro in ['centos', 'fedora', 'oraclelinux'] %} + +# Install designate-api because of /etc/designate/policy.json, which +# is needed in all services. This is probably a packaging bug. We do +# need the complete policy file because of some of the containers' +# requiring it. Remove the package when the file is moved though. +RUN yum install -y \ + MySQL-python \ + openstack-designate-api \ + openstack-designate-common \ + python-tooz \ + && yum clean all \ + && cp /etc/designate/policy.json /tmp/ \ + && rpm -e openstack-designate-api \ + && mv /tmp/policy.json /etc/designate/ + + {% elif base_distro in ['ubuntu', 'debian'] %} + +RUN echo '{{ install_type}} not yet available for {{ base_distro }}' \ + && /bin/false + + {% endif %} +{% elif install_type == 'source' %} + +ADD designate.tar / +RUN ln -s /designate-* designate \ + && useradd --user-group designate \ + && pip --no-cache-dir install /designate \ + && mkdir -p /etc/designate /var/log/designate /home/designate \ + && cp -r /designate/etc/designate/* /etc/designate/ \ + && chown -R designate: /etc/designate /var/log/designate /home/designate + +{% endif %} diff --git a/docker/designate/designate-central/Dockerfile.j2 b/docker/designate/designate-central/Dockerfile.j2 new file mode 100644 index 000000000..771ff3c68 --- /dev/null +++ b/docker/designate/designate-central/Dockerfile.j2 @@ -0,0 +1,19 @@ +FROM {{ namespace }}/{{ base_distro }}-{{ install_type }}-designate-base:{{ tag }} +MAINTAINER Kolla Project (https://launchpad.net.kolla) + +{% if install_type == 'binary' %} + {% if base_distro in ['centos', 'fedora', 'oraclelinux'] %} + +RUN yum install -y \ + openstack-designate-central \ + && yum clean all + + {% endif %} +{% endif %} + +COPY start.sh /start.sh +COPY config-external.sh /opt/kolla/ + +CMD ["/start.sh"] + +{{ include_footer }} diff --git a/docker/designate/designate-central/config-external.sh b/docker/designate/designate-central/config-external.sh new file mode 100644 index 000000000..ce302ea0c --- /dev/null +++ b/docker/designate/designate-central/config-external.sh @@ -0,0 +1,10 @@ +#!/bin/bash +SOURCE="/opt/kolla/designate/designate.conf" +TARGET="/etc/designate/designate.conf" +OWNER="designate" + +if [[ -f "$SOURCE" ]]; then + cp $SOURCE $TARGET + chown ${OWNER}: $TARGET + chmod 0644 $TARGET +fi diff --git a/docker/designate/designate-central/start.sh b/docker/designate/designate-central/start.sh new file mode 100755 index 000000000..eac012d3d --- /dev/null +++ b/docker/designate/designate-central/start.sh @@ -0,0 +1,13 @@ +#!/bin/bash + +set -o errexit +CMD="/usr/bin/designate-central" +ARGS="" + +# Loading common functions. +source /opt/kolla/kolla-common.sh + +# Execute config strategy +set_configs + +exec $CMD $ARGS diff --git a/docker/designate/designate-mdns/Dockerfile.j2 b/docker/designate/designate-mdns/Dockerfile.j2 new file mode 100644 index 000000000..cc5f5fb89 --- /dev/null +++ b/docker/designate/designate-mdns/Dockerfile.j2 @@ -0,0 +1,18 @@ +FROM {{ namespace }}/{{ base_distro }}-{{ install_type }}-designate-base:{{ tag }} +MAINTAINER Kolla Project (https://launchpad.net.kolla) + +{% if install_type == 'binary' %} + {% if base_distro in ['centos', 'fedora', 'oraclelinux'] %} + +RUN yum install -y openstack-designate-mdns \ + && yum clean all + + {% endif %} +{% endif %} + +COPY start.sh /start.sh +COPY config-external.sh /opt/kolla/ + +CMD ["/start.sh"] + +{{ include_footer }} diff --git a/docker/designate/designate-mdns/config-external.sh b/docker/designate/designate-mdns/config-external.sh new file mode 100644 index 000000000..ce302ea0c --- /dev/null +++ b/docker/designate/designate-mdns/config-external.sh @@ -0,0 +1,10 @@ +#!/bin/bash +SOURCE="/opt/kolla/designate/designate.conf" +TARGET="/etc/designate/designate.conf" +OWNER="designate" + +if [[ -f "$SOURCE" ]]; then + cp $SOURCE $TARGET + chown ${OWNER}: $TARGET + chmod 0644 $TARGET +fi diff --git a/docker/designate/designate-mdns/start.sh b/docker/designate/designate-mdns/start.sh new file mode 100755 index 000000000..b4bcda20c --- /dev/null +++ b/docker/designate/designate-mdns/start.sh @@ -0,0 +1,13 @@ +#!/bin/bash + +set -o errexit +CMD="/usr/bin/designate-mdns" +ARGS="" + +# Loading common functions. +source /opt/kolla/kolla-common.sh + +# Execute config strategy +set_configs + +exec $CMD $ARGS diff --git a/docker/designate/designate-poolmanager/Dockerfile.j2 b/docker/designate/designate-poolmanager/Dockerfile.j2 new file mode 100644 index 000000000..0fc968b90 --- /dev/null +++ b/docker/designate/designate-poolmanager/Dockerfile.j2 @@ -0,0 +1,21 @@ +FROM {{ namespace }}/{{ base_distro }}-{{ install_type }}-designate-base:{{ tag }} +MAINTAINER Kolla Project (https://launchpad.net.kolla) + +{% if install_type == 'binary' %} + {% if base_distro in ['centos', 'fedora', 'oraclelinux'] %} + +# The bind9 package here is only to provide the rndc binary. +RUN yum install -y \ + openstack-designate-pool-manager \ + bind \ + && yum clean all + + {% endif %} +{% endif %} + +COPY start.sh /start.sh +COPY config-external.sh /opt/kolla/ + +CMD ["/start.sh"] + +{{ include_footer }} diff --git a/docker/designate/designate-poolmanager/config-external.sh b/docker/designate/designate-poolmanager/config-external.sh new file mode 100644 index 000000000..ce302ea0c --- /dev/null +++ b/docker/designate/designate-poolmanager/config-external.sh @@ -0,0 +1,10 @@ +#!/bin/bash +SOURCE="/opt/kolla/designate/designate.conf" +TARGET="/etc/designate/designate.conf" +OWNER="designate" + +if [[ -f "$SOURCE" ]]; then + cp $SOURCE $TARGET + chown ${OWNER}: $TARGET + chmod 0644 $TARGET +fi diff --git a/docker/designate/designate-poolmanager/start.sh b/docker/designate/designate-poolmanager/start.sh new file mode 100755 index 000000000..0752b9847 --- /dev/null +++ b/docker/designate/designate-poolmanager/start.sh @@ -0,0 +1,13 @@ +#!/bin/bash + +set -o errexit +CMD="/usr/bin/designate-pool-manager" +ARGS="" + +# Loading common functions. +source /opt/kolla/kolla-common.sh + +# Execute config strategy +set_configs + +exec $CMD $ARGS diff --git a/docker/designate/designate-sink/Dockerfile.j2 b/docker/designate/designate-sink/Dockerfile.j2 new file mode 100644 index 000000000..c0ea23b2d --- /dev/null +++ b/docker/designate/designate-sink/Dockerfile.j2 @@ -0,0 +1,20 @@ +FROM {{ namespace }}/{{ base_distro }}-{{ install_type }}-designate-base:{{ tag }} +MAINTAINER Kolla Project (https://launchpad.net.kolla) + +{% if install_type == 'binary' %} + {% if base_distro in ['centos', 'fedora', 'oraclelinux'] %} + +RUN yum install -y \ + openstack-designate-sink \ + python-designateclient \ + && yum clean all + + {% endif %} +{% endif %} + +COPY start.sh /start.sh +COPY config-external.sh /opt/kolla/ + +CMD ["/start.sh"] + +{{ include_footer }} diff --git a/docker/designate/designate-sink/config-external.sh b/docker/designate/designate-sink/config-external.sh new file mode 100644 index 000000000..ce302ea0c --- /dev/null +++ b/docker/designate/designate-sink/config-external.sh @@ -0,0 +1,10 @@ +#!/bin/bash +SOURCE="/opt/kolla/designate/designate.conf" +TARGET="/etc/designate/designate.conf" +OWNER="designate" + +if [[ -f "$SOURCE" ]]; then + cp $SOURCE $TARGET + chown ${OWNER}: $TARGET + chmod 0644 $TARGET +fi diff --git a/docker/designate/designate-sink/start.sh b/docker/designate/designate-sink/start.sh new file mode 100755 index 000000000..d2f93e26f --- /dev/null +++ b/docker/designate/designate-sink/start.sh @@ -0,0 +1,13 @@ +#!/bin/bash + +set -o errexit +CMD="/usr/bin/designate-sink" +ARGS="" + +# Loading common functions. +source /opt/kolla/kolla-common.sh + +# Execute config strategy +set_configs + +exec $CMD $ARGS diff --git a/docker/galera/Dockerfile.j2 b/docker/galera/Dockerfile.j2 new file mode 100644 index 000000000..38e66ee14 --- /dev/null +++ b/docker/galera/Dockerfile.j2 @@ -0,0 +1,42 @@ +FROM {{ namespace }}/{{ base_distro }}-{{ install_type }}-base:{{ tag }} +MAINTAINER Kolla Project (https://launchpad.net/kolla) + +{% if base_distro in ['fedora', 'centos', 'oraclelinux'] %} + +RUN yum install -y \ + MariaDB-Galera-server \ + MariaDB-client \ + rsync \ + galera \ + socat \ + hostname \ + percona-xtrabackup \ + pv \ + tar \ + expect \ + && rm -rf /var/lib/mysql/* + +{% elif base_distro in ['ubuntu', 'debian'] %} + +# At the end of this run statement we symlink two folders to match the folder +# structure of the RPM family for mysql configs. This allows us to not change +# the config-external.sh code +# TODO(SamYaple): Remove that symlink once config-external is updated +RUN apt-get install -y --no-install-recommends \ + mariadb-galera-server \ + percona-xtrabackup \ + socat \ + expect \ + && apt-get clean \ + && rm -rf /var/lib/mysql/* \ + && ln -s /etc/mysql/conf.d/ /etc/my.cnf.d + +{% endif %} + +COPY config-galera.sh /opt/kolla/config/ +COPY config-external.sh /opt/kolla/ +COPY start.sh / + +CMD ["/start.sh"] + +{{ include_footer }} diff --git a/docker/galera/config-external.sh b/docker/galera/config-external.sh new file mode 100644 index 000000000..43447a51c --- /dev/null +++ b/docker/galera/config-external.sh @@ -0,0 +1,11 @@ +#!/bin/bash +SOURCE="/opt/kolla/mariadb/galera.cnf" +TARGET="/etc/my.cnf.d/galera.cnf" +OWNER="mysql" + +# Cluster configuration +if [[ -f "$SOURCE" ]]; then + cp $SOURCE $TARGET + chown ${OWNER}: $TARGET + chmod 0600 $TARGET +fi diff --git a/docker/galera/config-galera.sh b/docker/galera/config-galera.sh new file mode 100755 index 000000000..e66084001 --- /dev/null +++ b/docker/galera/config-galera.sh @@ -0,0 +1,37 @@ +#!/bin/bash + +function bootstrap_db { + mysqld_safe --wsrep-new-cluster & + + # Waiting for deamon + sleep 10 + expect -c ' + set timeout 10 + spawn mysql_secure_installation + expect "Enter current password for root (enter for none):" + send "\r" + expect "Set root password?" + send "y\r" + expect "New password:" + send "'"${DB_ROOT_PASSWORD}"'\r" + expect "Re-enter new password:" + send "'"${DB_ROOT_PASSWORD}"'\r" + expect "Remove anonymous users?" + send "y\r" + expect "Disallow root login remotely?" + send "n\r" + expect "Remove test database and access to it?" + send "y\r" + expect "Reload privilege tables now?" + send "y\r" + expect eof' + + mysql -u root --password="${DB_ROOT_PASSWORD}" -e "GRANT ALL PRIVILEGES ON *.* TO 'root'@'localhost' IDENTIFIED BY '${DB_ROOT_PASSWORD}' WITH GRANT OPTION;" + mysql -u root --password="${DB_ROOT_PASSWORD}" -e "GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY '${DB_ROOT_PASSWORD}' WITH GRANT OPTION;" + mysqladmin -p"${DB_ROOT_PASSWORD}" shutdown +} + +function populate_db { + mysql_install_db + chown -R mysql: /var/lib/mysql +} diff --git a/docker/galera/start.sh b/docker/galera/start.sh new file mode 100755 index 000000000..f8f8d7f77 --- /dev/null +++ b/docker/galera/start.sh @@ -0,0 +1,25 @@ +#!/bin/bash + +set -o errexit + +CMD="/usr/bin/mysqld_safe" +ARGS="" + +# loading common functions +source /opt/kolla/kolla-common.sh + +# Execute config strategy +set_configs + +# loading functions +source /opt/kolla/config/config-galera.sh + +# This catches all cases of the BOOTSTRAP variable being set, including empty +if [[ "${!KOLLA_BOOTSTRAP[@]}" ]] && [[ ! -e /var/lib/mysql/cluster.exists ]]; then + ARGS="--wsrep-new-cluster" + touch /var/lib/mysql/cluster.exists + populate_db + bootstrap_db +fi + +exec $CMD $ARGS diff --git a/docker/glance/glance-api/Dockerfile.j2 b/docker/glance/glance-api/Dockerfile.j2 new file mode 100644 index 000000000..e603a6c36 --- /dev/null +++ b/docker/glance/glance-api/Dockerfile.j2 @@ -0,0 +1,9 @@ +FROM {{ namespace }}/{{ base_distro }}-{{ install_type }}-glance-base:{{ tag }} +MAINTAINER Kolla Project (https://launchpad.net/kolla) + +COPY start.sh / +COPY config-external.sh /opt/kolla/ + +CMD ["/start.sh"] + +{{ include_footer }} diff --git a/docker/glance/glance-api/config-external.sh b/docker/glance/glance-api/config-external.sh new file mode 100755 index 000000000..ce5411738 --- /dev/null +++ b/docker/glance/glance-api/config-external.sh @@ -0,0 +1,10 @@ +#!/bin/bash +SOURCE="/opt/kolla/glance-api/glance-api.conf" +TARGET="/etc/glance/glance-api.conf" +OWNER="glance" + +if [[ -f "$SOURCE" ]]; then + cp $SOURCE $TARGET + chown ${OWNER}: $TARGET + chmod 0644 $TARGET +fi diff --git a/docker/glance/glance-api/start.sh b/docker/glance/glance-api/start.sh new file mode 100755 index 000000000..ce3cb6d8b --- /dev/null +++ b/docker/glance/glance-api/start.sh @@ -0,0 +1,20 @@ +#!/bin/bash +set -o errexit + +CMD="/usr/bin/glance-api" +ARGS="" + +# Loading common functions. +source /opt/kolla/kolla-common.sh + +# Execute config strategy +set_configs + +# Bootstrap and exit if KOLLA_BOOTSTRAP variable is set. This catches all cases +# of the KOLLA_BOOTSTRAP variable being set, including empty. +if [[ "${!KOLLA_BOOTSTRAP[@]}" ]]; then + su -s /bin/sh -c "glance-manage db_sync" glance + exit 0 +fi + +exec $CMD $ARGS diff --git a/docker/glance/glance-base/Dockerfile.j2 b/docker/glance/glance-base/Dockerfile.j2 new file mode 100644 index 000000000..8fad82106 --- /dev/null +++ b/docker/glance/glance-base/Dockerfile.j2 @@ -0,0 +1,28 @@ +FROM {{ namespace }}/{{ base_distro }}-{{ install_type }}-base:{{ tag }} +MAINTAINER Kolla Project (https://launchpad.net/kolla) + +{% if install_type == 'binary' %} + {% if base_distro in ['fedora', 'centos', 'oraclelinux'] %} + +RUN yum -y install \ + openstack-glance \ + python-oslo-i18n \ + && yum clean all + + {% elif base_distro in ['ubuntu', 'debian'] %} + +RUN echo '{{ install_type }} not yet available for {{ base_distro }}' \ + && /bin/false + + {% endif %} +{% elif install_type == 'source' %} + +ADD glance.tar / +RUN ln -s /glance-* glance \ + && useradd --user-group glance \ + && pip --no-cache-dir install /glance \ + && mkdir -p /etc/glance /var/log/glance /home/glance \ + && cp -r /glance/etc/* /etc/glance/ \ + && chown -R glance: /etc/glance /var/log/glance /home/glance + +{% endif %} diff --git a/docker/glance/glance-registry/Dockerfile.j2 b/docker/glance/glance-registry/Dockerfile.j2 new file mode 100644 index 000000000..e603a6c36 --- /dev/null +++ b/docker/glance/glance-registry/Dockerfile.j2 @@ -0,0 +1,9 @@ +FROM {{ namespace }}/{{ base_distro }}-{{ install_type }}-glance-base:{{ tag }} +MAINTAINER Kolla Project (https://launchpad.net/kolla) + +COPY start.sh / +COPY config-external.sh /opt/kolla/ + +CMD ["/start.sh"] + +{{ include_footer }} diff --git a/docker/glance/glance-registry/config-external.sh b/docker/glance/glance-registry/config-external.sh new file mode 100755 index 000000000..37abd136d --- /dev/null +++ b/docker/glance/glance-registry/config-external.sh @@ -0,0 +1,10 @@ +#!/bin/bash +SOURCE="/opt/kolla/glance-registry/glance-registry.conf" +TARGET="/etc/glance/glance-registry.conf" +OWNER="glance" + +if [[ -f "$SOURCE" ]]; then + cp $SOURCE $TARGET + chown ${OWNER}: $TARGET + chmod 0644 $TARGET +fi diff --git a/docker/glance/glance-registry/start.sh b/docker/glance/glance-registry/start.sh new file mode 100755 index 000000000..1d8265f80 --- /dev/null +++ b/docker/glance/glance-registry/start.sh @@ -0,0 +1,13 @@ +#!/bin/bash +set -o errexit + +CMD="/usr/bin/glance-registry" +ARGS="" + +# Loading common functions. +source /opt/kolla/kolla-common.sh + +# Execute config strategy +set_configs + +exec $CMD $ARGS diff --git a/docker/gnocchi/gnocchi-api/Dockerfile.j2 b/docker/gnocchi/gnocchi-api/Dockerfile.j2 new file mode 100644 index 000000000..9ca70113c --- /dev/null +++ b/docker/gnocchi/gnocchi-api/Dockerfile.j2 @@ -0,0 +1,21 @@ +FROM {{ namespace }}/{{ base_distro }}-{{ install_type }}-gnocchi-base:{{ tag }} +MAINTAINER Kolla Project (https://launchpad.net/kolla) + +{% if install_type == 'binary' %} + {% if base_distro in ['fedora', 'centos', 'oraclelinux'] %} + +RUN yum install -y \ + openstack-gnocchi-api \ + openstack-gnocchi-carbonara \ + openstack-gnocchi-indexer-sqlalchemy \ + && yum clean all + + {% endif %} +{% endif %} + +COPY start.sh / +COPY config-external.sh /opt/kolla/ + +CMD ["/start.sh"] + +{{ include_footer }} diff --git a/docker/gnocchi/gnocchi-api/config-external.sh b/docker/gnocchi/gnocchi-api/config-external.sh new file mode 100644 index 000000000..59639ba63 --- /dev/null +++ b/docker/gnocchi/gnocchi-api/config-external.sh @@ -0,0 +1,10 @@ +#!/bin/bash +SOURCE="/opt/kolla/gnocchi-api/gnocchi-api.conf" +TARGET="/etc/gnocchi/gnocchi-api.conf" +OWNER="gnocchi" + +if [[ -f "$SOURCE" ]]; then + cp $SOURCE $TARGET + chown ${OWNER}: $TARGET + chmod 0644 $TARGET +fi diff --git a/docker/gnocchi/gnocchi-api/start.sh b/docker/gnocchi/gnocchi-api/start.sh new file mode 100755 index 000000000..657368a27 --- /dev/null +++ b/docker/gnocchi/gnocchi-api/start.sh @@ -0,0 +1,21 @@ +#!/bin/bash +set -o errexit + +CMD="/usr/bin/gnocchi-api" +ARGS="" + +# Loading common functions. +source /opt/kolla/kolla-common.sh + +# Execute config strategy +set_configs + +# Bootstrap and exit if KOLLA_BOOTSTRAP variable is set. This catches all cases +# of the KOLLA_BOOTSTRAP variable being set, including empty. +if [[ "${!KOLLA_BOOTSTRAP[@]}" ]]; then + su -s /bin/sh -c "gnocchi-manage db_sync" gnocchi + exit 0 +fi + +exec $CMD $ARGS + diff --git a/docker/gnocchi/gnocchi-base/Dockerfile.j2 b/docker/gnocchi/gnocchi-base/Dockerfile.j2 new file mode 100644 index 000000000..be8840073 --- /dev/null +++ b/docker/gnocchi/gnocchi-base/Dockerfile.j2 @@ -0,0 +1,25 @@ +FROM {{ namespace }}/{{ base_distro }}-{{ install_type }}-base:{{ tag }} +MAINTAINER Kolla Project (https://launchpad.net/kolla) + +{% if install_type == 'binary' %} + +RUN echo '{{ install_type }} not yet available for {{ base_distro }}' \ + && /bin/false + +{% elif install_type == 'source' %} + {% if base_distro in ['ubuntu', 'debian'] %} + +RUN apt-get install -y --no-install-recommends libpq-dev \ + && apt-get clean + + {% endif %} + +ADD gnocchi.tar / +RUN ln -s /gnocchi-* gnocchi \ + && useradd --user-group gnocchi \ + && pip --no-cache-dir install /gnocchi \ + && mkdir -p /etc/gnocchi /var/log/gnocchi /home/gnocchi \ + && cp -r /gnocchi/etc/* /etc/gnocchi/ \ + && chown -R gnocchi: /etc/gnocchi /var/log/gnocchi /home/gnocchi + +{% endif %} diff --git a/docker/gnocchi/gnocchi-statsd/Dockerfile.j2 b/docker/gnocchi/gnocchi-statsd/Dockerfile.j2 new file mode 100644 index 000000000..99f1374a2 --- /dev/null +++ b/docker/gnocchi/gnocchi-statsd/Dockerfile.j2 @@ -0,0 +1,18 @@ +FROM {{ namespace }}/{{ base_distro }}-{{ install_type }}-gnocchi-base:{{ tag }} +MAINTAINER Kolla Project (https://launchpad.net/kolla) + +{% if install_type == 'binary' %} + {% if base_distro in ['fedora', 'centos', 'oraclelinux'] %} + +RUN yum install -y openstack-gnocchi-statsd \ + && yum clean all + + {% endif %} +{% endif %} + +COPY start.sh / +COPY config-external.sh /opt/kolla/ + +CMD ["/start.sh"] + +{{ include_footer }} diff --git a/docker/gnocchi/gnocchi-statsd/config-external.sh b/docker/gnocchi/gnocchi-statsd/config-external.sh new file mode 100644 index 000000000..59639ba63 --- /dev/null +++ b/docker/gnocchi/gnocchi-statsd/config-external.sh @@ -0,0 +1,10 @@ +#!/bin/bash +SOURCE="/opt/kolla/gnocchi-api/gnocchi-api.conf" +TARGET="/etc/gnocchi/gnocchi-api.conf" +OWNER="gnocchi" + +if [[ -f "$SOURCE" ]]; then + cp $SOURCE $TARGET + chown ${OWNER}: $TARGET + chmod 0644 $TARGET +fi diff --git a/docker/gnocchi/gnocchi-statsd/start.sh b/docker/gnocchi/gnocchi-statsd/start.sh new file mode 100755 index 000000000..636e71323 --- /dev/null +++ b/docker/gnocchi/gnocchi-statsd/start.sh @@ -0,0 +1,14 @@ +#!/bin/bash +set -o errexit + +CMD="/usr/bin/gnocchi-statsd" +ARGS="" + +# Loading common functions. +source /opt/kolla/kolla-common.sh + +# Execute config strategy +set_configs + +exec $CMD $ARGS + diff --git a/docker/haproxy/Dockerfile.j2 b/docker/haproxy/Dockerfile.j2 new file mode 100755 index 000000000..2858f436a --- /dev/null +++ b/docker/haproxy/Dockerfile.j2 @@ -0,0 +1,27 @@ +FROM {{ namespace }}/{{ base_distro }}-{{ install_type }}-base:{{ tag }} +MAINTAINER Kolla Project (https://launchpad.net/kolla) + +{% if base_distro in ['fedora', 'centos', 'oraclelinux'] %} + +RUN yum -y install \ + haproxy \ + && yum clean all + +{% elif base_distro == 'ubuntu' %} + +RUN apt-get install -y --no-install-recommends -t trusty-backports haproxy \ + && apt-get clean + +{% elif base_distro == 'debian' %} + +RUN apt-get install -y --no-install-recommends haproxy \ + && apt-get clean + +{% endif %} + +COPY start.sh / +COPY config-external.sh ensure_latest_config.sh /opt/kolla/ + +CMD ["/start.sh"] + +{{ include_footer }} diff --git a/docker/haproxy/config-external.sh b/docker/haproxy/config-external.sh new file mode 100644 index 000000000..0c41a5bdb --- /dev/null +++ b/docker/haproxy/config-external.sh @@ -0,0 +1,10 @@ +#!/bin/bash +SOURCE="/opt/kolla/haproxy/haproxy.cfg" +TARGET="/etc/haproxy/haproxy.cfg" +OWNER="root" + +if [[ -f "$SOURCE" ]]; then + cp -f $SOURCE $TARGET + chown ${OWNER}: $TARGET + chmod 0644 $TARGET +fi diff --git a/docker/haproxy/ensure_latest_config.sh b/docker/haproxy/ensure_latest_config.sh new file mode 100755 index 000000000..b91189ca5 --- /dev/null +++ b/docker/haproxy/ensure_latest_config.sh @@ -0,0 +1,12 @@ +#!/bin/bash + +CURRENT_CONFIG_HASH=$(sha1sum /etc/haproxy/haproxy.cfg | cut -f1 -d' ') +NEW_CONFIG_HASH=$(sha1sum /opt/kolla/haproxy/haproxy.cfg | cut -f1 -d' ') + +if [[ $CURRENT_CONFIG_HASH != $NEW_CONFIG_HASH ]]; then + changed=changed + source /opt/kolla/config-external.sh + /usr/sbin/haproxy -f /etc/haproxy/haproxy.cfg -p /run/haproxy.pid -sf $(cat /run/haproxy.pid) +fi + +echo $changed diff --git a/docker/haproxy/start.sh b/docker/haproxy/start.sh new file mode 100755 index 000000000..d1da4a607 --- /dev/null +++ b/docker/haproxy/start.sh @@ -0,0 +1,20 @@ +#!/bin/bash +set -o errexit + +CMD='/usr/sbin/haproxy' +ARGS="-f /etc/haproxy/haproxy.cfg -p /run/haproxy.pid" + +# Loading common functions. +source /opt/kolla/kolla-common.sh + +# Execute config strategy +set_configs + +# We are intentionally not using exec so we can reload the haproxy config later +$CMD $ARGS + +# TODO(SamYaple): This has the potential for a race condition triggered by a +# config reload that could cause the container to exit +while [[ -e "/proc/$(cat /run/haproxy.pid)" ]]; do + sleep 5 +done diff --git a/docker/heat/heat-api-cfn/Dockerfile.j2 b/docker/heat/heat-api-cfn/Dockerfile.j2 new file mode 100644 index 000000000..f199c16cf --- /dev/null +++ b/docker/heat/heat-api-cfn/Dockerfile.j2 @@ -0,0 +1,25 @@ +FROM {{ namespace }}/{{ base_distro }}-{{ install_type }}-heat-base:{{ tag }} +MAINTAINER Kolla Project (https://launchpad.net/kolla) + +{% if install_type == 'binary' %} + {% if base_distro in ['fedora', 'centos', 'oraclelinux'] %} + +RUN yum -y install \ + openstack-heat-api-cfn \ + python-openstackclient \ + && yum clean all + + {% elif base_distro in ['ubuntu', 'debian'] %} + +RUN echo '{{ install_type }} not yet available for {{ base_distro }}' \ + && /bin/false + + {% endif %} +{% endif %} + +COPY start.sh / +COPY config-external.sh /opt/kolla/ + +CMD ["/start.sh"] + +{{ include_footer }} diff --git a/docker/heat/heat-api-cfn/config-external.sh b/docker/heat/heat-api-cfn/config-external.sh new file mode 100644 index 000000000..91d5742f1 --- /dev/null +++ b/docker/heat/heat-api-cfn/config-external.sh @@ -0,0 +1,10 @@ +#!/bin/bash +SOURCE="/opt/kolla/heat-api-cfn/heat.conf" +TARGET="/etc/heat/heat.conf" +OWNER="heat" + +if [[ -f "$SOURCE" ]]; then + cp $SOURCE $TARGET + chown ${OWNER}: $TARGET + chmod 0644 $TARGET +fi diff --git a/docker/heat/heat-api-cfn/start.sh b/docker/heat/heat-api-cfn/start.sh new file mode 100755 index 000000000..54b533185 --- /dev/null +++ b/docker/heat/heat-api-cfn/start.sh @@ -0,0 +1,13 @@ +#!/bin/bash +set -o errexit + +CMD="/usr/bin/heat-api-cfn" +ARGS="" + +# Loading common functions. +source /opt/kolla/kolla-common.sh + +# Execute config strategy +set_configs + +exec $CMD $ARGS diff --git a/docker/heat/heat-api/Dockerfile.j2 b/docker/heat/heat-api/Dockerfile.j2 new file mode 100644 index 000000000..8a782d8d3 --- /dev/null +++ b/docker/heat/heat-api/Dockerfile.j2 @@ -0,0 +1,25 @@ +FROM {{ namespace }}/{{ base_distro }}-{{ install_type }}-heat-base:{{ tag }} +MAINTAINER Kolla Project (https://launchpad.net/kolla) + +{% if install_type == 'binary' %} + {% if base_distro in ['fedora', 'centos', 'oraclelinux'] %} + +RUN yum -y install \ + openstack-heat-api \ + python-openstackclient \ + && yum clean all + + {% elif base_distro in ['ubuntu', 'debian'] %} + +RUN echo '{{ install_type }} not yet available for {{ base_distro }}' \ + && /bin/false + + {% endif %} +{% endif %} + +COPY start.sh / +COPY config-external.sh /opt/kolla/ + +CMD ["/start.sh"] + +{{ include_footer }} diff --git a/docker/heat/heat-api/config-external.sh b/docker/heat/heat-api/config-external.sh new file mode 100644 index 000000000..ca5d73e90 --- /dev/null +++ b/docker/heat/heat-api/config-external.sh @@ -0,0 +1,10 @@ +#!/bin/bash +SOURCE="/opt/kolla/heat-api/heat-api.conf" +TARGET="/etc/heat/heat-api.conf" +OWNER="heat" + +if [[ -f "$SOURCE" ]]; then + cp $SOURCE $TARGET + chown ${OWNER}: $TARGET + chmod 0644 $TARGET +fi diff --git a/docker/heat/heat-api/start.sh b/docker/heat/heat-api/start.sh new file mode 100755 index 000000000..a7b14b1d9 --- /dev/null +++ b/docker/heat/heat-api/start.sh @@ -0,0 +1,13 @@ +#!/bin/bash +set -o errexit + +CMD="/usr/bin/heat-api" +ARGS="" + +# Loading common functions. +source /opt/kolla/kolla-common.sh + +# Execute config strategy +set_configs + +exec $CMD $ARGS diff --git a/docker/heat/heat-base/Dockerfile.j2 b/docker/heat/heat-base/Dockerfile.j2 new file mode 100644 index 000000000..408167e90 --- /dev/null +++ b/docker/heat/heat-base/Dockerfile.j2 @@ -0,0 +1,27 @@ +FROM {{ namespace }}/{{ base_distro }}-{{ install_type }}-base:{{ tag }} +MAINTAINER Kolla Project (https://launchpad.net/kolla) + +{% if install_type == 'binary' %} + {% if base_distro in ['fedora', 'centos', 'oraclelinux'] %} + +RUN yum -y install \ + python-oslo-reports \ + && yum clean all + + {% elif base_distro in ['ubuntu', 'debian'] %} + +RUN echo '{{ install_type }} not yet available for {{ base_distro }}' \ + && /bin/false + + {% endif %} +{% elif install_type == 'source' %} + +ADD heat.tar / +RUN ln -s /heat-* heat \ + && useradd --user-group heat \ + && pip --no-cache-dir install /heat \ + && mkdir -p /etc/heat /var/log/heat /home/heat \ + && cp -r /heat/etc/heat/* /etc/heat/ \ + && chown -R heat: /etc/heat /var/log/heat /home/heat + +{% endif %} diff --git a/docker/heat/heat-engine/Dockerfile.j2 b/docker/heat/heat-engine/Dockerfile.j2 new file mode 100644 index 000000000..5002d519d --- /dev/null +++ b/docker/heat/heat-engine/Dockerfile.j2 @@ -0,0 +1,28 @@ +FROM {{ namespace }}/{{ base_distro }}-{{ install_type }}-heat-base:{{ tag }} +MAINTAINER Kolla Project (https://launchpad.net/kolla) + +{% if install_type == 'binary' %} + {% if base_distro in ['fedora', 'centos', 'oraclelinux'] %} + +RUN yum -y install \ + # until http://pkgs.fedoraproject.org/cgit/openstack-heat.git/tree/openstack-heat.spec#n248 \ + # is updated, the clients must remain here: \ + python-barbicanclient \ + python-zaqarclient \ + openstack-heat-engine \ + && yum clean all + + {% elif base_distro in ['ubuntu', 'debian'] %} + +RUN echo '{{ install_type }} not yet available for {{ base_distro }}' \ + && /bin/false + + {% endif %} +{% endif %} + +COPY start.sh / +COPY config-external.sh /opt/kolla/ + +CMD ["/start.sh"] + +{{ include_footer }} diff --git a/docker/heat/heat-engine/config-external.sh b/docker/heat/heat-engine/config-external.sh new file mode 100644 index 000000000..bde0ffe0d --- /dev/null +++ b/docker/heat/heat-engine/config-external.sh @@ -0,0 +1,10 @@ +#!/bin/bash +SOURCE="/opt/kolla/heat-engine/heat.conf" +TARGET="/etc/heat/heat.conf" +OWNER="heat" + +if [[ -f "$SOURCE" ]]; then + cp $SOURCE $TARGET + chown ${OWNER}: $TARGET + chmod 0644 $TARGET +fi diff --git a/docker/heat/heat-engine/start.sh b/docker/heat/heat-engine/start.sh new file mode 100755 index 000000000..8f9a6f1cb --- /dev/null +++ b/docker/heat/heat-engine/start.sh @@ -0,0 +1,20 @@ +#!/bin/bash +set -o errexit + +CMD="/usr/bin/heat-engine" +ARGS="" + +# Loading common functions. +source /opt/kolla/kolla-common.sh + +# Execute config strategy +set_configs + +# Bootstrap and exit if KOLLA_BOOTSTRAP variable is set. This catches all cases +# of the KOLLA_BOOTSTRAP variable being set, including empty. +if [[ "${!KOLLA_BOOTSTRAP[@]}" ]]; then + su -s /bin/bash -c "/usr/bin/heat-manage db_sync" heat + exit 0 +fi + +exec $CMD $ARGS diff --git a/docker/horizon/Dockerfile.j2 b/docker/horizon/Dockerfile.j2 new file mode 100644 index 000000000..2fe69b3d2 --- /dev/null +++ b/docker/horizon/Dockerfile.j2 @@ -0,0 +1,58 @@ +FROM {{ namespace }}/{{ base_distro }}-{{ install_type }}-base:{{ tag }} +MAINTAINER Kolla Project (https://launchpad.net.kolla) + +{% if install_type == 'binary' %} + {% if base_distro in ['centos', 'fedora', 'oraclelinux'] %} + +RUN yum -y install \ + openstack-dashboard \ + httpd \ + mod_wsgi \ + && yum clean all \ + && chown -R apache: /usr/share/openstack-dashboard/static + +# The chown is required because of this packaging bug: +# https://bugzilla.redhat.com/show_bug.cgi?id=1219006 + + {% elif base_distro in ['ubuntu', 'debian'] %} + +RUN echo '{{ install_type }} not yet available for {{ base_distro }}' \ + && /bin/false + + {% endif %} +{% elif install_type == 'source' %} + {% if base_distro in ['centos', 'fedora', 'oraclelinux'] %} + +RUN yum install -y \ + httpd \ + mod_wsgi \ + && yum clean all + + {% elif base_distro in ['ubuntu', 'debian'] %} + +RUN apt-get install -y --no-install-recommends \ + apache2 \ + libapache2-mod-wsgi \ + && echo > /etc/apache2/ports.conf \ + && apt-get clean + + {% endif %} + +ADD horizon.tar / +RUN ln -s /horizon-* horizon \ + && pip --no-cache-dir install /horizon \ + && useradd --user-group horizon \ + && mkdir -p /etc/openstack-dashboard /home/horizon \ + && ln -s openstack_dashboard/static/ /usr/lib/python2.7/site-packages/static \ + && ln -s /etc/openstack-dashboard/local_settings /usr/lib/python2.7/site-packages/openstack_dashboard/local/local_settings.py \ + && cp -r /horizon/openstack_dashboard/conf/* /etc/openstack-dashboard/ \ + && chown -R horizon: /etc/openstack-dashboard /home/horizon /usr/lib/python2.7/site-packages/openstack_dashboard/static + +{% endif %} + +COPY start.sh / +COPY config-external.sh /opt/kolla/ + +CMD ["/start.sh"] + +{{ include_footer }} diff --git a/docker/horizon/config-external.sh b/docker/horizon/config-external.sh new file mode 100644 index 000000000..8e9fc47a0 --- /dev/null +++ b/docker/horizon/config-external.sh @@ -0,0 +1,25 @@ +#!/bin/bash +SOURCE="/opt/kolla/horizon/local_settings" +TARGET="/etc/openstack-dashboard/local_settings" +OWNER="horizon" + +if [[ -f "$SOURCE" ]]; then + cp $SOURCE $TARGET + chown ${OWNER}: $TARGET + chmod 0644 $TARGET +fi + +if [[ "${KOLLA_BASE_DISTRO}" == "ubuntu" || \ + "${KOLLA_BASE_DISTRO}" == "debian" ]]; then + SOURCE="/opt/kolla/horizon/horizon.conf" + TARGET="/etc/apache2/sites-enabled/000-default.conf" +else + SOURCE="/opt/kolla/horizon/horizon.conf" + TARGET="/etc/httpd/sites.d/horizon.conf" +fi + +if [[ -f "$SOURCE" ]]; then + cp $SOURCE $TARGET + chown ${OWNER}: $TARGET + chmod 0644 $TARGET +fi diff --git a/docker/horizon/start.sh b/docker/horizon/start.sh new file mode 100755 index 000000000..096326a3a --- /dev/null +++ b/docker/horizon/start.sh @@ -0,0 +1,23 @@ +#!/bin/bash + +set -o errexit + +# Loading common functions +source /opt/kolla/kolla-common.sh + +if [[ "${KOLLA_BASE_DISTRO}" == "ubuntu" || \ + "${KOLLA_BASE_DISTRO}" == "debian" ]]; then + CMD="/usr/sbin/apache2" + ARGS="-DFOREGROUND" + + # Loading Apache2 ENV variables + source /etc/apache2/envvars +else + CMD="/usr/sbin/httpd" + ARGS="-DFOREGROUND" +fi + +# Execute config strategy +set_configs + +exec $CMD $ARGS diff --git a/docker/ironic/ironic-api/Dockerfile.j2 b/docker/ironic/ironic-api/Dockerfile.j2 new file mode 100644 index 000000000..5bce3bdda --- /dev/null +++ b/docker/ironic/ironic-api/Dockerfile.j2 @@ -0,0 +1,19 @@ +FROM {{ namespace }}/{{ base_distro }}-{{ install_type }}-ironic-base:{{ tag }} +MAINTAINER Kolla Project (https://launchpad.net/kolla) + +{% if install_type == 'binary' %} + {% if base_distro in ['fedora', 'centos', 'oraclelinux'] %} + +RUN yum -y install \ + openstack-ironic-api \ + && yum clean all + + {% endif %} +{% endif %} + +COPY start.sh / +COPY config-external.sh /opt/kolla/ + +CMD ["/start.sh"] + +{{ include_footer }} diff --git a/docker/ironic/ironic-api/config-external.sh b/docker/ironic/ironic-api/config-external.sh new file mode 100644 index 000000000..b838ee19d --- /dev/null +++ b/docker/ironic/ironic-api/config-external.sh @@ -0,0 +1,11 @@ +#!/bin/bash + +SOURCE="/opt/kolla/ironic-api/ironic.conf" +TARGET="/etc/ironic/ironic.conf" +OWNER="ironic" + +if [[ -f "$SOURCE" ]]; then + cp $SOURCE $TARGET + chown ${OWNER}: $TARGET + chmod 0644 $TARGET +fi diff --git a/docker/ironic/ironic-api/start.sh b/docker/ironic/ironic-api/start.sh new file mode 100755 index 000000000..9d449defb --- /dev/null +++ b/docker/ironic/ironic-api/start.sh @@ -0,0 +1,10 @@ +#!/bin/bash +set -o errexit + +CMD="/usr/bin/ironic-api" +ARGS="" + +source /opt/kolla/kolla-common.sh +set_configs + +exec $CMD $ARGS diff --git a/docker/ironic/ironic-base/Dockerfile.j2 b/docker/ironic/ironic-base/Dockerfile.j2 new file mode 100644 index 000000000..0fc7e56c2 --- /dev/null +++ b/docker/ironic/ironic-base/Dockerfile.j2 @@ -0,0 +1,33 @@ +FROM {{ namespace }}/{{ base_distro }}-{{ install_type }}-base:{{ tag }} +MAINTAINER Kolla Project (https://launchpad.net/kolla) + +{% if install_type == 'binary' %} + {% if base_distro in ['fedora', 'centos', 'oraclelinux'] %} + +# until packaging is fixed, all of this is required +# api: policy +# conductor:MySQL-python +RUN yum -y install \ + python-oslo-log \ + python-oslo-concurrency \ + python-oslo-policy \ + MySQL-python \ + && yum clean all + + {% elif base_distro in ['ubuntu', 'debian'] %} + +RUN echo '{{ install_type }} not yet available for {{ base_distro }}' \ + && /bin/false + + {% endif %} +{% elif install_type == 'source' %} + +ADD ironic.tar / +RUN ln -s /ironic-* ironic \ + && useradd --user-group ironic \ + && pip --no-cache-dir install /ironic \ + && mkdir -p /etc/ironic /var/log/ironic /home/ironic \ + && cp -r /ironic/etc/* /etc/ironic/ \ + && chown -R ironic: /etc/ironic /var/log/ironic /home/ironic + +{% endif %} diff --git a/docker/ironic/ironic-conductor/Dockerfile.j2 b/docker/ironic/ironic-conductor/Dockerfile.j2 new file mode 100644 index 000000000..d38033230 --- /dev/null +++ b/docker/ironic/ironic-conductor/Dockerfile.j2 @@ -0,0 +1,19 @@ +FROM {{ namespace }}/{{ base_distro }}-{{ install_type }}-ironic-base:{{ tag }} +MAINTAINER Kolla Project (https://launchpad.net/kolla) + +{% if install_type == 'binary' %} + {% if base_distro in ['fedora', 'centos', 'oraclelinux'] %} + +RUN yum -y install \ + openstack-ironic-conductor \ + && yum clean all + + {% endif %} +{% endif %} + +COPY start.sh / +COPY config-external.sh /opt/kolla/ + +CMD ["/start.sh"] + +{{ include_footer }} diff --git a/docker/ironic/ironic-conductor/config-external.sh b/docker/ironic/ironic-conductor/config-external.sh new file mode 100644 index 000000000..b838ee19d --- /dev/null +++ b/docker/ironic/ironic-conductor/config-external.sh @@ -0,0 +1,11 @@ +#!/bin/bash + +SOURCE="/opt/kolla/ironic-api/ironic.conf" +TARGET="/etc/ironic/ironic.conf" +OWNER="ironic" + +if [[ -f "$SOURCE" ]]; then + cp $SOURCE $TARGET + chown ${OWNER}: $TARGET + chmod 0644 $TARGET +fi diff --git a/docker/ironic/ironic-conductor/start.sh b/docker/ironic/ironic-conductor/start.sh new file mode 100755 index 000000000..c766f04c5 --- /dev/null +++ b/docker/ironic/ironic-conductor/start.sh @@ -0,0 +1,10 @@ +#!/bin/bash +set -o errexit + +CMD="/usr/bin/ironic-conductor" +ARGS="" + +source /opt/kolla/kolla-common.sh +set_configs + +exec $CMD $ARGS diff --git a/docker/ironic/ironic-discoverd/Dockerfile.j2 b/docker/ironic/ironic-discoverd/Dockerfile.j2 new file mode 100644 index 000000000..cb4e8b80f --- /dev/null +++ b/docker/ironic/ironic-discoverd/Dockerfile.j2 @@ -0,0 +1,19 @@ +FROM {{ namespace }}/{{ base_distro }}-{{ install_type }}-ironic-base:{{ tag }} +MAINTAINER Kolla Project (https://launchpad.net/kolla) + +{% if install_type == 'binary' %} + {% if base_distro in ['fedora', 'centos', 'oraclelinux'] %} + +RUN yum -y install \ + openstack-ironic-discoverd \ + && yum clean all + + {% endif %} +{% endif %} + +COPY start.sh / +COPY config-external.sh /opt/kolla/ + +CMD ["/start.sh"] + +{{ include_footer }} diff --git a/docker/ironic/ironic-discoverd/config-external.sh b/docker/ironic/ironic-discoverd/config-external.sh new file mode 100644 index 000000000..a3f82b8f3 --- /dev/null +++ b/docker/ironic/ironic-discoverd/config-external.sh @@ -0,0 +1,11 @@ +#!/bin/bash + +SOURCE="/opt/kolla/ironic-discoverd/discoverd.conf" +TARGET="/etc/ironic-discoverd/discoverd.conf" +OWNER="ironic" + +if [[ -f "$SOURCE" ]]; then + cp $SOURCE $TARGET + chown ${OWNER}: $TARGET + chmod 0644 $TARGET +fi diff --git a/docker/ironic/ironic-discoverd/start.sh b/docker/ironic/ironic-discoverd/start.sh new file mode 100755 index 000000000..093dc517a --- /dev/null +++ b/docker/ironic/ironic-discoverd/start.sh @@ -0,0 +1,10 @@ +#!/bin/bash +set -o errexit + +CMD="/usr/bin/ironic-discoverd" +ARGS="" + +source /opt/kolla/kolla-common.sh +set_configs + +exec $CMD $ARGS diff --git a/docker/keepalived/Dockerfile.j2 b/docker/keepalived/Dockerfile.j2 new file mode 100644 index 000000000..325e4c2c5 --- /dev/null +++ b/docker/keepalived/Dockerfile.j2 @@ -0,0 +1,26 @@ +FROM {{ namespace }}/{{ base_distro }}-{{ install_type }}-base:{{ tag }} +MAINTAINER Kolla Project (https://launchpad.net/kolla) + +{% if base_distro in ['fedora', 'centos', 'oraclelinux'] %} + +RUN yum -y install \ + hostname \ + keepalived \ + socat \ + && yum clean all + +{% elif base_distro in ['ubuntu', 'debian'] %} + +RUN apt-get install -y --no-install-recommends \ + keepalived \ + socat \ + && apt-get clean + +{% endif %} + +COPY start.sh check_alive.sh / +COPY config-external.sh /opt/kolla/ + +CMD ["/start.sh"] + +{{ include_footer }} diff --git a/docker/keepalived/check_alive.sh b/docker/keepalived/check_alive.sh new file mode 100755 index 000000000..8c2684f10 --- /dev/null +++ b/docker/keepalived/check_alive.sh @@ -0,0 +1,6 @@ +#!/bin/bash + +# This will return 0 when it successfully talks to the haproxy daemon via the socket +# Failures return 1 + +echo "show info" | socat unix-connect:/run/haproxy.sock stdio diff --git a/docker/keepalived/config-external.sh b/docker/keepalived/config-external.sh new file mode 100755 index 000000000..d7ff97826 --- /dev/null +++ b/docker/keepalived/config-external.sh @@ -0,0 +1,10 @@ +#!/bin/bash +SOURCE="/opt/kolla/keepalived/keepalived.conf" +TARGET="/etc/keepalived/keepalived.conf" +OWNER="root" + +if [[ -f "$SOURCE" ]]; then + cp $SOURCE $TARGET + chown ${OWNER}: $TARGET + chmod 0644 $TARGET +fi diff --git a/docker/keepalived/start.sh b/docker/keepalived/start.sh new file mode 100755 index 000000000..a122526e4 --- /dev/null +++ b/docker/keepalived/start.sh @@ -0,0 +1,20 @@ +#!/bin/bash +set -o errexit + +CMD="/usr/sbin/keepalived" +ARGS="-nld -p /run/keepalived.pid" + +# Loading common functions. +source /opt/kolla/kolla-common.sh + +# Execute config strategy +set_configs + +modprobe ip_vs + +# Workaround for bug #1485079 +if [ -f /run/keepalived.pid ]; then + rm /run/keepalived.pid +fi + +exec $CMD $ARGS diff --git a/docker/keystone/Dockerfile.j2 b/docker/keystone/Dockerfile.j2 new file mode 100644 index 000000000..a3b686165 --- /dev/null +++ b/docker/keystone/Dockerfile.j2 @@ -0,0 +1,71 @@ +FROM {{ namespace }}/{{ base_distro }}-{{ install_type }}-base:{{ tag }} +MAINTAINER Kolla Project (https://launchpad.net/kolla) + +{% if install_type == 'binary' %} + {% if base_distro in ['fedora', 'centos', 'oraclelinux'] %} + +RUN yum -y install openstack-keystone \ + python-keystoneclient \ + python-openstackclient \ + httpd \ + mod_wsgi \ + && yum clean all + +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 + + {% elif base_distro in ['ubuntu', 'debian'] %} + +RUN apt-get install -y --no-install-recommends \ + apache2 \ + keystone \ + libapache2-mod-wsgi \ + python-keystoneclient \ + && apt-get clean + +RUN ln -s /etc/apache2/sites-available/wsgi-keystone.conf /etc/apache2/sites-enabled \ + && 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 + + {% endif %} +{% elif install_type == 'source' %} + {% if base_distro in ['fedora', 'centos', 'oraclelinux'] %} + +RUN yum -y install \ + httpd \ + mod_wsgi \ + && yum clean all + + {% elif base_distro in ['ubuntu', 'debian'] %} + +RUN apt-get install -y --no-install-recommends \ + apache2 \ + libapache2-mod-wsgi \ + && echo > /etc/apache2/ports.conf \ + && apt-get clean + + {% endif %} + +ADD keystone.tar / +RUN ln -s /keystone-* keystone \ + && useradd --user-group keystone \ + && pip --no-cache-dir install /keystone \ + && mkdir -p /etc/keystone /var/www/cgi-bin/keystone /var/log/apache2 /home/keystone \ + && cp -r /keystone/etc/* /etc/keystone/ \ + && cp /keystone/httpd/keystone.py /var/www/cgi-bin/keystone/admin \ + && cp /keystone/httpd/keystone.py /var/www/cgi-bin/keystone/main \ + && chown -R keystone: /etc/keystone /var/www/cgi-bin/keystone /var/log/apache2 /home/keystone + +{% endif %} + +RUN chown -R keystone: /var/www/cgi-bin/keystone \ + && chmod 755 /var/www/cgi-bin/keystone/* + +COPY start.sh / +COPY config-external.sh /opt/kolla/ + +CMD ["/start.sh"] + +{{ include_footer }} diff --git a/docker/keystone/config-external.sh b/docker/keystone/config-external.sh new file mode 100644 index 000000000..1bd4e3bb4 --- /dev/null +++ b/docker/keystone/config-external.sh @@ -0,0 +1,25 @@ +#!/bin/bash +SOURCE="/opt/kolla/keystone/keystone.conf" +TARGET="/etc/keystone/keystone.conf" +OWNER="keystone" + +if [[ -f "$SOURCE" ]]; then + cp $SOURCE $TARGET + chown ${OWNER}: $TARGET + chmod 0644 $TARGET +fi + +if [[ "${KOLLA_BASE_DISTRO}" == "ubuntu" || \ + "${KOLLA_BASE_DISTRO}" == "debian" ]]; then + SOURCE_WSGI="/opt/kolla/keystone/wsgi-keystone.conf" + TARGET_WSGI="/etc/apache2/conf-enabled/wsgi-keystone.conf" +else + SOURCE_WSGI="/opt/kolla/keystone/wsgi-keystone.conf" + TARGET_WSGI="/etc/httpd/conf.d/wsgi-keystone.conf" +fi + +if [[ -f "$SOURCE_WSGI" ]]; then + cp $SOURCE_WSGI $TARGET_WSGI + chown ${OWNER}: $TARGET_WSGI + chmod 0644 $TARGET_WSGI +fi diff --git a/docker/keystone/start.sh b/docker/keystone/start.sh new file mode 100755 index 000000000..d964b0303 --- /dev/null +++ b/docker/keystone/start.sh @@ -0,0 +1,48 @@ +#!/bin/bash + +set -o errexit + +# Loading common functions +source /opt/kolla/kolla-common.sh + +if [[ "${KOLLA_BASE_DISTRO}" == "ubuntu" || \ + "${KOLLA_BASE_DISTRO}" == "debian" ]]; then + CMD="/usr/sbin/apache2" + ARGS="-DFOREGROUND" + + # Loading Apache2 ENV variables + source /etc/apache2/envvars +else + CMD="/usr/sbin/httpd" + ARGS="-DFOREGROUND" +fi + +# Execute config strategy +set_configs + +# Bootstrap and exit if KOLLA_BOOTSTRAP variable is set. This catches all cases +# of the KOLLA_BOOTSTRAP variable being set, including empty. +if [[ "${!KOLLA_BOOTSTRAP[@]}" ]]; then + su -s /bin/sh -c "keystone-manage db_sync" keystone + + # Start the api to set initial endpoint and users with the admin_token + $CMD + sleep 5 + + keystone service-create --name keystone --type identity \ + --description "OpenStack Identity" + keystone endpoint-create --region "${REGION_NAME}" \ + --publicurl "${PUBLIC_URL}" \ + --internalurl "${INTERNAL_URL}" \ + --adminurl "${ADMIN_URL}" \ + --service-id $(keystone service-list | awk '/ identity / {print $2}') + + keystone tenant-create --description "Admin Project" --name admin + keystone user-create --pass "${KEYSTONE_ADMIN_PASSWORD}" --name admin + keystone role-create --name admin + keystone user-role-add --user admin --tenant admin --role admin + + exit 0 +fi + +exec $CMD $ARGS diff --git a/docker/kolla-ansible/Dockerfile.j2 b/docker/kolla-ansible/Dockerfile.j2 new file mode 100644 index 000000000..9975f5873 --- /dev/null +++ b/docker/kolla-ansible/Dockerfile.j2 @@ -0,0 +1,38 @@ +FROM {{ namespace }}/{{ base_distro }}-{{ install_type }}-base:{{ tag }} +MAINTAINER Kolla Project (https://launchpad.net/kolla) + +{% if base_distro in ['fedora', 'centos', 'oraclelinux'] %} + +RUN yum -y install \ + git \ + gcc \ + libffi-devel \ + libxml2-devel \ + libxslt-devel \ + MySQL-python \ + openssl-devel \ + python-devel \ + openssh-clients \ + && yum clean all + +RUN pip install -U pip wheel + +{% elif base_distro in ['ubuntu', 'debian'] %} + +RUN apt-get install -y --no-install-recommends git + +{% endif %} + +RUN pip install shade + +RUN git clone --depth 1 https://github.com/ansible/ansible.git \ + && cd ansible \ + && git submodule update --init --recursive \ + && pip install --install-option="--install-scripts=/usr/bin" . + +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/kolla-ansible/kolla_keystone_service.py b/docker/kolla-ansible/kolla_keystone_service.py new file mode 100644 index 000000000..455aaf578 --- /dev/null +++ b/docker/kolla-ansible/kolla_keystone_service.py @@ -0,0 +1,84 @@ +#!/usr/bin/python + +# Copyright 2015 Sam Yaple +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# This file is a barebones file needed to file a gap until Ansible 2.0. No error +# checking, no deletions, no updates. Idempotent creation only. + +# If you look closely, you will see we arent _really_ using the shade module +# we just use it to slightly abstract the authentication model. As patches land +# in upstream shade we will be able to use more of the shade module. Until then +# if we want to be 'stable' we really need to be using it as a passthrough + +import shade + +def main(): + module = AnsibleModule( + argument_spec = openstack_full_argument_spec( + description = dict(required=True, type='str'), + service_name = dict(required=True, type='str'), + service_type = dict(required=True, type='str'), + admin_url = dict(required=True, type='str'), + internal_url = dict(required=True, type='str'), + public_url = dict(required=True, type='str'), + endpoint_region = dict(required=True, type='str') + ) + ) + + try: + description = module.params.pop('description') + service_name = module.params.pop('service_name') + service_type = module.params.pop('service_type') + admin_url = module.params.pop('admin_url') + internal_url = module.params.pop('internal_url') + public_url = module.params.pop('public_url') + endpoint_region = module.params.pop('endpoint_region') + + changed = False + service = None + endpoint = None + + cloud = shade.operator_cloud(**module.params) + + for _service in cloud.keystone_client.services.list(): + if _service.type == service_type: + service = _service + + if service is not None: + for _endpoint in cloud.keystone_client.endpoints.list(): + if _endpoint.service_id == service.id: + endpoint = _endpoint + else: + service = cloud.keystone_client.services.create(name=service_name, + service_type=service_type, + description=description) + + if endpoint is None: + changed = True + cloud.keystone_client.endpoints.create(service_id=service.id, + adminurl=admin_url, + internalurl=public_url, + publicurl=public_url, + region=endpoint_region) + + module.exit_json(changed=changed) + except Exception as e: + module.exit_json(failed=True, changed=True, msg=e) + +# import module snippets +from ansible.module_utils.basic import * +from ansible.module_utils.openstack import * +if __name__ == '__main__': + main() diff --git a/docker/kolla-ansible/kolla_keystone_user.py b/docker/kolla-ansible/kolla_keystone_user.py new file mode 100644 index 000000000..5d295c1e2 --- /dev/null +++ b/docker/kolla-ansible/kolla_keystone_user.py @@ -0,0 +1,83 @@ +#!/usr/bin/python + +# Copyright 2015 Sam Yaple +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# This file is a barebones file needed to file a gap until Ansible 2.0. No error +# checking, no deletions, no updates. Idempotent creation only. + +# If you look closely, you will see we arent _really_ using the shade module +# we just use it to slightly abstract the authentication model. As patches land +# in upstream shade we will be able to use more of the shade module. Until then +# if we want to be 'stable' we really need to be using it as a passthrough + +import shade + +def main(): + module = AnsibleModule( + argument_spec = openstack_full_argument_spec( + password = dict(required=True, type='str'), + project = dict(required=True, type='str'), + role = dict(required=True, type='str'), + user = dict(required=True, type='str') + ) + ) + + try: + password = module.params.pop('password') + project_name = module.params.pop('project') + role_name = module.params.pop('role') + user_name = module.params.pop('user') + + changed = False + project = None + role = None + user = None + + cloud = shade.operator_cloud(**module.params) + + for _project in cloud.keystone_client.tenants.list(): + if _project.name == project_name: + project = _project + + for _role in cloud.keystone_client.roles.list(): + if _role.name == role_name: + role = _role + + for _user in cloud.keystone_client.users.list(): + if _user.name == user_name: + user = _user + + if not project: + changed = True + project = cloud.keystone_client.tenants.create(tenant_name=project_name) + + if not role: + changed = True + role = cloud.keystone_client.roles.create(name=role_name) + + if not user: + changed = True + user = cloud.keystone_client.users.create(name=user_name, password=password, tenant_id=project.id) + cloud.keystone_client.roles.add_user_role(role=role.id, user=user.id, tenant=project.id) + + module.exit_json(changed=changed) + except Exception as e: + module.exit_json(failed=True, changed=True, msg=e) + +# import module snippets +from ansible.module_utils.basic import * +from ansible.module_utils.openstack import * +if __name__ == '__main__': + main() diff --git a/docker/magnum/magnum-api/Dockerfile.j2 b/docker/magnum/magnum-api/Dockerfile.j2 new file mode 100644 index 000000000..e208a115e --- /dev/null +++ b/docker/magnum/magnum-api/Dockerfile.j2 @@ -0,0 +1,19 @@ +FROM {{ namespace }}/{{ base_distro }}-{{ install_type }}-magnum-base:{{ tag }} +MAINTAINER Kolla Project (https://launchpad.net/kolla) + +{% if install_type == 'binary' %} + {% if base_distro in ['fedora', 'centos', 'oraclelinux'] %} + +RUN yum -y install openstack-magnum-api \ + && yum clean all + + {% endif %} +{% endif %} + +COPY ./start.sh / +COPY config-external.sh /opt/kolla/ + +CMD ["/start.sh"] + + +{{ include_footer }} diff --git a/docker/magnum/magnum-api/config-external.sh b/docker/magnum/magnum-api/config-external.sh new file mode 100644 index 000000000..573043f7d --- /dev/null +++ b/docker/magnum/magnum-api/config-external.sh @@ -0,0 +1,10 @@ +#!/bin/bash +SOURCE="/opt/kolla/magnum/magnum-api/magnum.conf" +TARGET="/etc/magnum/magnum.conf" +OWNER="magnum" + +if [[ -f "$SOURCE" ]]; then + cp $SOURCE $TARGET + chown ${OWNER}: $TARGET + chmod 0644 $TARGET +fi diff --git a/docker/magnum/magnum-api/start.sh b/docker/magnum/magnum-api/start.sh new file mode 100755 index 000000000..ed154e29a --- /dev/null +++ b/docker/magnum/magnum-api/start.sh @@ -0,0 +1,20 @@ +#!/bin/bash + +set -o errexit +CMD="/usr/bin/magnum-api" +ARGS="" + +# Loading common functions. +source /opt/kolla/kolla-common.sh + +# Execute config strategy +set_configs + +# Bootstrap and exit if KOLLA_BOOTSTRAP variable is set. This catches all cases +# of the KOLLA_BOOTSTRAP variable being set, including empty. +if [[ "${!KOLLA_BOOTSTRAP[@]}" ]]; then + su -s /bin/sh -c "magnum-manage db_sync" magnum + exit 0 +fi + +exec $CMD $ARGS diff --git a/docker/magnum/magnum-base/Dockerfile.j2 b/docker/magnum/magnum-base/Dockerfile.j2 new file mode 100644 index 000000000..59c22f57e --- /dev/null +++ b/docker/magnum/magnum-base/Dockerfile.j2 @@ -0,0 +1,29 @@ +FROM {{ namespace }}/{{ base_distro }}-{{ install_type }}-base:{{ tag }} +MAINTAINER Kolla Project (https://launchpad.net/kolla) + +{% if install_type == 'binary' %} + {% if base_distro in ['centos'] %} + +RUN curl https://copr.fedoraproject.org/coprs/sdake/openstack-magnum/repo/epel-7/sdake-openstack-magnum-epel-7.repo -o /etc/yum.repos.d/sdake-openstack-magnum-epel-7.repo + + {% elif base_distro in ['fedora'] %} + +RUN curl https://copr.fedoraproject.org/coprs/sdake/openstack-magnum/repo/fedora-22/sdake-openstack-magnum-fedora-22.repo -o /etc/yum.repos.d/sdake-openstack-magnum-f22.repo + + {% elif base_distro in ['ubuntu', 'debian', 'oraclelinux'] %} + +RUN echo '{{ install_type }} not yet available for {{ base_distro }}' \ + && /bin/false + + {% endif %} +{% elif install_type == 'source' %} + +ADD magnum.tar / +RUN ln -s /magnum-* magnum \ + && useradd --user-group magnum \ + && pip --no-cache-dir install /magnum \ + && mkdir -p /etc/magnum /var/log/magnum /home/magnum \ + && cp -r /magnum/etc/* /etc/magnum/ \ + && chown -R magnum: /etc/magnum /var/log/magnum /home/magnum + +{% endif %} diff --git a/docker/magnum/magnum-conductor/Dockerfile.j2 b/docker/magnum/magnum-conductor/Dockerfile.j2 new file mode 100644 index 000000000..c14370085 --- /dev/null +++ b/docker/magnum/magnum-conductor/Dockerfile.j2 @@ -0,0 +1,23 @@ +FROM {{ namespace }}/{{ base_distro }}-{{ install_type }}-magnum-base:{{ tag }} +MAINTAINER Kolla Project (https://launchpad.net/kolla) + +{% if install_type == 'binary' %} + {% if base_distro in ['fedora', 'centos', 'oraclelinux'] %} + +RUN yum -y install openstack-magnum-conductor \ + tar \ + && yum clean all + +# Install kubectl binary (ugh) +RUN cd /tmp && curl -L https://github.com/GoogleCloudPlatform/kubernetes/releases/download/v0.15.0/kubernetes.tar.gz -o /tmp/kubernetes.tar.gz && /usr/bin/tar -xzvf /tmp/kubernetes.tar.gz && cp -a /tmp/kubernetes/platforms/linux/amd64/kubectl /usr/bin/kubectl && rm -rf /tmp/kubernetes + + {% endif %} +{% endif %} + +COPY ./start.sh / +COPY config-external.sh /opt/kolla/ + +CMD ["/start.sh"] + + +{{ include_footer }} diff --git a/docker/magnum/magnum-conductor/config-external.sh b/docker/magnum/magnum-conductor/config-external.sh new file mode 100644 index 000000000..b96e3179e --- /dev/null +++ b/docker/magnum/magnum-conductor/config-external.sh @@ -0,0 +1,10 @@ +#!/bin/bash +SOURCE="/opt/kolla/magnum/magnum-conductor/magnum.conf" +TARGET="/etc/magnum/magnum.conf" +OWNER="magnum" + +if [[ -f "$SOURCE" ]]; then + cp $SOURCE $TARGET + chown ${OWNER}: $TARGET + chmod 0644 $TARGET +fi diff --git a/docker/magnum/magnum-conductor/start.sh b/docker/magnum/magnum-conductor/start.sh new file mode 100755 index 000000000..a5c76ee85 --- /dev/null +++ b/docker/magnum/magnum-conductor/start.sh @@ -0,0 +1,14 @@ +#!/bin/bash + +set -o errexit + +CMD="/usr/bin/magnum-conductor" +ARGS="" + +# Loading common functions. +source /opt/kolla/kolla-common.sh + +# Execute config strategy +set_configs + +exec $CMD $ARGS diff --git a/docker/memcached/Dockerfile.j2 b/docker/memcached/Dockerfile.j2 new file mode 100644 index 000000000..0c0111f7e --- /dev/null +++ b/docker/memcached/Dockerfile.j2 @@ -0,0 +1,21 @@ +FROM {{ namespace }}/{{ base_distro }}-{{ install_type }}-base:{{ tag }} +MAINTAINER Kolla Project (https://launchpad.net/kolla) + +{% if base_distro in ['fedora', 'centos', 'oraclelinux'] %} + +RUN yum -y install memcached \ + && yum clean all + +{% elif base_distro in ['ubuntu', 'debian'] %} + +RUN apt-get install -y --no-install-recommends memcached \ + && apt-get clean + +{% endif %} + +COPY start.sh / +COPY config-external.sh /opt/kolla/ + +CMD ["/start.sh"] + +{{ include_footer }} diff --git a/docker/memcached/config-external.sh b/docker/memcached/config-external.sh new file mode 100644 index 000000000..0f3fa8336 --- /dev/null +++ b/docker/memcached/config-external.sh @@ -0,0 +1,10 @@ +#!/bin/bash +SOURCE="/opt/kolla/memcached/memcached.conf" +TARGET="/etc/memcached.conf" +OWNER="memcached" + +if [[ -f "$SOURCE" ]]; then + cp $SOURCE $TARGET + chown ${OWNER}: $TARGET + chmod 0644 $TARGET +fi diff --git a/docker/memcached/start.sh b/docker/memcached/start.sh new file mode 100755 index 000000000..531dd3872 --- /dev/null +++ b/docker/memcached/start.sh @@ -0,0 +1,16 @@ +#!/bin/bash + +set -o errexit + +CMD="/usr/bin/memcached" +ARGS="-u memcached -vv" + +# Loading common functions. +source /opt/kolla/kolla-common.sh + +# Execute config strategy +set_configs + +source /etc/memcached.conf + +exec $CMD $ARGS $OPTIONS diff --git a/docker/mongodb/Dockerfile.j2 b/docker/mongodb/Dockerfile.j2 new file mode 100644 index 000000000..ee82f0b7a --- /dev/null +++ b/docker/mongodb/Dockerfile.j2 @@ -0,0 +1,25 @@ +FROM {{ namespace }}/{{ base_distro }}-{{ install_type }}-base:{{ tag }} +MAINTAINER Kolla Project (https://launchpad.net/kolla) + +{% if base_distro in ['fedora', 'centos', 'oraclelinux'] %} + +RUN yum -y install \ + mongodb \ + mongodb-server \ + && yum clean all + +{% elif base_distro in ['ubuntu', 'debian'] %} + +RUN apt-get install -y --no-install-recommends mongodb-server \ + && apt-get clean + +{% endif %} + +RUN mkdir -p /data/db + +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/murano/murano-api/Dockerfile.j2 b/docker/murano/murano-api/Dockerfile.j2 new file mode 100644 index 000000000..f1d7e1f42 --- /dev/null +++ b/docker/murano/murano-api/Dockerfile.j2 @@ -0,0 +1,9 @@ +FROM {{ namespace }}/{{ base_distro }}-{{ install_type }}-murano-base:{{ tag }} +MAINTAINER Kolla Project (https://launchpad.net/kolla) + +COPY config-external.sh /opt/kolla/ +COPY start.sh / + +CMD ["/start.sh"] + +{{ include_footer }} diff --git a/docker/murano/murano-api/config-external.sh b/docker/murano/murano-api/config-external.sh new file mode 100644 index 000000000..5d9a2da49 --- /dev/null +++ b/docker/murano/murano-api/config-external.sh @@ -0,0 +1,10 @@ +#!/bin/bash +SOURCE="/opt/kolla/murano/murano.conf" +TARGET="/etc/murano/murano.conf" +OWNER="murano" + +if [[ -f "$SOURCE" ]]; then + cp $SOURCE $TARGET + chown ${OWNER}: $TARGET + chmod 0644 $TARGET +fi diff --git a/docker/murano/murano-api/start.sh b/docker/murano/murano-api/start.sh new file mode 100755 index 000000000..7d712177d --- /dev/null +++ b/docker/murano/murano-api/start.sh @@ -0,0 +1,20 @@ +#!/bin/bash +set -o errexit + +CMD="/usr/bin/murano-api" +ARGS="--config-file /etc/murano/murano.conf" + +# Loading common functions. +source /opt/kolla/kolla-common.sh + +# Execute config strategy +set_configs + +# Bootstrap and exit if KOLLA_BOOTSTRAP variable is set. This catches all cases +# of the KOLLA_BOOTSTRAP variable being set, including empty. +if [[ "${!KOLLA_BOOTSTRAP[@]}" ]]; then + su -s /bin/sh -c "murano-db-manage --config-file /etc/murano/murano.conf upgrade" murano + exit 0 +fi + +exec $CMD $ARGS diff --git a/docker/murano/murano-base/Dockerfile.j2 b/docker/murano/murano-base/Dockerfile.j2 new file mode 100644 index 000000000..cb700e5e0 --- /dev/null +++ b/docker/murano/murano-base/Dockerfile.j2 @@ -0,0 +1,19 @@ +FROM {{ namespace }}/{{ base_distro }}-{{ install_type }}-base:{{ tag }} +MAINTAINER Kolla Project (https://launchpad.net/kolla) + +{% if install_type == 'binary' %} + +RUN echo '{{ install_type }} not yet available for {{ base_distro }}' \ + && /bin/false + +{% elif install_type == 'source' %} + +ADD murano.tar / +RUN ln -s /murano-* murano \ + && useradd --user-group murano \ + && pip --no-cache-dir install /murano \ + && mkdir -p /etc/murano /var/log/murano /home/murano \ + && cp -r /murano/etc/murano/* /etc/murano/ \ + && chown -R murano: /etc/murano /var/log/murano /home/murano + +{% endif %} diff --git a/docker/murano/murano-engine/Dockerfile.j2 b/docker/murano/murano-engine/Dockerfile.j2 new file mode 100644 index 000000000..f1d7e1f42 --- /dev/null +++ b/docker/murano/murano-engine/Dockerfile.j2 @@ -0,0 +1,9 @@ +FROM {{ namespace }}/{{ base_distro }}-{{ install_type }}-murano-base:{{ tag }} +MAINTAINER Kolla Project (https://launchpad.net/kolla) + +COPY config-external.sh /opt/kolla/ +COPY start.sh / + +CMD ["/start.sh"] + +{{ include_footer }} diff --git a/docker/murano/murano-engine/config-external.sh b/docker/murano/murano-engine/config-external.sh new file mode 100644 index 000000000..5d9a2da49 --- /dev/null +++ b/docker/murano/murano-engine/config-external.sh @@ -0,0 +1,10 @@ +#!/bin/bash +SOURCE="/opt/kolla/murano/murano.conf" +TARGET="/etc/murano/murano.conf" +OWNER="murano" + +if [[ -f "$SOURCE" ]]; then + cp $SOURCE $TARGET + chown ${OWNER}: $TARGET + chmod 0644 $TARGET +fi diff --git a/docker/murano/murano-engine/start.sh b/docker/murano/murano-engine/start.sh new file mode 100755 index 000000000..22834fc4c --- /dev/null +++ b/docker/murano/murano-engine/start.sh @@ -0,0 +1,13 @@ +#!/bin/bash +set -o errexit + +CMD="/usr/bin/murano-engine" +ARGS="--config-file /etc/murano/murano.conf" + +# Loading common functions. +source /opt/kolla/kolla-common.sh + +# Execute config strategy +set_configs + +exec $CMD $ARGS diff --git a/docker/neutron/neutron-agents/Dockerfile.j2 b/docker/neutron/neutron-agents/Dockerfile.j2 new file mode 100644 index 000000000..590443e00 --- /dev/null +++ b/docker/neutron/neutron-agents/Dockerfile.j2 @@ -0,0 +1,35 @@ +FROM {{ namespace }}/{{ base_distro }}-{{ install_type }}-neutron-base:{{ tag }} +MAINTAINER Kolla Project (https://launchpad.net.kolla) + +{% if base_distro in ['centos', 'fedora', 'oraclelinux'] %} + +RUN yum install -y supervisor \ + && yum clean all + +COPY supervisord.conf /etc/ + +{% elif base_distro in ['ubuntu', 'debian'] %} + +RUN apt-get install -y --no-install-recommends supervisor \ + && apt-get clean + +COPY supervisord.conf /etc/supervisor/ + +{% endif %} + +# TODO: SamYaple FWaaS is part of the l3-agent, not a seperate agent that is +# why this file is needed. To support FWaaS we cannot have a seperate container +# I need to figure out the best way to make this work together +# +# This file _does_ _not_ need to exist, you must remove referencing it from the +# exec line in the start script. Also all these config options can exist in the +# main neutron.conf if we wish +COPY fwaas_driver.ini /etc/neutron/ + +COPY neutron-dhcp-agent/ /opt/kolla/neutron-dhcp-agent +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/neutron/neutron-agents/fwaas_driver.ini b/docker/neutron/neutron-agents/fwaas_driver.ini new file mode 120000 index 000000000..a9b1ec519 --- /dev/null +++ b/docker/neutron/neutron-agents/fwaas_driver.ini @@ -0,0 +1 @@ +neutron-l3-agent/fwaas_driver.ini \ No newline at end of file diff --git a/docker/neutron/neutron-agents/neutron-dhcp-agent/config-external.sh b/docker/neutron/neutron-agents/neutron-dhcp-agent/config-external.sh new file mode 100755 index 000000000..badbd86a1 --- /dev/null +++ b/docker/neutron/neutron-agents/neutron-dhcp-agent/config-external.sh @@ -0,0 +1,13 @@ +#!/bin/bash +SOURCES="/opt/kolla/neutron-agents/neutron.conf /opt/kolla/neutron-agents/dhcp_agent.ini /opt/kolla/neutron-agents/dnsmasq.conf" +TARGET="/etc/neutron/" +OWNER="neutron" + +for f in $SOURCES; do + if [[ -f "$f" ]]; then + fname=$(basename $f) + cp $f $TARGET + chown ${OWNER}: $TARGET/$fname + chmod 0644 $TARGET/$fname + fi +done diff --git a/docker/neutron/neutron-agents/neutron-dhcp-agent/start.sh b/docker/neutron/neutron-agents/neutron-dhcp-agent/start.sh new file mode 100755 index 000000000..7b64f87aa --- /dev/null +++ b/docker/neutron/neutron-agents/neutron-dhcp-agent/start.sh @@ -0,0 +1,37 @@ +#!/bin/bash +set -o errexit + +CMD="/usr/bin/neutron-dhcp-agent" +ARGS="--config-file /etc/neutron/neutron.conf --config-file /etc/neutron/dhcp_agent.ini" + +# Loading common functions. +source /opt/kolla/kolla-common.sh +source /opt/kolla/config-sudoers.sh + +# Override set_configs() here because it doesn't work for fat containers like +# this one. +set_configs() { + case $KOLLA_CONFIG_STRATEGY in + CONFIG_EXTERNAL_COPY_ALWAYS) + source /opt/kolla/neutron-dhcp-agent/config-external.sh + ;; + CONFIG_EXTERNAL_COPY_ONCE) + if [[ -f /configured-dhcp ]]; then + echo 'INFO - Neutron-dhcp has already been configured; Refusing to copy new configs' + return + fi + source /opt/kolla/neutron-dhcp-agent/config-external.sh + touch /configured-dhcp + ;; + + *) + echo '$KOLLA_CONFIG_STRATEGY is not set properly' + exit 1 + ;; + esac +} + +# Execute config strategy +set_configs + +exec $CMD $ARGS diff --git a/docker/neutron/neutron-agents/neutron-l3-agent/config-external.sh b/docker/neutron/neutron-agents/neutron-l3-agent/config-external.sh new file mode 100755 index 000000000..e6eb049a4 --- /dev/null +++ b/docker/neutron/neutron-agents/neutron-l3-agent/config-external.sh @@ -0,0 +1,23 @@ +#!/bin/bash +SOURCES="/opt/kolla/neutron-agents/neutron.conf /opt/kolla/neutron-agents/l3_agent.ini /opt/kolla/neutron-agents/fwaas_driver.ini" +TARGET="/etc/neutron/" +OWNER="neutron" + +for f in $SOURCES; do + if [[ -f "$f" ]]; then + fname=$(basename $f) + cp $f $TARGET + chown ${OWNER}: $TARGET/$fname + chmod 0644 $TARGET/$fname + fi +done + +SOURCE="/opt/kolla/neutron-agents/ml2_conf.ini" +TARGET="/etc/neutron/plugins/ml2/ml2_conf.ini" +OWNER="neutron" + +if [[ -f "$SOURCE" ]]; then + cp $SOURCE $TARGET + chown ${OWNER}: $TARGET + chmod 0644 $TARGET +fi diff --git a/docker/neutron/neutron-agents/neutron-l3-agent/fwaas_driver.ini b/docker/neutron/neutron-agents/neutron-l3-agent/fwaas_driver.ini new file mode 100644 index 000000000..41f761abf --- /dev/null +++ b/docker/neutron/neutron-agents/neutron-l3-agent/fwaas_driver.ini @@ -0,0 +1,3 @@ +[fwaas] +#driver = neutron.services.firewall.drivers.linux.iptables_fwaas.IptablesFwaasDriver +#enabled = True diff --git a/docker/neutron/neutron-agents/neutron-l3-agent/start.sh b/docker/neutron/neutron-agents/neutron-l3-agent/start.sh new file mode 100755 index 000000000..e0a17e47a --- /dev/null +++ b/docker/neutron/neutron-agents/neutron-l3-agent/start.sh @@ -0,0 +1,37 @@ +#!/bin/bash +set -o errexit + +CMD="/usr/bin/neutron-l3-agent" +ARGS="--config-file /etc/neutron/neutron.conf --config-file /etc/neutron/l3_agent.ini --config-file /etc/neutron/fwaas_driver.ini --config-file /etc/neutron/plugins/ml2/ml2_conf.ini" + +# Loading common functions. +source /opt/kolla/kolla-common.sh +source /opt/kolla/config-sudoers.sh + +# Override set_configs() here because it doesn't work for fat containers like +# this one. +set_configs() { + case $KOLLA_CONFIG_STRATEGY in + CONFIG_EXTERNAL_COPY_ALWAYS) + source /opt/kolla/neutron-l3-agent/config-external.sh + ;; + CONFIG_EXTERNAL_COPY_ONCE) + if [[ -f /configured-l3 ]]; then + echo 'INFO - Neutron-l3 has already been configured; Refusing to copy new configs' + return + fi + source /opt/kolla/neutron-l3-agent/config-external.sh + touch /configured-l3 + ;; + + *) + echo '$KOLLA_CONFIG_STRATEGY is not set properly' + exit 1 + ;; + esac +} + +# Execute config strategy +set_configs + +exec $CMD $ARGS diff --git a/docker/neutron/neutron-agents/neutron-metadata-agent/config-external.sh b/docker/neutron/neutron-agents/neutron-metadata-agent/config-external.sh new file mode 100755 index 000000000..319ee3793 --- /dev/null +++ b/docker/neutron/neutron-agents/neutron-metadata-agent/config-external.sh @@ -0,0 +1,13 @@ +#!/bin/bash +SOURCES="/opt/kolla/neutron-agents/neutron.conf /opt/kolla/neutron-agents/metadata_agent.ini" +TARGET="/etc/neutron/" +OWNER="neutron" + +for f in $SOURCES; do + if [[ -f "$f" ]]; then + fname=$(basename $f) + cp $f $TARGET + chown ${OWNER}: $TARGET/$fname + chmod 0644 $TARGET/$fname + fi +done diff --git a/docker/neutron/neutron-agents/neutron-metadata-agent/start.sh b/docker/neutron/neutron-agents/neutron-metadata-agent/start.sh new file mode 100755 index 000000000..09a7329c7 --- /dev/null +++ b/docker/neutron/neutron-agents/neutron-metadata-agent/start.sh @@ -0,0 +1,37 @@ +#!/bin/bash +set -o errexit + +CMD="/usr/bin/neutron-metadata-agent" +ARGS="--config-file /etc/neutron/neutron.conf --config-file /etc/neutron/metadata_agent.ini" + +# Loading common functions. +source /opt/kolla/kolla-common.sh +source /opt/kolla/config-sudoers.sh + +# Override set_configs() here because it doesn't work for fat containers like +# this one. +set_configs() { + case $KOLLA_CONFIG_STRATEGY in + CONFIG_EXTERNAL_COPY_ALWAYS) + source /opt/kolla/neutron-metadata-agent/config-external.sh + ;; + CONFIG_EXTERNAL_COPY_ONCE) + if [[ -f /configured-md ]]; then + echo 'INFO - Neutron-metadata has already been configured; Refusing to copy new configs' + return + fi + source /opt/kolla/neutron-metadata-agent/config-external.sh + touch /configured-md + ;; + + *) + echo '$KOLLA_CONFIG_STRATEGY is not set properly' + exit 1 + ;; + esac +} + +# Execute config strategy +set_configs + +exec $CMD $ARGS diff --git a/docker/neutron/neutron-agents/supervisord.conf b/docker/neutron/neutron-agents/supervisord.conf new file mode 100644 index 000000000..5cab8f5dc --- /dev/null +++ b/docker/neutron/neutron-agents/supervisord.conf @@ -0,0 +1,40 @@ +[unix_http_server] +file = /var/run/supervisor.sock + +[inet_http_server] +port = 127.0.0.1:9001 + +[supervisord] +nodaemon=true +logfile = /var/log/supervisor/supervisord.log +logfile_maxbytes = 200KB +logfile_backups = 1 +pidfile = /var/run/supervisord.pid +childlogdir = /var/log/supervisor + +[rpcinterface:supervisor] +supervisor.rpcinterface_factory = supervisor.rpcinterface:make_main_rpcinterface + +[supervisorctl] +serverurl = unix:///var/run/supervisor.sock + +[program:neutron-dhcp-agent] +command=/opt/kolla/neutron-dhcp-agent/start.sh +priority=40 +startsec=10 +stderr_events_enabled=true +stdout_events_enabled=true + +[program:neutron-metadata-agent] +command=/opt/kolla/neutron-metadata-agent/start.sh +priority=40 +startsec=10 +stderr_events_enabled=true +stdout_events_enabled=true + +[program:neutron-l3-agent] +command=/opt/kolla/neutron-l3-agent/start.sh +priority=40 +startsec=10 +stderr_events_enabled=true +stdout_events_enabled=true diff --git a/docker/neutron/neutron-base/Dockerfile.j2 b/docker/neutron/neutron-base/Dockerfile.j2 new file mode 100644 index 000000000..f1cd75a37 --- /dev/null +++ b/docker/neutron/neutron-base/Dockerfile.j2 @@ -0,0 +1,47 @@ +FROM {{ namespace }}/{{ base_distro }}-{{ install_type }}-base:{{ tag }} +MAINTAINER Kolla Project (https://launchpad.net.kolla) + +{% if install_type == 'binary' %} + {% if base_distro in ['centos', 'fedora', 'oraclelinux'] %} + +RUN yum -y install openstack-neutron \ + openstack-neutron-ml2 \ + openvswitch \ + && yum clean all + +# TODO (sdake): remove once RDO adds to the openstack-neutron package +RUN pip install oslo.versionedobjects + + {% elif base_distro in ['ubuntu', 'debian'] %} + +RUN echo '{{ install_type}} not yet available for {{ base_distro }}' \ + && /bin/false + + {% endif %} +{% elif install_type == 'source' %} + {% if base_distro in ['ubuntu', 'debian'] %} + +RUN apt-get install -y --no-install-recommends \ + iptables \ + dnsmasq \ + uuid-runtime \ + ipset \ + openvswitch-switch \ + && apt-get clean + + {% endif %} + +ADD neutron.tar / +RUN ln -s /neutron-* neutron \ + && useradd --user-group neutron \ + && pip --no-cache-dir install /neutron \ + && mkdir -p /etc/neutron /usr/share/neutron /var/log/neutron /home/neutron \ + && cp -r /neutron/etc/* /etc/neutron/ \ + && cp -r /neutron/etc/neutron/* /etc/neutron/ \ + && cp /neutron/etc/api-paste.ini /usr/share/neutron \ + && mv /etc/neutron/neutron/ /etc/neutron/plugins/ \ + && chown -R neutron: /etc/neutron /usr/share/neutron /var/log/neutron /home/neutron + +{% endif %} + +COPY config-sudoers.sh /opt/kolla/ diff --git a/docker/neutron/neutron-base/config-sudoers.sh b/docker/neutron/neutron-base/config-sudoers.sh new file mode 100644 index 000000000..82cf0d624 --- /dev/null +++ b/docker/neutron/neutron-base/config-sudoers.sh @@ -0,0 +1,12 @@ +#!/bin/bash + +# Neutron uses rootwrap which requires a tty for sudo. +# Since the container is running in daemon mode, a tty +# is not present and requiretty must be commented out. +if [ ! -f /sudo-modified ]; then + chmod 0640 /etc/sudoers + sed -i '/Defaults requiretty/s/^/#/' /etc/sudoers + chmod 0440 /etc/sudoers +fi + +touch /sudo-modified diff --git a/docker/neutron/neutron-base/ip_wrapper.py b/docker/neutron/neutron-base/ip_wrapper.py new file mode 100755 index 000000000..591fca6f4 --- /dev/null +++ b/docker/neutron/neutron-base/ip_wrapper.py @@ -0,0 +1,66 @@ +#!/usr/bin/env python + +# Copyright 2015 Sam Yaple +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# This file exists because we want to create and delete any network +# namespaces from the host mount namespace. This allows the host to +# access all of the neutron network namespaces as well as all +# containers that bind mount /run/netns from the host. + +# This is required for "thin" neutron containers to function properly + +import nsenter +import subprocess +import sys + + +def host_mnt_exec(cmd): + try: + with nsenter.ExitStack() as stack: + stack.enter_context( + nsenter.Namespace( + '1', + 'mnt', + proc='/opt/kolla/host_proc/')) + process_ = subprocess.Popen(cmd) + + except Exception as e: + print( + "An error has occured with a component that Kolla manages." + " Please file a bug") + print("Error: ", e) + + return process_ + + +if len(sys.argv) > 2: + # We catch all commands that ip will accept that refer + # to creating or deleteing a Network namespace + if str(sys.argv[1]).startswith("net") and ( + str(sys.argv[2]).startswith("a") or + str(sys.argv[2]).startswith("d")): + # This cmd is executed in the host mount namespace + cmd = ["/usr/bin/env", "ip"] + sys.argv[1:] + sys.exit(host_mnt_exec(cmd).returncode) + else: + cmd = ["/opt/kolla/ip"] + sys.argv[1:] +else: + cmd = ["/opt/kolla/ip"] + + if len(sys.argv) == 2: + cmd = cmd + sys.argv[1:] + +process_ = subprocess.Popen(cmd) +sys.exit(process_.returncode) diff --git a/docker/neutron/neutron-linuxbridge-agent/Dockerfile.j2 b/docker/neutron/neutron-linuxbridge-agent/Dockerfile.j2 new file mode 100644 index 000000000..58d5ae6c3 --- /dev/null +++ b/docker/neutron/neutron-linuxbridge-agent/Dockerfile.j2 @@ -0,0 +1,28 @@ +FROM {{ namespace }}/{{ base_distro }}-{{ install_type }}-neutron-base:{{ tag }} +MAINTAINER Kolla Project (https://launchpad.net.kolla) + +{% if install_type == 'binary' %} + {% if base_distro in ['centos', 'fedora', 'oraclelinux'] %} + +# Install required packages +RUN yum install -y \ + ebtables \ + openstack-neutron-linuxbridge \ + && yum clean all + + {% endif %} +{% elif install_type == 'source' %} + {% if base_distro in ['centos', 'fedora', 'oraclelinux'] %} + +# Install required packages +RUN yum install -y ebtables && yum clean all + + {% endif %} +{% endif %} + +COPY start.sh / +COPY config-external.sh /opt/kolla/ + +CMD ["/start.sh"] + +{{ include_footer }} diff --git a/docker/neutron/neutron-linuxbridge-agent/config-external.sh b/docker/neutron/neutron-linuxbridge-agent/config-external.sh new file mode 100755 index 000000000..c44d71d84 --- /dev/null +++ b/docker/neutron/neutron-linuxbridge-agent/config-external.sh @@ -0,0 +1,20 @@ +#!/bin/bash +SOURCE="/opt/kolla/neutron-linuxbridge-agent/neutron.conf" +TARGET="/etc/neutron/neutron.conf" +OWNER="neutron" + +if [[ -f "$SOURCE" ]]; then + cp $SOURCE $TARGET + chown ${OWNER}: $TARGET + chmod 0644 $TARGET +fi + +SOURCE="/opt/kolla/neutron-linuxbridge-agent/ml2_conf.ini" +TARGET="/etc/neutron/plugins/ml2/ml2_conf.ini" +OWNER="neutron" + +if [[ -f "$SOURCE" ]]; then + cp $SOURCE $TARGET + chown ${OWNER}: $TARGET + chmod 0644 $TARGET +fi diff --git a/docker/neutron/neutron-linuxbridge-agent/start.sh b/docker/neutron/neutron-linuxbridge-agent/start.sh new file mode 100755 index 000000000..ab47f2dfb --- /dev/null +++ b/docker/neutron/neutron-linuxbridge-agent/start.sh @@ -0,0 +1,14 @@ +#!/bin/bash +set -o errexit + +CMD="/usr/bin/neutron-linuxbridge-agent" +ARGS="--config-file /etc/neutron/neutron.conf --config-file /etc/neutron/plugins/ml2/ml2_conf.ini" + +# Loading common functions. +source /opt/kolla/kolla-common.sh +source /opt/kolla/config-sudoers.sh + +# Execute config strategy +set_configs + +exec $CMD $ARGS diff --git a/docker/neutron/neutron-openvswitch-agent/Dockerfile.j2 b/docker/neutron/neutron-openvswitch-agent/Dockerfile.j2 new file mode 100644 index 000000000..ad12e5511 --- /dev/null +++ b/docker/neutron/neutron-openvswitch-agent/Dockerfile.j2 @@ -0,0 +1,32 @@ +FROM {{ namespace }}/{{ base_distro }}-{{ install_type }}-neutron-base:{{ tag }} +MAINTAINER Kolla Project (https://launchpad.net.kolla) + +{% if install_type == 'binary' %} + {% if base_distro in ['centos', 'fedora', 'oraclelinux'] %} + +# Install required packages +RUN yum install -y \ + openstack-neutron-openvswitch \ + openvswitch \ + && yum clean all + + {% endif %} +{% elif install_type == 'source' %} + {% if base_distro in ['centos', 'fedora', 'oraclelinux'] %} + +# Install required packages +RUN yum install -y \ + #TODO: will be addressed later + https://rdoproject.org/repos/openstack-kilo/rdo-release-kilo.rpm \ + openvswitch \ + && yum clean all + + {% endif %} +{% endif %} + +COPY start.sh / +COPY config-external.sh /opt/kolla/ + +CMD ["/start.sh"] + +{{ include_footer }} diff --git a/docker/neutron/neutron-openvswitch-agent/config-external.sh b/docker/neutron/neutron-openvswitch-agent/config-external.sh new file mode 100755 index 000000000..552d69861 --- /dev/null +++ b/docker/neutron/neutron-openvswitch-agent/config-external.sh @@ -0,0 +1,20 @@ +#!/bin/bash +SOURCE="/opt/kolla/neutron-openvswitch-agent/neutron.conf" +TARGET="/etc/neutron/neutron.conf" +OWNER="neutron" + +if [[ -f "$SOURCE" ]]; then + cp $SOURCE $TARGET + chown ${OWNER}: $TARGET + chmod 0644 $TARGET +fi + +SOURCE="/opt/kolla/neutron-openvswitch-agent/ml2_conf.ini" +TARGET="/etc/neutron/plugins/ml2/ml2_conf.ini" +OWNER="neutron" + +if [[ -f "$SOURCE" ]]; then + cp $SOURCE $TARGET + chown ${OWNER}: $TARGET + chmod 0644 $TARGET +fi diff --git a/docker/neutron/neutron-openvswitch-agent/start.sh b/docker/neutron/neutron-openvswitch-agent/start.sh new file mode 100755 index 000000000..6d62ff65d --- /dev/null +++ b/docker/neutron/neutron-openvswitch-agent/start.sh @@ -0,0 +1,14 @@ +#!/bin/bash +set -o errexit + +CMD="/usr/bin/neutron-openvswitch-agent" +ARGS="--config-file /etc/neutron/neutron.conf --config-file /etc/neutron/plugins/ml2/ml2_conf.ini" + +# Loading common functions. +source /opt/kolla/kolla-common.sh +source /opt/kolla/config-sudoers.sh + +# Execute config strategy +set_configs + +exec $CMD $ARGS diff --git a/docker/neutron/neutron-server/Dockerfile.j2 b/docker/neutron/neutron-server/Dockerfile.j2 new file mode 100644 index 000000000..9cfe634c4 --- /dev/null +++ b/docker/neutron/neutron-server/Dockerfile.j2 @@ -0,0 +1,31 @@ +FROM {{ namespace }}/{{ base_distro }}-{{ install_type }}-neutron-base:{{ tag }} +MAINTAINER Kolla Project (https://launchpad.net.kolla) + +{% if install_type == 'binary' %} + {% if base_distro in ['centos', 'fedora', 'oraclelinux'] %} + +# Install required packages +RUN yum install -y which \ + && yum clean all + +# See bug: https://bugs.launchpad.net/kolla/+bug/1483667 +# TODO(SamYaple): Check in on this and remove once unneccesary +RUN pip install oslo.messaging==2.2.0 + + {% endif %} +{% elif install_type == 'source' %} + {% if base_distro in ['centos', 'fedora', 'oraclelinux'] %} + +#Install required packages +RUN yum install -y which \ + && yum clean all + + {% endif %} +{% endif %} + +COPY start.sh / +COPY config-external.sh /opt/kolla/ + +CMD ["/start.sh"] + +{{ include_footer }} diff --git a/docker/neutron/neutron-server/config-external.sh b/docker/neutron/neutron-server/config-external.sh new file mode 100755 index 000000000..574923067 --- /dev/null +++ b/docker/neutron/neutron-server/config-external.sh @@ -0,0 +1,20 @@ +#!/bin/bash +SOURCE="/opt/kolla/neutron-server/neutron.conf" +TARGET="/etc/neutron/neutron.conf" +OWNER="neutron" + +if [[ -f "$SOURCE" ]]; then + cp $SOURCE $TARGET + chown ${OWNER}: $TARGET + chmod 0644 $TARGET +fi + +SOURCE="/opt/kolla/neutron-server/ml2_conf.ini" +TARGET="/etc/neutron/plugins/ml2/ml2_conf.ini" +OWNER="neutron" + +if [[ -f "$SOURCE" ]]; then + cp $SOURCE $TARGET + chown ${OWNER}: $TARGET + chmod 0644 $TARGET +fi diff --git a/docker/neutron/neutron-server/start.sh b/docker/neutron/neutron-server/start.sh new file mode 100755 index 000000000..51c4c2a3d --- /dev/null +++ b/docker/neutron/neutron-server/start.sh @@ -0,0 +1,20 @@ +#!/bin/bash +set -o errexit + +CMD="/usr/bin/neutron-server" +ARGS="--config-file /etc/neutron/neutron.conf --config-file /etc/neutron/plugins/ml2/ml2_conf.ini" + +# Loading common functions. +source /opt/kolla/kolla-common.sh + +# Execute config strategy +set_configs + +# Bootstrap and exit if KOLLA_BOOTSTRAP variable is set. This catches all cases +# of the KOLLA_BOOTSTRAP variable being set, including empty. +if [[ "${!KOLLA_BOOTSTRAP[@]}" ]]; then + su -s /bin/bash -c "neutron-db-manage --config-file /etc/neutron/neutron.conf --config-file /etc/neutron/plugins/ml2/ml2_conf.ini upgrade head" neutron + exit 0 +fi + +exec $CMD $ARGS diff --git a/docker/nova/nova-api/Dockerfile.j2 b/docker/nova/nova-api/Dockerfile.j2 new file mode 100644 index 000000000..b906d1937 --- /dev/null +++ b/docker/nova/nova-api/Dockerfile.j2 @@ -0,0 +1,18 @@ +FROM {{ namespace }}/{{ base_distro }}-{{ install_type }}-nova-base:{{ tag }} +MAINTAINER Kolla Project (https://launchpad.net/kolla) + +{% if install_type == 'binary' %} + {% if base_distro in ['fedora', 'centos', 'oraclelinux'] %} + +RUN yum -y install openstack-nova-api \ + && yum clean all + + {% endif %} +{% endif %} + +COPY start.sh / +COPY config-external.sh /opt/kolla/ + +CMD ["/start.sh"] + +{{ include_footer }} diff --git a/docker/nova/nova-api/config-external.sh b/docker/nova/nova-api/config-external.sh new file mode 100755 index 000000000..d0859893d --- /dev/null +++ b/docker/nova/nova-api/config-external.sh @@ -0,0 +1,10 @@ +#!/bin/bash +SOURCE="/opt/kolla/nova-api/nova.conf" +TARGET="/etc/nova/nova.conf" +OWNER="nova" + +if [[ -f "$SOURCE" ]]; then + cp $SOURCE $TARGET + chown ${OWNER}: $TARGET + chmod 0644 $TARGET +fi diff --git a/docker/nova/nova-api/start.sh b/docker/nova/nova-api/start.sh new file mode 100755 index 000000000..ad25ba65c --- /dev/null +++ b/docker/nova/nova-api/start.sh @@ -0,0 +1,20 @@ +#!/bin/bash +set -o errexit + +CMD="/usr/bin/nova-api" +ARGS="" + +# Loading common functions. +source /opt/kolla/kolla-common.sh + +# Execute config strategy +set_configs + +# Bootstrap and exit if KOLLA_BOOTSTRAP variable is set. This catches all cases +# of the KOLLA_BOOTSTRAP variable being set, including empty. +if [[ "${!KOLLA_BOOTSTRAP[@]}" ]]; then + su -s /bin/sh -c "nova-manage db sync" nova + exit 0 +fi + +exec $CMD $ARGS diff --git a/docker/nova/nova-base/Dockerfile.j2 b/docker/nova/nova-base/Dockerfile.j2 new file mode 100644 index 000000000..b46a446d4 --- /dev/null +++ b/docker/nova/nova-base/Dockerfile.j2 @@ -0,0 +1,50 @@ +FROM {{ namespace }}/{{ base_distro }}-{{ install_type }}-base:{{ tag }} +MAINTAINER Kolla Project (https://launchpad.net/kolla) + +{% if install_type == 'binary' %} + {% if base_distro in ['fedora', 'centos', 'oraclelinux'] %} + +RUN yum -y install \ + openstack-nova-common \ + python-keystoneclient \ + python-cinderclient \ + python-nova \ + bridge-utils \ + && yum clean all + + {% elif base_distro in ['ubuntu', 'debian'] %} + +RUN echo '{{ install_type }} not yet available for {{ base_distro }}' \ + && /bin/false + + {% endif %} +{% elif install_type == 'source' %} + {% if base_distro in ['fedora', 'centos', 'oraclelinux'] %} + +RUN yum -y install \ + bridge-utils \ + && yum clean all + + {% elif base_distro in ['ubuntu', 'debian'] %} + +RUN apt-get install -y --no-install-recommends \ + iptables \ + ebtables \ + dnsmasq \ + bridge-utils \ + python-libvirt \ + openssh-client \ + openvswitch-switch \ + && apt-get clean + + {% endif %} + +ADD nova.tar / +RUN ln -s /nova-* nova \ + && useradd --user-group nova \ + && pip --no-cache-dir install /nova \ + && mkdir -p /etc/nova /var/log/nova /home/nova \ + && cp -r /nova/etc/nova/* /etc/nova/ \ + && chown -R nova: /etc/nova /var/log/nova /home/nova + +{% endif %} diff --git a/docker/nova/nova-compute/Dockerfile.j2 b/docker/nova/nova-compute/Dockerfile.j2 new file mode 100644 index 000000000..a8a719023 --- /dev/null +++ b/docker/nova/nova-compute/Dockerfile.j2 @@ -0,0 +1,34 @@ +FROM {{ namespace }}/{{ base_distro }}-{{ install_type }}-nova-base:{{ tag }} +MAINTAINER Kolla Project (https://launchpad.net/kolla) + +{% if install_type == 'binary' %} + {% if base_distro in ['fedora', 'centos', 'oraclelinux'] %} + +RUN yum -y install openstack-nova-compute \ + openvswitch \ + sysfsutils \ + && yum clean all + + {% endif %} +{% elif install_type == 'source' %} + {% if base_distro in ['fedora', 'centos', 'oraclelinux'] %} + +RUN yum -y install \ + sysfsutils \ + libvirt-python \ + && yum clean all + + {% elif base_distro in ['ubuntu', 'debian'] %} + +RUN apt-get install -y --no-install-recommends qemu-utils \ + && apt-get clean + + {% endif %} +{% endif %} + +COPY start.sh / +COPY config-external.sh /opt/kolla/ + +CMD ["/start.sh"] + +{{ include_footer }} diff --git a/docker/nova/nova-compute/config-external.sh b/docker/nova/nova-compute/config-external.sh new file mode 100755 index 000000000..e844bf50c --- /dev/null +++ b/docker/nova/nova-compute/config-external.sh @@ -0,0 +1,10 @@ +#!/bin/bash +SOURCE="/opt/kolla/nova-compute/nova.conf" +TARGET="/etc/nova/nova.conf" +OWNER="nova" + +if [[ -f "$SOURCE" ]]; then + cp $SOURCE $TARGET + chown ${OWNER}: $TARGET + chmod 0644 $TARGET +fi diff --git a/docker/nova/nova-compute/start.sh b/docker/nova/nova-compute/start.sh new file mode 100755 index 000000000..48e77542b --- /dev/null +++ b/docker/nova/nova-compute/start.sh @@ -0,0 +1,13 @@ +#!/bin/bash +set -o errexit + +CMD="/usr/bin/nova-compute" +ARGS="" + +# Loading common functions. +source /opt/kolla/kolla-common.sh + +# Execute config strategy +set_configs + +exec $CMD $ARGS diff --git a/docker/nova/nova-conductor/Dockerfile.j2 b/docker/nova/nova-conductor/Dockerfile.j2 new file mode 100644 index 000000000..0f42df5c9 --- /dev/null +++ b/docker/nova/nova-conductor/Dockerfile.j2 @@ -0,0 +1,19 @@ +FROM {{ namespace }}/{{ base_distro }}-{{ install_type }}-nova-base:{{ tag }} +MAINTAINER Kolla Project (https://launchpad.net/kolla) + +{% if install_type == 'binary' %} + {% if base_distro in ['fedora', 'centos', 'oraclelinux'] %} + +RUN yum -y install \ + openstack-nova-conductor \ + && yum clean all + + {% endif %} +{% endif %} + +COPY start.sh / +COPY config-external.sh /opt/kolla/ + +CMD ["/start.sh"] + +{{ include_footer }} diff --git a/docker/nova/nova-conductor/config-external.sh b/docker/nova/nova-conductor/config-external.sh new file mode 100755 index 000000000..ea3b123ec --- /dev/null +++ b/docker/nova/nova-conductor/config-external.sh @@ -0,0 +1,10 @@ +#!/bin/bash +SOURCE="/opt/kolla/nova-conductor/nova.conf" +TARGET="/etc/nova/nova.conf" +OWNER="nova" + +if [[ -f "$SOURCE" ]]; then + cp $SOURCE $TARGET + chown ${OWNER}: $TARGET + chmod 0644 $TARGET +fi diff --git a/docker/nova/nova-conductor/start.sh b/docker/nova/nova-conductor/start.sh new file mode 100755 index 000000000..1fe7d0586 --- /dev/null +++ b/docker/nova/nova-conductor/start.sh @@ -0,0 +1,13 @@ +#!/bin/bash +set -o errexit + +CMD="/usr/bin/nova-conductor" +ARGS="" + +# Loading common functions. +source /opt/kolla/kolla-common.sh + +# Execute config strategy +set_configs + +exec $CMD $ARGS diff --git a/docker/nova/nova-consoleauth/Dockerfile.j2 b/docker/nova/nova-consoleauth/Dockerfile.j2 new file mode 100644 index 000000000..1c8d9ea12 --- /dev/null +++ b/docker/nova/nova-consoleauth/Dockerfile.j2 @@ -0,0 +1,18 @@ +FROM {{ namespace }}/{{ base_distro }}-{{ install_type }}-nova-base:{{ tag }} +MAINTAINER Kolla Project (https://launchpad.net/kolla) + +{% if install_type == 'binary' %} + {% if base_distro in ['fedora', 'centos', 'oraclelinux'] %} + +RUN yum -y install openstack-nova-console \ + && yum clean all + + {% endif %} +{% endif %} + +COPY start.sh / +COPY config-external.sh /opt/kolla/ + +CMD ["/start.sh"] + +{{ include_footer }} diff --git a/docker/nova/nova-consoleauth/config-external.sh b/docker/nova/nova-consoleauth/config-external.sh new file mode 100755 index 000000000..1da10d83f --- /dev/null +++ b/docker/nova/nova-consoleauth/config-external.sh @@ -0,0 +1,10 @@ +#!/bin/bash +SOURCE="/opt/kolla/nova-consoleauth/nova.conf" +TARGET="/etc/nova/nova.conf" +OWNER="nova" + +if [[ -f "$SOURCE" ]]; then + cp $SOURCE $TARGET + chown ${OWNER}: $TARGET + chmod 0644 $TARGET +fi diff --git a/docker/nova/nova-consoleauth/start.sh b/docker/nova/nova-consoleauth/start.sh new file mode 100755 index 000000000..1abccde19 --- /dev/null +++ b/docker/nova/nova-consoleauth/start.sh @@ -0,0 +1,13 @@ +#!/bin/bash +set -o errexit + +CMD="/usr/bin/nova-consoleauth" +ARGS="" + +# Loading common functions. +source /opt/kolla/kolla-common.sh + +# Execute config strategy +set_configs + +exec $CMD $ARGS diff --git a/docker/nova/nova-libvirt/Dockerfile.j2 b/docker/nova/nova-libvirt/Dockerfile.j2 new file mode 100644 index 000000000..5ff525426 --- /dev/null +++ b/docker/nova/nova-libvirt/Dockerfile.j2 @@ -0,0 +1,32 @@ +FROM {{ namespace }}/{{ base_distro }}-{{ install_type }}-nova-base:{{ tag }} +MAINTAINER Kolla Project (https://launchpad.net/kolla) + +{% if base_distro in ['fedora', 'centos', 'oraclelinux'] %} + +RUN yum -y install \ + libvirt-daemon \ + libguestfs \ + qemu-system-x86 \ + libvirt-daemon-driver-nwfilter \ + libvirt-daemon-config-nwfilter \ + libvirt-daemon-driver-lxc \ + && yum clean all + +{% elif base_distro in ['ubuntu', 'debian'] %} + +RUN apt-get install -y --no-install-recommends \ + libvirt-bin \ + dmidecode \ + pm-utils \ + qemu \ + ebtables \ + && apt-get clean + +{% endif %} + +COPY start.sh / +COPY config-external.sh /opt/kolla/ + +CMD ["/start.sh"] + +{{ include_footer }} diff --git a/docker/nova/nova-libvirt/config-external.sh b/docker/nova/nova-libvirt/config-external.sh new file mode 100755 index 000000000..acc1c5473 --- /dev/null +++ b/docker/nova/nova-libvirt/config-external.sh @@ -0,0 +1,10 @@ +#!/bin/bash +SOURCE="/opt/kolla/libvirt/libvirtd.conf" +TARGET="/etc/libvirt/libvirtd.conf" +OWNER="libvirt" + +if [[ -f "$SOURCE" ]]; then + cp $SOURCE $TARGET + chown ${OWNER}: $TARGET + chmod 0644 $TARGET +fi diff --git a/docker/nova/nova-libvirt/start.sh b/docker/nova/nova-libvirt/start.sh new file mode 100755 index 000000000..ae0de867b --- /dev/null +++ b/docker/nova/nova-libvirt/start.sh @@ -0,0 +1,20 @@ +#!/bin/bash +set -o errexit + +CMD="/usr/sbin/libvirtd" +ARGS="" + +# Loading common functions. +source /opt/kolla/kolla-common.sh + +# Execute config strategy +set_configs + +# TODO(SamYaple): Tweak libvirt.conf rather than change permissions. +# Fix permissions for libvirt +if [[ -c /dev/kvm ]]; then + chmod 660 /dev/kvm + chown root:kvm /dev/kvm +fi + +exec $CMD $ARGS diff --git a/docker/nova/nova-network/Dockerfile.j2 b/docker/nova/nova-network/Dockerfile.j2 new file mode 100644 index 000000000..60ea394aa --- /dev/null +++ b/docker/nova/nova-network/Dockerfile.j2 @@ -0,0 +1,28 @@ +FROM {{ namespace }}/{{ base_distro }}-{{ install_type }}-nova-base:{{ tag }} +MAINTAINER Kolla Project (https://launchpad.net/kolla) + +{% if install_type == 'binary' %} + {% if base_distro in ['fedora', 'centos', 'oraclelinux'] %} + +RUN yum -y install \ + openstack-nova-network \ + bridge-utils \ + initscripts \ + && yum clean all + + {% endif %} +{% elif install_type == 'source' %} + {% if base_distro in ['fedora', 'centos', 'oraclelinux'] %} + +RUN yum -y install initscripts \ + && yum clean all + + {% endif %} +{% endif %} + +COPY start.sh / +COPY config-external.sh /opt/kolla/ + +CMD ["/start.sh"] + +{{ include_footer }} diff --git a/docker/nova/nova-network/config-external.sh b/docker/nova/nova-network/config-external.sh new file mode 100755 index 000000000..7c1d6bb37 --- /dev/null +++ b/docker/nova/nova-network/config-external.sh @@ -0,0 +1,10 @@ +#!/bin/bash +SOURCE="/opt/kolla/nova-network/nova.conf" +TARGET="/etc/nova/nova.conf" +OWNER="nova" + +if [[ -f "$SOURCE" ]]; then + cp $SOURCE $TARGET + chown ${OWNER}: $TARGET + chmod 0644 $TARGET +fi diff --git a/docker/nova/nova-network/start.sh b/docker/nova/nova-network/start.sh new file mode 100755 index 000000000..88f941b33 --- /dev/null +++ b/docker/nova/nova-network/start.sh @@ -0,0 +1,13 @@ +#!/bin/bash +set -o errexit + +CMD="/usr/bin/nova-network" +ARGS="" + +# Loading common functions. +source /opt/kolla/kolla-common.sh + +# Execute config strategy +set_configs + +exec $CMD $ARGS diff --git a/docker/nova/nova-novncproxy/Dockerfile.j2 b/docker/nova/nova-novncproxy/Dockerfile.j2 new file mode 100644 index 000000000..b798e00a6 --- /dev/null +++ b/docker/nova/nova-novncproxy/Dockerfile.j2 @@ -0,0 +1,34 @@ +FROM {{ namespace }}/{{ base_distro }}-{{ install_type }}-nova-base:{{ tag }} +MAINTAINER Kolla Project (https://launchpad.net/kolla) + +{% if install_type == 'binary' %} + {% if base_distro in ['fedora', 'centos', 'oraclelinux'] %} + +RUN yum -y install \ + novnc \ + openstack-nova-novncproxy \ + && yum clean all + + {% endif %} +{% elif install_type == 'source' %} + {% if base_distro in ['fedora', 'centos', 'oraclelinux'] %} + +RUN yum -y install \ + https://rdoproject.org/repos/openstack-kilo/rdo-release-kilo.rpm \ + novnc \ + && yum clean all + + {% elif base_distro in ['ubuntu', 'debian'] %} + +ADD novnc.tar / +RUN ln -s /kanaka-noVNC-* /usr/share/novnc + + {% endif %} +{% endif %} + +COPY start.sh / +COPY config-external.sh /opt/kolla/ + +CMD ["/start.sh"] + +{{ include_footer }} diff --git a/docker/nova/nova-novncproxy/config-external.sh b/docker/nova/nova-novncproxy/config-external.sh new file mode 100755 index 000000000..fdc33a5bd --- /dev/null +++ b/docker/nova/nova-novncproxy/config-external.sh @@ -0,0 +1,10 @@ +#!/bin/bash +SOURCE="/opt/kolla/nova-novncproxy/nova.conf" +TARGET="/etc/nova/nova.conf" +OWNER="nova" + +if [[ -f "$SOURCE" ]]; then + cp $SOURCE $TARGET + chown ${OWNER}: $TARGET + chmod 0644 $TARGET +fi diff --git a/docker/nova/nova-novncproxy/start.sh b/docker/nova/nova-novncproxy/start.sh new file mode 100755 index 000000000..6e59d1253 --- /dev/null +++ b/docker/nova/nova-novncproxy/start.sh @@ -0,0 +1,13 @@ +#!/bin/bash +set -o errexit + +CMD="/usr/bin/nova-novncproxy" +ARGS="" + +# Loading common functions. +source /opt/kolla/kolla-common.sh + +# Execute config strategy +set_configs + +exec $CMD $ARGS diff --git a/docker/nova/nova-scheduler/Dockerfile.j2 b/docker/nova/nova-scheduler/Dockerfile.j2 new file mode 100644 index 000000000..5dd0fd507 --- /dev/null +++ b/docker/nova/nova-scheduler/Dockerfile.j2 @@ -0,0 +1,18 @@ +FROM {{ namespace }}/{{ base_distro }}-{{ install_type }}-nova-base:{{ tag }} +MAINTAINER Kolla Project (https://launchpad.net/kolla) + +{% if install_type == 'binary' %} + {% if base_distro in ['fedora', 'centos', 'oraclelinux'] %} + +RUN yum -y install openstack-nova-scheduler \ + && yum clean all + + {% endif %} +{% endif %} + +COPY start.sh / +COPY config-external.sh /opt/kolla/ + +CMD ["/start.sh"] + +{{ include_footer }} diff --git a/docker/nova/nova-scheduler/config-external.sh b/docker/nova/nova-scheduler/config-external.sh new file mode 100755 index 000000000..3df0f9b7b --- /dev/null +++ b/docker/nova/nova-scheduler/config-external.sh @@ -0,0 +1,10 @@ +#!/bin/bash +SOURCE="/opt/kolla/nova-scheduler/nova.conf" +TARGET="/etc/nova/nova.conf" +OWNER="nova" + +if [[ -f "$SOURCE" ]]; then + cp $SOURCE $TARGET + chown ${OWNER}: $TARGET + chmod 0644 $TARGET +fi diff --git a/docker/nova/nova-scheduler/start.sh b/docker/nova/nova-scheduler/start.sh new file mode 100755 index 000000000..d9b3e14eb --- /dev/null +++ b/docker/nova/nova-scheduler/start.sh @@ -0,0 +1,13 @@ +#!/bin/bash +set -o errexit + +CMD="/usr/bin/nova-scheduler" +ARGS="" + +# Loading common functions. +source /opt/kolla/kolla-common.sh + +# Execute config strategy +set_configs + +exec $CMD $ARGS diff --git a/docker/openvswitch/ovs-base/Dockerfile.j2 b/docker/openvswitch/ovs-base/Dockerfile.j2 new file mode 100644 index 000000000..fd8eac1af --- /dev/null +++ b/docker/openvswitch/ovs-base/Dockerfile.j2 @@ -0,0 +1,22 @@ +FROM {{ namespace }}/{{ base_distro }}-{{ install_type }}-base:{{ tag }} +MAINTAINER Kolla Project (https://launchpad.net/kolla) + +{% if base_distro in ['fedora', 'centos', 'oraclelinux'] %} + {% if install_type == 'source' %} + + # TODO(sdake): groan openvswitch is only in the RDO repos +RUN yum install -y https://rdoproject.org/repos/openstack-kilo/rdo-release-kilo.rpm \ + && yum clean all + + {% endif %} + +RUN yum install -y \ + openvswitch \ + && yum clean all + +{% elif base_distro in ['ubuntu', 'debian'] %} + +RUN apt-get install -y --no-install-recommends openvswitch-switch \ + && apt-get clean + +{% endif %} diff --git a/docker/openvswitch/ovs-db-server/Dockerfile.j2 b/docker/openvswitch/ovs-db-server/Dockerfile.j2 new file mode 100644 index 000000000..05c6a928b --- /dev/null +++ b/docker/openvswitch/ovs-db-server/Dockerfile.j2 @@ -0,0 +1,9 @@ +FROM {{ namespace }}/{{ base_distro }}-{{ install_type }}-ovs-base:{{ tag }} +MAINTAINER Kolla Project (https://launchpad.net/kolla) + +COPY start.sh / +COPY config-external.sh /opt/kolla/ + +CMD ["/start.sh"] + +{{ include_footer }} diff --git a/docker/openvswitch/ovs-db-server/config-external.sh b/docker/openvswitch/ovs-db-server/config-external.sh new file mode 100644 index 000000000..9ada4efcb --- /dev/null +++ b/docker/openvswitch/ovs-db-server/config-external.sh @@ -0,0 +1,3 @@ +#!/bin/bash + +#This file should be a noop. It just needs to exist, but it don't perform any function diff --git a/docker/openvswitch/ovs-db-server/start.sh b/docker/openvswitch/ovs-db-server/start.sh new file mode 100755 index 000000000..89b2e3e92 --- /dev/null +++ b/docker/openvswitch/ovs-db-server/start.sh @@ -0,0 +1,25 @@ +#!/bin/bash + +set -o errexit + +LOG_FILE="/var/log/openvswitch/ovsdb-server.log" +DB_FILE="/etc/openvswitch/conf.db" +UNIXSOCK_DIR="/var/run/openvswitch" +UNIXSOCK="${UNIXSOCK_DIR}/db.sock" + +CMD="/usr/sbin/ovsdb-server" +ARGS="$DB_FILE -vconsole:emer -vsyslog:err -vfile:info --remote=punix:${UNIXSOCK} --log-file=${LOG_FILE}" + +# Loading common functions. +source /opt/kolla/kolla-common.sh + +# Execute config strategy +set_configs + +mkdir -p "${UNIXSOCK_DIR}" + +if [[ ! -e "${DB_FILE}" ]]; then + ovsdb-tool create "${DB_FILE}" +fi + +exec $CMD $ARGS diff --git a/docker/openvswitch/ovs-vswitchd/Dockerfile.j2 b/docker/openvswitch/ovs-vswitchd/Dockerfile.j2 new file mode 100644 index 000000000..59079d335 --- /dev/null +++ b/docker/openvswitch/ovs-vswitchd/Dockerfile.j2 @@ -0,0 +1,9 @@ +FROM {{ namespace }}/{{ base_distro }}-{{ install_type }}-ovs-base:{{ tag }} +MAINTAINER Kolla Project (https://launchpad.net/kolla) + +COPY start.sh / +COPY ovs_ensure_configured.sh config-external.sh /opt/kolla/ + +CMD ["/start.sh"] + +{{ include_footer }} diff --git a/docker/openvswitch/ovs-vswitchd/config-external.sh b/docker/openvswitch/ovs-vswitchd/config-external.sh new file mode 100644 index 000000000..9ada4efcb --- /dev/null +++ b/docker/openvswitch/ovs-vswitchd/config-external.sh @@ -0,0 +1,3 @@ +#!/bin/bash + +#This file should be a noop. It just needs to exist, but it don't perform any function diff --git a/docker/openvswitch/ovs-vswitchd/ovs_ensure_configured.sh b/docker/openvswitch/ovs-vswitchd/ovs_ensure_configured.sh new file mode 100755 index 000000000..c39d64ff7 --- /dev/null +++ b/docker/openvswitch/ovs-vswitchd/ovs_ensure_configured.sh @@ -0,0 +1,17 @@ +#!/bin/bash + +bridge=$1 +port=$2 + +ovs-vsctl br-exists $bridge; rc=$? +if [[ $rc == 2 ]]; then + changed=changed + ovs-vsctl add-br $bridge +fi + +if [[ ! $(ovs-vsctl list-ports $bridge) =~ $(echo "\<$port\>") ]]; then + changed=changed + ovs-vsctl add-port $bridge $port +fi + +echo $changed diff --git a/docker/openvswitch/ovs-vswitchd/start.sh b/docker/openvswitch/ovs-vswitchd/start.sh new file mode 100755 index 000000000..3ec2c26b2 --- /dev/null +++ b/docker/openvswitch/ovs-vswitchd/start.sh @@ -0,0 +1,19 @@ +#!/bin/bash +LOG_FILE="/var/log/openvswitch/ovs-vswitchd.log" +DB_FILE="/etc/openvswitch/conf.db" +UNIXSOCK_DIR="/var/run/openvswitch" +UNIXSOCK="${UNIXSOCK_DIR}/db.sock" + +CMD="/usr/sbin/ovs-vswitchd" +ARGS="unix:${UNIXSOCK} -vconsole:emer -vsyslog:err -vfile:info --mlockall --log-file=${LOG_FILE}" + +# Loading common functions. +source /opt/kolla/kolla-common.sh + +# Execute config strategy +set_configs + +modprobe openvswitch +mkdir -p "${UNIXSOCK_DIR}" + +exec $CMD $ARGS diff --git a/docker/rabbitmq/Dockerfile.j2 b/docker/rabbitmq/Dockerfile.j2 new file mode 100644 index 000000000..1baf2ce80 --- /dev/null +++ b/docker/rabbitmq/Dockerfile.j2 @@ -0,0 +1,27 @@ +FROM {{ namespace }}/{{ base_distro }}-{{ install_type }}-base:{{ tag }} +MAINTAINER Kolla Project (https://launchpad.net/kolla) + +{% if base_distro in ['fedora', 'centos', 'oraclelinux'] %} + +RUN yum -y install \ + hostname \ + rabbitmq-server \ + && yum clean all \ + && rm -rf /var/lib/rabbitmq/* + +{% elif base_distro in ['ubuntu', 'debian'] %} + +RUN apt-get install -y --no-install-recommends rabbitmq-server \ + && apt-get clean \ + && rm -rf /var/lib/rabbitmq/* + +{% endif %} + +RUN /usr/lib/rabbitmq/bin/rabbitmq-plugins enable rabbitmq_management + +COPY start.sh / +COPY config-rabbit.sh config-external.sh /opt/kolla/ + +CMD ["/start.sh"] + +{{ include_footer }} diff --git a/docker/rabbitmq/config-external.sh b/docker/rabbitmq/config-external.sh new file mode 100644 index 000000000..33810d621 --- /dev/null +++ b/docker/rabbitmq/config-external.sh @@ -0,0 +1,19 @@ +#!/bin/bash +SOURCE_CONFIG="/opt/kolla/rabbitmq/rabbitmq.config" +TARGET_CONFIG="/etc/rabbitmq/rabbitmq.config" +SOURCE_ENV="/opt/kolla/rabbitmq/rabbitmq-env.conf" +TARGET_ENV="/etc/rabbitmq/rabbitmq-env.conf" +OWNER="rabbitmq" + +# Cluster configuration +if [[ -f "$SOURCE_CONFIG" ]]; then + cp -af $SOURCE_CONFIG $TARGET_CONFIG + chown ${OWNER}: $TARGET_CONFIG + chmod 0600 $TARGET_CONFIG +fi + +if [[ -f "$SOURCE_ENV" ]]; then + cp -af $SOURCE_ENV $TARGET_ENV + chown ${OWNER}: $TARGET_ENV + chmod 0600 $TARGET_ENV +fi diff --git a/docker/rabbitmq/config-rabbit.sh b/docker/rabbitmq/config-rabbit.sh new file mode 100644 index 000000000..c87a2ab48 --- /dev/null +++ b/docker/rabbitmq/config-rabbit.sh @@ -0,0 +1,7 @@ +#!/bin/bash + +function set_rabbitmq_cookie { + echo "${RABBITMQ_CLUSTER_COOKIE}" > /var/lib/rabbitmq/.erlang.cookie + chown -R rabbitmq: /var/lib/rabbitmq + chmod 400 /var/lib/rabbitmq/.erlang.cookie +} diff --git a/docker/rabbitmq/start.sh b/docker/rabbitmq/start.sh new file mode 100755 index 000000000..749bee963 --- /dev/null +++ b/docker/rabbitmq/start.sh @@ -0,0 +1,23 @@ +#!/bin/bash + +set -o errexit + +CMD="/usr/sbin/rabbitmq-server" +ARGS="" + +# loading common functions +source /opt/kolla/kolla-common.sh + +# Execute config strategy +set_configs + +# loading functions +source /opt/kolla/config-rabbit.sh + +# This catches all cases of the BOOTSTRAP variable being set, including empty +if [[ "${!KOLLA_BOOTSTRAP[@]}" ]]; then + set_rabbitmq_cookie + exit 0 +fi + +$CMD $ARGS diff --git a/docker/swift/swift-account-server/Dockerfile.j2 b/docker/swift/swift-account-server/Dockerfile.j2 new file mode 100644 index 000000000..7320de9f4 --- /dev/null +++ b/docker/swift/swift-account-server/Dockerfile.j2 @@ -0,0 +1,19 @@ +FROM {{ namespace }}/{{ base_distro }}-{{ install_type }}-swift-base:{{ tag }} +MAINTAINER Kolla Project (https://launchpad.net.kolla) + +{% if install_type == 'binary' %} + {% if base_distro in ['centos', 'fedora', 'oraclelinux'] %} + +RUN yum -y install \ + openstack-swift-account \ + && yum clean all + + {% endif %} +{% endif %} + +COPY start.sh / +COPY config-external.sh /opt/kolla/ + +CMD ["/start.sh"] + +{{ include_footer }} diff --git a/docker/swift/swift-account-server/config-external.sh b/docker/swift/swift-account-server/config-external.sh new file mode 100644 index 000000000..61adefcd0 --- /dev/null +++ b/docker/swift/swift-account-server/config-external.sh @@ -0,0 +1,19 @@ +#!/bin/bash + +if [[ -f /opt/kolla/swift/swift.conf ]]; then + cp /opt/kolla/swift/swift.conf /etc/swift/ + chown swift: /etc/swift/swift.conf + chmod 0640 /etc/swift/swift.conf +fi + +if [[ -f "/opt/kolla/swift/account.ring.gz" ]]; then + cp /opt/kolla/swift/account.ring.gz /etc/swift/account.ring.gz + chown swift: /etc/swift/account.ring.gz + chmod 0640 /etc/swift/account.ring.gz +fi + +if [[ -f /opt/kolla/swift-account-server/account-server.conf ]]; then + cp /opt/kolla/swift-account-server/account-server.conf /etc/swift/ + chown swift: /etc/swift/account-server.conf + chmod 0640 /etc/swift/account-server.conf +fi diff --git a/docker/swift/swift-account-server/start.sh b/docker/swift/swift-account-server/start.sh new file mode 100755 index 000000000..402ee6f44 --- /dev/null +++ b/docker/swift/swift-account-server/start.sh @@ -0,0 +1,16 @@ +#!/bin/bash + +set -o errexit + +CMD="/usr/bin/swift-account-server" +ARGS="/etc/swift/account-server.conf --verbose" + +# Loading common functions. +source /opt/kolla/kolla-common.sh + +source /opt/kolla/config-swift.sh + +# Execute config strategy +set_configs + +exec $CMD $ARGS diff --git a/docker/swift/swift-base/Dockerfile.j2 b/docker/swift/swift-base/Dockerfile.j2 new file mode 100644 index 000000000..7102916f1 --- /dev/null +++ b/docker/swift/swift-base/Dockerfile.j2 @@ -0,0 +1,29 @@ +FROM {{ namespace }}/{{ base_distro }}-{{ install_type }}-base:{{ tag }} +MAINTAINER Kolla Project (https://launchpad.net.kolla) + +{% if install_type == 'binary' %} + {% if base_distro in ['centos', 'fedora', 'oraclelinux'] %} + +RUN yum -y install openstack-swift && yum clean all + + {% elif base_distro in ['ubuntu', 'debian'] %} + +RUN echo '{{ install_type}} not yet available for {{ base_distro }}' \ + && /bin/false + + {% endif %} + +{% elif install_type == 'source' %} + +ADD swift.tar / +RUN ln -s /swift-* swift \ + && useradd --user-group swift \ + && pip --no-cache-dir install /swift \ + && mkdir -p /etc/swift /var/log/swift /home/swift \ + && cp -r /swift/etc/* /etc/swift/ \ + && chown -R swift: /etc/swift /var/log/swift /home/swift + +{% endif %} + +COPY config-swift.sh build-swift-ring.py /opt/kolla/ +RUN mkdir /opt/swift diff --git a/docker/swift/swift-base/build-swift-ring.py b/docker/swift/swift-base/build-swift-ring.py new file mode 100644 index 000000000..d7386392d --- /dev/null +++ b/docker/swift/swift-base/build-swift-ring.py @@ -0,0 +1,93 @@ +#!/usr/bin/env python + +# Copyright 2015 Paul Bourke +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +""" +This script is a simple wrapper used to create and rebalance Swift ring files. +""" + +import argparse +import subprocess +import sys + + +def setup_args(): + parser = argparse.ArgumentParser() + parser.add_argument("-f", "--ring-file", + required=True, + help="Path to ring file") + parser.add_argument("-p", "--part-power", + required=True, + help="Part power") + parser.add_argument("-r", "--num-replicas", + required=True, + help="Number of replicas") + parser.add_argument("-m", "--min-part-hours", + required=True, + help="Min part hours") + parser.add_argument("-H", "--hosts", + required=True, + help="Hosts in the ring, comma delimited") + parser.add_argument("-w", "--weights", + required=True, + help="Weight of each host, comma delimited") + parser.add_argument("-d", "--devices", + required=True, + help="Device on each host, comma delimited") + parser.add_argument("-z", "--zones", + required=True, + help="Zone of each host, comma delimited") + return parser.parse_args() + + +def run_cmd(cmd): + print(' '.join(cmd)) + subprocess.call(cmd) + + +def run(args): + hosts = args.hosts.split(',') + weights = args.weights.split(',') + zones = args.zones.split(',') + devices = args.devices.split(',') + if not (len(hosts) == len(weights) == len(zones) == len(devices)): + print('Error: an equal amount of hosts, devices, weights, ' + 'and zones are required') + sys.exit(1) + + run_cmd(['/usr/bin/swift-ring-builder', + args.ring_file, + 'create', + args.part_power, + args.num_replicas, + args.min_part_hours]) + + for i in xrange(len(hosts)): + run_cmd(['/usr/bin/swift-ring-builder', + args.ring_file, + 'add', + 'z{}-{}/{}'.format(zones[i], hosts[i], devices[i]), + weights[i]]) + + run_cmd(['/usr/bin/swift-ring-builder', args.ring_file, 'rebalance']) + + +def main(): + args = setup_args() + run(args) + + +if __name__ == "__main__": + main() diff --git a/docker/swift/swift-base/config-swift.sh b/docker/swift/swift-base/config-swift.sh new file mode 100755 index 000000000..b101b4e69 --- /dev/null +++ b/docker/swift/swift-base/config-swift.sh @@ -0,0 +1,3 @@ +#!/bin/bash + +chown -R swift: /srv/node diff --git a/docker/swift/swift-container-server/Dockerfile.j2 b/docker/swift/swift-container-server/Dockerfile.j2 new file mode 100644 index 000000000..1a08c0f5d --- /dev/null +++ b/docker/swift/swift-container-server/Dockerfile.j2 @@ -0,0 +1,19 @@ +FROM {{ namespace }}/{{ base_distro }}-{{ install_type }}-swift-base:{{ tag }} +MAINTAINER Kolla Project (https://launchpad.net.kolla) + +{% if install_type == 'binary' %} + {% if base_distro in ['centos', 'fedora', 'oraclelinux'] %} + +RUN yum -y install \ + openstack-swift-container \ + && yum clean all + + {% endif %} +{% endif %} + +COPY start.sh / +COPY config-external.sh /opt/kolla/ + +CMD ["/start.sh"] + +{{ include_footer }} diff --git a/docker/swift/swift-container-server/config-external.sh b/docker/swift/swift-container-server/config-external.sh new file mode 100644 index 000000000..d81ba6cc4 --- /dev/null +++ b/docker/swift/swift-container-server/config-external.sh @@ -0,0 +1,21 @@ +#!/bin/bash + +OWNER="swift" + +if [[ -f "/opt/kolla/swift/swift.conf" ]]; then + cp /opt/kolla/swift/swift.conf /etc/swift/swift.conf + chown ${OWNER}: /etc/swift/swift.conf + chmod 0640 /etc/swift/swift.conf +fi + +if [[ -f "/opt/kolla/swift/container.ring.gz" ]]; then + cp /opt/kolla/swift/container.ring.gz /etc/swift/container.ring.gz + chown ${OWNER}: /etc/swift/container.ring.gz + chmod 0640 /etc/swift/container.ring.gz +fi + +if [[ -f "/opt/kolla/swift-container-server/container-server.conf" ]]; then + cp /opt/kolla/swift-container-server/container-server.conf /etc/swift/container-server.conf + chown ${OWNER}: /etc/swift/container-server.conf + chmod 0640 /etc/swift/container-server.conf +fi diff --git a/docker/swift/swift-container-server/start.sh b/docker/swift/swift-container-server/start.sh new file mode 100755 index 000000000..78070ab29 --- /dev/null +++ b/docker/swift/swift-container-server/start.sh @@ -0,0 +1,16 @@ +#!/bin/bash + +set -o errexit + +CMD="/usr/bin/swift-container-server" +ARGS="/etc/swift/container-server.conf --verbose" + +# Loading common functions. +source /opt/kolla/kolla-common.sh + +source /opt/kolla/config-swift.sh + +# Execute config strategy +set_configs + +exec $CMD $ARGS diff --git a/docker/swift/swift-object-auditor/Dockerfile.j2 b/docker/swift/swift-object-auditor/Dockerfile.j2 new file mode 100644 index 000000000..ab8a7adee --- /dev/null +++ b/docker/swift/swift-object-auditor/Dockerfile.j2 @@ -0,0 +1,9 @@ +FROM {{ namespace }}/{{ base_distro }}-{{ install_type }}-swift-object-base:{{ tag }} +MAINTAINER Kolla Project (https://launchpad.net.kolla) + +COPY start.sh / +COPY config-external.sh /opt/kolla/ + +CMD ["/start.sh"] + +{{ include_footer }} diff --git a/docker/swift/swift-object-auditor/config-external.sh b/docker/swift/swift-object-auditor/config-external.sh new file mode 100644 index 000000000..0fa02e985 --- /dev/null +++ b/docker/swift/swift-object-auditor/config-external.sh @@ -0,0 +1,18 @@ +#!/bin/bash +SOURCE="/opt/kolla/swift/swift.conf" +TARGET="/etc/swift/swift.conf" +SOURCE_OBJECT_SERVER="/opt/kolla/swift/object-server.conf" +TARGET_OBJECT_SERVER="/etc/swift/object-server.conf" +OWNER="swift" + +if [[ -f "$SOURCE" ]]; then + cp $SOURCE $TARGET + chown ${OWNER}: $TARGET + chmod 0640 $TARGET +fi + +if [[ -f "$SOURCE_OBJECT_SERVER" ]]; then + cp $SOURCE_OBJECT_SERVER $TARGET_OBJECT_SERVER + chown ${OWNER}: $TARGET_OBJECT_SERVER + chmod 0640 $TARGET_OBJECT_SERVER +fi diff --git a/docker/swift/swift-object-auditor/start.sh b/docker/swift/swift-object-auditor/start.sh new file mode 100755 index 000000000..6319eed6b --- /dev/null +++ b/docker/swift/swift-object-auditor/start.sh @@ -0,0 +1,16 @@ +#!/bin/bash + +set -o errexit + +CMD="/usr/bin/swift-object-auditor" +ARGS="/etc/swift/object-server.conf --verbose" + +# Loading common functions. +source /opt/kolla/kolla-common.sh + +source /opt/kolla/config-swift.sh + +# Execute config strategy +set_configs + +exec $CMD $ARGS diff --git a/docker/swift/swift-object-base/Dockerfile.j2 b/docker/swift/swift-object-base/Dockerfile.j2 new file mode 100644 index 000000000..54997a114 --- /dev/null +++ b/docker/swift/swift-object-base/Dockerfile.j2 @@ -0,0 +1,14 @@ +FROM {{ namespace }}/{{ base_distro }}-{{ install_type }}-swift-base:{{ tag }} +MAINTAINER Kolla Project (https://launchpad.net.kolla) + +{% if install_type == 'binary' %} + {% if base_distro in ['centos', 'fedora', 'oraclelinux'] %} + +RUN yum -y install \ + openstack-swift-object \ + && yum clean all + + {% endif %} +{% endif %} + +COPY config-swift-object.sh /opt/kolla/ diff --git a/docker/swift/swift-object-base/config-swift-object.sh b/docker/swift/swift-object-base/config-swift-object.sh new file mode 100644 index 000000000..0d3d58dc3 --- /dev/null +++ b/docker/swift/swift-object-base/config-swift-object.sh @@ -0,0 +1,72 @@ +#!/bin/bash + +. /opt/kolla/kolla-common.sh + +check_required_vars \ + SWIFT_CONTAINER_SVC_RING_DEVICES \ + SWIFT_CONTAINER_SVC_RING_HOSTS \ + SWIFT_CONTAINER_SVC_RING_MIN_PART_HOURS \ + SWIFT_CONTAINER_SVC_RING_NAME \ + SWIFT_CONTAINER_SVC_RING_PART_POWER \ + SWIFT_CONTAINER_SVC_RING_REPLICAS \ + SWIFT_CONTAINER_SVC_RING_WEIGHTS \ + SWIFT_CONTAINER_SVC_RING_ZONES \ + SWIFT_DIR \ + SWIFT_OBJECT_SVC_BIND_IP \ + SWIFT_OBJECT_SVC_BIND_PORT \ + SWIFT_OBJECT_SVC_DEVICES \ + SWIFT_OBJECT_SVC_MOUNT_CHECK \ + SWIFT_OBJECT_SVC_PIPELINE \ + SWIFT_OBJECT_SVC_RING_DEVICES \ + SWIFT_OBJECT_SVC_RING_HOSTS \ + SWIFT_OBJECT_SVC_RING_MIN_PART_HOURS \ + SWIFT_OBJECT_SVC_RING_NAME \ + SWIFT_OBJECT_SVC_RING_PART_POWER \ + SWIFT_OBJECT_SVC_RING_REPLICAS \ + SWIFT_OBJECT_SVC_RING_WEIGHTS \ + SWIFT_OBJECT_SVC_RING_ZONES \ + SWIFT_USER + +cfg=/etc/swift/object-server.conf + +crudini --set $cfg DEFAULT bind_ip "${SWIFT_OBJECT_SVC_BIND_IP}" +crudini --set $cfg DEFAULT bind_port "${SWIFT_OBJECT_SVC_BIND_PORT}" +crudini --set $cfg DEFAULT user "${SWIFT_USER}" +crudini --set $cfg DEFAULT swift_dir "${SWIFT_DIR}" +crudini --set $cfg DEFAULT devices "${SWIFT_OBJECT_SVC_DEVICES}" +crudini --set $cfg DEFAULT mount_check "${SWIFT_OBJECT_SVC_MOUNT_CHECK}" + +crudini --set $cfg pipeline:main pipeline "${SWIFT_OBJECT_SVC_PIPELINE}" + +# NOTE(pbourke): some services require a section in the conf, even if empty +crudini --set $cfg object-expirer + +# Create swift user and group if they don't exist +id -u swift &>/dev/null || useradd --user-group swift + +# Ensure proper ownership of the mount point directory structure +chown -R swift:swift /srv/node + +# TODO(pbourke): does this need to be on a data vol? +mkdir -p /var/cache/swift +chown -R swift:swift /var/cache/swift + +python /opt/kolla/build-swift-ring.py \ + -f ${SWIFT_OBJECT_SVC_RING_NAME} \ + -p ${SWIFT_OBJECT_SVC_RING_PART_POWER} \ + -r ${SWIFT_OBJECT_SVC_RING_REPLICAS} \ + -m ${SWIFT_OBJECT_SVC_RING_MIN_PART_HOURS} \ + -H ${SWIFT_OBJECT_SVC_RING_HOSTS} \ + -w ${SWIFT_OBJECT_SVC_RING_WEIGHTS} \ + -d ${SWIFT_OBJECT_SVC_RING_DEVICES} \ + -z ${SWIFT_OBJECT_SVC_RING_ZONES} + +python /opt/kolla/build-swift-ring.py \ + -f ${SWIFT_CONTAINER_SVC_RING_NAME} \ + -p ${SWIFT_CONTAINER_SVC_RING_PART_POWER} \ + -r ${SWIFT_CONTAINER_SVC_RING_REPLICAS} \ + -m ${SWIFT_CONTAINER_SVC_RING_MIN_PART_HOURS} \ + -H ${SWIFT_CONTAINER_SVC_RING_HOSTS} \ + -w ${SWIFT_CONTAINER_SVC_RING_WEIGHTS} \ + -d ${SWIFT_CONTAINER_SVC_RING_DEVICES} \ + -z ${SWIFT_CONTAINER_SVC_RING_ZONES} diff --git a/docker/swift/swift-object-expirer/Dockerfile.j2 b/docker/swift/swift-object-expirer/Dockerfile.j2 new file mode 100644 index 000000000..af9f3eb58 --- /dev/null +++ b/docker/swift/swift-object-expirer/Dockerfile.j2 @@ -0,0 +1,20 @@ +FROM {{ namespace }}/{{ base_distro }}-{{ install_type }}-swift-object-base:{{ tag }} +MAINTAINER Kolla Project (https://launchpad.net.kolla) + +{% if install_type == 'binary' %} + {% if base_distro in ['centos', 'fedora', 'oraclelinux'] %} + +RUN yum -y install \ + openstack-swift-proxy \ + openstack-swift-container \ + && yum clean all + + {% endif %} +{% endif %} + +COPY start.sh / +COPY config-external.sh /opt/kolla/ + +CMD ["/start.sh"] + +{{ include_footer }} diff --git a/docker/swift/swift-object-expirer/config-external.sh b/docker/swift/swift-object-expirer/config-external.sh new file mode 100644 index 000000000..ff2bcf9f5 --- /dev/null +++ b/docker/swift/swift-object-expirer/config-external.sh @@ -0,0 +1,18 @@ +#!/bin/bash +SOURCE="/opt/kolla/swift/swift.conf" +TARGET="/etc/swift/swift.conf" +SOURCE_OBJECT_EXPIRER="/opt/kolla/swift/object-expirer.conf" +TARGET_OBJECT_EXPIRER="/etc/swift/object-expirer.conf" +OWNER="swift" + +if [[ -f "$SOURCE" ]]; then + cp $SOURCE $TARGET + chown ${OWNER}: $TARGET + chmod 0640 $TARGET +fi + +if [[ -f "$SOURCE_OBJECT_EXPIRER" ]]; then + cp $SOURCE_OBJECT_EXPIRER $TARGET_OBJECT_EXPIRER + chown ${OWNER}: $TARGET_OBJECT_EXPIRER + chmod 0640 $TARGET_OBJECT_EXPIRER +fi diff --git a/docker/swift/swift-object-expirer/start.sh b/docker/swift/swift-object-expirer/start.sh new file mode 100755 index 000000000..434e8dc49 --- /dev/null +++ b/docker/swift/swift-object-expirer/start.sh @@ -0,0 +1,16 @@ +#!/bin/bash + +set -o errexit + +CMD="/usr/bin/swift-object-expirer" +ARGS="/etc/swift/object-server.conf --verbose" + +# Loading common functions. +source /opt/kolla/kolla-common.sh + +source /opt/kolla/config-swift.sh + +# Execute config strategy +set_configs + +exec $CMD $ARGS diff --git a/docker/swift/swift-object-replicator/Dockerfile.j2 b/docker/swift/swift-object-replicator/Dockerfile.j2 new file mode 100644 index 000000000..ab8a7adee --- /dev/null +++ b/docker/swift/swift-object-replicator/Dockerfile.j2 @@ -0,0 +1,9 @@ +FROM {{ namespace }}/{{ base_distro }}-{{ install_type }}-swift-object-base:{{ tag }} +MAINTAINER Kolla Project (https://launchpad.net.kolla) + +COPY start.sh / +COPY config-external.sh /opt/kolla/ + +CMD ["/start.sh"] + +{{ include_footer }} diff --git a/docker/swift/swift-object-replicator/config-external.sh b/docker/swift/swift-object-replicator/config-external.sh new file mode 100644 index 000000000..0fa02e985 --- /dev/null +++ b/docker/swift/swift-object-replicator/config-external.sh @@ -0,0 +1,18 @@ +#!/bin/bash +SOURCE="/opt/kolla/swift/swift.conf" +TARGET="/etc/swift/swift.conf" +SOURCE_OBJECT_SERVER="/opt/kolla/swift/object-server.conf" +TARGET_OBJECT_SERVER="/etc/swift/object-server.conf" +OWNER="swift" + +if [[ -f "$SOURCE" ]]; then + cp $SOURCE $TARGET + chown ${OWNER}: $TARGET + chmod 0640 $TARGET +fi + +if [[ -f "$SOURCE_OBJECT_SERVER" ]]; then + cp $SOURCE_OBJECT_SERVER $TARGET_OBJECT_SERVER + chown ${OWNER}: $TARGET_OBJECT_SERVER + chmod 0640 $TARGET_OBJECT_SERVER +fi diff --git a/docker/swift/swift-object-replicator/start.sh b/docker/swift/swift-object-replicator/start.sh new file mode 100755 index 000000000..203f8864d --- /dev/null +++ b/docker/swift/swift-object-replicator/start.sh @@ -0,0 +1,16 @@ +#!/bin/bash + +set -o errexit + +CMD="/usr/bin/swift-object-replicator" +ARGS="/etc/swift/object-server.conf --verbose" + +# Loading common functions. +source /opt/kolla/kolla-common.sh + +source /opt/kolla/config-swift.sh + +# Execute config strategy +set_configs + +exec $CMD $ARGS diff --git a/docker/swift/swift-object-server/Dockerfile.j2 b/docker/swift/swift-object-server/Dockerfile.j2 new file mode 100644 index 000000000..ab8a7adee --- /dev/null +++ b/docker/swift/swift-object-server/Dockerfile.j2 @@ -0,0 +1,9 @@ +FROM {{ namespace }}/{{ base_distro }}-{{ install_type }}-swift-object-base:{{ tag }} +MAINTAINER Kolla Project (https://launchpad.net.kolla) + +COPY start.sh / +COPY config-external.sh /opt/kolla/ + +CMD ["/start.sh"] + +{{ include_footer }} diff --git a/docker/swift/swift-object-server/config-external.sh b/docker/swift/swift-object-server/config-external.sh new file mode 100644 index 000000000..a3fb1a2cc --- /dev/null +++ b/docker/swift/swift-object-server/config-external.sh @@ -0,0 +1,27 @@ +#!/bin/bash + +OWNER="swift" + +if [[ -f "/opt/kolla/swift/swift.conf" ]]; then + cp /opt/kolla/swift/swift.conf /etc/swift/swift.conf + chown ${OWNER}: /etc/swift/swift.conf + chmod 0640 /etc/swift/swift.conf +fi + +if [[ -f "/opt/kolla/swift/object.ring.gz" ]]; then + cp /opt/kolla/swift/object.ring.gz /etc/swift/object.ring.gz + chown ${OWNER}: /etc/swift/object.ring.gz + chmod 0640 /etc/swift/object.ring.gz +fi + +if [[ -f "/opt/kolla/swift/container.ring.gz" ]]; then + cp /opt/kolla/swift/container.ring.gz /etc/swift/container.ring.gz + chown ${OWNER}: /etc/swift/container.ring.gz + chmod 0640 /etc/swift/container.ring.gz +fi + +if [[ -f "/opt/kolla/swift-object-server/object-server.conf" ]]; then + cp /opt/kolla/swift-object-server/object-server.conf /etc/swift/object-server.conf + chown ${OWNER}: /etc/swift/object-server.conf + chmod 0640 /etc/swift/object-server.conf +fi diff --git a/docker/swift/swift-object-server/start.sh b/docker/swift/swift-object-server/start.sh new file mode 100755 index 000000000..f2a32b4d3 --- /dev/null +++ b/docker/swift/swift-object-server/start.sh @@ -0,0 +1,16 @@ +#!/bin/bash + +set -o errexit + +CMD="/usr/bin/swift-object-server" +ARGS="/etc/swift/object-server.conf --verbose" + +# Loading common functions. +source /opt/kolla/kolla-common.sh + +source /opt/kolla/config-swift.sh + +# Execute config strategy +set_configs + +exec $CMD $ARGS diff --git a/docker/swift/swift-object-updater/Dockerfile.j2 b/docker/swift/swift-object-updater/Dockerfile.j2 new file mode 100644 index 000000000..ab8a7adee --- /dev/null +++ b/docker/swift/swift-object-updater/Dockerfile.j2 @@ -0,0 +1,9 @@ +FROM {{ namespace }}/{{ base_distro }}-{{ install_type }}-swift-object-base:{{ tag }} +MAINTAINER Kolla Project (https://launchpad.net.kolla) + +COPY start.sh / +COPY config-external.sh /opt/kolla/ + +CMD ["/start.sh"] + +{{ include_footer }} diff --git a/docker/swift/swift-object-updater/config-external.sh b/docker/swift/swift-object-updater/config-external.sh new file mode 100644 index 000000000..0fa02e985 --- /dev/null +++ b/docker/swift/swift-object-updater/config-external.sh @@ -0,0 +1,18 @@ +#!/bin/bash +SOURCE="/opt/kolla/swift/swift.conf" +TARGET="/etc/swift/swift.conf" +SOURCE_OBJECT_SERVER="/opt/kolla/swift/object-server.conf" +TARGET_OBJECT_SERVER="/etc/swift/object-server.conf" +OWNER="swift" + +if [[ -f "$SOURCE" ]]; then + cp $SOURCE $TARGET + chown ${OWNER}: $TARGET + chmod 0640 $TARGET +fi + +if [[ -f "$SOURCE_OBJECT_SERVER" ]]; then + cp $SOURCE_OBJECT_SERVER $TARGET_OBJECT_SERVER + chown ${OWNER}: $TARGET_OBJECT_SERVER + chmod 0640 $TARGET_OBJECT_SERVER +fi diff --git a/docker/swift/swift-object-updater/start.sh b/docker/swift/swift-object-updater/start.sh new file mode 100755 index 000000000..744344f74 --- /dev/null +++ b/docker/swift/swift-object-updater/start.sh @@ -0,0 +1,16 @@ +#!/bin/bash + +set -o errexit + +CMD="/usr/bin/swift-object-updater" +ARGS="/etc/swift/object-server.conf --verbose" + +# Loading common functions. +source /opt/kolla/kolla-common.sh + +source /opt/kolla/config-swift.sh + +# Execute config strategy +set_configs + +exec $CMD $ARGS diff --git a/docker/swift/swift-proxy-server/Dockerfile.j2 b/docker/swift/swift-proxy-server/Dockerfile.j2 new file mode 100644 index 000000000..54d024f8b --- /dev/null +++ b/docker/swift/swift-proxy-server/Dockerfile.j2 @@ -0,0 +1,16 @@ +FROM {{ namespace }}/{{ base_distro }}-{{ install_type }}-swift-base:{{ tag }} +MAINTAINER Kolla Project (https://launchpad.net.kolla) + +{% if install_type == 'binary' %} + {% if base_distro in ['centos', 'fedora', 'oraclelinux'] %} + +RUN yum -y install openstack-swift-proxy && yum clean all + + {% endif %} +{% endif %} + +COPY ./start.sh /start.sh +COPY config-external.sh /opt/kolla/ +CMD ["/start.sh"] + +{{ include_footer }} diff --git a/docker/swift/swift-proxy-server/config-external.sh b/docker/swift/swift-proxy-server/config-external.sh new file mode 100755 index 000000000..434cce7e5 --- /dev/null +++ b/docker/swift/swift-proxy-server/config-external.sh @@ -0,0 +1,33 @@ +#!/bin/bash + +OWNER="swift" + +if [[ -f "/opt/kolla/swift/swift.conf" ]]; then + cp /opt/kolla/swift/swift.conf /etc/swift/swift.conf + chown ${OWNER}: /etc/swift/swift.conf + chmod 0640 /etc/swift/swift.conf +fi + +if [[ -f "/opt/kolla/swift/object.ring.gz" ]]; then + cp /opt/kolla/swift/object.ring.gz /etc/swift/object.ring.gz + chown ${OWNER}: /etc/swift/object.ring.gz + chmod 0640 /etc/swift/object.ring.gz +fi + +if [[ -f "/opt/kolla/swift/container.ring.gz" ]]; then + cp /opt/kolla/swift/container.ring.gz /etc/swift/container.ring.gz + chown ${OWNER}: /etc/swift/container.ring.gz + chmod 0640 /etc/swift/container.ring.gz +fi + +if [[ -f "/opt/kolla/swift/account.ring.gz" ]]; then + cp /opt/kolla/swift/account.ring.gz /etc/swift/account.ring.gz + chown ${OWNER}: /etc/swift/account.ring.gz + chmod 0640 /etc/swift/account.ring.gz +fi + +if [[ -f "/opt/kolla/swift-proxy-server/proxy-server.conf" ]]; then + cp /opt/kolla/swift-proxy-server/proxy-server.conf /etc/swift/proxy-server.conf + chown ${OWNER}: /etc/swift/proxy-server.conf + chmod 0640 /etc/swift/proxy-server.conf +fi diff --git a/docker/swift/swift-proxy-server/start.sh b/docker/swift/swift-proxy-server/start.sh new file mode 100755 index 000000000..99a142e52 --- /dev/null +++ b/docker/swift/swift-proxy-server/start.sh @@ -0,0 +1,16 @@ +#!/bin/bash + +set -o errexit + +CMD="/usr/bin/swift-proxy-server" +ARGS="/etc/swift/proxy-server.conf --verbose" + +# Loading common functions. +source /opt/kolla/kolla-common.sh + +source /opt/kolla/config-swift.sh + +# Execute config strategy +set_configs + +exec $CMD $ARGS diff --git a/docker/zaqar/Dockerfile.j2 b/docker/zaqar/Dockerfile.j2 new file mode 100644 index 000000000..4e3a0bc52 --- /dev/null +++ b/docker/zaqar/Dockerfile.j2 @@ -0,0 +1,32 @@ +FROM {{ namespace }}/{{ base_distro }}-{{ install_type }}-base:{{ tag }} +MAINTAINER Kolla Project (https://launchpad.net/kolla) + +{% if install_type == 'binary' %} + {% if base_distro in ['fedora', 'centos', 'oraclelinux'] %} + +RUN yum -y install openstack-zaqar && yum clean all + + {% elif base_distro in ['ubuntu', 'debian'] %} + +RUN echo '{{ install_type }} not yet available for {{ base_distro }}' \ + && /bin/false + + {% endif %} +{% elif install_type == 'source' %} + +ADD zaqar.tar / +RUN ln -s /zaqar-* zaqar \ + && useradd --user-group zaqar \ + && pip --no-cache-dir install /zaqar \ + && mkdir -p /etc/zaqar /var/log/zaqar /home/zaqar \ + && cp -r /zaqar/etc/* /etc/zaqar/ \ + && chown -R zaqar: /etc/zaqar /var/log/zaqar /home/zaqar + +{% endif %} + +COPY start.sh / +COPY config-external.sh /opt/kolla/ + +CMD ["/start.sh"] + +{{ include_footer }} diff --git a/docker/zaqar/config-external.sh b/docker/zaqar/config-external.sh new file mode 100644 index 000000000..7ed6da2eb --- /dev/null +++ b/docker/zaqar/config-external.sh @@ -0,0 +1,10 @@ +#!/bin/bash +SOURCE="/opt/kolla/zaqar/zaqar.conf" +TARGET="/etc/zaqar/zaqar.conf" +OWNER="zaqar" + +if [[ -f "$SOURCE" ]]; then + cp $SOURCE $TARGET + chown ${OWNER}: $TARGET + chmod 0644 $TARGET +fi diff --git a/docker/zaqar/start.sh b/docker/zaqar/start.sh new file mode 100755 index 000000000..fa1050280 --- /dev/null +++ b/docker/zaqar/start.sh @@ -0,0 +1,21 @@ +#!/bin/bash + +set -o errexit + +CMD="/usr/bin/zaqar-server" +ARGS="" + +# Loading common functions. +source /opt/kolla/kolla-common.sh + +# Execute config strategy +set_configs + +# Bootstrap and exit if KOLLA_BOOTSTRAP variable is set. This catches all cases +# of the KOLLA_BOOTSTRAP variable being set, including empty. +if [[ "${!KOLLA_BOOTSTRAP[@]}" ]]; then + su -s /bin/sh -c "zaqar-manage db_sync" cinder + exit 0 +fi + +exec $CMD $ARGS diff --git a/docker_templates/base/Dockerfile.j2 b/docker_templates/base/Dockerfile.j2 deleted file mode 100755 index b3b0c776a..000000000 --- a/docker_templates/base/Dockerfile.j2 +++ /dev/null @@ -1,236 +0,0 @@ -FROM {{ base_distro }}:{{ base_distro_tag }} -MAINTAINER Kolla Project (https://launchpad.net/kolla) - -{{ include_header }} - -ENV KOLLA_BASE_DISTRO {{ base_distro }} -ENV KOLLA_INSTALL_TYPE {{ install_type }} - -{% if base_distro in ['fedora', 'centos', 'oraclelinux'] %} - -# Turns on galera repos throughout the build -COPY mariadb.yum.repo /etc/yum.repos.d/MariaDB.repo - -RUN yum install -y http://www.percona.com/redir/downloads/percona-release/redhat/0.1-3/percona-release-0.1-3.noarch.rpm \ - && sed -i 's|$releasever|centos/latest|g' /etc/yum.repos.d/percona-release.repo - - {% if install_type == 'binary' %} - {% if base_distro in ['centos', 'oraclelinux'] %} - -# Set up repositories -# This repository provides all dependencies used by RDO OpenStack -RUN yum install -y https://rdoproject.org/repos/openstack-kilo/rdo-release-kilo.rpm - -# This repository provides latest packages built from trunk master into RPMs -RUN curl http://trunk.rdoproject.org/centos7/current/delorean.repo -o /etc/yum.repos.d/delorean-current.repo - -# This repository turns off auth in PAM so we can operate on Ubuntu 14.04 -RUN curl https://copr.fedoraproject.org/coprs/sdake/pam.noaudit/repo/epel-7/sdake-pam.noaudit-epel-7.repo -o /etc/yum.repos.d/sdake-pam.noaudit-epel-7.repo - -{% if base_distro == 'centos' %} -# CentOS 7.1 workaround for conflicting packages with libvirt -RUN rpm -e --nodeps systemd-container systemd-container-libs \ - && rpm -e --nodeps yum-plugin-fastestmirror \ - && yum -d 10 -y install systemd systemd-libs systemd-devel \ - && yum clean all -{% endif %} - -{% if base_distro == 'oraclelinux' %} -RUN yum install -y \ - yum-utils \ - https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm \ - && yum clean all -RUN yum-config-manager --enable ol7_optional_latest ol7_addons -{% endif %} - - # Endif for base_distro centos/oraclelinux - {% elif base_distro == 'fedora' %} - -# Set up repositories -RUN yum install -y https://rdo.fedorapeople.org/rdo-release.rpm \ - && yum -y install dnf dnf-plugins-core \ - && yum clean all \ - && dnf copr enable -y sdake/pam.noaudit - - # Endif for base_distro fedora - {% endif %} - -# Update packages -RUN yum update -y \ - && yum install -y epel-release \ - && yum clean all - -# Install base packages -RUN yum install -y \ - git \ - iproute \ - mariadb-libs \ - openssl \ - openstack-utils \ - pyparsing \ - python-alembic \ - python-amqp \ - python-amqplib \ - python-anyjson \ - python-boto \ - python-cheetah \ - python-cliff \ - python-cmd2 \ - python-croniter \ - python-crypto \ - python-d2to1 \ - python-docutils \ - python-dogpile-cache \ - python-dogpile-core \ - python-empy \ - python-eventlet \ - python-flask \ - python-futures \ - python-greenlet \ - python-httplib2 \ - python-iso8601 \ - python-itsdangerous \ - python-jinja2 \ - python-jsonpatch \ - python-jsonpath-rw \ - python-jsonpointer \ - python-jsonschema \ - python-keyring \ - python-kombu \ - python-ldap \ - python-lesscpy \ - python-lockfile \ - python-lxml \ - python-markdown \ - python-memcached \ - python-migrate \ - python-msgpack \ - python-netifaces \ - python-networkx \ - python-oauthlib \ - python-oslo-config \ - python-oslo-messaging \ - python-oslo-rootwrap \ - python-oslo-policy \ - python-paramiko \ - python-passlib \ - python-paste-deploy \ - python-pbr \ - python-pecan \ - python-pip \ - python-ply \ - python-prettytable \ - python-psutil \ - python-pycadf \ - python-pygments \ - python-pymongo \ - python-qpid \ - python-repoze-lru \ - python-requests \ - python-routes \ - python-simplegeneric \ - python-simplejson \ - python-singledispatch \ - python-six \ - python-sqlalchemy \ - python-stevedore \ - python-taskflow \ - python-versiontools \ - python-warlock \ - python-webob \ - python-websockify \ - python-webtest \ - python-werkzeug \ - python-wsme \ - && yum clean all - -# TODO(inc0): when oslo_service lands in delorean, change pip to yum -# necessary until https://bugzilla.redhat.com/show_bug.cgi?id=1229477 is fixed - -# This is dirty like zebra. This works around a bug in Ubuntu 14.04 LTS. The -# --net=host option does not work on ubuntu 14.04 because of a kernel bug. One -# workaround is to buid pam without authentication. -# See: -# https://registry.hub.docker.com/u/sequenceiq/pam/ -# -RUN rpm -e --nodeps pam \ - && yum -y install pam+noaudit \ - && yum clean all -# End dirty like zebra - - # Endif for install_type binary - {% elif install_type == 'source' %} - -# Update packages -RUN yum update -y \ - && yum install -y \ - epel-release \ - gcc \ - gcc-c++ \ - git \ - libffi-devel \ - libxml2-devel \ - libxslt-devel \ - mariadb-devel \ - mysql-devel \ - MySQL-python \ - openldap-devel \ - openssl \ - openssl-devel \ - postgresql \ - postgresql-devel \ - python-devel \ - python-oslo-policy \ - sqlite-devel \ - tar \ - && yum clean all - - # Endif for install_type source - {% endif %} - -# Endif for base_distro centos,fedora,oraclelinux -{% elif base_distro in ['ubuntu', 'debian'] %} - -# This will prevent questions from being asked during the install -ENV DEBIAN_FRONTEND noninteractive - -COPY sources.list /etc/apt/ - -RUN apt-key adv --recv-keys --keyserver hkp://keyserver.ubuntu.com 199369E5404BD5FC7D2FE43BCBCB082A1BB943DB \ - && apt-key adv --recv-keys --keyserver hkp://keyserver.ubuntu.com 391A9AA2147192839E9DB0315EDB1B62EC4926EA \ - && apt-key adv --recv-keys --keyserver hkp://keyserver.ubuntu.com F78372A06FF50C80464FC1B4F7B8CEA6056E8E56 \ - && apt-key adv --recv-keys --keyserver hkp://keyserver.ubuntu.com 430BDF5C56E7C94E848EE60C1C4CBDCDCD2EFD2A \ - && apt-key adv --recv-keys --keyserver hkp://keyserver.ubuntu.com 7D5C473EB80C00FC133071068A6844A29F68104E \ - && apt-get update \ - && apt-get upgrade -y \ - && apt-get dist-upgrade -y \ - && apt-get install -y --no-install-recommends \ - curl \ - ca-certificates \ - build-essential \ - python-dev \ - libssl-dev \ - python-mysqldb \ - libmariadbclient-dev \ - libxslt1-dev \ - libffi-dev \ - libyaml-dev \ - pkg-config \ - && apt-get clean \ - && sed -i "s|'purelib': '\$base/local/lib/python\$py_version_short/dist-packages',|'purelib': '\$base/lib/python\$py_version_short/dist-packages',|;s|'platlib': '\$platbase/local/lib/python\$py_version_short/dist-packages',|'platlib': '\$platbase/lib/python\$py_version_short/dist-packages',|;s|'headers': '\$base/local/include/python\$py_version_short/\$dist_name',|'headers': '\$base/include/python\$py_version_short/\$dist_name',|;s|'scripts': '\$base/local/bin',|'scripts': '\$base/bin',|;s|'data' : '\$base/local',|'data' : '\$base',|" /usr/lib/python2.7/distutils/command/install.py \ - && rm -rf /usr/lib/python2.7/site-packages \ - && ln -s dist-packages /usr/lib/python2.7/site-packages - -# Endif for base_distro ubuntu,debian -{% endif %} - -{% if install_type == 'source' %} - -RUN curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py \ - && python get-pip.py \ - && rm get-pip.py - -# Endif for install_type source -{% endif %} - -COPY kolla-common.sh /opt/kolla/ diff --git a/docker_templates/base/kolla-common.sh b/docker_templates/base/kolla-common.sh deleted file mode 100644 index cc960ca24..000000000 --- a/docker_templates/base/kolla-common.sh +++ /dev/null @@ -1,22 +0,0 @@ -#!/bin/bash - -set_configs() { - case $KOLLA_CONFIG_STRATEGY in - COPY_ALWAYS) - source /opt/kolla/config-external.sh - ;; - COPY_ONCE) - if [[ -f /configured ]]; then - echo 'INFO - This container has already been configured; Refusing to copy new configs' - else - source /opt/kolla/config-external.sh - touch /configured - fi - ;; - - *) - echo '$KOLLA_CONFIG_STRATEGY is not set properly' - exit 1 - ;; - esac -} diff --git a/docker_templates/base/mariadb.yum.repo b/docker_templates/base/mariadb.yum.repo deleted file mode 100644 index 564ce3f0e..000000000 --- a/docker_templates/base/mariadb.yum.repo +++ /dev/null @@ -1,5 +0,0 @@ -[mariadb] -name = MariaDB -baseurl = http://yum.mariadb.org/10.0/centos7-amd64 -gpgkey=https://yum.mariadb.org/RPM-GPG-KEY-MariaDB -gpgcheck=1 diff --git a/docker_templates/base/sources.list b/docker_templates/base/sources.list deleted file mode 100644 index ccb6f8d25..000000000 --- a/docker_templates/base/sources.list +++ /dev/null @@ -1,22 +0,0 @@ -# Default repos -deb http://archive.ubuntu.com/ubuntu/ trusty main restricted universe multiverse -deb http://archive.ubuntu.com/ubuntu/ trusty-updates main restricted universe multiverse -deb http://archive.ubuntu.com/ubuntu/ trusty-security main restricted universe multiverse - -# Backports have a lower priority and must be explictly installed to be used -deb http://archive.ubuntu.com/ubuntu/ trusty-backports main restricted universe multiverse - -# TODO(SamYaple): Switch this to the Liberty repo as soon as the update packages -# and actually start signing them. -# We need to add the Kilo repo for the updated packages they provide. The main -# ones are qemu, libvirt, and openvswitch. -deb http://ubuntu-cloud.archive.canonical.com/ubuntu trusty-updates/kilo main - -# MariaDB 10.0 repo -deb http://nyc2.mirrors.digitalocean.com/mariadb/repo/10.0/ubuntu trusty main - -# Percona repo (for xtrabackup) -deb http://repo.percona.com/apt trusty main - -# RabbitMQ repo. Despite the name, the 'testing' repo is the stable repo. -deb http://www.rabbitmq.com/debian/ testing main diff --git a/docker_templates/ceilometer/ceilometer-alarm/Dockerfile.j2 b/docker_templates/ceilometer/ceilometer-alarm/Dockerfile.j2 deleted file mode 100644 index aa62562ac..000000000 --- a/docker_templates/ceilometer/ceilometer-alarm/Dockerfile.j2 +++ /dev/null @@ -1,18 +0,0 @@ -FROM {{ namespace }}/{{ base_distro }}-{{ install_type }}-ceilometer-base:{{ tag }} -MAINTAINER Kolla Project (https://launchpad.net/kolla) - -{% if install_type == 'binary' %} - {% if base_distro in ['fedora', 'centos', 'oraclelinux'] %} - -RUN yum install -y openstack-ceilometer-alarm \ - && yum clean all - - {% endif %} -{% endif %} - -COPY ./start.sh / -COPY config-external.sh /opt/kolla/ - -CMD ["/start.sh"] - -{{ include_footer }} diff --git a/docker_templates/ceilometer/ceilometer-alarm/config-external.sh b/docker_templates/ceilometer/ceilometer-alarm/config-external.sh deleted file mode 100644 index 2835bd5aa..000000000 --- a/docker_templates/ceilometer/ceilometer-alarm/config-external.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/bash -SOURCE="/opt/kolla/ceilometer/ceilometer.conf" -TARGET="/etc/ceilometer/ceilometer.conf" -OWNER="ceilometer" - -if [[ -f "$SOURCE" ]]; then - cp $SOURCE $TARGET - chown ${OWNER}: $TARGET - chmod 0644 $TARGET -fi diff --git a/docker_templates/ceilometer/ceilometer-alarm/start.sh b/docker_templates/ceilometer/ceilometer-alarm/start.sh deleted file mode 100755 index ab5501b23..000000000 --- a/docker_templates/ceilometer/ceilometer-alarm/start.sh +++ /dev/null @@ -1,14 +0,0 @@ -#!/bin/bash - -set -o errexit - -CMD="/usr/bin/ceilometer-alarm" -ARGS="" - -# Loading common functions. -source /opt/kolla/kolla-common.sh - -# Execute config strategy -set_configs - -exec $CMD $ARGS diff --git a/docker_templates/ceilometer/ceilometer-api/Dockerfile.j2 b/docker_templates/ceilometer/ceilometer-api/Dockerfile.j2 deleted file mode 100644 index 805e5e8eb..000000000 --- a/docker_templates/ceilometer/ceilometer-api/Dockerfile.j2 +++ /dev/null @@ -1,18 +0,0 @@ -FROM {{ namespace }}/{{ base_distro }}-{{ install_type }}-ceilometer-base:{{ tag }} -MAINTAINER Kolla Project (https://launchpad.net/kolla) - -{% if install_type == 'binary' %} - {% if base_distro in ['fedora', 'centos', 'oraclelinux'] %} - -RUN yum install -y openstack-ceilometer-api \ - && yum clean all - - {% endif %} -{% endif %} - -COPY ./start.sh / -COPY config-external.sh /opt/kolla/ - -CMD ["/start.sh"] - -{{ include_footer }} diff --git a/docker_templates/ceilometer/ceilometer-api/config-external.sh b/docker_templates/ceilometer/ceilometer-api/config-external.sh deleted file mode 100644 index 2835bd5aa..000000000 --- a/docker_templates/ceilometer/ceilometer-api/config-external.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/bash -SOURCE="/opt/kolla/ceilometer/ceilometer.conf" -TARGET="/etc/ceilometer/ceilometer.conf" -OWNER="ceilometer" - -if [[ -f "$SOURCE" ]]; then - cp $SOURCE $TARGET - chown ${OWNER}: $TARGET - chmod 0644 $TARGET -fi diff --git a/docker_templates/ceilometer/ceilometer-api/start.sh b/docker_templates/ceilometer/ceilometer-api/start.sh deleted file mode 100755 index 0f660e025..000000000 --- a/docker_templates/ceilometer/ceilometer-api/start.sh +++ /dev/null @@ -1,21 +0,0 @@ -#!/bin/bash - -set -o errexit - -CMD="/usr/bin/ceilometer-api" -ARGS="" - -# Loading common functions. -source /opt/kolla/kolla-common.sh - -# Config-internal script exec out of this function, it does not return here. -set_configs - -# Bootstrap and exit if KOLLA_BOOTSTRAP variable is set. This catches all cases -# of the KOLLA_BOOTSTRAP variable being set, including empty. -if [[ "${!KOLLA_BOOTSTRAP[@]}" ]]; then - su -s /bin/sh -c "ceilometer-manage db_sync" ceilometer - exit 0 -fi - -exec $CMD $ARGS diff --git a/docker_templates/ceilometer/ceilometer-base/Dockerfile.j2 b/docker_templates/ceilometer/ceilometer-base/Dockerfile.j2 deleted file mode 100644 index 92a3b70d9..000000000 --- a/docker_templates/ceilometer/ceilometer-base/Dockerfile.j2 +++ /dev/null @@ -1,21 +0,0 @@ -FROM {{ namespace }}/{{ base_distro }}-{{ install_type }}-base:{{ tag }} -MAINTAINER Kolla Project (https://launchpad.net/kolla) - -{% if install_type == 'binary' %} - {% if base_distro in ['ubuntu', 'debian'] %} - -RUN echo '{{ install_type }} not yet available for {{ base_distro }}' \ - && /bin/false - - {% endif %} -{% elif install_type == 'source' %} - -ADD ceilometer.tar / -RUN ln -s /ceilometer-* ceilometer \ - && useradd --user-group ceilometer \ - && pip --no-cache-dir install /ceilometer \ - && mkdir -p /etc/ceilometer /var/log/ceilometer /home/ceilometer \ - && cp -r /ceilometer/etc/* /etc/ceilometer/ \ - && chown -R ceilometer: /etc/ceilometer /var/log/ceilometer /home/ceilometer - -{% endif %} diff --git a/docker_templates/ceilometer/ceilometer-central/Dockerfile.j2 b/docker_templates/ceilometer/ceilometer-central/Dockerfile.j2 deleted file mode 100644 index b45c5fac3..000000000 --- a/docker_templates/ceilometer/ceilometer-central/Dockerfile.j2 +++ /dev/null @@ -1,18 +0,0 @@ -FROM {{ namespace }}/{{ base_distro }}-{{ install_type }}-ceilometer-base:{{ tag }} -MAINTAINER Kolla Project (https://launchpad.net/kolla) - -{% if install_type == 'binary' %} - {% if base_distro in ['fedora', 'centos', 'oraclelinux'] %} - -RUN yum install -y openstack-ceilometer-central \ - && yum clean all - - {% endif %} -{% endif %} - -COPY ./start.sh / -COPY config-external.sh /opt/kolla/ - -CMD ["/start.sh"] - -{{ include_footer }} diff --git a/docker_templates/ceilometer/ceilometer-central/config-external.sh b/docker_templates/ceilometer/ceilometer-central/config-external.sh deleted file mode 100644 index 2835bd5aa..000000000 --- a/docker_templates/ceilometer/ceilometer-central/config-external.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/bash -SOURCE="/opt/kolla/ceilometer/ceilometer.conf" -TARGET="/etc/ceilometer/ceilometer.conf" -OWNER="ceilometer" - -if [[ -f "$SOURCE" ]]; then - cp $SOURCE $TARGET - chown ${OWNER}: $TARGET - chmod 0644 $TARGET -fi diff --git a/docker_templates/ceilometer/ceilometer-central/start.sh b/docker_templates/ceilometer/ceilometer-central/start.sh deleted file mode 100755 index f2980a4d5..000000000 --- a/docker_templates/ceilometer/ceilometer-central/start.sh +++ /dev/null @@ -1,14 +0,0 @@ -#!/bin/bash - -set -o errexit - -CMD="/usr/bin/ceilometer-agent-central" -ARGS="" - -# Loading common functions. -source /opt/kolla/kolla-common.sh - -# Execute config strategy -set_configs - -exec $CMD $ARGS diff --git a/docker_templates/ceilometer/ceilometer-collector/Dockerfile.j2 b/docker_templates/ceilometer/ceilometer-collector/Dockerfile.j2 deleted file mode 100644 index 6f425e855..000000000 --- a/docker_templates/ceilometer/ceilometer-collector/Dockerfile.j2 +++ /dev/null @@ -1,18 +0,0 @@ -FROM {{ namespace }}/{{ base_distro }}-{{ install_type }}-ceilometer-base:{{ tag }} -MAINTAINER Kolla Project (https://launchpad.net/kolla) - -{% if install_type == 'binary' %} - {% if base_distro in ['fedora', 'centos', 'oraclelinux'] %} - -RUN yum install -y openstack-ceilometer-collector \ - && yum clean all - - {% endif %} -{% endif %} - -COPY ./start.sh / -COPY config-external.sh /opt/kolla/ - -CMD ["/start.sh"] - -{{ include_footer }} diff --git a/docker_templates/ceilometer/ceilometer-collector/config-external.sh b/docker_templates/ceilometer/ceilometer-collector/config-external.sh deleted file mode 100644 index 2835bd5aa..000000000 --- a/docker_templates/ceilometer/ceilometer-collector/config-external.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/bash -SOURCE="/opt/kolla/ceilometer/ceilometer.conf" -TARGET="/etc/ceilometer/ceilometer.conf" -OWNER="ceilometer" - -if [[ -f "$SOURCE" ]]; then - cp $SOURCE $TARGET - chown ${OWNER}: $TARGET - chmod 0644 $TARGET -fi diff --git a/docker_templates/ceilometer/ceilometer-collector/start.sh b/docker_templates/ceilometer/ceilometer-collector/start.sh deleted file mode 100755 index 3a59c17d1..000000000 --- a/docker_templates/ceilometer/ceilometer-collector/start.sh +++ /dev/null @@ -1,14 +0,0 @@ -#!/bin/bash - -set -o errexit - -CMD="/usr/bin/ceilometer-collector" -ARGS="" - -# Loading common functions. -source /opt/kolla/kolla-common.sh - -# Execute config strategy -set_configs - -exec $CMD $ARGS diff --git a/docker_templates/ceilometer/ceilometer-compute/Dockerfile.j2 b/docker_templates/ceilometer/ceilometer-compute/Dockerfile.j2 deleted file mode 100644 index 0487af710..000000000 --- a/docker_templates/ceilometer/ceilometer-compute/Dockerfile.j2 +++ /dev/null @@ -1,20 +0,0 @@ -FROM {{ namespace }}/{{ base_distro }}-{{ install_type }}-ceilometer-base:{{ tag }} -MAINTAINER Kolla Project (https://launchpad.net/kolla) - -{% if install_type == 'binary' %} - {% if base_distro in ['fedora', 'centos', 'oraclelinux'] %} - -RUN yum install -y openstack-ceilometer-compute \ - python-ceilometerclient \ - python-pecan \ - && yum clean all - - {% endif %} -{% endif %} - -COPY ./start.sh / -COPY config-external.sh /opt/kolla/ - -CMD ["/start.sh"] - -{{ include_footer }} diff --git a/docker_templates/ceilometer/ceilometer-compute/config-external.sh b/docker_templates/ceilometer/ceilometer-compute/config-external.sh deleted file mode 100644 index 2835bd5aa..000000000 --- a/docker_templates/ceilometer/ceilometer-compute/config-external.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/bash -SOURCE="/opt/kolla/ceilometer/ceilometer.conf" -TARGET="/etc/ceilometer/ceilometer.conf" -OWNER="ceilometer" - -if [[ -f "$SOURCE" ]]; then - cp $SOURCE $TARGET - chown ${OWNER}: $TARGET - chmod 0644 $TARGET -fi diff --git a/docker_templates/ceilometer/ceilometer-compute/start.sh b/docker_templates/ceilometer/ceilometer-compute/start.sh deleted file mode 100755 index 19d90be2f..000000000 --- a/docker_templates/ceilometer/ceilometer-compute/start.sh +++ /dev/null @@ -1,14 +0,0 @@ -#!/bin/bash - -set -o errexit - -CMD="/usr/bin/ceilometer-agent-compute" -ARGS="" - -# Loading common functions. -source /opt/kolla/kolla-common.sh - -# Execute config strategy -set_configs - -exec $CMD $ARGS diff --git a/docker_templates/ceilometer/ceilometer-notification/Dockerfile.j2 b/docker_templates/ceilometer/ceilometer-notification/Dockerfile.j2 deleted file mode 100644 index 67fcfb50e..000000000 --- a/docker_templates/ceilometer/ceilometer-notification/Dockerfile.j2 +++ /dev/null @@ -1,18 +0,0 @@ -FROM {{ namespace }}/{{ base_distro }}-{{ install_type }}-ceilometer-base:{{ tag }} -MAINTAINER Kolla Project (https://launchpad.net/kolla) - -{% if install_type == 'binary' %} - {% if base_distro in ['fedora', 'centos', 'oraclelinux'] %} - -RUN yum install -y openstack-ceilometer-notification \ - && yum clean all - - {% endif %} -{% endif %} - -COPY ./start.sh / -COPY config-external.sh /opt/kolla/ - -CMD ["/start.sh"] - -{{ include_footer }} diff --git a/docker_templates/ceilometer/ceilometer-notification/config-external.sh b/docker_templates/ceilometer/ceilometer-notification/config-external.sh deleted file mode 100644 index 2835bd5aa..000000000 --- a/docker_templates/ceilometer/ceilometer-notification/config-external.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/bash -SOURCE="/opt/kolla/ceilometer/ceilometer.conf" -TARGET="/etc/ceilometer/ceilometer.conf" -OWNER="ceilometer" - -if [[ -f "$SOURCE" ]]; then - cp $SOURCE $TARGET - chown ${OWNER}: $TARGET - chmod 0644 $TARGET -fi diff --git a/docker_templates/ceilometer/ceilometer-notification/start.sh b/docker_templates/ceilometer/ceilometer-notification/start.sh deleted file mode 100755 index 8ce4b4488..000000000 --- a/docker_templates/ceilometer/ceilometer-notification/start.sh +++ /dev/null @@ -1,14 +0,0 @@ -#!/bin/bash - -set -o errexit - -CMD="/usr/bin/ceilometer-agent-notification" -ARGS="" - -# Loading common functions. -source /opt/kolla/kolla-common.sh - -# Execute config strategy -set_configs - -exec $CMD $ARGS diff --git a/docker_templates/cinder/cinder-api/Dockerfile.j2 b/docker_templates/cinder/cinder-api/Dockerfile.j2 deleted file mode 100644 index 196f93baf..000000000 --- a/docker_templates/cinder/cinder-api/Dockerfile.j2 +++ /dev/null @@ -1,18 +0,0 @@ -FROM {{ namespace }}/{{ base_distro }}-{{ install_type }}-cinder-base:{{ tag }} -MAINTAINER Kolla Project (https://launchpad.net/kolla) - -{% if install_type == 'binary' %} - {% if base_distro in ['fedora', 'centos', 'oraclelinux'] %} - -RUN yum install -y python-keystone \ - && yum clean all - - {% endif %} -{% endif %} - -COPY ./start.sh / -COPY config-external.sh /opt/kolla/ - -CMD ["/start.sh"] - -{{ include_footer }} diff --git a/docker_templates/cinder/cinder-api/config-external.sh b/docker_templates/cinder/cinder-api/config-external.sh deleted file mode 100644 index 08d8cde0a..000000000 --- a/docker_templates/cinder/cinder-api/config-external.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/bash -SOURCE="/opt/kolla/cinder-api/cinder.conf" -TARGET="/etc/cinder/cinder.conf" -OWNER="cinder" - -if [[ -f "$SOURCE" ]]; then - cp $SOURCE $TARGET - chown ${OWNER}: $TARGET - chmod 0644 $TARGET -fi diff --git a/docker_templates/cinder/cinder-api/start.sh b/docker_templates/cinder/cinder-api/start.sh deleted file mode 100755 index 6c61b3a4e..000000000 --- a/docker_templates/cinder/cinder-api/start.sh +++ /dev/null @@ -1,21 +0,0 @@ -#!/bin/bash - -set -o errexit - -CMD="/usr/bin/cinder-api" -ARGS="--config-file /etc/cinder/cinder.conf" - -# Loading common functions. -source /opt/kolla/kolla-common.sh - -# Execute config strategy -set_configs - -# Bootstrap and exit if KOLLA_BOOTSTRAP variable is set. This catches all cases -# of the KOLLA_BOOTSTRAP variable being set, including empty. -if [[ "${!KOLLA_BOOTSTRAP[@]}" ]]; then - su -s /bin/sh -c "cinder-manage db sync" cinder - exit 0 -fi - -exec $CMD $ARGS diff --git a/docker_templates/cinder/cinder-backup/Dockerfile.j2 b/docker_templates/cinder/cinder-backup/Dockerfile.j2 deleted file mode 100644 index fa331b195..000000000 --- a/docker_templates/cinder/cinder-backup/Dockerfile.j2 +++ /dev/null @@ -1,9 +0,0 @@ -FROM {{ namespace }}/{{ base_distro }}-{{ install_type }}-cinder-base:{{ tag }} -MAINTAINER Kolla Project (https://launchpad.net/kolla) - -COPY ./start.sh / -COPY config-external.sh /opt/kolla/ - -CMD ["/start.sh"] - -{{ include_footer }} diff --git a/docker_templates/cinder/cinder-backup/config-external.sh b/docker_templates/cinder/cinder-backup/config-external.sh deleted file mode 100644 index ff4752492..000000000 --- a/docker_templates/cinder/cinder-backup/config-external.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/bash -SOURCE="/opt/kolla/cinder-backup/cinder.conf" -TARGET="/etc/cinder/cinder.conf" -OWNER="cinder" - -if [[ -f "$SOURCE" ]]; then - cp $SOURCE $TARGET - chown ${OWNER}: $TARGET - chmod 0644 $TARGET -fi diff --git a/docker_templates/cinder/cinder-backup/start.sh b/docker_templates/cinder/cinder-backup/start.sh deleted file mode 100755 index 7d9403f07..000000000 --- a/docker_templates/cinder/cinder-backup/start.sh +++ /dev/null @@ -1,14 +0,0 @@ -#!/bin/bash - -set -o errexit - -CMD="/usr/bin/cinder-backup" -ARGS="--config-file /etc/cinder/cinder.conf" - -# Loading common functions. -source /opt/kolla/kolla-common.sh - -# Execute config strategy -set_configs - -exec $CMD $ARGS diff --git a/docker_templates/cinder/cinder-base/Dockerfile.j2 b/docker_templates/cinder/cinder-base/Dockerfile.j2 deleted file mode 100644 index 1cce34a9e..000000000 --- a/docker_templates/cinder/cinder-base/Dockerfile.j2 +++ /dev/null @@ -1,49 +0,0 @@ -FROM {{ namespace }}/{{ base_distro }}-{{ install_type }}-base:{{ tag }} -MAINTAINER Kolla Project (https://launchpad.net/kolla) - -{% if install_type == 'binary' %} - {% if base_distro in ['fedora', 'centos', 'oraclelinux'] %} - -RUN yum -y install openstack-cinder \ - python-automaton \ - lvm2 \ - && yum clean all \ - && sed -i "s|udev_rules = 1|udev_rules = 0|g" /etc/lvm/lvm.conf \ - && sed -i "s|udev_sync = 1|udev_sync = 0|g" /etc/lvm/lvm.conf - -# NOTE(sdake): The sed operations make LVM tools work inside a container - see -# https://groups.google.com/forum/#!topic/docker-user/n4Xtvsb4RAw - - {% elif base_distro in ['ubuntu', 'debian'] %} - -RUN echo '{{ install_type }} not yet available for {{ base_distro }}' \ - && /bin/false - - {% endif %} -{% elif install_type == 'source' %} - {% if base_distro in ['fedora', 'centos', 'oraclelinux'] %} - -RUN yum -y install lvm2 \ - && yum clean all - - {% elif base_distro in ['ubuntu', 'debian'] %} - -RUN apt-get install -y --no-install-recommends lvm2 \ - && apt-get clean - - {% endif %} - -ADD cinder.tar / -RUN ln -s /cinder-* cinder \ - && useradd --user-group cinder \ - && pip --no-cache-dir install /cinder \ - && mkdir -p /etc/cinder /var/log/cinder /home/cinder \ - && cp -r /cinder/etc/cinder/* /etc/cinder/ \ - && chown -R cinder: /etc/cinder /var/log/cinder /home/cinder \ - && sed -i "s|udev_rules = 1|udev_rules = 0|g" /etc/lvm/lvm.conf \ - && sed -i "s|udev_sync = 1|udev_sync = 0|g" /etc/lvm/lvm.conf - -# NOTE(sdake): The sed operations make LVM tools work inside a container - see -# https://groups.google.com/forum/#!topic/docker-user/n4Xtvsb4RAw - -{% endif %} diff --git a/docker_templates/cinder/cinder-scheduler/Dockerfile.j2 b/docker_templates/cinder/cinder-scheduler/Dockerfile.j2 deleted file mode 100644 index fa331b195..000000000 --- a/docker_templates/cinder/cinder-scheduler/Dockerfile.j2 +++ /dev/null @@ -1,9 +0,0 @@ -FROM {{ namespace }}/{{ base_distro }}-{{ install_type }}-cinder-base:{{ tag }} -MAINTAINER Kolla Project (https://launchpad.net/kolla) - -COPY ./start.sh / -COPY config-external.sh /opt/kolla/ - -CMD ["/start.sh"] - -{{ include_footer }} diff --git a/docker_templates/cinder/cinder-scheduler/config-external.sh b/docker_templates/cinder/cinder-scheduler/config-external.sh deleted file mode 100644 index 3c8ca26be..000000000 --- a/docker_templates/cinder/cinder-scheduler/config-external.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/bash -SOURCE="/opt/kolla/cinder-scheduler/cinder.conf" -TARGET="/etc/cinder/cinder.conf" -OWNER="cinder" - -if [[ -f "$SOURCE" ]]; then - cp $SOURCE $TARGET - chown ${OWNER}: $TARGET - chmod 0644 $TARGET -fi diff --git a/docker_templates/cinder/cinder-scheduler/start.sh b/docker_templates/cinder/cinder-scheduler/start.sh deleted file mode 100755 index 759175e3f..000000000 --- a/docker_templates/cinder/cinder-scheduler/start.sh +++ /dev/null @@ -1,14 +0,0 @@ -#!/bin/bash - -set -o errexit - -CMD="/usr/bin/cinder-scheduler" -ARGS="--config-file /etc/cinder/cinder.conf" - -# Loading common functions. -source /opt/kolla/kolla-common.sh - -# Execute config strategy -set_configs - -exec $CMD $ARGS diff --git a/docker_templates/cinder/cinder-volume/Dockerfile.j2 b/docker_templates/cinder/cinder-volume/Dockerfile.j2 deleted file mode 100644 index 6393798bd..000000000 --- a/docker_templates/cinder/cinder-volume/Dockerfile.j2 +++ /dev/null @@ -1,19 +0,0 @@ -FROM {{ namespace }}/{{ base_distro }}-{{ install_type }}-cinder-base:{{ tag }} -MAINTAINER Kolla Project (https://launchpad.net/kolla) - -{% if install_type == 'binary' %} - {% if base_distro in ['fedora', 'centos', 'oraclelinux'] %} - -RUN yum install -y lvm2 \ - scsi-target-utils \ - && yum clean all - - {% endif %} -{% endif %} - -COPY ./start.sh / -COPY config-external.sh /opt/kolla/ - -CMD ["/start.sh"] - -{{ include_footer }} diff --git a/docker_templates/cinder/cinder-volume/config-external.sh b/docker_templates/cinder/cinder-volume/config-external.sh deleted file mode 100755 index 2f6b99fc9..000000000 --- a/docker_templates/cinder/cinder-volume/config-external.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/bash -SOURCE="/opt/kolla/cinder-volume/cinder.conf" -TARGET="/etc/cinder/cinder.conf" -OWNER="cinder" - -if [[ -f "$SOURCE" ]]; then - cp $SOURCE $TARGET - chown ${OWNER}: $TARGET - chmod 0644 $TARGET -fi diff --git a/docker_templates/cinder/cinder-volume/start.sh b/docker_templates/cinder/cinder-volume/start.sh deleted file mode 100755 index a6874ce47..000000000 --- a/docker_templates/cinder/cinder-volume/start.sh +++ /dev/null @@ -1,14 +0,0 @@ -#!/bin/bash - -set -o errexit - -CMD="/usr/bin/cinder-volume" -ARGS="--config-file /etc/cinder/cinder.conf" - -# Loading common functions. -source /opt/kolla/kolla-common.sh - -# Execute config strategy -set_configs - -exec $CMD $ARGS diff --git a/docker_templates/data/Dockerfile.j2 b/docker_templates/data/Dockerfile.j2 deleted file mode 100644 index 7fecdb068..000000000 --- a/docker_templates/data/Dockerfile.j2 +++ /dev/null @@ -1,6 +0,0 @@ -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 deleted file mode 100644 index 75f4b06ee..000000000 --- a/docker_templates/designate/designate-api/Dockerfile.j2 +++ /dev/null @@ -1,19 +0,0 @@ -FROM {{ namespace }}/{{ base_distro }}-{{ install_type }}-designate-base:{{ tag }} -MAINTAINER Kolla Project (https://launchpad.net.kolla) - -{% if install_type == 'binary' %} - {% if base_distro in ['centos', 'fedora', 'oraclelinux'] %} - -RUN yum install -y \ - openstack-designate-api \ - && yum clean all - - {% endif %} -{% endif %} - -COPY start.sh /start.sh -COPY config-external.sh /opt/kolla/ - -CMD ["/start.sh"] - -{{ include_footer }} diff --git a/docker_templates/designate/designate-api/config-external.sh b/docker_templates/designate/designate-api/config-external.sh deleted file mode 100644 index ce302ea0c..000000000 --- a/docker_templates/designate/designate-api/config-external.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/bash -SOURCE="/opt/kolla/designate/designate.conf" -TARGET="/etc/designate/designate.conf" -OWNER="designate" - -if [[ -f "$SOURCE" ]]; then - cp $SOURCE $TARGET - chown ${OWNER}: $TARGET - chmod 0644 $TARGET -fi diff --git a/docker_templates/designate/designate-api/start.sh b/docker_templates/designate/designate-api/start.sh deleted file mode 100755 index fe556225b..000000000 --- a/docker_templates/designate/designate-api/start.sh +++ /dev/null @@ -1,20 +0,0 @@ -#!/bin/bash - -set -o errexit -CMD="/usr/bin/designate-api" -ARGS="" - -# Loading common functions. -source /opt/kolla/kolla-common.sh - -# Execute config strategy -set_configs - -# Bootstrap and exit if KOLLA_BOOTSTRAP variable is set. This catches all cases -# of the KOLLA_BOOTSTRAP variable being set, including empty. -if [[ "${!KOLLA_BOOTSTRAP[@]}" ]]; then - su -s /bin/sh -c "designate-manage db_sync" designate - exit 0 -fi - -exec $CMD $ARGS diff --git a/docker_templates/designate/designate-backend-bind9/Dockerfile.j2 b/docker_templates/designate/designate-backend-bind9/Dockerfile.j2 deleted file mode 100644 index 06f86c043..000000000 --- a/docker_templates/designate/designate-backend-bind9/Dockerfile.j2 +++ /dev/null @@ -1,19 +0,0 @@ -FROM {{ namespace }}/{{ base_distro }}-{{ install_type }}-designate-base:{{ tag }} -MAINTAINER Kolla Project (https://launchpad.net.kolla) - -{% if install_type == 'binary' %} - {% if base_distro in ['centos', 'fedora', 'oraclelinux'] %} - -RUN yum install -y bind \ - && yum clean all \ - && cp -pr /var/named /opt/kolla/var-named - - {% endif %} -{% endif %} - -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/config-external.sh b/docker_templates/designate/designate-backend-bind9/config-external.sh deleted file mode 100644 index ce302ea0c..000000000 --- a/docker_templates/designate/designate-backend-bind9/config-external.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/bash -SOURCE="/opt/kolla/designate/designate.conf" -TARGET="/etc/designate/designate.conf" -OWNER="designate" - -if [[ -f "$SOURCE" ]]; then - cp $SOURCE $TARGET - chown ${OWNER}: $TARGET - chmod 0644 $TARGET -fi diff --git a/docker_templates/designate/designate-backend-bind9/start.sh b/docker_templates/designate/designate-backend-bind9/start.sh deleted file mode 100755 index 11922974a..000000000 --- a/docker_templates/designate/designate-backend-bind9/start.sh +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/bash - -set -o errexit -CMD="/usr/sbin/named" -ARGS="-u named -g" - -# Execute config strategy -source /opt/kolla/kolla-common.sh - -# Execute config strategy -set_configs - -exec $CMD $ARGS diff --git a/docker_templates/designate/designate-base/Dockerfile.j2 b/docker_templates/designate/designate-base/Dockerfile.j2 deleted file mode 100644 index 3fec3a6f7..000000000 --- a/docker_templates/designate/designate-base/Dockerfile.j2 +++ /dev/null @@ -1,37 +0,0 @@ -FROM {{ namespace }}/{{ base_distro }}-{{ install_type }}-base:{{ tag }} -MAINTAINER Kolla Project (https://launchpad.net.kolla) - -{% if install_type == 'binary' %} - {% if base_distro in ['centos', 'fedora', 'oraclelinux'] %} - -# Install designate-api because of /etc/designate/policy.json, which -# is needed in all services. This is probably a packaging bug. We do -# need the complete policy file because of some of the containers' -# requiring it. Remove the package when the file is moved though. -RUN yum install -y \ - MySQL-python \ - openstack-designate-api \ - openstack-designate-common \ - python-tooz \ - && yum clean all \ - && cp /etc/designate/policy.json /tmp/ \ - && rpm -e openstack-designate-api \ - && mv /tmp/policy.json /etc/designate/ - - {% elif base_distro in ['ubuntu', 'debian'] %} - -RUN echo '{{ install_type}} not yet available for {{ base_distro }}' \ - && /bin/false - - {% endif %} -{% elif install_type == 'source' %} - -ADD designate.tar / -RUN ln -s /designate-* designate \ - && useradd --user-group designate \ - && pip --no-cache-dir install /designate \ - && mkdir -p /etc/designate /var/log/designate /home/designate \ - && cp -r /designate/etc/designate/* /etc/designate/ \ - && chown -R designate: /etc/designate /var/log/designate /home/designate - -{% endif %} diff --git a/docker_templates/designate/designate-central/Dockerfile.j2 b/docker_templates/designate/designate-central/Dockerfile.j2 deleted file mode 100644 index 771ff3c68..000000000 --- a/docker_templates/designate/designate-central/Dockerfile.j2 +++ /dev/null @@ -1,19 +0,0 @@ -FROM {{ namespace }}/{{ base_distro }}-{{ install_type }}-designate-base:{{ tag }} -MAINTAINER Kolla Project (https://launchpad.net.kolla) - -{% if install_type == 'binary' %} - {% if base_distro in ['centos', 'fedora', 'oraclelinux'] %} - -RUN yum install -y \ - openstack-designate-central \ - && yum clean all - - {% endif %} -{% endif %} - -COPY start.sh /start.sh -COPY config-external.sh /opt/kolla/ - -CMD ["/start.sh"] - -{{ include_footer }} diff --git a/docker_templates/designate/designate-central/config-external.sh b/docker_templates/designate/designate-central/config-external.sh deleted file mode 100644 index ce302ea0c..000000000 --- a/docker_templates/designate/designate-central/config-external.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/bash -SOURCE="/opt/kolla/designate/designate.conf" -TARGET="/etc/designate/designate.conf" -OWNER="designate" - -if [[ -f "$SOURCE" ]]; then - cp $SOURCE $TARGET - chown ${OWNER}: $TARGET - chmod 0644 $TARGET -fi diff --git a/docker_templates/designate/designate-central/start.sh b/docker_templates/designate/designate-central/start.sh deleted file mode 100755 index eac012d3d..000000000 --- a/docker_templates/designate/designate-central/start.sh +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/bash - -set -o errexit -CMD="/usr/bin/designate-central" -ARGS="" - -# Loading common functions. -source /opt/kolla/kolla-common.sh - -# Execute config strategy -set_configs - -exec $CMD $ARGS diff --git a/docker_templates/designate/designate-mdns/Dockerfile.j2 b/docker_templates/designate/designate-mdns/Dockerfile.j2 deleted file mode 100644 index cc5f5fb89..000000000 --- a/docker_templates/designate/designate-mdns/Dockerfile.j2 +++ /dev/null @@ -1,18 +0,0 @@ -FROM {{ namespace }}/{{ base_distro }}-{{ install_type }}-designate-base:{{ tag }} -MAINTAINER Kolla Project (https://launchpad.net.kolla) - -{% if install_type == 'binary' %} - {% if base_distro in ['centos', 'fedora', 'oraclelinux'] %} - -RUN yum install -y openstack-designate-mdns \ - && yum clean all - - {% endif %} -{% endif %} - -COPY start.sh /start.sh -COPY config-external.sh /opt/kolla/ - -CMD ["/start.sh"] - -{{ include_footer }} diff --git a/docker_templates/designate/designate-mdns/config-external.sh b/docker_templates/designate/designate-mdns/config-external.sh deleted file mode 100644 index ce302ea0c..000000000 --- a/docker_templates/designate/designate-mdns/config-external.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/bash -SOURCE="/opt/kolla/designate/designate.conf" -TARGET="/etc/designate/designate.conf" -OWNER="designate" - -if [[ -f "$SOURCE" ]]; then - cp $SOURCE $TARGET - chown ${OWNER}: $TARGET - chmod 0644 $TARGET -fi diff --git a/docker_templates/designate/designate-mdns/start.sh b/docker_templates/designate/designate-mdns/start.sh deleted file mode 100755 index b4bcda20c..000000000 --- a/docker_templates/designate/designate-mdns/start.sh +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/bash - -set -o errexit -CMD="/usr/bin/designate-mdns" -ARGS="" - -# Loading common functions. -source /opt/kolla/kolla-common.sh - -# Execute config strategy -set_configs - -exec $CMD $ARGS diff --git a/docker_templates/designate/designate-poolmanager/Dockerfile.j2 b/docker_templates/designate/designate-poolmanager/Dockerfile.j2 deleted file mode 100644 index 0fc968b90..000000000 --- a/docker_templates/designate/designate-poolmanager/Dockerfile.j2 +++ /dev/null @@ -1,21 +0,0 @@ -FROM {{ namespace }}/{{ base_distro }}-{{ install_type }}-designate-base:{{ tag }} -MAINTAINER Kolla Project (https://launchpad.net.kolla) - -{% if install_type == 'binary' %} - {% if base_distro in ['centos', 'fedora', 'oraclelinux'] %} - -# The bind9 package here is only to provide the rndc binary. -RUN yum install -y \ - openstack-designate-pool-manager \ - bind \ - && yum clean all - - {% endif %} -{% endif %} - -COPY start.sh /start.sh -COPY config-external.sh /opt/kolla/ - -CMD ["/start.sh"] - -{{ include_footer }} diff --git a/docker_templates/designate/designate-poolmanager/config-external.sh b/docker_templates/designate/designate-poolmanager/config-external.sh deleted file mode 100644 index ce302ea0c..000000000 --- a/docker_templates/designate/designate-poolmanager/config-external.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/bash -SOURCE="/opt/kolla/designate/designate.conf" -TARGET="/etc/designate/designate.conf" -OWNER="designate" - -if [[ -f "$SOURCE" ]]; then - cp $SOURCE $TARGET - chown ${OWNER}: $TARGET - chmod 0644 $TARGET -fi diff --git a/docker_templates/designate/designate-poolmanager/start.sh b/docker_templates/designate/designate-poolmanager/start.sh deleted file mode 100755 index 0752b9847..000000000 --- a/docker_templates/designate/designate-poolmanager/start.sh +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/bash - -set -o errexit -CMD="/usr/bin/designate-pool-manager" -ARGS="" - -# Loading common functions. -source /opt/kolla/kolla-common.sh - -# Execute config strategy -set_configs - -exec $CMD $ARGS diff --git a/docker_templates/designate/designate-sink/Dockerfile.j2 b/docker_templates/designate/designate-sink/Dockerfile.j2 deleted file mode 100644 index c0ea23b2d..000000000 --- a/docker_templates/designate/designate-sink/Dockerfile.j2 +++ /dev/null @@ -1,20 +0,0 @@ -FROM {{ namespace }}/{{ base_distro }}-{{ install_type }}-designate-base:{{ tag }} -MAINTAINER Kolla Project (https://launchpad.net.kolla) - -{% if install_type == 'binary' %} - {% if base_distro in ['centos', 'fedora', 'oraclelinux'] %} - -RUN yum install -y \ - openstack-designate-sink \ - python-designateclient \ - && yum clean all - - {% endif %} -{% endif %} - -COPY start.sh /start.sh -COPY config-external.sh /opt/kolla/ - -CMD ["/start.sh"] - -{{ include_footer }} diff --git a/docker_templates/designate/designate-sink/config-external.sh b/docker_templates/designate/designate-sink/config-external.sh deleted file mode 100644 index ce302ea0c..000000000 --- a/docker_templates/designate/designate-sink/config-external.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/bash -SOURCE="/opt/kolla/designate/designate.conf" -TARGET="/etc/designate/designate.conf" -OWNER="designate" - -if [[ -f "$SOURCE" ]]; then - cp $SOURCE $TARGET - chown ${OWNER}: $TARGET - chmod 0644 $TARGET -fi diff --git a/docker_templates/designate/designate-sink/start.sh b/docker_templates/designate/designate-sink/start.sh deleted file mode 100755 index d2f93e26f..000000000 --- a/docker_templates/designate/designate-sink/start.sh +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/bash - -set -o errexit -CMD="/usr/bin/designate-sink" -ARGS="" - -# Loading common functions. -source /opt/kolla/kolla-common.sh - -# Execute config strategy -set_configs - -exec $CMD $ARGS diff --git a/docker_templates/galera/Dockerfile.j2 b/docker_templates/galera/Dockerfile.j2 deleted file mode 100644 index 38e66ee14..000000000 --- a/docker_templates/galera/Dockerfile.j2 +++ /dev/null @@ -1,42 +0,0 @@ -FROM {{ namespace }}/{{ base_distro }}-{{ install_type }}-base:{{ tag }} -MAINTAINER Kolla Project (https://launchpad.net/kolla) - -{% if base_distro in ['fedora', 'centos', 'oraclelinux'] %} - -RUN yum install -y \ - MariaDB-Galera-server \ - MariaDB-client \ - rsync \ - galera \ - socat \ - hostname \ - percona-xtrabackup \ - pv \ - tar \ - expect \ - && rm -rf /var/lib/mysql/* - -{% elif base_distro in ['ubuntu', 'debian'] %} - -# At the end of this run statement we symlink two folders to match the folder -# structure of the RPM family for mysql configs. This allows us to not change -# the config-external.sh code -# TODO(SamYaple): Remove that symlink once config-external is updated -RUN apt-get install -y --no-install-recommends \ - mariadb-galera-server \ - percona-xtrabackup \ - socat \ - expect \ - && apt-get clean \ - && rm -rf /var/lib/mysql/* \ - && ln -s /etc/mysql/conf.d/ /etc/my.cnf.d - -{% endif %} - -COPY config-galera.sh /opt/kolla/config/ -COPY config-external.sh /opt/kolla/ -COPY start.sh / - -CMD ["/start.sh"] - -{{ include_footer }} diff --git a/docker_templates/galera/config-external.sh b/docker_templates/galera/config-external.sh deleted file mode 100644 index 43447a51c..000000000 --- a/docker_templates/galera/config-external.sh +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/bash -SOURCE="/opt/kolla/mariadb/galera.cnf" -TARGET="/etc/my.cnf.d/galera.cnf" -OWNER="mysql" - -# Cluster configuration -if [[ -f "$SOURCE" ]]; then - cp $SOURCE $TARGET - chown ${OWNER}: $TARGET - chmod 0600 $TARGET -fi diff --git a/docker_templates/galera/config-galera.sh b/docker_templates/galera/config-galera.sh deleted file mode 100755 index e66084001..000000000 --- a/docker_templates/galera/config-galera.sh +++ /dev/null @@ -1,37 +0,0 @@ -#!/bin/bash - -function bootstrap_db { - mysqld_safe --wsrep-new-cluster & - - # Waiting for deamon - sleep 10 - expect -c ' - set timeout 10 - spawn mysql_secure_installation - expect "Enter current password for root (enter for none):" - send "\r" - expect "Set root password?" - send "y\r" - expect "New password:" - send "'"${DB_ROOT_PASSWORD}"'\r" - expect "Re-enter new password:" - send "'"${DB_ROOT_PASSWORD}"'\r" - expect "Remove anonymous users?" - send "y\r" - expect "Disallow root login remotely?" - send "n\r" - expect "Remove test database and access to it?" - send "y\r" - expect "Reload privilege tables now?" - send "y\r" - expect eof' - - mysql -u root --password="${DB_ROOT_PASSWORD}" -e "GRANT ALL PRIVILEGES ON *.* TO 'root'@'localhost' IDENTIFIED BY '${DB_ROOT_PASSWORD}' WITH GRANT OPTION;" - mysql -u root --password="${DB_ROOT_PASSWORD}" -e "GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY '${DB_ROOT_PASSWORD}' WITH GRANT OPTION;" - mysqladmin -p"${DB_ROOT_PASSWORD}" shutdown -} - -function populate_db { - mysql_install_db - chown -R mysql: /var/lib/mysql -} diff --git a/docker_templates/galera/start.sh b/docker_templates/galera/start.sh deleted file mode 100755 index f8f8d7f77..000000000 --- a/docker_templates/galera/start.sh +++ /dev/null @@ -1,25 +0,0 @@ -#!/bin/bash - -set -o errexit - -CMD="/usr/bin/mysqld_safe" -ARGS="" - -# loading common functions -source /opt/kolla/kolla-common.sh - -# Execute config strategy -set_configs - -# loading functions -source /opt/kolla/config/config-galera.sh - -# This catches all cases of the BOOTSTRAP variable being set, including empty -if [[ "${!KOLLA_BOOTSTRAP[@]}" ]] && [[ ! -e /var/lib/mysql/cluster.exists ]]; then - ARGS="--wsrep-new-cluster" - touch /var/lib/mysql/cluster.exists - populate_db - bootstrap_db -fi - -exec $CMD $ARGS diff --git a/docker_templates/glance/glance-api/Dockerfile.j2 b/docker_templates/glance/glance-api/Dockerfile.j2 deleted file mode 100644 index e603a6c36..000000000 --- a/docker_templates/glance/glance-api/Dockerfile.j2 +++ /dev/null @@ -1,9 +0,0 @@ -FROM {{ namespace }}/{{ base_distro }}-{{ install_type }}-glance-base:{{ tag }} -MAINTAINER Kolla Project (https://launchpad.net/kolla) - -COPY start.sh / -COPY config-external.sh /opt/kolla/ - -CMD ["/start.sh"] - -{{ include_footer }} diff --git a/docker_templates/glance/glance-api/config-external.sh b/docker_templates/glance/glance-api/config-external.sh deleted file mode 100755 index ce5411738..000000000 --- a/docker_templates/glance/glance-api/config-external.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/bash -SOURCE="/opt/kolla/glance-api/glance-api.conf" -TARGET="/etc/glance/glance-api.conf" -OWNER="glance" - -if [[ -f "$SOURCE" ]]; then - cp $SOURCE $TARGET - chown ${OWNER}: $TARGET - chmod 0644 $TARGET -fi diff --git a/docker_templates/glance/glance-api/start.sh b/docker_templates/glance/glance-api/start.sh deleted file mode 100755 index ce3cb6d8b..000000000 --- a/docker_templates/glance/glance-api/start.sh +++ /dev/null @@ -1,20 +0,0 @@ -#!/bin/bash -set -o errexit - -CMD="/usr/bin/glance-api" -ARGS="" - -# Loading common functions. -source /opt/kolla/kolla-common.sh - -# Execute config strategy -set_configs - -# Bootstrap and exit if KOLLA_BOOTSTRAP variable is set. This catches all cases -# of the KOLLA_BOOTSTRAP variable being set, including empty. -if [[ "${!KOLLA_BOOTSTRAP[@]}" ]]; then - su -s /bin/sh -c "glance-manage db_sync" glance - exit 0 -fi - -exec $CMD $ARGS diff --git a/docker_templates/glance/glance-base/Dockerfile.j2 b/docker_templates/glance/glance-base/Dockerfile.j2 deleted file mode 100644 index 8fad82106..000000000 --- a/docker_templates/glance/glance-base/Dockerfile.j2 +++ /dev/null @@ -1,28 +0,0 @@ -FROM {{ namespace }}/{{ base_distro }}-{{ install_type }}-base:{{ tag }} -MAINTAINER Kolla Project (https://launchpad.net/kolla) - -{% if install_type == 'binary' %} - {% if base_distro in ['fedora', 'centos', 'oraclelinux'] %} - -RUN yum -y install \ - openstack-glance \ - python-oslo-i18n \ - && yum clean all - - {% elif base_distro in ['ubuntu', 'debian'] %} - -RUN echo '{{ install_type }} not yet available for {{ base_distro }}' \ - && /bin/false - - {% endif %} -{% elif install_type == 'source' %} - -ADD glance.tar / -RUN ln -s /glance-* glance \ - && useradd --user-group glance \ - && pip --no-cache-dir install /glance \ - && mkdir -p /etc/glance /var/log/glance /home/glance \ - && cp -r /glance/etc/* /etc/glance/ \ - && chown -R glance: /etc/glance /var/log/glance /home/glance - -{% endif %} diff --git a/docker_templates/glance/glance-registry/Dockerfile.j2 b/docker_templates/glance/glance-registry/Dockerfile.j2 deleted file mode 100644 index e603a6c36..000000000 --- a/docker_templates/glance/glance-registry/Dockerfile.j2 +++ /dev/null @@ -1,9 +0,0 @@ -FROM {{ namespace }}/{{ base_distro }}-{{ install_type }}-glance-base:{{ tag }} -MAINTAINER Kolla Project (https://launchpad.net/kolla) - -COPY start.sh / -COPY config-external.sh /opt/kolla/ - -CMD ["/start.sh"] - -{{ include_footer }} diff --git a/docker_templates/glance/glance-registry/config-external.sh b/docker_templates/glance/glance-registry/config-external.sh deleted file mode 100755 index 37abd136d..000000000 --- a/docker_templates/glance/glance-registry/config-external.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/bash -SOURCE="/opt/kolla/glance-registry/glance-registry.conf" -TARGET="/etc/glance/glance-registry.conf" -OWNER="glance" - -if [[ -f "$SOURCE" ]]; then - cp $SOURCE $TARGET - chown ${OWNER}: $TARGET - chmod 0644 $TARGET -fi diff --git a/docker_templates/glance/glance-registry/start.sh b/docker_templates/glance/glance-registry/start.sh deleted file mode 100755 index 1d8265f80..000000000 --- a/docker_templates/glance/glance-registry/start.sh +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/bash -set -o errexit - -CMD="/usr/bin/glance-registry" -ARGS="" - -# Loading common functions. -source /opt/kolla/kolla-common.sh - -# Execute config strategy -set_configs - -exec $CMD $ARGS diff --git a/docker_templates/gnocchi/gnocchi-api/Dockerfile.j2 b/docker_templates/gnocchi/gnocchi-api/Dockerfile.j2 deleted file mode 100644 index 9ca70113c..000000000 --- a/docker_templates/gnocchi/gnocchi-api/Dockerfile.j2 +++ /dev/null @@ -1,21 +0,0 @@ -FROM {{ namespace }}/{{ base_distro }}-{{ install_type }}-gnocchi-base:{{ tag }} -MAINTAINER Kolla Project (https://launchpad.net/kolla) - -{% if install_type == 'binary' %} - {% if base_distro in ['fedora', 'centos', 'oraclelinux'] %} - -RUN yum install -y \ - openstack-gnocchi-api \ - openstack-gnocchi-carbonara \ - openstack-gnocchi-indexer-sqlalchemy \ - && yum clean all - - {% endif %} -{% endif %} - -COPY start.sh / -COPY config-external.sh /opt/kolla/ - -CMD ["/start.sh"] - -{{ include_footer }} diff --git a/docker_templates/gnocchi/gnocchi-api/config-external.sh b/docker_templates/gnocchi/gnocchi-api/config-external.sh deleted file mode 100644 index 59639ba63..000000000 --- a/docker_templates/gnocchi/gnocchi-api/config-external.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/bash -SOURCE="/opt/kolla/gnocchi-api/gnocchi-api.conf" -TARGET="/etc/gnocchi/gnocchi-api.conf" -OWNER="gnocchi" - -if [[ -f "$SOURCE" ]]; then - cp $SOURCE $TARGET - chown ${OWNER}: $TARGET - chmod 0644 $TARGET -fi diff --git a/docker_templates/gnocchi/gnocchi-api/start.sh b/docker_templates/gnocchi/gnocchi-api/start.sh deleted file mode 100755 index 657368a27..000000000 --- a/docker_templates/gnocchi/gnocchi-api/start.sh +++ /dev/null @@ -1,21 +0,0 @@ -#!/bin/bash -set -o errexit - -CMD="/usr/bin/gnocchi-api" -ARGS="" - -# Loading common functions. -source /opt/kolla/kolla-common.sh - -# Execute config strategy -set_configs - -# Bootstrap and exit if KOLLA_BOOTSTRAP variable is set. This catches all cases -# of the KOLLA_BOOTSTRAP variable being set, including empty. -if [[ "${!KOLLA_BOOTSTRAP[@]}" ]]; then - su -s /bin/sh -c "gnocchi-manage db_sync" gnocchi - exit 0 -fi - -exec $CMD $ARGS - diff --git a/docker_templates/gnocchi/gnocchi-base/Dockerfile.j2 b/docker_templates/gnocchi/gnocchi-base/Dockerfile.j2 deleted file mode 100644 index be8840073..000000000 --- a/docker_templates/gnocchi/gnocchi-base/Dockerfile.j2 +++ /dev/null @@ -1,25 +0,0 @@ -FROM {{ namespace }}/{{ base_distro }}-{{ install_type }}-base:{{ tag }} -MAINTAINER Kolla Project (https://launchpad.net/kolla) - -{% if install_type == 'binary' %} - -RUN echo '{{ install_type }} not yet available for {{ base_distro }}' \ - && /bin/false - -{% elif install_type == 'source' %} - {% if base_distro in ['ubuntu', 'debian'] %} - -RUN apt-get install -y --no-install-recommends libpq-dev \ - && apt-get clean - - {% endif %} - -ADD gnocchi.tar / -RUN ln -s /gnocchi-* gnocchi \ - && useradd --user-group gnocchi \ - && pip --no-cache-dir install /gnocchi \ - && mkdir -p /etc/gnocchi /var/log/gnocchi /home/gnocchi \ - && cp -r /gnocchi/etc/* /etc/gnocchi/ \ - && chown -R gnocchi: /etc/gnocchi /var/log/gnocchi /home/gnocchi - -{% endif %} diff --git a/docker_templates/gnocchi/gnocchi-statsd/Dockerfile.j2 b/docker_templates/gnocchi/gnocchi-statsd/Dockerfile.j2 deleted file mode 100644 index 99f1374a2..000000000 --- a/docker_templates/gnocchi/gnocchi-statsd/Dockerfile.j2 +++ /dev/null @@ -1,18 +0,0 @@ -FROM {{ namespace }}/{{ base_distro }}-{{ install_type }}-gnocchi-base:{{ tag }} -MAINTAINER Kolla Project (https://launchpad.net/kolla) - -{% if install_type == 'binary' %} - {% if base_distro in ['fedora', 'centos', 'oraclelinux'] %} - -RUN yum install -y openstack-gnocchi-statsd \ - && yum clean all - - {% endif %} -{% endif %} - -COPY start.sh / -COPY config-external.sh /opt/kolla/ - -CMD ["/start.sh"] - -{{ include_footer }} diff --git a/docker_templates/gnocchi/gnocchi-statsd/config-external.sh b/docker_templates/gnocchi/gnocchi-statsd/config-external.sh deleted file mode 100644 index 59639ba63..000000000 --- a/docker_templates/gnocchi/gnocchi-statsd/config-external.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/bash -SOURCE="/opt/kolla/gnocchi-api/gnocchi-api.conf" -TARGET="/etc/gnocchi/gnocchi-api.conf" -OWNER="gnocchi" - -if [[ -f "$SOURCE" ]]; then - cp $SOURCE $TARGET - chown ${OWNER}: $TARGET - chmod 0644 $TARGET -fi diff --git a/docker_templates/gnocchi/gnocchi-statsd/start.sh b/docker_templates/gnocchi/gnocchi-statsd/start.sh deleted file mode 100755 index 636e71323..000000000 --- a/docker_templates/gnocchi/gnocchi-statsd/start.sh +++ /dev/null @@ -1,14 +0,0 @@ -#!/bin/bash -set -o errexit - -CMD="/usr/bin/gnocchi-statsd" -ARGS="" - -# Loading common functions. -source /opt/kolla/kolla-common.sh - -# Execute config strategy -set_configs - -exec $CMD $ARGS - diff --git a/docker_templates/haproxy/Dockerfile.j2 b/docker_templates/haproxy/Dockerfile.j2 deleted file mode 100755 index 2858f436a..000000000 --- a/docker_templates/haproxy/Dockerfile.j2 +++ /dev/null @@ -1,27 +0,0 @@ -FROM {{ namespace }}/{{ base_distro }}-{{ install_type }}-base:{{ tag }} -MAINTAINER Kolla Project (https://launchpad.net/kolla) - -{% if base_distro in ['fedora', 'centos', 'oraclelinux'] %} - -RUN yum -y install \ - haproxy \ - && yum clean all - -{% elif base_distro == 'ubuntu' %} - -RUN apt-get install -y --no-install-recommends -t trusty-backports haproxy \ - && apt-get clean - -{% elif base_distro == 'debian' %} - -RUN apt-get install -y --no-install-recommends haproxy \ - && apt-get clean - -{% endif %} - -COPY start.sh / -COPY config-external.sh ensure_latest_config.sh /opt/kolla/ - -CMD ["/start.sh"] - -{{ include_footer }} diff --git a/docker_templates/haproxy/config-external.sh b/docker_templates/haproxy/config-external.sh deleted file mode 100644 index 0c41a5bdb..000000000 --- a/docker_templates/haproxy/config-external.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/bash -SOURCE="/opt/kolla/haproxy/haproxy.cfg" -TARGET="/etc/haproxy/haproxy.cfg" -OWNER="root" - -if [[ -f "$SOURCE" ]]; then - cp -f $SOURCE $TARGET - chown ${OWNER}: $TARGET - chmod 0644 $TARGET -fi diff --git a/docker_templates/haproxy/ensure_latest_config.sh b/docker_templates/haproxy/ensure_latest_config.sh deleted file mode 100755 index b91189ca5..000000000 --- a/docker_templates/haproxy/ensure_latest_config.sh +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/bash - -CURRENT_CONFIG_HASH=$(sha1sum /etc/haproxy/haproxy.cfg | cut -f1 -d' ') -NEW_CONFIG_HASH=$(sha1sum /opt/kolla/haproxy/haproxy.cfg | cut -f1 -d' ') - -if [[ $CURRENT_CONFIG_HASH != $NEW_CONFIG_HASH ]]; then - changed=changed - source /opt/kolla/config-external.sh - /usr/sbin/haproxy -f /etc/haproxy/haproxy.cfg -p /run/haproxy.pid -sf $(cat /run/haproxy.pid) -fi - -echo $changed diff --git a/docker_templates/haproxy/start.sh b/docker_templates/haproxy/start.sh deleted file mode 100755 index d1da4a607..000000000 --- a/docker_templates/haproxy/start.sh +++ /dev/null @@ -1,20 +0,0 @@ -#!/bin/bash -set -o errexit - -CMD='/usr/sbin/haproxy' -ARGS="-f /etc/haproxy/haproxy.cfg -p /run/haproxy.pid" - -# Loading common functions. -source /opt/kolla/kolla-common.sh - -# Execute config strategy -set_configs - -# We are intentionally not using exec so we can reload the haproxy config later -$CMD $ARGS - -# TODO(SamYaple): This has the potential for a race condition triggered by a -# config reload that could cause the container to exit -while [[ -e "/proc/$(cat /run/haproxy.pid)" ]]; do - sleep 5 -done diff --git a/docker_templates/heat/heat-api-cfn/Dockerfile.j2 b/docker_templates/heat/heat-api-cfn/Dockerfile.j2 deleted file mode 100644 index f199c16cf..000000000 --- a/docker_templates/heat/heat-api-cfn/Dockerfile.j2 +++ /dev/null @@ -1,25 +0,0 @@ -FROM {{ namespace }}/{{ base_distro }}-{{ install_type }}-heat-base:{{ tag }} -MAINTAINER Kolla Project (https://launchpad.net/kolla) - -{% if install_type == 'binary' %} - {% if base_distro in ['fedora', 'centos', 'oraclelinux'] %} - -RUN yum -y install \ - openstack-heat-api-cfn \ - python-openstackclient \ - && yum clean all - - {% elif base_distro in ['ubuntu', 'debian'] %} - -RUN echo '{{ install_type }} not yet available for {{ base_distro }}' \ - && /bin/false - - {% endif %} -{% endif %} - -COPY start.sh / -COPY config-external.sh /opt/kolla/ - -CMD ["/start.sh"] - -{{ include_footer }} diff --git a/docker_templates/heat/heat-api-cfn/config-external.sh b/docker_templates/heat/heat-api-cfn/config-external.sh deleted file mode 100644 index 91d5742f1..000000000 --- a/docker_templates/heat/heat-api-cfn/config-external.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/bash -SOURCE="/opt/kolla/heat-api-cfn/heat.conf" -TARGET="/etc/heat/heat.conf" -OWNER="heat" - -if [[ -f "$SOURCE" ]]; then - cp $SOURCE $TARGET - chown ${OWNER}: $TARGET - chmod 0644 $TARGET -fi diff --git a/docker_templates/heat/heat-api-cfn/start.sh b/docker_templates/heat/heat-api-cfn/start.sh deleted file mode 100755 index 54b533185..000000000 --- a/docker_templates/heat/heat-api-cfn/start.sh +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/bash -set -o errexit - -CMD="/usr/bin/heat-api-cfn" -ARGS="" - -# Loading common functions. -source /opt/kolla/kolla-common.sh - -# Execute config strategy -set_configs - -exec $CMD $ARGS diff --git a/docker_templates/heat/heat-api/Dockerfile.j2 b/docker_templates/heat/heat-api/Dockerfile.j2 deleted file mode 100644 index 8a782d8d3..000000000 --- a/docker_templates/heat/heat-api/Dockerfile.j2 +++ /dev/null @@ -1,25 +0,0 @@ -FROM {{ namespace }}/{{ base_distro }}-{{ install_type }}-heat-base:{{ tag }} -MAINTAINER Kolla Project (https://launchpad.net/kolla) - -{% if install_type == 'binary' %} - {% if base_distro in ['fedora', 'centos', 'oraclelinux'] %} - -RUN yum -y install \ - openstack-heat-api \ - python-openstackclient \ - && yum clean all - - {% elif base_distro in ['ubuntu', 'debian'] %} - -RUN echo '{{ install_type }} not yet available for {{ base_distro }}' \ - && /bin/false - - {% endif %} -{% endif %} - -COPY start.sh / -COPY config-external.sh /opt/kolla/ - -CMD ["/start.sh"] - -{{ include_footer }} diff --git a/docker_templates/heat/heat-api/config-external.sh b/docker_templates/heat/heat-api/config-external.sh deleted file mode 100644 index ca5d73e90..000000000 --- a/docker_templates/heat/heat-api/config-external.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/bash -SOURCE="/opt/kolla/heat-api/heat-api.conf" -TARGET="/etc/heat/heat-api.conf" -OWNER="heat" - -if [[ -f "$SOURCE" ]]; then - cp $SOURCE $TARGET - chown ${OWNER}: $TARGET - chmod 0644 $TARGET -fi diff --git a/docker_templates/heat/heat-api/start.sh b/docker_templates/heat/heat-api/start.sh deleted file mode 100755 index a7b14b1d9..000000000 --- a/docker_templates/heat/heat-api/start.sh +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/bash -set -o errexit - -CMD="/usr/bin/heat-api" -ARGS="" - -# Loading common functions. -source /opt/kolla/kolla-common.sh - -# Execute config strategy -set_configs - -exec $CMD $ARGS diff --git a/docker_templates/heat/heat-base/Dockerfile.j2 b/docker_templates/heat/heat-base/Dockerfile.j2 deleted file mode 100644 index 408167e90..000000000 --- a/docker_templates/heat/heat-base/Dockerfile.j2 +++ /dev/null @@ -1,27 +0,0 @@ -FROM {{ namespace }}/{{ base_distro }}-{{ install_type }}-base:{{ tag }} -MAINTAINER Kolla Project (https://launchpad.net/kolla) - -{% if install_type == 'binary' %} - {% if base_distro in ['fedora', 'centos', 'oraclelinux'] %} - -RUN yum -y install \ - python-oslo-reports \ - && yum clean all - - {% elif base_distro in ['ubuntu', 'debian'] %} - -RUN echo '{{ install_type }} not yet available for {{ base_distro }}' \ - && /bin/false - - {% endif %} -{% elif install_type == 'source' %} - -ADD heat.tar / -RUN ln -s /heat-* heat \ - && useradd --user-group heat \ - && pip --no-cache-dir install /heat \ - && mkdir -p /etc/heat /var/log/heat /home/heat \ - && cp -r /heat/etc/heat/* /etc/heat/ \ - && chown -R heat: /etc/heat /var/log/heat /home/heat - -{% endif %} diff --git a/docker_templates/heat/heat-engine/Dockerfile.j2 b/docker_templates/heat/heat-engine/Dockerfile.j2 deleted file mode 100644 index 5002d519d..000000000 --- a/docker_templates/heat/heat-engine/Dockerfile.j2 +++ /dev/null @@ -1,28 +0,0 @@ -FROM {{ namespace }}/{{ base_distro }}-{{ install_type }}-heat-base:{{ tag }} -MAINTAINER Kolla Project (https://launchpad.net/kolla) - -{% if install_type == 'binary' %} - {% if base_distro in ['fedora', 'centos', 'oraclelinux'] %} - -RUN yum -y install \ - # until http://pkgs.fedoraproject.org/cgit/openstack-heat.git/tree/openstack-heat.spec#n248 \ - # is updated, the clients must remain here: \ - python-barbicanclient \ - python-zaqarclient \ - openstack-heat-engine \ - && yum clean all - - {% elif base_distro in ['ubuntu', 'debian'] %} - -RUN echo '{{ install_type }} not yet available for {{ base_distro }}' \ - && /bin/false - - {% endif %} -{% endif %} - -COPY start.sh / -COPY config-external.sh /opt/kolla/ - -CMD ["/start.sh"] - -{{ include_footer }} diff --git a/docker_templates/heat/heat-engine/config-external.sh b/docker_templates/heat/heat-engine/config-external.sh deleted file mode 100644 index bde0ffe0d..000000000 --- a/docker_templates/heat/heat-engine/config-external.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/bash -SOURCE="/opt/kolla/heat-engine/heat.conf" -TARGET="/etc/heat/heat.conf" -OWNER="heat" - -if [[ -f "$SOURCE" ]]; then - cp $SOURCE $TARGET - chown ${OWNER}: $TARGET - chmod 0644 $TARGET -fi diff --git a/docker_templates/heat/heat-engine/start.sh b/docker_templates/heat/heat-engine/start.sh deleted file mode 100755 index 8f9a6f1cb..000000000 --- a/docker_templates/heat/heat-engine/start.sh +++ /dev/null @@ -1,20 +0,0 @@ -#!/bin/bash -set -o errexit - -CMD="/usr/bin/heat-engine" -ARGS="" - -# Loading common functions. -source /opt/kolla/kolla-common.sh - -# Execute config strategy -set_configs - -# Bootstrap and exit if KOLLA_BOOTSTRAP variable is set. This catches all cases -# of the KOLLA_BOOTSTRAP variable being set, including empty. -if [[ "${!KOLLA_BOOTSTRAP[@]}" ]]; then - su -s /bin/bash -c "/usr/bin/heat-manage db_sync" heat - exit 0 -fi - -exec $CMD $ARGS diff --git a/docker_templates/horizon/Dockerfile.j2 b/docker_templates/horizon/Dockerfile.j2 deleted file mode 100644 index 2fe69b3d2..000000000 --- a/docker_templates/horizon/Dockerfile.j2 +++ /dev/null @@ -1,58 +0,0 @@ -FROM {{ namespace }}/{{ base_distro }}-{{ install_type }}-base:{{ tag }} -MAINTAINER Kolla Project (https://launchpad.net.kolla) - -{% if install_type == 'binary' %} - {% if base_distro in ['centos', 'fedora', 'oraclelinux'] %} - -RUN yum -y install \ - openstack-dashboard \ - httpd \ - mod_wsgi \ - && yum clean all \ - && chown -R apache: /usr/share/openstack-dashboard/static - -# The chown is required because of this packaging bug: -# https://bugzilla.redhat.com/show_bug.cgi?id=1219006 - - {% elif base_distro in ['ubuntu', 'debian'] %} - -RUN echo '{{ install_type }} not yet available for {{ base_distro }}' \ - && /bin/false - - {% endif %} -{% elif install_type == 'source' %} - {% if base_distro in ['centos', 'fedora', 'oraclelinux'] %} - -RUN yum install -y \ - httpd \ - mod_wsgi \ - && yum clean all - - {% elif base_distro in ['ubuntu', 'debian'] %} - -RUN apt-get install -y --no-install-recommends \ - apache2 \ - libapache2-mod-wsgi \ - && echo > /etc/apache2/ports.conf \ - && apt-get clean - - {% endif %} - -ADD horizon.tar / -RUN ln -s /horizon-* horizon \ - && pip --no-cache-dir install /horizon \ - && useradd --user-group horizon \ - && mkdir -p /etc/openstack-dashboard /home/horizon \ - && ln -s openstack_dashboard/static/ /usr/lib/python2.7/site-packages/static \ - && ln -s /etc/openstack-dashboard/local_settings /usr/lib/python2.7/site-packages/openstack_dashboard/local/local_settings.py \ - && cp -r /horizon/openstack_dashboard/conf/* /etc/openstack-dashboard/ \ - && chown -R horizon: /etc/openstack-dashboard /home/horizon /usr/lib/python2.7/site-packages/openstack_dashboard/static - -{% endif %} - -COPY start.sh / -COPY config-external.sh /opt/kolla/ - -CMD ["/start.sh"] - -{{ include_footer }} diff --git a/docker_templates/horizon/config-external.sh b/docker_templates/horizon/config-external.sh deleted file mode 100644 index 8e9fc47a0..000000000 --- a/docker_templates/horizon/config-external.sh +++ /dev/null @@ -1,25 +0,0 @@ -#!/bin/bash -SOURCE="/opt/kolla/horizon/local_settings" -TARGET="/etc/openstack-dashboard/local_settings" -OWNER="horizon" - -if [[ -f "$SOURCE" ]]; then - cp $SOURCE $TARGET - chown ${OWNER}: $TARGET - chmod 0644 $TARGET -fi - -if [[ "${KOLLA_BASE_DISTRO}" == "ubuntu" || \ - "${KOLLA_BASE_DISTRO}" == "debian" ]]; then - SOURCE="/opt/kolla/horizon/horizon.conf" - TARGET="/etc/apache2/sites-enabled/000-default.conf" -else - SOURCE="/opt/kolla/horizon/horizon.conf" - TARGET="/etc/httpd/sites.d/horizon.conf" -fi - -if [[ -f "$SOURCE" ]]; then - cp $SOURCE $TARGET - chown ${OWNER}: $TARGET - chmod 0644 $TARGET -fi diff --git a/docker_templates/horizon/start.sh b/docker_templates/horizon/start.sh deleted file mode 100755 index 096326a3a..000000000 --- a/docker_templates/horizon/start.sh +++ /dev/null @@ -1,23 +0,0 @@ -#!/bin/bash - -set -o errexit - -# Loading common functions -source /opt/kolla/kolla-common.sh - -if [[ "${KOLLA_BASE_DISTRO}" == "ubuntu" || \ - "${KOLLA_BASE_DISTRO}" == "debian" ]]; then - CMD="/usr/sbin/apache2" - ARGS="-DFOREGROUND" - - # Loading Apache2 ENV variables - source /etc/apache2/envvars -else - CMD="/usr/sbin/httpd" - ARGS="-DFOREGROUND" -fi - -# Execute config strategy -set_configs - -exec $CMD $ARGS diff --git a/docker_templates/ironic/ironic-api/Dockerfile.j2 b/docker_templates/ironic/ironic-api/Dockerfile.j2 deleted file mode 100644 index 5bce3bdda..000000000 --- a/docker_templates/ironic/ironic-api/Dockerfile.j2 +++ /dev/null @@ -1,19 +0,0 @@ -FROM {{ namespace }}/{{ base_distro }}-{{ install_type }}-ironic-base:{{ tag }} -MAINTAINER Kolla Project (https://launchpad.net/kolla) - -{% if install_type == 'binary' %} - {% if base_distro in ['fedora', 'centos', 'oraclelinux'] %} - -RUN yum -y install \ - openstack-ironic-api \ - && yum clean all - - {% endif %} -{% endif %} - -COPY start.sh / -COPY config-external.sh /opt/kolla/ - -CMD ["/start.sh"] - -{{ include_footer }} diff --git a/docker_templates/ironic/ironic-api/config-external.sh b/docker_templates/ironic/ironic-api/config-external.sh deleted file mode 100644 index b838ee19d..000000000 --- a/docker_templates/ironic/ironic-api/config-external.sh +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/bash - -SOURCE="/opt/kolla/ironic-api/ironic.conf" -TARGET="/etc/ironic/ironic.conf" -OWNER="ironic" - -if [[ -f "$SOURCE" ]]; then - cp $SOURCE $TARGET - chown ${OWNER}: $TARGET - chmod 0644 $TARGET -fi diff --git a/docker_templates/ironic/ironic-api/start.sh b/docker_templates/ironic/ironic-api/start.sh deleted file mode 100755 index 9d449defb..000000000 --- a/docker_templates/ironic/ironic-api/start.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/bash -set -o errexit - -CMD="/usr/bin/ironic-api" -ARGS="" - -source /opt/kolla/kolla-common.sh -set_configs - -exec $CMD $ARGS diff --git a/docker_templates/ironic/ironic-base/Dockerfile.j2 b/docker_templates/ironic/ironic-base/Dockerfile.j2 deleted file mode 100644 index 0fc7e56c2..000000000 --- a/docker_templates/ironic/ironic-base/Dockerfile.j2 +++ /dev/null @@ -1,33 +0,0 @@ -FROM {{ namespace }}/{{ base_distro }}-{{ install_type }}-base:{{ tag }} -MAINTAINER Kolla Project (https://launchpad.net/kolla) - -{% if install_type == 'binary' %} - {% if base_distro in ['fedora', 'centos', 'oraclelinux'] %} - -# until packaging is fixed, all of this is required -# api: policy -# conductor:MySQL-python -RUN yum -y install \ - python-oslo-log \ - python-oslo-concurrency \ - python-oslo-policy \ - MySQL-python \ - && yum clean all - - {% elif base_distro in ['ubuntu', 'debian'] %} - -RUN echo '{{ install_type }} not yet available for {{ base_distro }}' \ - && /bin/false - - {% endif %} -{% elif install_type == 'source' %} - -ADD ironic.tar / -RUN ln -s /ironic-* ironic \ - && useradd --user-group ironic \ - && pip --no-cache-dir install /ironic \ - && mkdir -p /etc/ironic /var/log/ironic /home/ironic \ - && cp -r /ironic/etc/* /etc/ironic/ \ - && chown -R ironic: /etc/ironic /var/log/ironic /home/ironic - -{% endif %} diff --git a/docker_templates/ironic/ironic-conductor/Dockerfile.j2 b/docker_templates/ironic/ironic-conductor/Dockerfile.j2 deleted file mode 100644 index d38033230..000000000 --- a/docker_templates/ironic/ironic-conductor/Dockerfile.j2 +++ /dev/null @@ -1,19 +0,0 @@ -FROM {{ namespace }}/{{ base_distro }}-{{ install_type }}-ironic-base:{{ tag }} -MAINTAINER Kolla Project (https://launchpad.net/kolla) - -{% if install_type == 'binary' %} - {% if base_distro in ['fedora', 'centos', 'oraclelinux'] %} - -RUN yum -y install \ - openstack-ironic-conductor \ - && yum clean all - - {% endif %} -{% endif %} - -COPY start.sh / -COPY config-external.sh /opt/kolla/ - -CMD ["/start.sh"] - -{{ include_footer }} diff --git a/docker_templates/ironic/ironic-conductor/config-external.sh b/docker_templates/ironic/ironic-conductor/config-external.sh deleted file mode 100644 index b838ee19d..000000000 --- a/docker_templates/ironic/ironic-conductor/config-external.sh +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/bash - -SOURCE="/opt/kolla/ironic-api/ironic.conf" -TARGET="/etc/ironic/ironic.conf" -OWNER="ironic" - -if [[ -f "$SOURCE" ]]; then - cp $SOURCE $TARGET - chown ${OWNER}: $TARGET - chmod 0644 $TARGET -fi diff --git a/docker_templates/ironic/ironic-conductor/start.sh b/docker_templates/ironic/ironic-conductor/start.sh deleted file mode 100755 index c766f04c5..000000000 --- a/docker_templates/ironic/ironic-conductor/start.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/bash -set -o errexit - -CMD="/usr/bin/ironic-conductor" -ARGS="" - -source /opt/kolla/kolla-common.sh -set_configs - -exec $CMD $ARGS diff --git a/docker_templates/ironic/ironic-discoverd/Dockerfile.j2 b/docker_templates/ironic/ironic-discoverd/Dockerfile.j2 deleted file mode 100644 index cb4e8b80f..000000000 --- a/docker_templates/ironic/ironic-discoverd/Dockerfile.j2 +++ /dev/null @@ -1,19 +0,0 @@ -FROM {{ namespace }}/{{ base_distro }}-{{ install_type }}-ironic-base:{{ tag }} -MAINTAINER Kolla Project (https://launchpad.net/kolla) - -{% if install_type == 'binary' %} - {% if base_distro in ['fedora', 'centos', 'oraclelinux'] %} - -RUN yum -y install \ - openstack-ironic-discoverd \ - && yum clean all - - {% endif %} -{% endif %} - -COPY start.sh / -COPY config-external.sh /opt/kolla/ - -CMD ["/start.sh"] - -{{ include_footer }} diff --git a/docker_templates/ironic/ironic-discoverd/config-external.sh b/docker_templates/ironic/ironic-discoverd/config-external.sh deleted file mode 100644 index a3f82b8f3..000000000 --- a/docker_templates/ironic/ironic-discoverd/config-external.sh +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/bash - -SOURCE="/opt/kolla/ironic-discoverd/discoverd.conf" -TARGET="/etc/ironic-discoverd/discoverd.conf" -OWNER="ironic" - -if [[ -f "$SOURCE" ]]; then - cp $SOURCE $TARGET - chown ${OWNER}: $TARGET - chmod 0644 $TARGET -fi diff --git a/docker_templates/ironic/ironic-discoverd/start.sh b/docker_templates/ironic/ironic-discoverd/start.sh deleted file mode 100755 index 093dc517a..000000000 --- a/docker_templates/ironic/ironic-discoverd/start.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/bash -set -o errexit - -CMD="/usr/bin/ironic-discoverd" -ARGS="" - -source /opt/kolla/kolla-common.sh -set_configs - -exec $CMD $ARGS diff --git a/docker_templates/keepalived/Dockerfile.j2 b/docker_templates/keepalived/Dockerfile.j2 deleted file mode 100644 index 325e4c2c5..000000000 --- a/docker_templates/keepalived/Dockerfile.j2 +++ /dev/null @@ -1,26 +0,0 @@ -FROM {{ namespace }}/{{ base_distro }}-{{ install_type }}-base:{{ tag }} -MAINTAINER Kolla Project (https://launchpad.net/kolla) - -{% if base_distro in ['fedora', 'centos', 'oraclelinux'] %} - -RUN yum -y install \ - hostname \ - keepalived \ - socat \ - && yum clean all - -{% elif base_distro in ['ubuntu', 'debian'] %} - -RUN apt-get install -y --no-install-recommends \ - keepalived \ - socat \ - && apt-get clean - -{% endif %} - -COPY start.sh check_alive.sh / -COPY config-external.sh /opt/kolla/ - -CMD ["/start.sh"] - -{{ include_footer }} diff --git a/docker_templates/keepalived/check_alive.sh b/docker_templates/keepalived/check_alive.sh deleted file mode 100755 index 8c2684f10..000000000 --- a/docker_templates/keepalived/check_alive.sh +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/bash - -# This will return 0 when it successfully talks to the haproxy daemon via the socket -# Failures return 1 - -echo "show info" | socat unix-connect:/run/haproxy.sock stdio diff --git a/docker_templates/keepalived/config-external.sh b/docker_templates/keepalived/config-external.sh deleted file mode 100755 index d7ff97826..000000000 --- a/docker_templates/keepalived/config-external.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/bash -SOURCE="/opt/kolla/keepalived/keepalived.conf" -TARGET="/etc/keepalived/keepalived.conf" -OWNER="root" - -if [[ -f "$SOURCE" ]]; then - cp $SOURCE $TARGET - chown ${OWNER}: $TARGET - chmod 0644 $TARGET -fi diff --git a/docker_templates/keepalived/start.sh b/docker_templates/keepalived/start.sh deleted file mode 100755 index a122526e4..000000000 --- a/docker_templates/keepalived/start.sh +++ /dev/null @@ -1,20 +0,0 @@ -#!/bin/bash -set -o errexit - -CMD="/usr/sbin/keepalived" -ARGS="-nld -p /run/keepalived.pid" - -# Loading common functions. -source /opt/kolla/kolla-common.sh - -# Execute config strategy -set_configs - -modprobe ip_vs - -# Workaround for bug #1485079 -if [ -f /run/keepalived.pid ]; then - rm /run/keepalived.pid -fi - -exec $CMD $ARGS diff --git a/docker_templates/keystone/Dockerfile.j2 b/docker_templates/keystone/Dockerfile.j2 deleted file mode 100644 index a3b686165..000000000 --- a/docker_templates/keystone/Dockerfile.j2 +++ /dev/null @@ -1,71 +0,0 @@ -FROM {{ namespace }}/{{ base_distro }}-{{ install_type }}-base:{{ tag }} -MAINTAINER Kolla Project (https://launchpad.net/kolla) - -{% if install_type == 'binary' %} - {% if base_distro in ['fedora', 'centos', 'oraclelinux'] %} - -RUN yum -y install openstack-keystone \ - python-keystoneclient \ - python-openstackclient \ - httpd \ - mod_wsgi \ - && yum clean all - -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 - - {% elif base_distro in ['ubuntu', 'debian'] %} - -RUN apt-get install -y --no-install-recommends \ - apache2 \ - keystone \ - libapache2-mod-wsgi \ - python-keystoneclient \ - && apt-get clean - -RUN ln -s /etc/apache2/sites-available/wsgi-keystone.conf /etc/apache2/sites-enabled \ - && 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 - - {% endif %} -{% elif install_type == 'source' %} - {% if base_distro in ['fedora', 'centos', 'oraclelinux'] %} - -RUN yum -y install \ - httpd \ - mod_wsgi \ - && yum clean all - - {% elif base_distro in ['ubuntu', 'debian'] %} - -RUN apt-get install -y --no-install-recommends \ - apache2 \ - libapache2-mod-wsgi \ - && echo > /etc/apache2/ports.conf \ - && apt-get clean - - {% endif %} - -ADD keystone.tar / -RUN ln -s /keystone-* keystone \ - && useradd --user-group keystone \ - && pip --no-cache-dir install /keystone \ - && mkdir -p /etc/keystone /var/www/cgi-bin/keystone /var/log/apache2 /home/keystone \ - && cp -r /keystone/etc/* /etc/keystone/ \ - && cp /keystone/httpd/keystone.py /var/www/cgi-bin/keystone/admin \ - && cp /keystone/httpd/keystone.py /var/www/cgi-bin/keystone/main \ - && chown -R keystone: /etc/keystone /var/www/cgi-bin/keystone /var/log/apache2 /home/keystone - -{% endif %} - -RUN chown -R keystone: /var/www/cgi-bin/keystone \ - && chmod 755 /var/www/cgi-bin/keystone/* - -COPY start.sh / -COPY config-external.sh /opt/kolla/ - -CMD ["/start.sh"] - -{{ include_footer }} diff --git a/docker_templates/keystone/config-external.sh b/docker_templates/keystone/config-external.sh deleted file mode 100644 index 1bd4e3bb4..000000000 --- a/docker_templates/keystone/config-external.sh +++ /dev/null @@ -1,25 +0,0 @@ -#!/bin/bash -SOURCE="/opt/kolla/keystone/keystone.conf" -TARGET="/etc/keystone/keystone.conf" -OWNER="keystone" - -if [[ -f "$SOURCE" ]]; then - cp $SOURCE $TARGET - chown ${OWNER}: $TARGET - chmod 0644 $TARGET -fi - -if [[ "${KOLLA_BASE_DISTRO}" == "ubuntu" || \ - "${KOLLA_BASE_DISTRO}" == "debian" ]]; then - SOURCE_WSGI="/opt/kolla/keystone/wsgi-keystone.conf" - TARGET_WSGI="/etc/apache2/conf-enabled/wsgi-keystone.conf" -else - SOURCE_WSGI="/opt/kolla/keystone/wsgi-keystone.conf" - TARGET_WSGI="/etc/httpd/conf.d/wsgi-keystone.conf" -fi - -if [[ -f "$SOURCE_WSGI" ]]; then - cp $SOURCE_WSGI $TARGET_WSGI - chown ${OWNER}: $TARGET_WSGI - chmod 0644 $TARGET_WSGI -fi diff --git a/docker_templates/keystone/start.sh b/docker_templates/keystone/start.sh deleted file mode 100755 index d964b0303..000000000 --- a/docker_templates/keystone/start.sh +++ /dev/null @@ -1,48 +0,0 @@ -#!/bin/bash - -set -o errexit - -# Loading common functions -source /opt/kolla/kolla-common.sh - -if [[ "${KOLLA_BASE_DISTRO}" == "ubuntu" || \ - "${KOLLA_BASE_DISTRO}" == "debian" ]]; then - CMD="/usr/sbin/apache2" - ARGS="-DFOREGROUND" - - # Loading Apache2 ENV variables - source /etc/apache2/envvars -else - CMD="/usr/sbin/httpd" - ARGS="-DFOREGROUND" -fi - -# Execute config strategy -set_configs - -# Bootstrap and exit if KOLLA_BOOTSTRAP variable is set. This catches all cases -# of the KOLLA_BOOTSTRAP variable being set, including empty. -if [[ "${!KOLLA_BOOTSTRAP[@]}" ]]; then - su -s /bin/sh -c "keystone-manage db_sync" keystone - - # Start the api to set initial endpoint and users with the admin_token - $CMD - sleep 5 - - keystone service-create --name keystone --type identity \ - --description "OpenStack Identity" - keystone endpoint-create --region "${REGION_NAME}" \ - --publicurl "${PUBLIC_URL}" \ - --internalurl "${INTERNAL_URL}" \ - --adminurl "${ADMIN_URL}" \ - --service-id $(keystone service-list | awk '/ identity / {print $2}') - - keystone tenant-create --description "Admin Project" --name admin - keystone user-create --pass "${KEYSTONE_ADMIN_PASSWORD}" --name admin - keystone role-create --name admin - keystone user-role-add --user admin --tenant admin --role admin - - exit 0 -fi - -exec $CMD $ARGS diff --git a/docker_templates/kolla-ansible/Dockerfile.j2 b/docker_templates/kolla-ansible/Dockerfile.j2 deleted file mode 100644 index 9975f5873..000000000 --- a/docker_templates/kolla-ansible/Dockerfile.j2 +++ /dev/null @@ -1,38 +0,0 @@ -FROM {{ namespace }}/{{ base_distro }}-{{ install_type }}-base:{{ tag }} -MAINTAINER Kolla Project (https://launchpad.net/kolla) - -{% if base_distro in ['fedora', 'centos', 'oraclelinux'] %} - -RUN yum -y install \ - git \ - gcc \ - libffi-devel \ - libxml2-devel \ - libxslt-devel \ - MySQL-python \ - openssl-devel \ - python-devel \ - openssh-clients \ - && yum clean all - -RUN pip install -U pip wheel - -{% elif base_distro in ['ubuntu', 'debian'] %} - -RUN apt-get install -y --no-install-recommends git - -{% endif %} - -RUN pip install shade - -RUN git clone --depth 1 https://github.com/ansible/ansible.git \ - && cd ansible \ - && git submodule update --init --recursive \ - && pip install --install-option="--install-scripts=/usr/bin" . - -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/kolla-ansible/kolla_keystone_service.py b/docker_templates/kolla-ansible/kolla_keystone_service.py deleted file mode 100644 index 455aaf578..000000000 --- a/docker_templates/kolla-ansible/kolla_keystone_service.py +++ /dev/null @@ -1,84 +0,0 @@ -#!/usr/bin/python - -# Copyright 2015 Sam Yaple -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# This file is a barebones file needed to file a gap until Ansible 2.0. No error -# checking, no deletions, no updates. Idempotent creation only. - -# If you look closely, you will see we arent _really_ using the shade module -# we just use it to slightly abstract the authentication model. As patches land -# in upstream shade we will be able to use more of the shade module. Until then -# if we want to be 'stable' we really need to be using it as a passthrough - -import shade - -def main(): - module = AnsibleModule( - argument_spec = openstack_full_argument_spec( - description = dict(required=True, type='str'), - service_name = dict(required=True, type='str'), - service_type = dict(required=True, type='str'), - admin_url = dict(required=True, type='str'), - internal_url = dict(required=True, type='str'), - public_url = dict(required=True, type='str'), - endpoint_region = dict(required=True, type='str') - ) - ) - - try: - description = module.params.pop('description') - service_name = module.params.pop('service_name') - service_type = module.params.pop('service_type') - admin_url = module.params.pop('admin_url') - internal_url = module.params.pop('internal_url') - public_url = module.params.pop('public_url') - endpoint_region = module.params.pop('endpoint_region') - - changed = False - service = None - endpoint = None - - cloud = shade.operator_cloud(**module.params) - - for _service in cloud.keystone_client.services.list(): - if _service.type == service_type: - service = _service - - if service is not None: - for _endpoint in cloud.keystone_client.endpoints.list(): - if _endpoint.service_id == service.id: - endpoint = _endpoint - else: - service = cloud.keystone_client.services.create(name=service_name, - service_type=service_type, - description=description) - - if endpoint is None: - changed = True - cloud.keystone_client.endpoints.create(service_id=service.id, - adminurl=admin_url, - internalurl=public_url, - publicurl=public_url, - region=endpoint_region) - - module.exit_json(changed=changed) - except Exception as e: - module.exit_json(failed=True, changed=True, msg=e) - -# import module snippets -from ansible.module_utils.basic import * -from ansible.module_utils.openstack import * -if __name__ == '__main__': - main() diff --git a/docker_templates/kolla-ansible/kolla_keystone_user.py b/docker_templates/kolla-ansible/kolla_keystone_user.py deleted file mode 100644 index 5d295c1e2..000000000 --- a/docker_templates/kolla-ansible/kolla_keystone_user.py +++ /dev/null @@ -1,83 +0,0 @@ -#!/usr/bin/python - -# Copyright 2015 Sam Yaple -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# This file is a barebones file needed to file a gap until Ansible 2.0. No error -# checking, no deletions, no updates. Idempotent creation only. - -# If you look closely, you will see we arent _really_ using the shade module -# we just use it to slightly abstract the authentication model. As patches land -# in upstream shade we will be able to use more of the shade module. Until then -# if we want to be 'stable' we really need to be using it as a passthrough - -import shade - -def main(): - module = AnsibleModule( - argument_spec = openstack_full_argument_spec( - password = dict(required=True, type='str'), - project = dict(required=True, type='str'), - role = dict(required=True, type='str'), - user = dict(required=True, type='str') - ) - ) - - try: - password = module.params.pop('password') - project_name = module.params.pop('project') - role_name = module.params.pop('role') - user_name = module.params.pop('user') - - changed = False - project = None - role = None - user = None - - cloud = shade.operator_cloud(**module.params) - - for _project in cloud.keystone_client.tenants.list(): - if _project.name == project_name: - project = _project - - for _role in cloud.keystone_client.roles.list(): - if _role.name == role_name: - role = _role - - for _user in cloud.keystone_client.users.list(): - if _user.name == user_name: - user = _user - - if not project: - changed = True - project = cloud.keystone_client.tenants.create(tenant_name=project_name) - - if not role: - changed = True - role = cloud.keystone_client.roles.create(name=role_name) - - if not user: - changed = True - user = cloud.keystone_client.users.create(name=user_name, password=password, tenant_id=project.id) - cloud.keystone_client.roles.add_user_role(role=role.id, user=user.id, tenant=project.id) - - module.exit_json(changed=changed) - except Exception as e: - module.exit_json(failed=True, changed=True, msg=e) - -# import module snippets -from ansible.module_utils.basic import * -from ansible.module_utils.openstack import * -if __name__ == '__main__': - main() diff --git a/docker_templates/magnum/magnum-api/Dockerfile.j2 b/docker_templates/magnum/magnum-api/Dockerfile.j2 deleted file mode 100644 index e208a115e..000000000 --- a/docker_templates/magnum/magnum-api/Dockerfile.j2 +++ /dev/null @@ -1,19 +0,0 @@ -FROM {{ namespace }}/{{ base_distro }}-{{ install_type }}-magnum-base:{{ tag }} -MAINTAINER Kolla Project (https://launchpad.net/kolla) - -{% if install_type == 'binary' %} - {% if base_distro in ['fedora', 'centos', 'oraclelinux'] %} - -RUN yum -y install openstack-magnum-api \ - && yum clean all - - {% endif %} -{% endif %} - -COPY ./start.sh / -COPY config-external.sh /opt/kolla/ - -CMD ["/start.sh"] - - -{{ include_footer }} diff --git a/docker_templates/magnum/magnum-api/config-external.sh b/docker_templates/magnum/magnum-api/config-external.sh deleted file mode 100644 index 573043f7d..000000000 --- a/docker_templates/magnum/magnum-api/config-external.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/bash -SOURCE="/opt/kolla/magnum/magnum-api/magnum.conf" -TARGET="/etc/magnum/magnum.conf" -OWNER="magnum" - -if [[ -f "$SOURCE" ]]; then - cp $SOURCE $TARGET - chown ${OWNER}: $TARGET - chmod 0644 $TARGET -fi diff --git a/docker_templates/magnum/magnum-api/start.sh b/docker_templates/magnum/magnum-api/start.sh deleted file mode 100755 index ed154e29a..000000000 --- a/docker_templates/magnum/magnum-api/start.sh +++ /dev/null @@ -1,20 +0,0 @@ -#!/bin/bash - -set -o errexit -CMD="/usr/bin/magnum-api" -ARGS="" - -# Loading common functions. -source /opt/kolla/kolla-common.sh - -# Execute config strategy -set_configs - -# Bootstrap and exit if KOLLA_BOOTSTRAP variable is set. This catches all cases -# of the KOLLA_BOOTSTRAP variable being set, including empty. -if [[ "${!KOLLA_BOOTSTRAP[@]}" ]]; then - su -s /bin/sh -c "magnum-manage db_sync" magnum - exit 0 -fi - -exec $CMD $ARGS diff --git a/docker_templates/magnum/magnum-base/Dockerfile.j2 b/docker_templates/magnum/magnum-base/Dockerfile.j2 deleted file mode 100644 index 59c22f57e..000000000 --- a/docker_templates/magnum/magnum-base/Dockerfile.j2 +++ /dev/null @@ -1,29 +0,0 @@ -FROM {{ namespace }}/{{ base_distro }}-{{ install_type }}-base:{{ tag }} -MAINTAINER Kolla Project (https://launchpad.net/kolla) - -{% if install_type == 'binary' %} - {% if base_distro in ['centos'] %} - -RUN curl https://copr.fedoraproject.org/coprs/sdake/openstack-magnum/repo/epel-7/sdake-openstack-magnum-epel-7.repo -o /etc/yum.repos.d/sdake-openstack-magnum-epel-7.repo - - {% elif base_distro in ['fedora'] %} - -RUN curl https://copr.fedoraproject.org/coprs/sdake/openstack-magnum/repo/fedora-22/sdake-openstack-magnum-fedora-22.repo -o /etc/yum.repos.d/sdake-openstack-magnum-f22.repo - - {% elif base_distro in ['ubuntu', 'debian', 'oraclelinux'] %} - -RUN echo '{{ install_type }} not yet available for {{ base_distro }}' \ - && /bin/false - - {% endif %} -{% elif install_type == 'source' %} - -ADD magnum.tar / -RUN ln -s /magnum-* magnum \ - && useradd --user-group magnum \ - && pip --no-cache-dir install /magnum \ - && mkdir -p /etc/magnum /var/log/magnum /home/magnum \ - && cp -r /magnum/etc/* /etc/magnum/ \ - && chown -R magnum: /etc/magnum /var/log/magnum /home/magnum - -{% endif %} diff --git a/docker_templates/magnum/magnum-conductor/Dockerfile.j2 b/docker_templates/magnum/magnum-conductor/Dockerfile.j2 deleted file mode 100644 index c14370085..000000000 --- a/docker_templates/magnum/magnum-conductor/Dockerfile.j2 +++ /dev/null @@ -1,23 +0,0 @@ -FROM {{ namespace }}/{{ base_distro }}-{{ install_type }}-magnum-base:{{ tag }} -MAINTAINER Kolla Project (https://launchpad.net/kolla) - -{% if install_type == 'binary' %} - {% if base_distro in ['fedora', 'centos', 'oraclelinux'] %} - -RUN yum -y install openstack-magnum-conductor \ - tar \ - && yum clean all - -# Install kubectl binary (ugh) -RUN cd /tmp && curl -L https://github.com/GoogleCloudPlatform/kubernetes/releases/download/v0.15.0/kubernetes.tar.gz -o /tmp/kubernetes.tar.gz && /usr/bin/tar -xzvf /tmp/kubernetes.tar.gz && cp -a /tmp/kubernetes/platforms/linux/amd64/kubectl /usr/bin/kubectl && rm -rf /tmp/kubernetes - - {% endif %} -{% endif %} - -COPY ./start.sh / -COPY config-external.sh /opt/kolla/ - -CMD ["/start.sh"] - - -{{ include_footer }} diff --git a/docker_templates/magnum/magnum-conductor/config-external.sh b/docker_templates/magnum/magnum-conductor/config-external.sh deleted file mode 100644 index b96e3179e..000000000 --- a/docker_templates/magnum/magnum-conductor/config-external.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/bash -SOURCE="/opt/kolla/magnum/magnum-conductor/magnum.conf" -TARGET="/etc/magnum/magnum.conf" -OWNER="magnum" - -if [[ -f "$SOURCE" ]]; then - cp $SOURCE $TARGET - chown ${OWNER}: $TARGET - chmod 0644 $TARGET -fi diff --git a/docker_templates/magnum/magnum-conductor/start.sh b/docker_templates/magnum/magnum-conductor/start.sh deleted file mode 100755 index a5c76ee85..000000000 --- a/docker_templates/magnum/magnum-conductor/start.sh +++ /dev/null @@ -1,14 +0,0 @@ -#!/bin/bash - -set -o errexit - -CMD="/usr/bin/magnum-conductor" -ARGS="" - -# Loading common functions. -source /opt/kolla/kolla-common.sh - -# Execute config strategy -set_configs - -exec $CMD $ARGS diff --git a/docker_templates/memcached/Dockerfile.j2 b/docker_templates/memcached/Dockerfile.j2 deleted file mode 100644 index 0c0111f7e..000000000 --- a/docker_templates/memcached/Dockerfile.j2 +++ /dev/null @@ -1,21 +0,0 @@ -FROM {{ namespace }}/{{ base_distro }}-{{ install_type }}-base:{{ tag }} -MAINTAINER Kolla Project (https://launchpad.net/kolla) - -{% if base_distro in ['fedora', 'centos', 'oraclelinux'] %} - -RUN yum -y install memcached \ - && yum clean all - -{% elif base_distro in ['ubuntu', 'debian'] %} - -RUN apt-get install -y --no-install-recommends memcached \ - && apt-get clean - -{% endif %} - -COPY start.sh / -COPY config-external.sh /opt/kolla/ - -CMD ["/start.sh"] - -{{ include_footer }} diff --git a/docker_templates/memcached/config-external.sh b/docker_templates/memcached/config-external.sh deleted file mode 100644 index 0f3fa8336..000000000 --- a/docker_templates/memcached/config-external.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/bash -SOURCE="/opt/kolla/memcached/memcached.conf" -TARGET="/etc/memcached.conf" -OWNER="memcached" - -if [[ -f "$SOURCE" ]]; then - cp $SOURCE $TARGET - chown ${OWNER}: $TARGET - chmod 0644 $TARGET -fi diff --git a/docker_templates/memcached/start.sh b/docker_templates/memcached/start.sh deleted file mode 100755 index 531dd3872..000000000 --- a/docker_templates/memcached/start.sh +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/bash - -set -o errexit - -CMD="/usr/bin/memcached" -ARGS="-u memcached -vv" - -# Loading common functions. -source /opt/kolla/kolla-common.sh - -# Execute config strategy -set_configs - -source /etc/memcached.conf - -exec $CMD $ARGS $OPTIONS diff --git a/docker_templates/mongodb/Dockerfile.j2 b/docker_templates/mongodb/Dockerfile.j2 deleted file mode 100644 index ee82f0b7a..000000000 --- a/docker_templates/mongodb/Dockerfile.j2 +++ /dev/null @@ -1,25 +0,0 @@ -FROM {{ namespace }}/{{ base_distro }}-{{ install_type }}-base:{{ tag }} -MAINTAINER Kolla Project (https://launchpad.net/kolla) - -{% if base_distro in ['fedora', 'centos', 'oraclelinux'] %} - -RUN yum -y install \ - mongodb \ - mongodb-server \ - && yum clean all - -{% elif base_distro in ['ubuntu', 'debian'] %} - -RUN apt-get install -y --no-install-recommends mongodb-server \ - && apt-get clean - -{% endif %} - -RUN mkdir -p /data/db - -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 deleted file mode 100644 index f1d7e1f42..000000000 --- a/docker_templates/murano/murano-api/Dockerfile.j2 +++ /dev/null @@ -1,9 +0,0 @@ -FROM {{ namespace }}/{{ base_distro }}-{{ install_type }}-murano-base:{{ tag }} -MAINTAINER Kolla Project (https://launchpad.net/kolla) - -COPY config-external.sh /opt/kolla/ -COPY start.sh / - -CMD ["/start.sh"] - -{{ include_footer }} diff --git a/docker_templates/murano/murano-api/config-external.sh b/docker_templates/murano/murano-api/config-external.sh deleted file mode 100644 index 5d9a2da49..000000000 --- a/docker_templates/murano/murano-api/config-external.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/bash -SOURCE="/opt/kolla/murano/murano.conf" -TARGET="/etc/murano/murano.conf" -OWNER="murano" - -if [[ -f "$SOURCE" ]]; then - cp $SOURCE $TARGET - chown ${OWNER}: $TARGET - chmod 0644 $TARGET -fi diff --git a/docker_templates/murano/murano-api/start.sh b/docker_templates/murano/murano-api/start.sh deleted file mode 100755 index 7d712177d..000000000 --- a/docker_templates/murano/murano-api/start.sh +++ /dev/null @@ -1,20 +0,0 @@ -#!/bin/bash -set -o errexit - -CMD="/usr/bin/murano-api" -ARGS="--config-file /etc/murano/murano.conf" - -# Loading common functions. -source /opt/kolla/kolla-common.sh - -# Execute config strategy -set_configs - -# Bootstrap and exit if KOLLA_BOOTSTRAP variable is set. This catches all cases -# of the KOLLA_BOOTSTRAP variable being set, including empty. -if [[ "${!KOLLA_BOOTSTRAP[@]}" ]]; then - su -s /bin/sh -c "murano-db-manage --config-file /etc/murano/murano.conf upgrade" murano - exit 0 -fi - -exec $CMD $ARGS diff --git a/docker_templates/murano/murano-base/Dockerfile.j2 b/docker_templates/murano/murano-base/Dockerfile.j2 deleted file mode 100644 index cb700e5e0..000000000 --- a/docker_templates/murano/murano-base/Dockerfile.j2 +++ /dev/null @@ -1,19 +0,0 @@ -FROM {{ namespace }}/{{ base_distro }}-{{ install_type }}-base:{{ tag }} -MAINTAINER Kolla Project (https://launchpad.net/kolla) - -{% if install_type == 'binary' %} - -RUN echo '{{ install_type }} not yet available for {{ base_distro }}' \ - && /bin/false - -{% elif install_type == 'source' %} - -ADD murano.tar / -RUN ln -s /murano-* murano \ - && useradd --user-group murano \ - && pip --no-cache-dir install /murano \ - && mkdir -p /etc/murano /var/log/murano /home/murano \ - && cp -r /murano/etc/murano/* /etc/murano/ \ - && chown -R murano: /etc/murano /var/log/murano /home/murano - -{% endif %} diff --git a/docker_templates/murano/murano-engine/Dockerfile.j2 b/docker_templates/murano/murano-engine/Dockerfile.j2 deleted file mode 100644 index f1d7e1f42..000000000 --- a/docker_templates/murano/murano-engine/Dockerfile.j2 +++ /dev/null @@ -1,9 +0,0 @@ -FROM {{ namespace }}/{{ base_distro }}-{{ install_type }}-murano-base:{{ tag }} -MAINTAINER Kolla Project (https://launchpad.net/kolla) - -COPY config-external.sh /opt/kolla/ -COPY start.sh / - -CMD ["/start.sh"] - -{{ include_footer }} diff --git a/docker_templates/murano/murano-engine/config-external.sh b/docker_templates/murano/murano-engine/config-external.sh deleted file mode 100644 index 5d9a2da49..000000000 --- a/docker_templates/murano/murano-engine/config-external.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/bash -SOURCE="/opt/kolla/murano/murano.conf" -TARGET="/etc/murano/murano.conf" -OWNER="murano" - -if [[ -f "$SOURCE" ]]; then - cp $SOURCE $TARGET - chown ${OWNER}: $TARGET - chmod 0644 $TARGET -fi diff --git a/docker_templates/murano/murano-engine/start.sh b/docker_templates/murano/murano-engine/start.sh deleted file mode 100755 index 22834fc4c..000000000 --- a/docker_templates/murano/murano-engine/start.sh +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/bash -set -o errexit - -CMD="/usr/bin/murano-engine" -ARGS="--config-file /etc/murano/murano.conf" - -# Loading common functions. -source /opt/kolla/kolla-common.sh - -# Execute config strategy -set_configs - -exec $CMD $ARGS diff --git a/docker_templates/neutron/neutron-agents/Dockerfile.j2 b/docker_templates/neutron/neutron-agents/Dockerfile.j2 deleted file mode 100644 index 590443e00..000000000 --- a/docker_templates/neutron/neutron-agents/Dockerfile.j2 +++ /dev/null @@ -1,35 +0,0 @@ -FROM {{ namespace }}/{{ base_distro }}-{{ install_type }}-neutron-base:{{ tag }} -MAINTAINER Kolla Project (https://launchpad.net.kolla) - -{% if base_distro in ['centos', 'fedora', 'oraclelinux'] %} - -RUN yum install -y supervisor \ - && yum clean all - -COPY supervisord.conf /etc/ - -{% elif base_distro in ['ubuntu', 'debian'] %} - -RUN apt-get install -y --no-install-recommends supervisor \ - && apt-get clean - -COPY supervisord.conf /etc/supervisor/ - -{% endif %} - -# TODO: SamYaple FWaaS is part of the l3-agent, not a seperate agent that is -# why this file is needed. To support FWaaS we cannot have a seperate container -# I need to figure out the best way to make this work together -# -# This file _does_ _not_ need to exist, you must remove referencing it from the -# exec line in the start script. Also all these config options can exist in the -# main neutron.conf if we wish -COPY fwaas_driver.ini /etc/neutron/ - -COPY neutron-dhcp-agent/ /opt/kolla/neutron-dhcp-agent -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-agents/fwaas_driver.ini b/docker_templates/neutron/neutron-agents/fwaas_driver.ini deleted file mode 120000 index a9b1ec519..000000000 --- a/docker_templates/neutron/neutron-agents/fwaas_driver.ini +++ /dev/null @@ -1 +0,0 @@ -neutron-l3-agent/fwaas_driver.ini \ No newline at end of file diff --git a/docker_templates/neutron/neutron-agents/neutron-dhcp-agent/config-external.sh b/docker_templates/neutron/neutron-agents/neutron-dhcp-agent/config-external.sh deleted file mode 100755 index badbd86a1..000000000 --- a/docker_templates/neutron/neutron-agents/neutron-dhcp-agent/config-external.sh +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/bash -SOURCES="/opt/kolla/neutron-agents/neutron.conf /opt/kolla/neutron-agents/dhcp_agent.ini /opt/kolla/neutron-agents/dnsmasq.conf" -TARGET="/etc/neutron/" -OWNER="neutron" - -for f in $SOURCES; do - if [[ -f "$f" ]]; then - fname=$(basename $f) - cp $f $TARGET - chown ${OWNER}: $TARGET/$fname - chmod 0644 $TARGET/$fname - fi -done diff --git a/docker_templates/neutron/neutron-agents/neutron-dhcp-agent/start.sh b/docker_templates/neutron/neutron-agents/neutron-dhcp-agent/start.sh deleted file mode 100755 index 7b64f87aa..000000000 --- a/docker_templates/neutron/neutron-agents/neutron-dhcp-agent/start.sh +++ /dev/null @@ -1,37 +0,0 @@ -#!/bin/bash -set -o errexit - -CMD="/usr/bin/neutron-dhcp-agent" -ARGS="--config-file /etc/neutron/neutron.conf --config-file /etc/neutron/dhcp_agent.ini" - -# Loading common functions. -source /opt/kolla/kolla-common.sh -source /opt/kolla/config-sudoers.sh - -# Override set_configs() here because it doesn't work for fat containers like -# this one. -set_configs() { - case $KOLLA_CONFIG_STRATEGY in - CONFIG_EXTERNAL_COPY_ALWAYS) - source /opt/kolla/neutron-dhcp-agent/config-external.sh - ;; - CONFIG_EXTERNAL_COPY_ONCE) - if [[ -f /configured-dhcp ]]; then - echo 'INFO - Neutron-dhcp has already been configured; Refusing to copy new configs' - return - fi - source /opt/kolla/neutron-dhcp-agent/config-external.sh - touch /configured-dhcp - ;; - - *) - echo '$KOLLA_CONFIG_STRATEGY is not set properly' - exit 1 - ;; - esac -} - -# Execute config strategy -set_configs - -exec $CMD $ARGS diff --git a/docker_templates/neutron/neutron-agents/neutron-l3-agent/config-external.sh b/docker_templates/neutron/neutron-agents/neutron-l3-agent/config-external.sh deleted file mode 100755 index e6eb049a4..000000000 --- a/docker_templates/neutron/neutron-agents/neutron-l3-agent/config-external.sh +++ /dev/null @@ -1,23 +0,0 @@ -#!/bin/bash -SOURCES="/opt/kolla/neutron-agents/neutron.conf /opt/kolla/neutron-agents/l3_agent.ini /opt/kolla/neutron-agents/fwaas_driver.ini" -TARGET="/etc/neutron/" -OWNER="neutron" - -for f in $SOURCES; do - if [[ -f "$f" ]]; then - fname=$(basename $f) - cp $f $TARGET - chown ${OWNER}: $TARGET/$fname - chmod 0644 $TARGET/$fname - fi -done - -SOURCE="/opt/kolla/neutron-agents/ml2_conf.ini" -TARGET="/etc/neutron/plugins/ml2/ml2_conf.ini" -OWNER="neutron" - -if [[ -f "$SOURCE" ]]; then - cp $SOURCE $TARGET - chown ${OWNER}: $TARGET - chmod 0644 $TARGET -fi diff --git a/docker_templates/neutron/neutron-agents/neutron-l3-agent/fwaas_driver.ini b/docker_templates/neutron/neutron-agents/neutron-l3-agent/fwaas_driver.ini deleted file mode 100644 index 41f761abf..000000000 --- a/docker_templates/neutron/neutron-agents/neutron-l3-agent/fwaas_driver.ini +++ /dev/null @@ -1,3 +0,0 @@ -[fwaas] -#driver = neutron.services.firewall.drivers.linux.iptables_fwaas.IptablesFwaasDriver -#enabled = True diff --git a/docker_templates/neutron/neutron-agents/neutron-l3-agent/start.sh b/docker_templates/neutron/neutron-agents/neutron-l3-agent/start.sh deleted file mode 100755 index e0a17e47a..000000000 --- a/docker_templates/neutron/neutron-agents/neutron-l3-agent/start.sh +++ /dev/null @@ -1,37 +0,0 @@ -#!/bin/bash -set -o errexit - -CMD="/usr/bin/neutron-l3-agent" -ARGS="--config-file /etc/neutron/neutron.conf --config-file /etc/neutron/l3_agent.ini --config-file /etc/neutron/fwaas_driver.ini --config-file /etc/neutron/plugins/ml2/ml2_conf.ini" - -# Loading common functions. -source /opt/kolla/kolla-common.sh -source /opt/kolla/config-sudoers.sh - -# Override set_configs() here because it doesn't work for fat containers like -# this one. -set_configs() { - case $KOLLA_CONFIG_STRATEGY in - CONFIG_EXTERNAL_COPY_ALWAYS) - source /opt/kolla/neutron-l3-agent/config-external.sh - ;; - CONFIG_EXTERNAL_COPY_ONCE) - if [[ -f /configured-l3 ]]; then - echo 'INFO - Neutron-l3 has already been configured; Refusing to copy new configs' - return - fi - source /opt/kolla/neutron-l3-agent/config-external.sh - touch /configured-l3 - ;; - - *) - echo '$KOLLA_CONFIG_STRATEGY is not set properly' - exit 1 - ;; - esac -} - -# Execute config strategy -set_configs - -exec $CMD $ARGS diff --git a/docker_templates/neutron/neutron-agents/neutron-metadata-agent/config-external.sh b/docker_templates/neutron/neutron-agents/neutron-metadata-agent/config-external.sh deleted file mode 100755 index 319ee3793..000000000 --- a/docker_templates/neutron/neutron-agents/neutron-metadata-agent/config-external.sh +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/bash -SOURCES="/opt/kolla/neutron-agents/neutron.conf /opt/kolla/neutron-agents/metadata_agent.ini" -TARGET="/etc/neutron/" -OWNER="neutron" - -for f in $SOURCES; do - if [[ -f "$f" ]]; then - fname=$(basename $f) - cp $f $TARGET - chown ${OWNER}: $TARGET/$fname - chmod 0644 $TARGET/$fname - fi -done diff --git a/docker_templates/neutron/neutron-agents/neutron-metadata-agent/start.sh b/docker_templates/neutron/neutron-agents/neutron-metadata-agent/start.sh deleted file mode 100755 index 09a7329c7..000000000 --- a/docker_templates/neutron/neutron-agents/neutron-metadata-agent/start.sh +++ /dev/null @@ -1,37 +0,0 @@ -#!/bin/bash -set -o errexit - -CMD="/usr/bin/neutron-metadata-agent" -ARGS="--config-file /etc/neutron/neutron.conf --config-file /etc/neutron/metadata_agent.ini" - -# Loading common functions. -source /opt/kolla/kolla-common.sh -source /opt/kolla/config-sudoers.sh - -# Override set_configs() here because it doesn't work for fat containers like -# this one. -set_configs() { - case $KOLLA_CONFIG_STRATEGY in - CONFIG_EXTERNAL_COPY_ALWAYS) - source /opt/kolla/neutron-metadata-agent/config-external.sh - ;; - CONFIG_EXTERNAL_COPY_ONCE) - if [[ -f /configured-md ]]; then - echo 'INFO - Neutron-metadata has already been configured; Refusing to copy new configs' - return - fi - source /opt/kolla/neutron-metadata-agent/config-external.sh - touch /configured-md - ;; - - *) - echo '$KOLLA_CONFIG_STRATEGY is not set properly' - exit 1 - ;; - esac -} - -# Execute config strategy -set_configs - -exec $CMD $ARGS diff --git a/docker_templates/neutron/neutron-agents/supervisord.conf b/docker_templates/neutron/neutron-agents/supervisord.conf deleted file mode 100644 index 5cab8f5dc..000000000 --- a/docker_templates/neutron/neutron-agents/supervisord.conf +++ /dev/null @@ -1,40 +0,0 @@ -[unix_http_server] -file = /var/run/supervisor.sock - -[inet_http_server] -port = 127.0.0.1:9001 - -[supervisord] -nodaemon=true -logfile = /var/log/supervisor/supervisord.log -logfile_maxbytes = 200KB -logfile_backups = 1 -pidfile = /var/run/supervisord.pid -childlogdir = /var/log/supervisor - -[rpcinterface:supervisor] -supervisor.rpcinterface_factory = supervisor.rpcinterface:make_main_rpcinterface - -[supervisorctl] -serverurl = unix:///var/run/supervisor.sock - -[program:neutron-dhcp-agent] -command=/opt/kolla/neutron-dhcp-agent/start.sh -priority=40 -startsec=10 -stderr_events_enabled=true -stdout_events_enabled=true - -[program:neutron-metadata-agent] -command=/opt/kolla/neutron-metadata-agent/start.sh -priority=40 -startsec=10 -stderr_events_enabled=true -stdout_events_enabled=true - -[program:neutron-l3-agent] -command=/opt/kolla/neutron-l3-agent/start.sh -priority=40 -startsec=10 -stderr_events_enabled=true -stdout_events_enabled=true diff --git a/docker_templates/neutron/neutron-base/Dockerfile.j2 b/docker_templates/neutron/neutron-base/Dockerfile.j2 deleted file mode 100644 index f1cd75a37..000000000 --- a/docker_templates/neutron/neutron-base/Dockerfile.j2 +++ /dev/null @@ -1,47 +0,0 @@ -FROM {{ namespace }}/{{ base_distro }}-{{ install_type }}-base:{{ tag }} -MAINTAINER Kolla Project (https://launchpad.net.kolla) - -{% if install_type == 'binary' %} - {% if base_distro in ['centos', 'fedora', 'oraclelinux'] %} - -RUN yum -y install openstack-neutron \ - openstack-neutron-ml2 \ - openvswitch \ - && yum clean all - -# TODO (sdake): remove once RDO adds to the openstack-neutron package -RUN pip install oslo.versionedobjects - - {% elif base_distro in ['ubuntu', 'debian'] %} - -RUN echo '{{ install_type}} not yet available for {{ base_distro }}' \ - && /bin/false - - {% endif %} -{% elif install_type == 'source' %} - {% if base_distro in ['ubuntu', 'debian'] %} - -RUN apt-get install -y --no-install-recommends \ - iptables \ - dnsmasq \ - uuid-runtime \ - ipset \ - openvswitch-switch \ - && apt-get clean - - {% endif %} - -ADD neutron.tar / -RUN ln -s /neutron-* neutron \ - && useradd --user-group neutron \ - && pip --no-cache-dir install /neutron \ - && mkdir -p /etc/neutron /usr/share/neutron /var/log/neutron /home/neutron \ - && cp -r /neutron/etc/* /etc/neutron/ \ - && cp -r /neutron/etc/neutron/* /etc/neutron/ \ - && cp /neutron/etc/api-paste.ini /usr/share/neutron \ - && mv /etc/neutron/neutron/ /etc/neutron/plugins/ \ - && chown -R neutron: /etc/neutron /usr/share/neutron /var/log/neutron /home/neutron - -{% endif %} - -COPY config-sudoers.sh /opt/kolla/ diff --git a/docker_templates/neutron/neutron-base/config-sudoers.sh b/docker_templates/neutron/neutron-base/config-sudoers.sh deleted file mode 100644 index 82cf0d624..000000000 --- a/docker_templates/neutron/neutron-base/config-sudoers.sh +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/bash - -# Neutron uses rootwrap which requires a tty for sudo. -# Since the container is running in daemon mode, a tty -# is not present and requiretty must be commented out. -if [ ! -f /sudo-modified ]; then - chmod 0640 /etc/sudoers - sed -i '/Defaults requiretty/s/^/#/' /etc/sudoers - chmod 0440 /etc/sudoers -fi - -touch /sudo-modified diff --git a/docker_templates/neutron/neutron-base/ip_wrapper.py b/docker_templates/neutron/neutron-base/ip_wrapper.py deleted file mode 100755 index 591fca6f4..000000000 --- a/docker_templates/neutron/neutron-base/ip_wrapper.py +++ /dev/null @@ -1,66 +0,0 @@ -#!/usr/bin/env python - -# Copyright 2015 Sam Yaple -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# This file exists because we want to create and delete any network -# namespaces from the host mount namespace. This allows the host to -# access all of the neutron network namespaces as well as all -# containers that bind mount /run/netns from the host. - -# This is required for "thin" neutron containers to function properly - -import nsenter -import subprocess -import sys - - -def host_mnt_exec(cmd): - try: - with nsenter.ExitStack() as stack: - stack.enter_context( - nsenter.Namespace( - '1', - 'mnt', - proc='/opt/kolla/host_proc/')) - process_ = subprocess.Popen(cmd) - - except Exception as e: - print( - "An error has occured with a component that Kolla manages." - " Please file a bug") - print("Error: ", e) - - return process_ - - -if len(sys.argv) > 2: - # We catch all commands that ip will accept that refer - # to creating or deleteing a Network namespace - if str(sys.argv[1]).startswith("net") and ( - str(sys.argv[2]).startswith("a") or - str(sys.argv[2]).startswith("d")): - # This cmd is executed in the host mount namespace - cmd = ["/usr/bin/env", "ip"] + sys.argv[1:] - sys.exit(host_mnt_exec(cmd).returncode) - else: - cmd = ["/opt/kolla/ip"] + sys.argv[1:] -else: - cmd = ["/opt/kolla/ip"] - - if len(sys.argv) == 2: - cmd = cmd + sys.argv[1:] - -process_ = subprocess.Popen(cmd) -sys.exit(process_.returncode) diff --git a/docker_templates/neutron/neutron-linuxbridge-agent/Dockerfile.j2 b/docker_templates/neutron/neutron-linuxbridge-agent/Dockerfile.j2 deleted file mode 100644 index 58d5ae6c3..000000000 --- a/docker_templates/neutron/neutron-linuxbridge-agent/Dockerfile.j2 +++ /dev/null @@ -1,28 +0,0 @@ -FROM {{ namespace }}/{{ base_distro }}-{{ install_type }}-neutron-base:{{ tag }} -MAINTAINER Kolla Project (https://launchpad.net.kolla) - -{% if install_type == 'binary' %} - {% if base_distro in ['centos', 'fedora', 'oraclelinux'] %} - -# Install required packages -RUN yum install -y \ - ebtables \ - openstack-neutron-linuxbridge \ - && yum clean all - - {% endif %} -{% elif install_type == 'source' %} - {% if base_distro in ['centos', 'fedora', 'oraclelinux'] %} - -# Install required packages -RUN yum install -y ebtables && yum clean all - - {% endif %} -{% endif %} - -COPY start.sh / -COPY config-external.sh /opt/kolla/ - -CMD ["/start.sh"] - -{{ include_footer }} diff --git a/docker_templates/neutron/neutron-linuxbridge-agent/config-external.sh b/docker_templates/neutron/neutron-linuxbridge-agent/config-external.sh deleted file mode 100755 index c44d71d84..000000000 --- a/docker_templates/neutron/neutron-linuxbridge-agent/config-external.sh +++ /dev/null @@ -1,20 +0,0 @@ -#!/bin/bash -SOURCE="/opt/kolla/neutron-linuxbridge-agent/neutron.conf" -TARGET="/etc/neutron/neutron.conf" -OWNER="neutron" - -if [[ -f "$SOURCE" ]]; then - cp $SOURCE $TARGET - chown ${OWNER}: $TARGET - chmod 0644 $TARGET -fi - -SOURCE="/opt/kolla/neutron-linuxbridge-agent/ml2_conf.ini" -TARGET="/etc/neutron/plugins/ml2/ml2_conf.ini" -OWNER="neutron" - -if [[ -f "$SOURCE" ]]; then - cp $SOURCE $TARGET - chown ${OWNER}: $TARGET - chmod 0644 $TARGET -fi diff --git a/docker_templates/neutron/neutron-linuxbridge-agent/start.sh b/docker_templates/neutron/neutron-linuxbridge-agent/start.sh deleted file mode 100755 index ab47f2dfb..000000000 --- a/docker_templates/neutron/neutron-linuxbridge-agent/start.sh +++ /dev/null @@ -1,14 +0,0 @@ -#!/bin/bash -set -o errexit - -CMD="/usr/bin/neutron-linuxbridge-agent" -ARGS="--config-file /etc/neutron/neutron.conf --config-file /etc/neutron/plugins/ml2/ml2_conf.ini" - -# Loading common functions. -source /opt/kolla/kolla-common.sh -source /opt/kolla/config-sudoers.sh - -# Execute config strategy -set_configs - -exec $CMD $ARGS diff --git a/docker_templates/neutron/neutron-openvswitch-agent/Dockerfile.j2 b/docker_templates/neutron/neutron-openvswitch-agent/Dockerfile.j2 deleted file mode 100644 index ad12e5511..000000000 --- a/docker_templates/neutron/neutron-openvswitch-agent/Dockerfile.j2 +++ /dev/null @@ -1,32 +0,0 @@ -FROM {{ namespace }}/{{ base_distro }}-{{ install_type }}-neutron-base:{{ tag }} -MAINTAINER Kolla Project (https://launchpad.net.kolla) - -{% if install_type == 'binary' %} - {% if base_distro in ['centos', 'fedora', 'oraclelinux'] %} - -# Install required packages -RUN yum install -y \ - openstack-neutron-openvswitch \ - openvswitch \ - && yum clean all - - {% endif %} -{% elif install_type == 'source' %} - {% if base_distro in ['centos', 'fedora', 'oraclelinux'] %} - -# Install required packages -RUN yum install -y \ - #TODO: will be addressed later - https://rdoproject.org/repos/openstack-kilo/rdo-release-kilo.rpm \ - openvswitch \ - && yum clean all - - {% endif %} -{% endif %} - -COPY start.sh / -COPY config-external.sh /opt/kolla/ - -CMD ["/start.sh"] - -{{ include_footer }} diff --git a/docker_templates/neutron/neutron-openvswitch-agent/config-external.sh b/docker_templates/neutron/neutron-openvswitch-agent/config-external.sh deleted file mode 100755 index 552d69861..000000000 --- a/docker_templates/neutron/neutron-openvswitch-agent/config-external.sh +++ /dev/null @@ -1,20 +0,0 @@ -#!/bin/bash -SOURCE="/opt/kolla/neutron-openvswitch-agent/neutron.conf" -TARGET="/etc/neutron/neutron.conf" -OWNER="neutron" - -if [[ -f "$SOURCE" ]]; then - cp $SOURCE $TARGET - chown ${OWNER}: $TARGET - chmod 0644 $TARGET -fi - -SOURCE="/opt/kolla/neutron-openvswitch-agent/ml2_conf.ini" -TARGET="/etc/neutron/plugins/ml2/ml2_conf.ini" -OWNER="neutron" - -if [[ -f "$SOURCE" ]]; then - cp $SOURCE $TARGET - chown ${OWNER}: $TARGET - chmod 0644 $TARGET -fi diff --git a/docker_templates/neutron/neutron-openvswitch-agent/start.sh b/docker_templates/neutron/neutron-openvswitch-agent/start.sh deleted file mode 100755 index 6d62ff65d..000000000 --- a/docker_templates/neutron/neutron-openvswitch-agent/start.sh +++ /dev/null @@ -1,14 +0,0 @@ -#!/bin/bash -set -o errexit - -CMD="/usr/bin/neutron-openvswitch-agent" -ARGS="--config-file /etc/neutron/neutron.conf --config-file /etc/neutron/plugins/ml2/ml2_conf.ini" - -# Loading common functions. -source /opt/kolla/kolla-common.sh -source /opt/kolla/config-sudoers.sh - -# Execute config strategy -set_configs - -exec $CMD $ARGS diff --git a/docker_templates/neutron/neutron-server/Dockerfile.j2 b/docker_templates/neutron/neutron-server/Dockerfile.j2 deleted file mode 100644 index 9cfe634c4..000000000 --- a/docker_templates/neutron/neutron-server/Dockerfile.j2 +++ /dev/null @@ -1,31 +0,0 @@ -FROM {{ namespace }}/{{ base_distro }}-{{ install_type }}-neutron-base:{{ tag }} -MAINTAINER Kolla Project (https://launchpad.net.kolla) - -{% if install_type == 'binary' %} - {% if base_distro in ['centos', 'fedora', 'oraclelinux'] %} - -# Install required packages -RUN yum install -y which \ - && yum clean all - -# See bug: https://bugs.launchpad.net/kolla/+bug/1483667 -# TODO(SamYaple): Check in on this and remove once unneccesary -RUN pip install oslo.messaging==2.2.0 - - {% endif %} -{% elif install_type == 'source' %} - {% if base_distro in ['centos', 'fedora', 'oraclelinux'] %} - -#Install required packages -RUN yum install -y which \ - && yum clean all - - {% endif %} -{% endif %} - -COPY start.sh / -COPY config-external.sh /opt/kolla/ - -CMD ["/start.sh"] - -{{ include_footer }} diff --git a/docker_templates/neutron/neutron-server/config-external.sh b/docker_templates/neutron/neutron-server/config-external.sh deleted file mode 100755 index 574923067..000000000 --- a/docker_templates/neutron/neutron-server/config-external.sh +++ /dev/null @@ -1,20 +0,0 @@ -#!/bin/bash -SOURCE="/opt/kolla/neutron-server/neutron.conf" -TARGET="/etc/neutron/neutron.conf" -OWNER="neutron" - -if [[ -f "$SOURCE" ]]; then - cp $SOURCE $TARGET - chown ${OWNER}: $TARGET - chmod 0644 $TARGET -fi - -SOURCE="/opt/kolla/neutron-server/ml2_conf.ini" -TARGET="/etc/neutron/plugins/ml2/ml2_conf.ini" -OWNER="neutron" - -if [[ -f "$SOURCE" ]]; then - cp $SOURCE $TARGET - chown ${OWNER}: $TARGET - chmod 0644 $TARGET -fi diff --git a/docker_templates/neutron/neutron-server/start.sh b/docker_templates/neutron/neutron-server/start.sh deleted file mode 100755 index 51c4c2a3d..000000000 --- a/docker_templates/neutron/neutron-server/start.sh +++ /dev/null @@ -1,20 +0,0 @@ -#!/bin/bash -set -o errexit - -CMD="/usr/bin/neutron-server" -ARGS="--config-file /etc/neutron/neutron.conf --config-file /etc/neutron/plugins/ml2/ml2_conf.ini" - -# Loading common functions. -source /opt/kolla/kolla-common.sh - -# Execute config strategy -set_configs - -# Bootstrap and exit if KOLLA_BOOTSTRAP variable is set. This catches all cases -# of the KOLLA_BOOTSTRAP variable being set, including empty. -if [[ "${!KOLLA_BOOTSTRAP[@]}" ]]; then - su -s /bin/bash -c "neutron-db-manage --config-file /etc/neutron/neutron.conf --config-file /etc/neutron/plugins/ml2/ml2_conf.ini upgrade head" neutron - exit 0 -fi - -exec $CMD $ARGS diff --git a/docker_templates/nova/nova-api/Dockerfile.j2 b/docker_templates/nova/nova-api/Dockerfile.j2 deleted file mode 100644 index b906d1937..000000000 --- a/docker_templates/nova/nova-api/Dockerfile.j2 +++ /dev/null @@ -1,18 +0,0 @@ -FROM {{ namespace }}/{{ base_distro }}-{{ install_type }}-nova-base:{{ tag }} -MAINTAINER Kolla Project (https://launchpad.net/kolla) - -{% if install_type == 'binary' %} - {% if base_distro in ['fedora', 'centos', 'oraclelinux'] %} - -RUN yum -y install openstack-nova-api \ - && yum clean all - - {% endif %} -{% endif %} - -COPY start.sh / -COPY config-external.sh /opt/kolla/ - -CMD ["/start.sh"] - -{{ include_footer }} diff --git a/docker_templates/nova/nova-api/config-external.sh b/docker_templates/nova/nova-api/config-external.sh deleted file mode 100755 index d0859893d..000000000 --- a/docker_templates/nova/nova-api/config-external.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/bash -SOURCE="/opt/kolla/nova-api/nova.conf" -TARGET="/etc/nova/nova.conf" -OWNER="nova" - -if [[ -f "$SOURCE" ]]; then - cp $SOURCE $TARGET - chown ${OWNER}: $TARGET - chmod 0644 $TARGET -fi diff --git a/docker_templates/nova/nova-api/start.sh b/docker_templates/nova/nova-api/start.sh deleted file mode 100755 index ad25ba65c..000000000 --- a/docker_templates/nova/nova-api/start.sh +++ /dev/null @@ -1,20 +0,0 @@ -#!/bin/bash -set -o errexit - -CMD="/usr/bin/nova-api" -ARGS="" - -# Loading common functions. -source /opt/kolla/kolla-common.sh - -# Execute config strategy -set_configs - -# Bootstrap and exit if KOLLA_BOOTSTRAP variable is set. This catches all cases -# of the KOLLA_BOOTSTRAP variable being set, including empty. -if [[ "${!KOLLA_BOOTSTRAP[@]}" ]]; then - su -s /bin/sh -c "nova-manage db sync" nova - exit 0 -fi - -exec $CMD $ARGS diff --git a/docker_templates/nova/nova-base/Dockerfile.j2 b/docker_templates/nova/nova-base/Dockerfile.j2 deleted file mode 100644 index b46a446d4..000000000 --- a/docker_templates/nova/nova-base/Dockerfile.j2 +++ /dev/null @@ -1,50 +0,0 @@ -FROM {{ namespace }}/{{ base_distro }}-{{ install_type }}-base:{{ tag }} -MAINTAINER Kolla Project (https://launchpad.net/kolla) - -{% if install_type == 'binary' %} - {% if base_distro in ['fedora', 'centos', 'oraclelinux'] %} - -RUN yum -y install \ - openstack-nova-common \ - python-keystoneclient \ - python-cinderclient \ - python-nova \ - bridge-utils \ - && yum clean all - - {% elif base_distro in ['ubuntu', 'debian'] %} - -RUN echo '{{ install_type }} not yet available for {{ base_distro }}' \ - && /bin/false - - {% endif %} -{% elif install_type == 'source' %} - {% if base_distro in ['fedora', 'centos', 'oraclelinux'] %} - -RUN yum -y install \ - bridge-utils \ - && yum clean all - - {% elif base_distro in ['ubuntu', 'debian'] %} - -RUN apt-get install -y --no-install-recommends \ - iptables \ - ebtables \ - dnsmasq \ - bridge-utils \ - python-libvirt \ - openssh-client \ - openvswitch-switch \ - && apt-get clean - - {% endif %} - -ADD nova.tar / -RUN ln -s /nova-* nova \ - && useradd --user-group nova \ - && pip --no-cache-dir install /nova \ - && mkdir -p /etc/nova /var/log/nova /home/nova \ - && cp -r /nova/etc/nova/* /etc/nova/ \ - && chown -R nova: /etc/nova /var/log/nova /home/nova - -{% endif %} diff --git a/docker_templates/nova/nova-compute/Dockerfile.j2 b/docker_templates/nova/nova-compute/Dockerfile.j2 deleted file mode 100644 index a8a719023..000000000 --- a/docker_templates/nova/nova-compute/Dockerfile.j2 +++ /dev/null @@ -1,34 +0,0 @@ -FROM {{ namespace }}/{{ base_distro }}-{{ install_type }}-nova-base:{{ tag }} -MAINTAINER Kolla Project (https://launchpad.net/kolla) - -{% if install_type == 'binary' %} - {% if base_distro in ['fedora', 'centos', 'oraclelinux'] %} - -RUN yum -y install openstack-nova-compute \ - openvswitch \ - sysfsutils \ - && yum clean all - - {% endif %} -{% elif install_type == 'source' %} - {% if base_distro in ['fedora', 'centos', 'oraclelinux'] %} - -RUN yum -y install \ - sysfsutils \ - libvirt-python \ - && yum clean all - - {% elif base_distro in ['ubuntu', 'debian'] %} - -RUN apt-get install -y --no-install-recommends qemu-utils \ - && apt-get clean - - {% endif %} -{% endif %} - -COPY start.sh / -COPY config-external.sh /opt/kolla/ - -CMD ["/start.sh"] - -{{ include_footer }} diff --git a/docker_templates/nova/nova-compute/config-external.sh b/docker_templates/nova/nova-compute/config-external.sh deleted file mode 100755 index e844bf50c..000000000 --- a/docker_templates/nova/nova-compute/config-external.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/bash -SOURCE="/opt/kolla/nova-compute/nova.conf" -TARGET="/etc/nova/nova.conf" -OWNER="nova" - -if [[ -f "$SOURCE" ]]; then - cp $SOURCE $TARGET - chown ${OWNER}: $TARGET - chmod 0644 $TARGET -fi diff --git a/docker_templates/nova/nova-compute/start.sh b/docker_templates/nova/nova-compute/start.sh deleted file mode 100755 index 48e77542b..000000000 --- a/docker_templates/nova/nova-compute/start.sh +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/bash -set -o errexit - -CMD="/usr/bin/nova-compute" -ARGS="" - -# Loading common functions. -source /opt/kolla/kolla-common.sh - -# Execute config strategy -set_configs - -exec $CMD $ARGS diff --git a/docker_templates/nova/nova-conductor/Dockerfile.j2 b/docker_templates/nova/nova-conductor/Dockerfile.j2 deleted file mode 100644 index 0f42df5c9..000000000 --- a/docker_templates/nova/nova-conductor/Dockerfile.j2 +++ /dev/null @@ -1,19 +0,0 @@ -FROM {{ namespace }}/{{ base_distro }}-{{ install_type }}-nova-base:{{ tag }} -MAINTAINER Kolla Project (https://launchpad.net/kolla) - -{% if install_type == 'binary' %} - {% if base_distro in ['fedora', 'centos', 'oraclelinux'] %} - -RUN yum -y install \ - openstack-nova-conductor \ - && yum clean all - - {% endif %} -{% endif %} - -COPY start.sh / -COPY config-external.sh /opt/kolla/ - -CMD ["/start.sh"] - -{{ include_footer }} diff --git a/docker_templates/nova/nova-conductor/config-external.sh b/docker_templates/nova/nova-conductor/config-external.sh deleted file mode 100755 index ea3b123ec..000000000 --- a/docker_templates/nova/nova-conductor/config-external.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/bash -SOURCE="/opt/kolla/nova-conductor/nova.conf" -TARGET="/etc/nova/nova.conf" -OWNER="nova" - -if [[ -f "$SOURCE" ]]; then - cp $SOURCE $TARGET - chown ${OWNER}: $TARGET - chmod 0644 $TARGET -fi diff --git a/docker_templates/nova/nova-conductor/start.sh b/docker_templates/nova/nova-conductor/start.sh deleted file mode 100755 index 1fe7d0586..000000000 --- a/docker_templates/nova/nova-conductor/start.sh +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/bash -set -o errexit - -CMD="/usr/bin/nova-conductor" -ARGS="" - -# Loading common functions. -source /opt/kolla/kolla-common.sh - -# Execute config strategy -set_configs - -exec $CMD $ARGS diff --git a/docker_templates/nova/nova-consoleauth/Dockerfile.j2 b/docker_templates/nova/nova-consoleauth/Dockerfile.j2 deleted file mode 100644 index 1c8d9ea12..000000000 --- a/docker_templates/nova/nova-consoleauth/Dockerfile.j2 +++ /dev/null @@ -1,18 +0,0 @@ -FROM {{ namespace }}/{{ base_distro }}-{{ install_type }}-nova-base:{{ tag }} -MAINTAINER Kolla Project (https://launchpad.net/kolla) - -{% if install_type == 'binary' %} - {% if base_distro in ['fedora', 'centos', 'oraclelinux'] %} - -RUN yum -y install openstack-nova-console \ - && yum clean all - - {% endif %} -{% endif %} - -COPY start.sh / -COPY config-external.sh /opt/kolla/ - -CMD ["/start.sh"] - -{{ include_footer }} diff --git a/docker_templates/nova/nova-consoleauth/config-external.sh b/docker_templates/nova/nova-consoleauth/config-external.sh deleted file mode 100755 index 1da10d83f..000000000 --- a/docker_templates/nova/nova-consoleauth/config-external.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/bash -SOURCE="/opt/kolla/nova-consoleauth/nova.conf" -TARGET="/etc/nova/nova.conf" -OWNER="nova" - -if [[ -f "$SOURCE" ]]; then - cp $SOURCE $TARGET - chown ${OWNER}: $TARGET - chmod 0644 $TARGET -fi diff --git a/docker_templates/nova/nova-consoleauth/start.sh b/docker_templates/nova/nova-consoleauth/start.sh deleted file mode 100755 index 1abccde19..000000000 --- a/docker_templates/nova/nova-consoleauth/start.sh +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/bash -set -o errexit - -CMD="/usr/bin/nova-consoleauth" -ARGS="" - -# Loading common functions. -source /opt/kolla/kolla-common.sh - -# Execute config strategy -set_configs - -exec $CMD $ARGS diff --git a/docker_templates/nova/nova-libvirt/Dockerfile.j2 b/docker_templates/nova/nova-libvirt/Dockerfile.j2 deleted file mode 100644 index 5ff525426..000000000 --- a/docker_templates/nova/nova-libvirt/Dockerfile.j2 +++ /dev/null @@ -1,32 +0,0 @@ -FROM {{ namespace }}/{{ base_distro }}-{{ install_type }}-nova-base:{{ tag }} -MAINTAINER Kolla Project (https://launchpad.net/kolla) - -{% if base_distro in ['fedora', 'centos', 'oraclelinux'] %} - -RUN yum -y install \ - libvirt-daemon \ - libguestfs \ - qemu-system-x86 \ - libvirt-daemon-driver-nwfilter \ - libvirt-daemon-config-nwfilter \ - libvirt-daemon-driver-lxc \ - && yum clean all - -{% elif base_distro in ['ubuntu', 'debian'] %} - -RUN apt-get install -y --no-install-recommends \ - libvirt-bin \ - dmidecode \ - pm-utils \ - qemu \ - ebtables \ - && apt-get clean - -{% endif %} - -COPY start.sh / -COPY config-external.sh /opt/kolla/ - -CMD ["/start.sh"] - -{{ include_footer }} diff --git a/docker_templates/nova/nova-libvirt/config-external.sh b/docker_templates/nova/nova-libvirt/config-external.sh deleted file mode 100755 index acc1c5473..000000000 --- a/docker_templates/nova/nova-libvirt/config-external.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/bash -SOURCE="/opt/kolla/libvirt/libvirtd.conf" -TARGET="/etc/libvirt/libvirtd.conf" -OWNER="libvirt" - -if [[ -f "$SOURCE" ]]; then - cp $SOURCE $TARGET - chown ${OWNER}: $TARGET - chmod 0644 $TARGET -fi diff --git a/docker_templates/nova/nova-libvirt/start.sh b/docker_templates/nova/nova-libvirt/start.sh deleted file mode 100755 index ae0de867b..000000000 --- a/docker_templates/nova/nova-libvirt/start.sh +++ /dev/null @@ -1,20 +0,0 @@ -#!/bin/bash -set -o errexit - -CMD="/usr/sbin/libvirtd" -ARGS="" - -# Loading common functions. -source /opt/kolla/kolla-common.sh - -# Execute config strategy -set_configs - -# TODO(SamYaple): Tweak libvirt.conf rather than change permissions. -# Fix permissions for libvirt -if [[ -c /dev/kvm ]]; then - chmod 660 /dev/kvm - chown root:kvm /dev/kvm -fi - -exec $CMD $ARGS diff --git a/docker_templates/nova/nova-network/Dockerfile.j2 b/docker_templates/nova/nova-network/Dockerfile.j2 deleted file mode 100644 index 60ea394aa..000000000 --- a/docker_templates/nova/nova-network/Dockerfile.j2 +++ /dev/null @@ -1,28 +0,0 @@ -FROM {{ namespace }}/{{ base_distro }}-{{ install_type }}-nova-base:{{ tag }} -MAINTAINER Kolla Project (https://launchpad.net/kolla) - -{% if install_type == 'binary' %} - {% if base_distro in ['fedora', 'centos', 'oraclelinux'] %} - -RUN yum -y install \ - openstack-nova-network \ - bridge-utils \ - initscripts \ - && yum clean all - - {% endif %} -{% elif install_type == 'source' %} - {% if base_distro in ['fedora', 'centos', 'oraclelinux'] %} - -RUN yum -y install initscripts \ - && yum clean all - - {% endif %} -{% endif %} - -COPY start.sh / -COPY config-external.sh /opt/kolla/ - -CMD ["/start.sh"] - -{{ include_footer }} diff --git a/docker_templates/nova/nova-network/config-external.sh b/docker_templates/nova/nova-network/config-external.sh deleted file mode 100755 index 7c1d6bb37..000000000 --- a/docker_templates/nova/nova-network/config-external.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/bash -SOURCE="/opt/kolla/nova-network/nova.conf" -TARGET="/etc/nova/nova.conf" -OWNER="nova" - -if [[ -f "$SOURCE" ]]; then - cp $SOURCE $TARGET - chown ${OWNER}: $TARGET - chmod 0644 $TARGET -fi diff --git a/docker_templates/nova/nova-network/start.sh b/docker_templates/nova/nova-network/start.sh deleted file mode 100755 index 88f941b33..000000000 --- a/docker_templates/nova/nova-network/start.sh +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/bash -set -o errexit - -CMD="/usr/bin/nova-network" -ARGS="" - -# Loading common functions. -source /opt/kolla/kolla-common.sh - -# Execute config strategy -set_configs - -exec $CMD $ARGS diff --git a/docker_templates/nova/nova-novncproxy/Dockerfile.j2 b/docker_templates/nova/nova-novncproxy/Dockerfile.j2 deleted file mode 100644 index b798e00a6..000000000 --- a/docker_templates/nova/nova-novncproxy/Dockerfile.j2 +++ /dev/null @@ -1,34 +0,0 @@ -FROM {{ namespace }}/{{ base_distro }}-{{ install_type }}-nova-base:{{ tag }} -MAINTAINER Kolla Project (https://launchpad.net/kolla) - -{% if install_type == 'binary' %} - {% if base_distro in ['fedora', 'centos', 'oraclelinux'] %} - -RUN yum -y install \ - novnc \ - openstack-nova-novncproxy \ - && yum clean all - - {% endif %} -{% elif install_type == 'source' %} - {% if base_distro in ['fedora', 'centos', 'oraclelinux'] %} - -RUN yum -y install \ - https://rdoproject.org/repos/openstack-kilo/rdo-release-kilo.rpm \ - novnc \ - && yum clean all - - {% elif base_distro in ['ubuntu', 'debian'] %} - -ADD novnc.tar / -RUN ln -s /kanaka-noVNC-* /usr/share/novnc - - {% endif %} -{% endif %} - -COPY start.sh / -COPY config-external.sh /opt/kolla/ - -CMD ["/start.sh"] - -{{ include_footer }} diff --git a/docker_templates/nova/nova-novncproxy/config-external.sh b/docker_templates/nova/nova-novncproxy/config-external.sh deleted file mode 100755 index fdc33a5bd..000000000 --- a/docker_templates/nova/nova-novncproxy/config-external.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/bash -SOURCE="/opt/kolla/nova-novncproxy/nova.conf" -TARGET="/etc/nova/nova.conf" -OWNER="nova" - -if [[ -f "$SOURCE" ]]; then - cp $SOURCE $TARGET - chown ${OWNER}: $TARGET - chmod 0644 $TARGET -fi diff --git a/docker_templates/nova/nova-novncproxy/start.sh b/docker_templates/nova/nova-novncproxy/start.sh deleted file mode 100755 index 6e59d1253..000000000 --- a/docker_templates/nova/nova-novncproxy/start.sh +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/bash -set -o errexit - -CMD="/usr/bin/nova-novncproxy" -ARGS="" - -# Loading common functions. -source /opt/kolla/kolla-common.sh - -# Execute config strategy -set_configs - -exec $CMD $ARGS diff --git a/docker_templates/nova/nova-scheduler/Dockerfile.j2 b/docker_templates/nova/nova-scheduler/Dockerfile.j2 deleted file mode 100644 index 5dd0fd507..000000000 --- a/docker_templates/nova/nova-scheduler/Dockerfile.j2 +++ /dev/null @@ -1,18 +0,0 @@ -FROM {{ namespace }}/{{ base_distro }}-{{ install_type }}-nova-base:{{ tag }} -MAINTAINER Kolla Project (https://launchpad.net/kolla) - -{% if install_type == 'binary' %} - {% if base_distro in ['fedora', 'centos', 'oraclelinux'] %} - -RUN yum -y install openstack-nova-scheduler \ - && yum clean all - - {% endif %} -{% endif %} - -COPY start.sh / -COPY config-external.sh /opt/kolla/ - -CMD ["/start.sh"] - -{{ include_footer }} diff --git a/docker_templates/nova/nova-scheduler/config-external.sh b/docker_templates/nova/nova-scheduler/config-external.sh deleted file mode 100755 index 3df0f9b7b..000000000 --- a/docker_templates/nova/nova-scheduler/config-external.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/bash -SOURCE="/opt/kolla/nova-scheduler/nova.conf" -TARGET="/etc/nova/nova.conf" -OWNER="nova" - -if [[ -f "$SOURCE" ]]; then - cp $SOURCE $TARGET - chown ${OWNER}: $TARGET - chmod 0644 $TARGET -fi diff --git a/docker_templates/nova/nova-scheduler/start.sh b/docker_templates/nova/nova-scheduler/start.sh deleted file mode 100755 index d9b3e14eb..000000000 --- a/docker_templates/nova/nova-scheduler/start.sh +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/bash -set -o errexit - -CMD="/usr/bin/nova-scheduler" -ARGS="" - -# Loading common functions. -source /opt/kolla/kolla-common.sh - -# Execute config strategy -set_configs - -exec $CMD $ARGS diff --git a/docker_templates/openvswitch/ovs-base/Dockerfile.j2 b/docker_templates/openvswitch/ovs-base/Dockerfile.j2 deleted file mode 100644 index fd8eac1af..000000000 --- a/docker_templates/openvswitch/ovs-base/Dockerfile.j2 +++ /dev/null @@ -1,22 +0,0 @@ -FROM {{ namespace }}/{{ base_distro }}-{{ install_type }}-base:{{ tag }} -MAINTAINER Kolla Project (https://launchpad.net/kolla) - -{% if base_distro in ['fedora', 'centos', 'oraclelinux'] %} - {% if install_type == 'source' %} - - # TODO(sdake): groan openvswitch is only in the RDO repos -RUN yum install -y https://rdoproject.org/repos/openstack-kilo/rdo-release-kilo.rpm \ - && yum clean all - - {% endif %} - -RUN yum install -y \ - openvswitch \ - && yum clean all - -{% elif base_distro in ['ubuntu', 'debian'] %} - -RUN apt-get install -y --no-install-recommends openvswitch-switch \ - && apt-get clean - -{% endif %} diff --git a/docker_templates/openvswitch/ovs-db-server/Dockerfile.j2 b/docker_templates/openvswitch/ovs-db-server/Dockerfile.j2 deleted file mode 100644 index 05c6a928b..000000000 --- a/docker_templates/openvswitch/ovs-db-server/Dockerfile.j2 +++ /dev/null @@ -1,9 +0,0 @@ -FROM {{ namespace }}/{{ base_distro }}-{{ install_type }}-ovs-base:{{ tag }} -MAINTAINER Kolla Project (https://launchpad.net/kolla) - -COPY start.sh / -COPY config-external.sh /opt/kolla/ - -CMD ["/start.sh"] - -{{ include_footer }} diff --git a/docker_templates/openvswitch/ovs-db-server/config-external.sh b/docker_templates/openvswitch/ovs-db-server/config-external.sh deleted file mode 100644 index 9ada4efcb..000000000 --- a/docker_templates/openvswitch/ovs-db-server/config-external.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/bash - -#This file should be a noop. It just needs to exist, but it don't perform any function diff --git a/docker_templates/openvswitch/ovs-db-server/start.sh b/docker_templates/openvswitch/ovs-db-server/start.sh deleted file mode 100755 index 89b2e3e92..000000000 --- a/docker_templates/openvswitch/ovs-db-server/start.sh +++ /dev/null @@ -1,25 +0,0 @@ -#!/bin/bash - -set -o errexit - -LOG_FILE="/var/log/openvswitch/ovsdb-server.log" -DB_FILE="/etc/openvswitch/conf.db" -UNIXSOCK_DIR="/var/run/openvswitch" -UNIXSOCK="${UNIXSOCK_DIR}/db.sock" - -CMD="/usr/sbin/ovsdb-server" -ARGS="$DB_FILE -vconsole:emer -vsyslog:err -vfile:info --remote=punix:${UNIXSOCK} --log-file=${LOG_FILE}" - -# Loading common functions. -source /opt/kolla/kolla-common.sh - -# Execute config strategy -set_configs - -mkdir -p "${UNIXSOCK_DIR}" - -if [[ ! -e "${DB_FILE}" ]]; then - ovsdb-tool create "${DB_FILE}" -fi - -exec $CMD $ARGS diff --git a/docker_templates/openvswitch/ovs-vswitchd/Dockerfile.j2 b/docker_templates/openvswitch/ovs-vswitchd/Dockerfile.j2 deleted file mode 100644 index 59079d335..000000000 --- a/docker_templates/openvswitch/ovs-vswitchd/Dockerfile.j2 +++ /dev/null @@ -1,9 +0,0 @@ -FROM {{ namespace }}/{{ base_distro }}-{{ install_type }}-ovs-base:{{ tag }} -MAINTAINER Kolla Project (https://launchpad.net/kolla) - -COPY start.sh / -COPY ovs_ensure_configured.sh config-external.sh /opt/kolla/ - -CMD ["/start.sh"] - -{{ include_footer }} diff --git a/docker_templates/openvswitch/ovs-vswitchd/config-external.sh b/docker_templates/openvswitch/ovs-vswitchd/config-external.sh deleted file mode 100644 index 9ada4efcb..000000000 --- a/docker_templates/openvswitch/ovs-vswitchd/config-external.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/bash - -#This file should be a noop. It just needs to exist, but it don't perform any function diff --git a/docker_templates/openvswitch/ovs-vswitchd/ovs_ensure_configured.sh b/docker_templates/openvswitch/ovs-vswitchd/ovs_ensure_configured.sh deleted file mode 100755 index c39d64ff7..000000000 --- a/docker_templates/openvswitch/ovs-vswitchd/ovs_ensure_configured.sh +++ /dev/null @@ -1,17 +0,0 @@ -#!/bin/bash - -bridge=$1 -port=$2 - -ovs-vsctl br-exists $bridge; rc=$? -if [[ $rc == 2 ]]; then - changed=changed - ovs-vsctl add-br $bridge -fi - -if [[ ! $(ovs-vsctl list-ports $bridge) =~ $(echo "\<$port\>") ]]; then - changed=changed - ovs-vsctl add-port $bridge $port -fi - -echo $changed diff --git a/docker_templates/openvswitch/ovs-vswitchd/start.sh b/docker_templates/openvswitch/ovs-vswitchd/start.sh deleted file mode 100755 index 3ec2c26b2..000000000 --- a/docker_templates/openvswitch/ovs-vswitchd/start.sh +++ /dev/null @@ -1,19 +0,0 @@ -#!/bin/bash -LOG_FILE="/var/log/openvswitch/ovs-vswitchd.log" -DB_FILE="/etc/openvswitch/conf.db" -UNIXSOCK_DIR="/var/run/openvswitch" -UNIXSOCK="${UNIXSOCK_DIR}/db.sock" - -CMD="/usr/sbin/ovs-vswitchd" -ARGS="unix:${UNIXSOCK} -vconsole:emer -vsyslog:err -vfile:info --mlockall --log-file=${LOG_FILE}" - -# Loading common functions. -source /opt/kolla/kolla-common.sh - -# Execute config strategy -set_configs - -modprobe openvswitch -mkdir -p "${UNIXSOCK_DIR}" - -exec $CMD $ARGS diff --git a/docker_templates/rabbitmq/Dockerfile.j2 b/docker_templates/rabbitmq/Dockerfile.j2 deleted file mode 100644 index 1baf2ce80..000000000 --- a/docker_templates/rabbitmq/Dockerfile.j2 +++ /dev/null @@ -1,27 +0,0 @@ -FROM {{ namespace }}/{{ base_distro }}-{{ install_type }}-base:{{ tag }} -MAINTAINER Kolla Project (https://launchpad.net/kolla) - -{% if base_distro in ['fedora', 'centos', 'oraclelinux'] %} - -RUN yum -y install \ - hostname \ - rabbitmq-server \ - && yum clean all \ - && rm -rf /var/lib/rabbitmq/* - -{% elif base_distro in ['ubuntu', 'debian'] %} - -RUN apt-get install -y --no-install-recommends rabbitmq-server \ - && apt-get clean \ - && rm -rf /var/lib/rabbitmq/* - -{% endif %} - -RUN /usr/lib/rabbitmq/bin/rabbitmq-plugins enable rabbitmq_management - -COPY start.sh / -COPY config-rabbit.sh config-external.sh /opt/kolla/ - -CMD ["/start.sh"] - -{{ include_footer }} diff --git a/docker_templates/rabbitmq/config-external.sh b/docker_templates/rabbitmq/config-external.sh deleted file mode 100644 index 33810d621..000000000 --- a/docker_templates/rabbitmq/config-external.sh +++ /dev/null @@ -1,19 +0,0 @@ -#!/bin/bash -SOURCE_CONFIG="/opt/kolla/rabbitmq/rabbitmq.config" -TARGET_CONFIG="/etc/rabbitmq/rabbitmq.config" -SOURCE_ENV="/opt/kolla/rabbitmq/rabbitmq-env.conf" -TARGET_ENV="/etc/rabbitmq/rabbitmq-env.conf" -OWNER="rabbitmq" - -# Cluster configuration -if [[ -f "$SOURCE_CONFIG" ]]; then - cp -af $SOURCE_CONFIG $TARGET_CONFIG - chown ${OWNER}: $TARGET_CONFIG - chmod 0600 $TARGET_CONFIG -fi - -if [[ -f "$SOURCE_ENV" ]]; then - cp -af $SOURCE_ENV $TARGET_ENV - chown ${OWNER}: $TARGET_ENV - chmod 0600 $TARGET_ENV -fi diff --git a/docker_templates/rabbitmq/config-rabbit.sh b/docker_templates/rabbitmq/config-rabbit.sh deleted file mode 100644 index c87a2ab48..000000000 --- a/docker_templates/rabbitmq/config-rabbit.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/bash - -function set_rabbitmq_cookie { - echo "${RABBITMQ_CLUSTER_COOKIE}" > /var/lib/rabbitmq/.erlang.cookie - chown -R rabbitmq: /var/lib/rabbitmq - chmod 400 /var/lib/rabbitmq/.erlang.cookie -} diff --git a/docker_templates/rabbitmq/start.sh b/docker_templates/rabbitmq/start.sh deleted file mode 100755 index 749bee963..000000000 --- a/docker_templates/rabbitmq/start.sh +++ /dev/null @@ -1,23 +0,0 @@ -#!/bin/bash - -set -o errexit - -CMD="/usr/sbin/rabbitmq-server" -ARGS="" - -# loading common functions -source /opt/kolla/kolla-common.sh - -# Execute config strategy -set_configs - -# loading functions -source /opt/kolla/config-rabbit.sh - -# This catches all cases of the BOOTSTRAP variable being set, including empty -if [[ "${!KOLLA_BOOTSTRAP[@]}" ]]; then - set_rabbitmq_cookie - exit 0 -fi - -$CMD $ARGS diff --git a/docker_templates/swift/swift-account-server/Dockerfile.j2 b/docker_templates/swift/swift-account-server/Dockerfile.j2 deleted file mode 100644 index 7320de9f4..000000000 --- a/docker_templates/swift/swift-account-server/Dockerfile.j2 +++ /dev/null @@ -1,19 +0,0 @@ -FROM {{ namespace }}/{{ base_distro }}-{{ install_type }}-swift-base:{{ tag }} -MAINTAINER Kolla Project (https://launchpad.net.kolla) - -{% if install_type == 'binary' %} - {% if base_distro in ['centos', 'fedora', 'oraclelinux'] %} - -RUN yum -y install \ - openstack-swift-account \ - && yum clean all - - {% endif %} -{% endif %} - -COPY start.sh / -COPY config-external.sh /opt/kolla/ - -CMD ["/start.sh"] - -{{ include_footer }} diff --git a/docker_templates/swift/swift-account-server/config-external.sh b/docker_templates/swift/swift-account-server/config-external.sh deleted file mode 100644 index 61adefcd0..000000000 --- a/docker_templates/swift/swift-account-server/config-external.sh +++ /dev/null @@ -1,19 +0,0 @@ -#!/bin/bash - -if [[ -f /opt/kolla/swift/swift.conf ]]; then - cp /opt/kolla/swift/swift.conf /etc/swift/ - chown swift: /etc/swift/swift.conf - chmod 0640 /etc/swift/swift.conf -fi - -if [[ -f "/opt/kolla/swift/account.ring.gz" ]]; then - cp /opt/kolla/swift/account.ring.gz /etc/swift/account.ring.gz - chown swift: /etc/swift/account.ring.gz - chmod 0640 /etc/swift/account.ring.gz -fi - -if [[ -f /opt/kolla/swift-account-server/account-server.conf ]]; then - cp /opt/kolla/swift-account-server/account-server.conf /etc/swift/ - chown swift: /etc/swift/account-server.conf - chmod 0640 /etc/swift/account-server.conf -fi diff --git a/docker_templates/swift/swift-account-server/start.sh b/docker_templates/swift/swift-account-server/start.sh deleted file mode 100755 index 402ee6f44..000000000 --- a/docker_templates/swift/swift-account-server/start.sh +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/bash - -set -o errexit - -CMD="/usr/bin/swift-account-server" -ARGS="/etc/swift/account-server.conf --verbose" - -# Loading common functions. -source /opt/kolla/kolla-common.sh - -source /opt/kolla/config-swift.sh - -# Execute config strategy -set_configs - -exec $CMD $ARGS diff --git a/docker_templates/swift/swift-base/Dockerfile.j2 b/docker_templates/swift/swift-base/Dockerfile.j2 deleted file mode 100644 index 7102916f1..000000000 --- a/docker_templates/swift/swift-base/Dockerfile.j2 +++ /dev/null @@ -1,29 +0,0 @@ -FROM {{ namespace }}/{{ base_distro }}-{{ install_type }}-base:{{ tag }} -MAINTAINER Kolla Project (https://launchpad.net.kolla) - -{% if install_type == 'binary' %} - {% if base_distro in ['centos', 'fedora', 'oraclelinux'] %} - -RUN yum -y install openstack-swift && yum clean all - - {% elif base_distro in ['ubuntu', 'debian'] %} - -RUN echo '{{ install_type}} not yet available for {{ base_distro }}' \ - && /bin/false - - {% endif %} - -{% elif install_type == 'source' %} - -ADD swift.tar / -RUN ln -s /swift-* swift \ - && useradd --user-group swift \ - && pip --no-cache-dir install /swift \ - && mkdir -p /etc/swift /var/log/swift /home/swift \ - && cp -r /swift/etc/* /etc/swift/ \ - && chown -R swift: /etc/swift /var/log/swift /home/swift - -{% endif %} - -COPY config-swift.sh build-swift-ring.py /opt/kolla/ -RUN mkdir /opt/swift diff --git a/docker_templates/swift/swift-base/build-swift-ring.py b/docker_templates/swift/swift-base/build-swift-ring.py deleted file mode 100644 index d7386392d..000000000 --- a/docker_templates/swift/swift-base/build-swift-ring.py +++ /dev/null @@ -1,93 +0,0 @@ -#!/usr/bin/env python - -# Copyright 2015 Paul Bourke -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -""" -This script is a simple wrapper used to create and rebalance Swift ring files. -""" - -import argparse -import subprocess -import sys - - -def setup_args(): - parser = argparse.ArgumentParser() - parser.add_argument("-f", "--ring-file", - required=True, - help="Path to ring file") - parser.add_argument("-p", "--part-power", - required=True, - help="Part power") - parser.add_argument("-r", "--num-replicas", - required=True, - help="Number of replicas") - parser.add_argument("-m", "--min-part-hours", - required=True, - help="Min part hours") - parser.add_argument("-H", "--hosts", - required=True, - help="Hosts in the ring, comma delimited") - parser.add_argument("-w", "--weights", - required=True, - help="Weight of each host, comma delimited") - parser.add_argument("-d", "--devices", - required=True, - help="Device on each host, comma delimited") - parser.add_argument("-z", "--zones", - required=True, - help="Zone of each host, comma delimited") - return parser.parse_args() - - -def run_cmd(cmd): - print(' '.join(cmd)) - subprocess.call(cmd) - - -def run(args): - hosts = args.hosts.split(',') - weights = args.weights.split(',') - zones = args.zones.split(',') - devices = args.devices.split(',') - if not (len(hosts) == len(weights) == len(zones) == len(devices)): - print('Error: an equal amount of hosts, devices, weights, ' - 'and zones are required') - sys.exit(1) - - run_cmd(['/usr/bin/swift-ring-builder', - args.ring_file, - 'create', - args.part_power, - args.num_replicas, - args.min_part_hours]) - - for i in xrange(len(hosts)): - run_cmd(['/usr/bin/swift-ring-builder', - args.ring_file, - 'add', - 'z{}-{}/{}'.format(zones[i], hosts[i], devices[i]), - weights[i]]) - - run_cmd(['/usr/bin/swift-ring-builder', args.ring_file, 'rebalance']) - - -def main(): - args = setup_args() - run(args) - - -if __name__ == "__main__": - main() diff --git a/docker_templates/swift/swift-base/config-swift.sh b/docker_templates/swift/swift-base/config-swift.sh deleted file mode 100755 index b101b4e69..000000000 --- a/docker_templates/swift/swift-base/config-swift.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/bash - -chown -R swift: /srv/node diff --git a/docker_templates/swift/swift-container-server/Dockerfile.j2 b/docker_templates/swift/swift-container-server/Dockerfile.j2 deleted file mode 100644 index 1a08c0f5d..000000000 --- a/docker_templates/swift/swift-container-server/Dockerfile.j2 +++ /dev/null @@ -1,19 +0,0 @@ -FROM {{ namespace }}/{{ base_distro }}-{{ install_type }}-swift-base:{{ tag }} -MAINTAINER Kolla Project (https://launchpad.net.kolla) - -{% if install_type == 'binary' %} - {% if base_distro in ['centos', 'fedora', 'oraclelinux'] %} - -RUN yum -y install \ - openstack-swift-container \ - && yum clean all - - {% endif %} -{% endif %} - -COPY start.sh / -COPY config-external.sh /opt/kolla/ - -CMD ["/start.sh"] - -{{ include_footer }} diff --git a/docker_templates/swift/swift-container-server/config-external.sh b/docker_templates/swift/swift-container-server/config-external.sh deleted file mode 100644 index d81ba6cc4..000000000 --- a/docker_templates/swift/swift-container-server/config-external.sh +++ /dev/null @@ -1,21 +0,0 @@ -#!/bin/bash - -OWNER="swift" - -if [[ -f "/opt/kolla/swift/swift.conf" ]]; then - cp /opt/kolla/swift/swift.conf /etc/swift/swift.conf - chown ${OWNER}: /etc/swift/swift.conf - chmod 0640 /etc/swift/swift.conf -fi - -if [[ -f "/opt/kolla/swift/container.ring.gz" ]]; then - cp /opt/kolla/swift/container.ring.gz /etc/swift/container.ring.gz - chown ${OWNER}: /etc/swift/container.ring.gz - chmod 0640 /etc/swift/container.ring.gz -fi - -if [[ -f "/opt/kolla/swift-container-server/container-server.conf" ]]; then - cp /opt/kolla/swift-container-server/container-server.conf /etc/swift/container-server.conf - chown ${OWNER}: /etc/swift/container-server.conf - chmod 0640 /etc/swift/container-server.conf -fi diff --git a/docker_templates/swift/swift-container-server/start.sh b/docker_templates/swift/swift-container-server/start.sh deleted file mode 100755 index 78070ab29..000000000 --- a/docker_templates/swift/swift-container-server/start.sh +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/bash - -set -o errexit - -CMD="/usr/bin/swift-container-server" -ARGS="/etc/swift/container-server.conf --verbose" - -# Loading common functions. -source /opt/kolla/kolla-common.sh - -source /opt/kolla/config-swift.sh - -# Execute config strategy -set_configs - -exec $CMD $ARGS diff --git a/docker_templates/swift/swift-object-auditor/Dockerfile.j2 b/docker_templates/swift/swift-object-auditor/Dockerfile.j2 deleted file mode 100644 index ab8a7adee..000000000 --- a/docker_templates/swift/swift-object-auditor/Dockerfile.j2 +++ /dev/null @@ -1,9 +0,0 @@ -FROM {{ namespace }}/{{ base_distro }}-{{ install_type }}-swift-object-base:{{ tag }} -MAINTAINER Kolla Project (https://launchpad.net.kolla) - -COPY start.sh / -COPY config-external.sh /opt/kolla/ - -CMD ["/start.sh"] - -{{ include_footer }} diff --git a/docker_templates/swift/swift-object-auditor/config-external.sh b/docker_templates/swift/swift-object-auditor/config-external.sh deleted file mode 100644 index 0fa02e985..000000000 --- a/docker_templates/swift/swift-object-auditor/config-external.sh +++ /dev/null @@ -1,18 +0,0 @@ -#!/bin/bash -SOURCE="/opt/kolla/swift/swift.conf" -TARGET="/etc/swift/swift.conf" -SOURCE_OBJECT_SERVER="/opt/kolla/swift/object-server.conf" -TARGET_OBJECT_SERVER="/etc/swift/object-server.conf" -OWNER="swift" - -if [[ -f "$SOURCE" ]]; then - cp $SOURCE $TARGET - chown ${OWNER}: $TARGET - chmod 0640 $TARGET -fi - -if [[ -f "$SOURCE_OBJECT_SERVER" ]]; then - cp $SOURCE_OBJECT_SERVER $TARGET_OBJECT_SERVER - chown ${OWNER}: $TARGET_OBJECT_SERVER - chmod 0640 $TARGET_OBJECT_SERVER -fi diff --git a/docker_templates/swift/swift-object-auditor/start.sh b/docker_templates/swift/swift-object-auditor/start.sh deleted file mode 100755 index 6319eed6b..000000000 --- a/docker_templates/swift/swift-object-auditor/start.sh +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/bash - -set -o errexit - -CMD="/usr/bin/swift-object-auditor" -ARGS="/etc/swift/object-server.conf --verbose" - -# Loading common functions. -source /opt/kolla/kolla-common.sh - -source /opt/kolla/config-swift.sh - -# Execute config strategy -set_configs - -exec $CMD $ARGS diff --git a/docker_templates/swift/swift-object-base/Dockerfile.j2 b/docker_templates/swift/swift-object-base/Dockerfile.j2 deleted file mode 100644 index 54997a114..000000000 --- a/docker_templates/swift/swift-object-base/Dockerfile.j2 +++ /dev/null @@ -1,14 +0,0 @@ -FROM {{ namespace }}/{{ base_distro }}-{{ install_type }}-swift-base:{{ tag }} -MAINTAINER Kolla Project (https://launchpad.net.kolla) - -{% if install_type == 'binary' %} - {% if base_distro in ['centos', 'fedora', 'oraclelinux'] %} - -RUN yum -y install \ - openstack-swift-object \ - && yum clean all - - {% endif %} -{% endif %} - -COPY config-swift-object.sh /opt/kolla/ diff --git a/docker_templates/swift/swift-object-base/config-swift-object.sh b/docker_templates/swift/swift-object-base/config-swift-object.sh deleted file mode 100644 index 0d3d58dc3..000000000 --- a/docker_templates/swift/swift-object-base/config-swift-object.sh +++ /dev/null @@ -1,72 +0,0 @@ -#!/bin/bash - -. /opt/kolla/kolla-common.sh - -check_required_vars \ - SWIFT_CONTAINER_SVC_RING_DEVICES \ - SWIFT_CONTAINER_SVC_RING_HOSTS \ - SWIFT_CONTAINER_SVC_RING_MIN_PART_HOURS \ - SWIFT_CONTAINER_SVC_RING_NAME \ - SWIFT_CONTAINER_SVC_RING_PART_POWER \ - SWIFT_CONTAINER_SVC_RING_REPLICAS \ - SWIFT_CONTAINER_SVC_RING_WEIGHTS \ - SWIFT_CONTAINER_SVC_RING_ZONES \ - SWIFT_DIR \ - SWIFT_OBJECT_SVC_BIND_IP \ - SWIFT_OBJECT_SVC_BIND_PORT \ - SWIFT_OBJECT_SVC_DEVICES \ - SWIFT_OBJECT_SVC_MOUNT_CHECK \ - SWIFT_OBJECT_SVC_PIPELINE \ - SWIFT_OBJECT_SVC_RING_DEVICES \ - SWIFT_OBJECT_SVC_RING_HOSTS \ - SWIFT_OBJECT_SVC_RING_MIN_PART_HOURS \ - SWIFT_OBJECT_SVC_RING_NAME \ - SWIFT_OBJECT_SVC_RING_PART_POWER \ - SWIFT_OBJECT_SVC_RING_REPLICAS \ - SWIFT_OBJECT_SVC_RING_WEIGHTS \ - SWIFT_OBJECT_SVC_RING_ZONES \ - SWIFT_USER - -cfg=/etc/swift/object-server.conf - -crudini --set $cfg DEFAULT bind_ip "${SWIFT_OBJECT_SVC_BIND_IP}" -crudini --set $cfg DEFAULT bind_port "${SWIFT_OBJECT_SVC_BIND_PORT}" -crudini --set $cfg DEFAULT user "${SWIFT_USER}" -crudini --set $cfg DEFAULT swift_dir "${SWIFT_DIR}" -crudini --set $cfg DEFAULT devices "${SWIFT_OBJECT_SVC_DEVICES}" -crudini --set $cfg DEFAULT mount_check "${SWIFT_OBJECT_SVC_MOUNT_CHECK}" - -crudini --set $cfg pipeline:main pipeline "${SWIFT_OBJECT_SVC_PIPELINE}" - -# NOTE(pbourke): some services require a section in the conf, even if empty -crudini --set $cfg object-expirer - -# Create swift user and group if they don't exist -id -u swift &>/dev/null || useradd --user-group swift - -# Ensure proper ownership of the mount point directory structure -chown -R swift:swift /srv/node - -# TODO(pbourke): does this need to be on a data vol? -mkdir -p /var/cache/swift -chown -R swift:swift /var/cache/swift - -python /opt/kolla/build-swift-ring.py \ - -f ${SWIFT_OBJECT_SVC_RING_NAME} \ - -p ${SWIFT_OBJECT_SVC_RING_PART_POWER} \ - -r ${SWIFT_OBJECT_SVC_RING_REPLICAS} \ - -m ${SWIFT_OBJECT_SVC_RING_MIN_PART_HOURS} \ - -H ${SWIFT_OBJECT_SVC_RING_HOSTS} \ - -w ${SWIFT_OBJECT_SVC_RING_WEIGHTS} \ - -d ${SWIFT_OBJECT_SVC_RING_DEVICES} \ - -z ${SWIFT_OBJECT_SVC_RING_ZONES} - -python /opt/kolla/build-swift-ring.py \ - -f ${SWIFT_CONTAINER_SVC_RING_NAME} \ - -p ${SWIFT_CONTAINER_SVC_RING_PART_POWER} \ - -r ${SWIFT_CONTAINER_SVC_RING_REPLICAS} \ - -m ${SWIFT_CONTAINER_SVC_RING_MIN_PART_HOURS} \ - -H ${SWIFT_CONTAINER_SVC_RING_HOSTS} \ - -w ${SWIFT_CONTAINER_SVC_RING_WEIGHTS} \ - -d ${SWIFT_CONTAINER_SVC_RING_DEVICES} \ - -z ${SWIFT_CONTAINER_SVC_RING_ZONES} diff --git a/docker_templates/swift/swift-object-expirer/Dockerfile.j2 b/docker_templates/swift/swift-object-expirer/Dockerfile.j2 deleted file mode 100644 index af9f3eb58..000000000 --- a/docker_templates/swift/swift-object-expirer/Dockerfile.j2 +++ /dev/null @@ -1,20 +0,0 @@ -FROM {{ namespace }}/{{ base_distro }}-{{ install_type }}-swift-object-base:{{ tag }} -MAINTAINER Kolla Project (https://launchpad.net.kolla) - -{% if install_type == 'binary' %} - {% if base_distro in ['centos', 'fedora', 'oraclelinux'] %} - -RUN yum -y install \ - openstack-swift-proxy \ - openstack-swift-container \ - && yum clean all - - {% endif %} -{% endif %} - -COPY start.sh / -COPY config-external.sh /opt/kolla/ - -CMD ["/start.sh"] - -{{ include_footer }} diff --git a/docker_templates/swift/swift-object-expirer/config-external.sh b/docker_templates/swift/swift-object-expirer/config-external.sh deleted file mode 100644 index ff2bcf9f5..000000000 --- a/docker_templates/swift/swift-object-expirer/config-external.sh +++ /dev/null @@ -1,18 +0,0 @@ -#!/bin/bash -SOURCE="/opt/kolla/swift/swift.conf" -TARGET="/etc/swift/swift.conf" -SOURCE_OBJECT_EXPIRER="/opt/kolla/swift/object-expirer.conf" -TARGET_OBJECT_EXPIRER="/etc/swift/object-expirer.conf" -OWNER="swift" - -if [[ -f "$SOURCE" ]]; then - cp $SOURCE $TARGET - chown ${OWNER}: $TARGET - chmod 0640 $TARGET -fi - -if [[ -f "$SOURCE_OBJECT_EXPIRER" ]]; then - cp $SOURCE_OBJECT_EXPIRER $TARGET_OBJECT_EXPIRER - chown ${OWNER}: $TARGET_OBJECT_EXPIRER - chmod 0640 $TARGET_OBJECT_EXPIRER -fi diff --git a/docker_templates/swift/swift-object-expirer/start.sh b/docker_templates/swift/swift-object-expirer/start.sh deleted file mode 100755 index 434e8dc49..000000000 --- a/docker_templates/swift/swift-object-expirer/start.sh +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/bash - -set -o errexit - -CMD="/usr/bin/swift-object-expirer" -ARGS="/etc/swift/object-server.conf --verbose" - -# Loading common functions. -source /opt/kolla/kolla-common.sh - -source /opt/kolla/config-swift.sh - -# Execute config strategy -set_configs - -exec $CMD $ARGS diff --git a/docker_templates/swift/swift-object-replicator/Dockerfile.j2 b/docker_templates/swift/swift-object-replicator/Dockerfile.j2 deleted file mode 100644 index ab8a7adee..000000000 --- a/docker_templates/swift/swift-object-replicator/Dockerfile.j2 +++ /dev/null @@ -1,9 +0,0 @@ -FROM {{ namespace }}/{{ base_distro }}-{{ install_type }}-swift-object-base:{{ tag }} -MAINTAINER Kolla Project (https://launchpad.net.kolla) - -COPY start.sh / -COPY config-external.sh /opt/kolla/ - -CMD ["/start.sh"] - -{{ include_footer }} diff --git a/docker_templates/swift/swift-object-replicator/config-external.sh b/docker_templates/swift/swift-object-replicator/config-external.sh deleted file mode 100644 index 0fa02e985..000000000 --- a/docker_templates/swift/swift-object-replicator/config-external.sh +++ /dev/null @@ -1,18 +0,0 @@ -#!/bin/bash -SOURCE="/opt/kolla/swift/swift.conf" -TARGET="/etc/swift/swift.conf" -SOURCE_OBJECT_SERVER="/opt/kolla/swift/object-server.conf" -TARGET_OBJECT_SERVER="/etc/swift/object-server.conf" -OWNER="swift" - -if [[ -f "$SOURCE" ]]; then - cp $SOURCE $TARGET - chown ${OWNER}: $TARGET - chmod 0640 $TARGET -fi - -if [[ -f "$SOURCE_OBJECT_SERVER" ]]; then - cp $SOURCE_OBJECT_SERVER $TARGET_OBJECT_SERVER - chown ${OWNER}: $TARGET_OBJECT_SERVER - chmod 0640 $TARGET_OBJECT_SERVER -fi diff --git a/docker_templates/swift/swift-object-replicator/start.sh b/docker_templates/swift/swift-object-replicator/start.sh deleted file mode 100755 index 203f8864d..000000000 --- a/docker_templates/swift/swift-object-replicator/start.sh +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/bash - -set -o errexit - -CMD="/usr/bin/swift-object-replicator" -ARGS="/etc/swift/object-server.conf --verbose" - -# Loading common functions. -source /opt/kolla/kolla-common.sh - -source /opt/kolla/config-swift.sh - -# Execute config strategy -set_configs - -exec $CMD $ARGS diff --git a/docker_templates/swift/swift-object-server/Dockerfile.j2 b/docker_templates/swift/swift-object-server/Dockerfile.j2 deleted file mode 100644 index ab8a7adee..000000000 --- a/docker_templates/swift/swift-object-server/Dockerfile.j2 +++ /dev/null @@ -1,9 +0,0 @@ -FROM {{ namespace }}/{{ base_distro }}-{{ install_type }}-swift-object-base:{{ tag }} -MAINTAINER Kolla Project (https://launchpad.net.kolla) - -COPY start.sh / -COPY config-external.sh /opt/kolla/ - -CMD ["/start.sh"] - -{{ include_footer }} diff --git a/docker_templates/swift/swift-object-server/config-external.sh b/docker_templates/swift/swift-object-server/config-external.sh deleted file mode 100644 index a3fb1a2cc..000000000 --- a/docker_templates/swift/swift-object-server/config-external.sh +++ /dev/null @@ -1,27 +0,0 @@ -#!/bin/bash - -OWNER="swift" - -if [[ -f "/opt/kolla/swift/swift.conf" ]]; then - cp /opt/kolla/swift/swift.conf /etc/swift/swift.conf - chown ${OWNER}: /etc/swift/swift.conf - chmod 0640 /etc/swift/swift.conf -fi - -if [[ -f "/opt/kolla/swift/object.ring.gz" ]]; then - cp /opt/kolla/swift/object.ring.gz /etc/swift/object.ring.gz - chown ${OWNER}: /etc/swift/object.ring.gz - chmod 0640 /etc/swift/object.ring.gz -fi - -if [[ -f "/opt/kolla/swift/container.ring.gz" ]]; then - cp /opt/kolla/swift/container.ring.gz /etc/swift/container.ring.gz - chown ${OWNER}: /etc/swift/container.ring.gz - chmod 0640 /etc/swift/container.ring.gz -fi - -if [[ -f "/opt/kolla/swift-object-server/object-server.conf" ]]; then - cp /opt/kolla/swift-object-server/object-server.conf /etc/swift/object-server.conf - chown ${OWNER}: /etc/swift/object-server.conf - chmod 0640 /etc/swift/object-server.conf -fi diff --git a/docker_templates/swift/swift-object-server/start.sh b/docker_templates/swift/swift-object-server/start.sh deleted file mode 100755 index f2a32b4d3..000000000 --- a/docker_templates/swift/swift-object-server/start.sh +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/bash - -set -o errexit - -CMD="/usr/bin/swift-object-server" -ARGS="/etc/swift/object-server.conf --verbose" - -# Loading common functions. -source /opt/kolla/kolla-common.sh - -source /opt/kolla/config-swift.sh - -# Execute config strategy -set_configs - -exec $CMD $ARGS diff --git a/docker_templates/swift/swift-object-updater/Dockerfile.j2 b/docker_templates/swift/swift-object-updater/Dockerfile.j2 deleted file mode 100644 index ab8a7adee..000000000 --- a/docker_templates/swift/swift-object-updater/Dockerfile.j2 +++ /dev/null @@ -1,9 +0,0 @@ -FROM {{ namespace }}/{{ base_distro }}-{{ install_type }}-swift-object-base:{{ tag }} -MAINTAINER Kolla Project (https://launchpad.net.kolla) - -COPY start.sh / -COPY config-external.sh /opt/kolla/ - -CMD ["/start.sh"] - -{{ include_footer }} diff --git a/docker_templates/swift/swift-object-updater/config-external.sh b/docker_templates/swift/swift-object-updater/config-external.sh deleted file mode 100644 index 0fa02e985..000000000 --- a/docker_templates/swift/swift-object-updater/config-external.sh +++ /dev/null @@ -1,18 +0,0 @@ -#!/bin/bash -SOURCE="/opt/kolla/swift/swift.conf" -TARGET="/etc/swift/swift.conf" -SOURCE_OBJECT_SERVER="/opt/kolla/swift/object-server.conf" -TARGET_OBJECT_SERVER="/etc/swift/object-server.conf" -OWNER="swift" - -if [[ -f "$SOURCE" ]]; then - cp $SOURCE $TARGET - chown ${OWNER}: $TARGET - chmod 0640 $TARGET -fi - -if [[ -f "$SOURCE_OBJECT_SERVER" ]]; then - cp $SOURCE_OBJECT_SERVER $TARGET_OBJECT_SERVER - chown ${OWNER}: $TARGET_OBJECT_SERVER - chmod 0640 $TARGET_OBJECT_SERVER -fi diff --git a/docker_templates/swift/swift-object-updater/start.sh b/docker_templates/swift/swift-object-updater/start.sh deleted file mode 100755 index 744344f74..000000000 --- a/docker_templates/swift/swift-object-updater/start.sh +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/bash - -set -o errexit - -CMD="/usr/bin/swift-object-updater" -ARGS="/etc/swift/object-server.conf --verbose" - -# Loading common functions. -source /opt/kolla/kolla-common.sh - -source /opt/kolla/config-swift.sh - -# Execute config strategy -set_configs - -exec $CMD $ARGS diff --git a/docker_templates/swift/swift-proxy-server/Dockerfile.j2 b/docker_templates/swift/swift-proxy-server/Dockerfile.j2 deleted file mode 100644 index 54d024f8b..000000000 --- a/docker_templates/swift/swift-proxy-server/Dockerfile.j2 +++ /dev/null @@ -1,16 +0,0 @@ -FROM {{ namespace }}/{{ base_distro }}-{{ install_type }}-swift-base:{{ tag }} -MAINTAINER Kolla Project (https://launchpad.net.kolla) - -{% if install_type == 'binary' %} - {% if base_distro in ['centos', 'fedora', 'oraclelinux'] %} - -RUN yum -y install openstack-swift-proxy && yum clean all - - {% endif %} -{% endif %} - -COPY ./start.sh /start.sh -COPY config-external.sh /opt/kolla/ -CMD ["/start.sh"] - -{{ include_footer }} diff --git a/docker_templates/swift/swift-proxy-server/config-external.sh b/docker_templates/swift/swift-proxy-server/config-external.sh deleted file mode 100755 index 434cce7e5..000000000 --- a/docker_templates/swift/swift-proxy-server/config-external.sh +++ /dev/null @@ -1,33 +0,0 @@ -#!/bin/bash - -OWNER="swift" - -if [[ -f "/opt/kolla/swift/swift.conf" ]]; then - cp /opt/kolla/swift/swift.conf /etc/swift/swift.conf - chown ${OWNER}: /etc/swift/swift.conf - chmod 0640 /etc/swift/swift.conf -fi - -if [[ -f "/opt/kolla/swift/object.ring.gz" ]]; then - cp /opt/kolla/swift/object.ring.gz /etc/swift/object.ring.gz - chown ${OWNER}: /etc/swift/object.ring.gz - chmod 0640 /etc/swift/object.ring.gz -fi - -if [[ -f "/opt/kolla/swift/container.ring.gz" ]]; then - cp /opt/kolla/swift/container.ring.gz /etc/swift/container.ring.gz - chown ${OWNER}: /etc/swift/container.ring.gz - chmod 0640 /etc/swift/container.ring.gz -fi - -if [[ -f "/opt/kolla/swift/account.ring.gz" ]]; then - cp /opt/kolla/swift/account.ring.gz /etc/swift/account.ring.gz - chown ${OWNER}: /etc/swift/account.ring.gz - chmod 0640 /etc/swift/account.ring.gz -fi - -if [[ -f "/opt/kolla/swift-proxy-server/proxy-server.conf" ]]; then - cp /opt/kolla/swift-proxy-server/proxy-server.conf /etc/swift/proxy-server.conf - chown ${OWNER}: /etc/swift/proxy-server.conf - chmod 0640 /etc/swift/proxy-server.conf -fi diff --git a/docker_templates/swift/swift-proxy-server/start.sh b/docker_templates/swift/swift-proxy-server/start.sh deleted file mode 100755 index 99a142e52..000000000 --- a/docker_templates/swift/swift-proxy-server/start.sh +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/bash - -set -o errexit - -CMD="/usr/bin/swift-proxy-server" -ARGS="/etc/swift/proxy-server.conf --verbose" - -# Loading common functions. -source /opt/kolla/kolla-common.sh - -source /opt/kolla/config-swift.sh - -# Execute config strategy -set_configs - -exec $CMD $ARGS diff --git a/docker_templates/zaqar/Dockerfile.j2 b/docker_templates/zaqar/Dockerfile.j2 deleted file mode 100644 index 4e3a0bc52..000000000 --- a/docker_templates/zaqar/Dockerfile.j2 +++ /dev/null @@ -1,32 +0,0 @@ -FROM {{ namespace }}/{{ base_distro }}-{{ install_type }}-base:{{ tag }} -MAINTAINER Kolla Project (https://launchpad.net/kolla) - -{% if install_type == 'binary' %} - {% if base_distro in ['fedora', 'centos', 'oraclelinux'] %} - -RUN yum -y install openstack-zaqar && yum clean all - - {% elif base_distro in ['ubuntu', 'debian'] %} - -RUN echo '{{ install_type }} not yet available for {{ base_distro }}' \ - && /bin/false - - {% endif %} -{% elif install_type == 'source' %} - -ADD zaqar.tar / -RUN ln -s /zaqar-* zaqar \ - && useradd --user-group zaqar \ - && pip --no-cache-dir install /zaqar \ - && mkdir -p /etc/zaqar /var/log/zaqar /home/zaqar \ - && cp -r /zaqar/etc/* /etc/zaqar/ \ - && chown -R zaqar: /etc/zaqar /var/log/zaqar /home/zaqar - -{% endif %} - -COPY start.sh / -COPY config-external.sh /opt/kolla/ - -CMD ["/start.sh"] - -{{ include_footer }} diff --git a/docker_templates/zaqar/config-external.sh b/docker_templates/zaqar/config-external.sh deleted file mode 100644 index 7ed6da2eb..000000000 --- a/docker_templates/zaqar/config-external.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/bash -SOURCE="/opt/kolla/zaqar/zaqar.conf" -TARGET="/etc/zaqar/zaqar.conf" -OWNER="zaqar" - -if [[ -f "$SOURCE" ]]; then - cp $SOURCE $TARGET - chown ${OWNER}: $TARGET - chmod 0644 $TARGET -fi diff --git a/docker_templates/zaqar/start.sh b/docker_templates/zaqar/start.sh deleted file mode 100755 index fa1050280..000000000 --- a/docker_templates/zaqar/start.sh +++ /dev/null @@ -1,21 +0,0 @@ -#!/bin/bash - -set -o errexit - -CMD="/usr/bin/zaqar-server" -ARGS="" - -# Loading common functions. -source /opt/kolla/kolla-common.sh - -# Execute config strategy -set_configs - -# Bootstrap and exit if KOLLA_BOOTSTRAP variable is set. This catches all cases -# of the KOLLA_BOOTSTRAP variable being set, including empty. -if [[ "${!KOLLA_BOOTSTRAP[@]}" ]]; then - su -s /bin/sh -c "zaqar-manage db_sync" cinder - exit 0 -fi - -exec $CMD $ARGS diff --git a/kolla/cmd/build.py b/kolla/cmd/build.py index d3842d581..ed1de0035 100755 --- a/kolla/cmd/build.py +++ b/kolla/cmd/build.py @@ -239,9 +239,9 @@ def arg_parser(): type=int, default=3) parser.add_argument('--template', - help='Create dockerfiles from templates', + help='DEPRECATED: All Dockerfiles are templates', action='store_true', - default=False) + default=True) parser.add_argument('-d', '--debug', help='Turn on debugging log level', action='store_true') @@ -274,9 +274,7 @@ class KollaWorker(object): self.base_dir = os.path.abspath(find_base_dir()) LOG.debug("Kolla base directory: " + self.base_dir) self.images_dir = os.path.join(self.base_dir, 'docker') - self.templates_dir = os.path.join(self.base_dir, 'docker_templates') self.namespace = args['namespace'] - self.template = args['template'] self.base = args['base'] self.base_tag = args['base_tag'] self.type_ = args['type'] @@ -298,10 +296,7 @@ class KollaWorker(object): ts = datetime.datetime.fromtimestamp(ts).strftime('%Y-%m-%d_%H-%M-%S_') self.temp_dir = tempfile.mkdtemp(prefix='kolla-' + ts) self.working_dir = os.path.join(self.temp_dir, 'docker') - if self.template: - shutil.copytree(self.templates_dir, self.working_dir) - else: - shutil.copytree(self.images_dir, self.working_dir) + shutil.copytree(self.images_dir, self.working_dir) LOG.debug('Created working dir: {}'.format(self.working_dir)) def set_time(self): @@ -335,13 +330,8 @@ class KollaWorker(object): def find_dockerfiles(self): """Recursive search for Dockerfiles in the working directory""" self.docker_build_paths = list() - - if self.template: - path = self.working_dir - filename = 'Dockerfile.j2' - else: - path = os.path.join(self.working_dir, self.base, self.type_) - filename = 'Dockerfile' + path = self.working_dir + filename = 'Dockerfile.j2' for root, dirs, names in os.walk(path): if filename in names: @@ -427,16 +417,10 @@ class KollaWorker(object): def build_image_list(self): self.images = list() - - # Walk all of the Dockerfiles and replace the %%KOLLA%% variables for path in self.docker_build_paths: + # Reading parent image name with open(os.path.join(path, 'Dockerfile')) as f: - content = f.read().replace('%%KOLLA_NAMESPACE%%', - self.namespace) - content = content.replace('%%KOLLA_PREFIX%%', self.prefix) - content = content.replace('%%KOLLA_TAG%%', self.tag) - with open(os.path.join(path, 'Dockerfile'), 'w') as f: - f.write(content) + content = f.read() image = dict() image['status'] = "unprocessed" @@ -526,9 +510,7 @@ def main(): kolla = KollaWorker(args) kolla.setup_working_dir() kolla.find_dockerfiles() - - if args['template']: - kolla.create_dockerfiles() + kolla.create_dockerfiles() # We set the atime and mtime to 0 epoch to preserve allow the Docker cache # to work like we want. A different size or hash will still force a rebuild diff --git a/setup.cfg b/setup.cfg index 6db6a4a3e..678776679 100644 --- a/setup.cfg +++ b/setup.cfg @@ -24,7 +24,6 @@ data_files = share/kolla/ansible = ansible/* share/kolla/devenv = devenv/* share/kolla/docker = docker/* - share/kolla/docker_templates = docker_templates/* share/kolla/docs = docs/* share/kolla/etc_examples = etc/* share/kolla/vagrant = vagrant/* diff --git a/tox.ini b/tox.ini index b3ddde967..a35748db1 100644 --- a/tox.ini +++ b/tox.ini @@ -124,4 +124,4 @@ commands = [flake8] show-source = True -exclude=.git,.tox,doc,ansible/library,docker/centos/binary/kolla-ansible,docker_templates/kolla-ansible,docker/common/kolla-ansible +exclude=.git,.tox,doc,ansible/library,docker/kolla-ansible -- cgit v1.2.3