Merge "Disable env evaluation in workflow executions"
[apex-tripleo-heat-templates.git] / puppet / services / heat-api-cfn.yaml
index dde0bac..2c13cb3 100644 (file)
@@ -1,9 +1,13 @@
-heat_template_version: ocata
+heat_template_version: pike
 
 description: >
   Openstack Heat CloudFormation API service configured with Puppet
 
 parameters:
+  ServiceData:
+    default: {}
+    description: Dictionary packing service data
+    type: json
   ServiceNetMap:
     default: {}
     description: Mapping of service_name -> network name. Typically set
@@ -13,6 +17,14 @@ parameters:
   DefaultPasswords:
     default: {}
     type: json
+  RoleName:
+    default: ''
+    description: Role name on which the service is applied
+    type: string
+  RoleParameters:
+    default: {}
+    description: Parameters specific to the role
+    type: json
   EndpointMap:
     default: {}
     description: Mapping of service endpoint -> protocol. Typically set
@@ -50,17 +62,23 @@ resources:
   ApacheServiceBase:
     type: ./apache.yaml
     properties:
+      ServiceData: {get_param: ServiceData}
       ServiceNetMap: {get_param: ServiceNetMap}
       DefaultPasswords: {get_param: DefaultPasswords}
       EndpointMap: {get_param: EndpointMap}
+      RoleName: {get_param: RoleName}
+      RoleParameters: {get_param: RoleParameters}
       EnableInternalTLS: {get_param: EnableInternalTLS}
 
   HeatBase:
     type: ./heat-base.yaml
     properties:
+      ServiceData: {get_param: ServiceData}
       ServiceNetMap: {get_param: ServiceNetMap}
       DefaultPasswords: {get_param: DefaultPasswords}
       EndpointMap: {get_param: EndpointMap}
+      RoleName: {get_param: RoleName}
+      RoleParameters: {get_param: RoleParameters}
 
 outputs:
   role_data:
@@ -122,7 +140,16 @@ outputs:
           shell: /usr/bin/systemctl show 'openstack-heat-api-cfn' --property ActiveState | grep '\bactive\b'
           when: heat_api_cfn_enabled.rc == 0
           tags: step0,validation
-        - name: Stop heat_api_cfn service
+        - name: check for heat_api_cfn running under apache (post upgrade)
           tags: step1
-          when: heat_api_cfn_enabled.rc == 0
-          service: name=openstack-heat-api-cfn state=stopped
+          shell: "httpd -t -D DUMP_VHOSTS | grep -q heat_api_cfn_wsgi"
+          register: heat_api_cfn_apache
+          ignore_errors: true
+        - name: Stop heat_api_cfn service (running under httpd)
+          tags: step1
+          service: name=httpd state=stopped
+          when: heat_api_cfn_apache.rc == 0
+        - name: Stop and disable heat_api_cfn service (pre-upgrade not under httpd)
+          tags: step1
+          when: heat_api_cfn_apache.rc == 0
+          service: name=openstack-heat-api-cfn state=stopped enabled=no