Merge "Add environment to preselect only VIP IP addresses"
[apex-tripleo-heat-templates.git] / docker / services / heat-api-cfn.yaml
index fbaacbe..8f7bb14 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
@@ -35,6 +35,9 @@ parameters:
 
 resources:
 
+  ContainersCommon:
+    type: ./containers-common.yaml
+
   HeatBase:
     type: ../../puppet/services/heat-api-cfn.yaml
     properties:
@@ -55,10 +58,6 @@ outputs:
         get_attr: [HeatBase, role_data, step_config]
       service_config_settings: {get_attr: [HeatBase, role_data, service_config_settings]}
       # BEGIN DOCKER SETTINGS
-      docker_image: &heat_api_cfn_image
-        list_join:
-          - '/'
-          - [ {get_param: DockerNamespace}, {get_param: DockerHeatApiCfnImage} ]
       puppet_config:
         config_volume: heat
         puppet_tags: heat_config,file,concat,file_line
@@ -66,28 +65,33 @@ 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
-           config_files:
-           - dest: /etc/heat/heat.conf
-             owner: heat
-             perm: '0640'
-             source: /var/lib/kolla/config_files/src/etc/heat/heat.conf
+        /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
       docker_config:
         step_4:
           heat_api_cfn:
-            image: *heat_api_cfn_image
+            image:
+              list_join:
+                - '/'
+                - [ {get_param: DockerNamespace}, {get_param: DockerHeatApiCfnImage} ]
             net: host
             privileged: false
             restart: always
             volumes:
-              - /run:/run
-              - /var/lib/kolla/config_files/heat_api_cfn.json:/var/lib/kolla/config_files/config.json:ro
-              - /var/lib/config-data/heat/:/var/lib/kolla/config_files/src:ro
-              - /etc/hosts:/etc/hosts:ro
-              - /etc/localtime:/etc/localtime:ro
-              - /dev:/dev
+              yaql:
+                expression: $.data.common.concat($.data.service)
+                data:
+                  common: {get_attr: [ContainersCommon, volumes]}
+                  service:
+                    - /var/lib/kolla/config_files/heat_api_cfn.json:/var/lib/kolla/config_files/config.json:ro
+                    - /var/lib/config-data/heat/etc/heat/:/etc/heat/:ro
+                    - /dev:/dev
+                    - /run:/run
             environment:
               - KOLLA_CONFIG_STRATEGY=COPY_ALWAYS
+      upgrade_tasks:
+        - name: Stop and disable heat_api_cfn service
+          tags: step2
+          service: name=openstack-heat-api-cfn state=stopped enabled=no