Cleanup docker services templates
authorMartin André <m.andre@redhat.com>
Thu, 9 Mar 2017 15:48:06 +0000 (16:48 +0100)
committerMartin André <m.andre@redhat.com>
Fri, 10 Mar 2017 07:37:23 +0000 (08:37 +0100)
Use yaml anchors wherever possible for image definition and drop unused
anchors.

Renamed parameters to Docker*ConfigImage to clarify that an image is
specifically used to generate configuration files.

Change-Id: I388bd59de7f1d36a3a881fbb723ba5bcba09e637

16 files changed:
docker/services/database/mongodb.yaml
docker/services/database/mysql.yaml
docker/services/heat-api-cfn.yaml
docker/services/heat-api.yaml
docker/services/keystone.yaml
docker/services/mistral-engine.yaml
docker/services/mistral-executor.yaml
docker/services/neutron-dhcp.yaml
docker/services/neutron-l3.yaml
docker/services/nova-api.yaml
docker/services/nova-conductor.yaml
docker/services/nova-ironic.yaml
docker/services/nova-libvirt.yaml
docker/services/nova-placement.yaml
docker/services/nova-scheduler.yaml
docker/services/swift-storage.yaml

index 68a64a7..fa2e52f 100644 (file)
@@ -91,10 +91,7 @@ outputs:
           config_volume: 'mongodb_init_tasks'
           puppet_tags: 'mongodb_database,mongodb_user,mongodb_replset'
           step_config: 'include ::tripleo::profile::base::database::mongodb'
-          config_image:
-            list_join:
-            - '/'
-            - [ {get_param: DockerNamespace}, {get_param: DockerMongodbImage} ]
+          config_image: *mongodb_image
           volumes:
           - "mongodb:/var/lib/mongodb/"
           - "logs:/var/log/kolla:ro"
index 46b856e..fe45c46 100644 (file)
@@ -123,10 +123,7 @@ outputs:
           config_volume: 'mysql_init_tasks'
           puppet_tags: 'mysql_database,mysql_grant,mysql_user'
           step_config: 'include ::tripleo::profile::base::database::mysql'
-          config_image:
-            list_join:
-              - '/'
-              - [ {get_param: DockerNamespace}, {get_param: DockerMysqlImage} ]
+          config_image: *mysql_image
           volumes:
             - "mariadb:/var/lib/mysql/:ro"
             - "/var/lib/config-data/mysql/root:/root:ro" #provides .my.cnf
index 2a27efb..85ad921 100644 (file)
@@ -13,7 +13,7 @@ parameters:
     default: 'centos-binary-heat-api-cfn:latest'
     type: string
   # we configure all heat services in the same heat engine container
-  DockerHeatEngineImage:
+  DockerHeatConfigImage:
     description: image
     default: 'centos-binary-heat-engine:latest'
     type: string
@@ -62,7 +62,7 @@ outputs:
         config_image:
           list_join:
             - '/'
-            - [ {get_param: DockerNamespace}, {get_param: DockerHeatEngineImage} ]
+            - [ {get_param: DockerNamespace}, {get_param: DockerHeatConfigImage} ]
       kolla_config:
          /var/lib/kolla/config_files/heat_api_cfn.json:
            command: /usr/bin/heat-api-cfn --config-file /usr/share/heat/heat-dist.conf --config-file /etc/heat/heat.conf
index c429870..12884f5 100644 (file)
@@ -13,7 +13,7 @@ parameters:
     default: 'centos-binary-heat-api:latest'
     type: string
   # we configure all heat services in the same heat engine container
-  DockerHeatEngineImage:
+  DockerHeatConfigImage:
     description: image
     default: 'centos-binary-heat-engine:latest'
     type: string
@@ -62,7 +62,7 @@ outputs:
         config_image:
           list_join:
             - '/'
-            - [ {get_param: DockerNamespace}, {get_param: DockerHeatEngineImage} ]
+            - [ {get_param: DockerNamespace}, {get_param: DockerHeatConfigImage} ]
       kolla_config:
          /var/lib/kolla/config_files/heat_api.json:
            command: /usr/bin/heat-api --config-file /usr/share/heat/heat-dist.conf --config-file /etc/heat/heat.conf
index bd3a010..2099f09 100644 (file)
@@ -149,10 +149,7 @@ outputs:
           config_volume: 'keystone_init_tasks'
           puppet_tags: 'keystone_config,keystone_domain_config,keystone_endpoint,keystone_identity_provider,keystone_paste_ini,keystone_role,keystone_service,keystone_tenant,keystone_user,keystone_user_role,keystone_domain'
           step_config: 'include ::tripleo::profile::base::keystone'
-          config_image:
-            list_join:
-            - '/'
-            - [ {get_param: DockerNamespace}, {get_param: DockerKeystoneImage} ]
+          config_image: *keystone_image
       upgrade_tasks:
         - name: Stop and disable keystone service (running under httpd)
           tags: step2
index fd72e34..db2721b 100644 (file)
@@ -72,7 +72,7 @@ outputs:
       docker_config:
         step_4:
           mistral_engine:
-            image: &mistral_engine_image
+            image:
               list_join:
                 - '/'
                 - [ {get_param: DockerNamespace}, {get_param: DockerMistralEngineImage} ]
index 0274ff4..d68830e 100644 (file)
@@ -72,7 +72,7 @@ outputs:
       docker_config:
         step_4:
           mistral_executor:
-            image: &mistral_executor_image
+            image:
               list_join:
                 - '/'
                 - [ {get_param: DockerNamespace}, {get_param: DockerMistralExecutorImage} ]
index a4854d9..9be13ad 100644 (file)
@@ -8,7 +8,7 @@ parameters:
     description: namespace
     default: 'tripleoupstream'
     type: string
-  DockerNeutronApiImage:
+  DockerNeutronDHCPImage:
     description: image
     default: 'centos-binary-neutron-dhcp-agent:latest'
     type: string
@@ -76,10 +76,10 @@ outputs:
       docker_config:
         step_4:
           neutron_dhcp:
-            image: &neutron_dhcp_image
+            image:
               list_join:
                 - '/'
-                - [ {get_param: DockerNamespace}, {get_param: DockerNeutronApiImage} ]
+                - [ {get_param: DockerNamespace}, {get_param: DockerNeutronDHCPImage} ]
             net: host
             pid: host
             privileged: true
index 61ad8f4..db4fa86 100644 (file)
@@ -72,7 +72,7 @@ outputs:
       docker_config:
         step_4:
           neutronl3agent:
-            image: &neutron_l3_agent_image
+            image:
               list_join:
               - '/'
               - [ {get_param: DockerNamespace}, {get_param: DockerNeutronL3AgentImage} ]
index 1c57bbf..9e203b7 100644 (file)
@@ -12,7 +12,7 @@ parameters:
     description: image
     default: 'centos-binary-nova-api:latest'
     type: string
-  DockerNovaBaseImage:
+  DockerNovaConfigImage:
     description: image
     default: 'centos-binary-nova-base:latest'
     type: string
@@ -60,7 +60,7 @@ outputs:
         config_image:
           list_join:
           - '/'
-          - [ {get_param: DockerNamespace}, {get_param: DockerNovaBaseImage} ]
+          - [ {get_param: DockerNamespace}, {get_param: DockerNovaConfigImage} ]
       kolla_config:
          /var/lib/kolla/config_files/nova_api.json:
            command: /usr/bin/nova-api
index 09a6d0f..f85cf54 100644 (file)
@@ -12,7 +12,7 @@ parameters:
     description: image
     default: 'centos-binary-nova-conductor:latest'
     type: string
-  DockerNovaBaseImage:
+  DockerNovaConfigImage:
     description: image
     default: 'centos-binary-nova-base:latest'
     type: string
@@ -58,7 +58,7 @@ outputs:
         config_image:
           list_join:
           - '/'
-          - [ {get_param: DockerNamespace}, {get_param: DockerNovaBaseImage} ]
+          - [ {get_param: DockerNamespace}, {get_param: DockerNovaConfigImage} ]
       kolla_config:
          /var/lib/kolla/config_files/nova_conductor.json:
            command: /usr/bin/nova-conductor
index d3c0af4..170468a 100644 (file)
@@ -12,7 +12,7 @@ parameters:
     description: image
     default: 'centos-binary-nova-compute-ironic:latest'
     type: string
-  DockerNovaBaseImage:
+  DockerNovaConfigImage:
     description: image
     default: 'centos-binary-nova-base:latest'
     type: string
@@ -54,7 +54,7 @@ outputs:
         config_image:
           list_join:
           - '/'
-          - [ {get_param: DockerNamespace}, {get_param: DockerNovaBaseImage} ]
+          - [ {get_param: DockerNamespace}, {get_param: DockerNovaConfigImage} ]
       kolla_config:
         /var/lib/kolla/config_files/nova_ironic.json:
            command: /usr/bin/nova-compute --config-file /etc/nova/nova.conf --config-file /etc/nova/rootwrap.conf
index e25b201..85fabe5 100644 (file)
@@ -14,7 +14,7 @@ parameters:
     type: string
   # we configure libvirt via the nova-compute container due to coupling
   # in the puppet modules
-  DockerNovaComputeImage:
+  DockerNovaConfigImage:
     description: image
     default: 'centos-binary-nova-compute:latest'
     type: string
@@ -57,7 +57,7 @@ outputs:
         config_image:
           list_join:
           - '/'
-          - [ {get_param: DockerNamespace}, {get_param: DockerNovaComputeImage} ]
+          - [ {get_param: DockerNamespace}, {get_param: DockerNovaConfigImage} ]
       kolla_config:
         /var/lib/kolla/config_files/nova-libvirt.json:
            command: /usr/sbin/libvirtd --config /etc/libvirt/libvirtd.conf
index 0f32e33..e49839b 100644 (file)
@@ -53,7 +53,7 @@ outputs:
         config_volume: nova_placement
         puppet_tags: nova_config
         step_config: *step_config
-        config_image:
+        config_image: &nova_placement_image
           list_join:
           - '/'
           - [ {get_param: DockerNamespace}, {get_param: DockerNovaPlacementImage} ]
@@ -92,10 +92,7 @@ outputs:
         step_3:
           nova_placement:
             start_order: 1
-            image:
-              list_join:
-                - '/'
-                - [ {get_param: DockerNamespace}, {get_param: DockerNovaPlacementImage} ]
+            image: *nova_placement_image
             net: host
             user: root
             restart: always
index 0b64ca3..de1199e 100644 (file)
@@ -12,7 +12,7 @@ parameters:
     description: image
     default: 'centos-binary-nova-scheduler:latest'
     type: string
-  DockerNovaBaseImage:
+  DockerNovaConfigImage:
     description: image
     default: 'centos-binary-nova-base:latest'
     type: string
@@ -57,7 +57,7 @@ outputs:
         config_image:
           list_join:
           - '/'
-          - [ {get_param: DockerNamespace}, {get_param: DockerNovaBaseImage} ]
+          - [ {get_param: DockerNamespace}, {get_param: DockerNovaConfigImage} ]
       kolla_config:
          /var/lib/kolla/config_files/nova_scheduler.json:
            command: /usr/bin/nova-scheduler
index 8e76504..1b89827 100644 (file)
@@ -62,7 +62,7 @@ outputs:
         config_volume: swift
         puppet_tags: swift_config,swift_container_config,swift_container_sync_realms_config,swift_account_config,swift_object_config,swift_object_expirer_config
         step_config: *step_config
-        config_image:
+        config_image: &swift_proxy_image
           list_join:
             - '/'
             - [ {get_param: DockerNamespace}, {get_param: DockerSwiftProxyImage} ]
@@ -99,7 +99,7 @@ outputs:
           # volume during the configuration stage.  We just need to create this
           # directory and make sure it's owned by swift.
           swift_setup_srv:
-            image:
+            image: &swift_account_image
               list_join:
                 - '/'
                 - [ {get_param: DockerNamespace}, {get_param: DockerSwiftAccountImage} ]
@@ -109,10 +109,7 @@ outputs:
               - swift-srv:/srv
         step_4:
           swift_account_auditor:
-            image:
-              list_join:
-                - '/'
-                - [ {get_param: DockerNamespace}, {get_param: DockerSwiftAccountImage} ]
+            image: *swift_account_image
             net: host
             user: swift
             restart: always
@@ -128,10 +125,7 @@ outputs:
             environment: &kolla_env
               - KOLLA_CONFIG_STRATEGY=COPY_ALWAYS
           swift_account_reaper:
-            image:
-              list_join:
-                - '/'
-                - [ {get_param: DockerNamespace}, {get_param: DockerSwiftAccountImage} ]
+            image: *swift_account_image
             net: host
             user: swift
             restart: always
@@ -146,10 +140,7 @@ outputs:
               - /dev:/dev
             environment: *kolla_env
           swift_account_replicator:
-            image:
-              list_join:
-                - '/'
-                - [ {get_param: DockerNamespace}, {get_param: DockerSwiftAccountImage} ]
+            image: *swift_account_image
             net: host
             user: swift
             restart: always
@@ -164,10 +155,7 @@ outputs:
               - /dev:/dev
             environment: *kolla_env
           swift_account_server:
-            image:
-              list_join:
-                - '/'
-                - [ {get_param: DockerNamespace}, {get_param: DockerSwiftAccountImage} ]
+            image: *swift_account_image
             net: host
             user: swift
             restart: always
@@ -182,7 +170,7 @@ outputs:
               - /dev:/dev
             environment: *kolla_env
           swift_container_auditor:
-            image:
+            image: &swift_container_image
               list_join:
                 - '/'
                 - [ {get_param: DockerNamespace}, {get_param: DockerSwiftContainerImage} ]
@@ -200,10 +188,7 @@ outputs:
               - /dev:/dev
             environment: *kolla_env
           swift_container_replicator:
-            image:
-              list_join:
-                - '/'
-                - [ {get_param: DockerNamespace}, {get_param: DockerSwiftContainerImage} ]
+            image: *swift_container_image
             net: host
             user: swift
             restart: always
@@ -218,10 +203,7 @@ outputs:
               - /dev:/dev
             environment: *kolla_env
           swift_container_updater:
-            image:
-              list_join:
-                - '/'
-                - [ {get_param: DockerNamespace}, {get_param: DockerSwiftContainerImage} ]
+            image: *swift_container_image
             net: host
             user: swift
             restart: always
@@ -236,10 +218,7 @@ outputs:
               - /dev:/dev
             environment: *kolla_env
           swift_container_server:
-            image:
-              list_join:
-                - '/'
-                - [ {get_param: DockerNamespace}, {get_param: DockerSwiftContainerImage} ]
+            image: *swift_container_image
             net: host
             user: swift
             restart: always
@@ -254,7 +233,7 @@ outputs:
               - /dev:/dev
             environment: *kolla_env
           swift_object_auditor:
-            image:
+            image: &swift_object_image
               list_join:
                 - '/'
                 - [ {get_param: DockerNamespace}, {get_param: DockerSwiftObjectImage} ]
@@ -272,10 +251,7 @@ outputs:
               - /dev:/dev
             environment: *kolla_env
           swift_object_expirer:
-            image:
-              list_join:
-                - '/'
-                - [ {get_param: DockerNamespace}, {get_param: DockerSwiftProxyImage} ]
+            image: *swift_proxy_image
             net: host
             user: swift
             restart: always
@@ -290,10 +266,7 @@ outputs:
               - /dev:/dev
             environment: *kolla_env
           swift_object_replicator:
-            image:
-              list_join:
-                - '/'
-                - [ {get_param: DockerNamespace}, {get_param: DockerSwiftObjectImage} ]
+            image: *swift_object_image
             net: host
             user: swift
             restart: always
@@ -308,10 +281,7 @@ outputs:
               - /dev:/dev
             environment: *kolla_env
           swift_object_updater:
-            image:
-              list_join:
-                - '/'
-                - [ {get_param: DockerNamespace}, {get_param: DockerSwiftObjectImage} ]
+            image: *swift_object_image
             net: host
             user: swift
             restart: always
@@ -326,10 +296,7 @@ outputs:
               - /dev:/dev
             environment: *kolla_env
           swift_object_server:
-            image:
-              list_join:
-                - '/'
-                - [ {get_param: DockerNamespace}, {get_param: DockerSwiftObjectImage} ]
+            image: *swift_object_image
             net: host
             user: swift
             restart: always