Merge "Enable mistral to run under mod_wsgi"
[apex-tripleo-heat-templates.git] / docker / services / mistral-engine.yaml
index db2721b..d60d847 100644 (file)
@@ -1,4 +1,4 @@
-heat_template_version: ocata
+heat_template_version: pike
 
 description: >
   OpenStack containerized Mistral Engine service
@@ -30,16 +30,29 @@ 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
 
 
 resources:
 
+  ContainersCommon:
+    type: ./containers-common.yaml
+
   MistralBase:
     type: ../../puppet/services/mistral-engine.yaml
     properties:
       EndpointMap: {get_param: EndpointMap}
       ServiceNetMap: {get_param: ServiceNetMap}
       DefaultPasswords: {get_param: DefaultPasswords}
+      RoleName: {get_param: RoleName}
+      RoleParameters: {get_param: RoleParameters}
 
 outputs:
   role_data:
@@ -62,13 +75,12 @@ outputs:
             - '/'
             - [ {get_param: DockerNamespace}, {get_param: DockerMistralConfigImage} ]
       kolla_config:
-         /var/lib/kolla/config_files/mistral_engine.json:
-           command: /usr/bin/mistral-server --config-file=/etc/mistral/mistral.conf --log-file=/var/log/mistral/engine.log --server=engine
-           config_files:
-           - dest: /etc/mistral/mistral.conf
-             owner: mistral
-             perm: '0640'
-             source: /var/lib/kolla/config_files/src/etc/mistral/mistral.conf
+        /var/lib/kolla/config_files/mistral_engine.json:
+          command: /usr/bin/mistral-server --config-file=/etc/mistral/mistral.conf --log-file=/var/log/mistral/engine.log --server=engine
+          permissions:
+            - path: /var/log/mistral
+              owner: mistral:mistral
+              recurse: true
       docker_config:
         step_4:
           mistral_engine:
@@ -80,15 +92,21 @@ outputs:
             privileged: false
             restart: always
             volumes:
-              - /run:/run
-              - /var/lib/kolla/config_files/mistral_engine.json:/var/lib/kolla/config_files/config.json:ro
-              - /var/lib/config-data/mistral/:/var/lib/kolla/config_files/src:ro
-              - /etc/hosts:/etc/hosts:ro
-              - /etc/localtime:/etc/localtime:ro
+              list_concat:
+                - {get_attr: [ContainersCommon, volumes]}
+                -
+                  - /run:/run
+                  - /var/lib/kolla/config_files/mistral_engine.json:/var/lib/kolla/config_files/config.json:ro
+                  - /var/lib/config-data/mistral/etc/mistral/:/etc/mistral/:ro
+                  - /var/log/containers/mistral:/var/log/mistral
             environment:
               - KOLLA_CONFIG_STRATEGY=COPY_ALWAYS
+      host_prep_tasks:
+        - name: create persistent logs directory
+          file:
+            path: /var/log/containers/mistral
+            state: directory
       upgrade_tasks:
         - name: Stop and disable mistral_engine service
           tags: step2
           service: name=openstack-mistral-engine state=stopped enabled=no
-