Merge "Add network_data.yaml to encapsulate list of networks for j2"
[apex-tripleo-heat-templates.git] / docker / services / zaqar.yaml
index 1160031..fdb353b 100644 (file)
@@ -29,6 +29,9 @@ parameters:
 
 resources:
 
+  ContainersCommon:
+    type: ./containers-common.yaml
+
   ZaqarBase:
     type: ../../puppet/services/zaqar.yaml
     properties:
@@ -56,7 +59,7 @@ outputs:
             - [ {get_param: DockerNamespace}, {get_param: DockerZaqarImage} ]
       kolla_config:
         /var/lib/kolla/config_files/zaqar.json:
-          command: /usr/sbin/httpd -DFOREGROUND
+          command: /usr/bin/zaqar-server --config-file /etc/zaqar/zaqar.conf
         /var/lib/kolla/config_files/zaqar_websocket.json:
           command: /usr/bin/zaqar-server --config-file /etc/zaqar/zaqar.conf --config-file /etc/zaqar/1.conf
       docker_config:
@@ -66,15 +69,14 @@ outputs:
             net: host
             privileged: false
             restart: always
-            # NOTE(mandre) kolla image changes the user to 'zaqar', we need it
-            # to be root to run httpd
-            user: root
             volumes:
-              - /var/lib/kolla/config_files/zaqar.json:/var/lib/kolla/config_files/config.json:ro
-              - /var/lib/config-data/zaqar/etc/zaqar/:/etc/zaqar/:ro
-              - /var/lib/config-data/zaqar/etc/httpd:/etc/httpd/:ro
-              - /etc/hosts:/etc/hosts:ro
-              - /etc/localtime:/etc/localtime:ro
+              yaql:
+                expression: $.data.common.concat($.data.service)
+                data:
+                  common: {get_attr: [ContainersCommon, volumes]}
+                  service:
+                    - /var/lib/kolla/config_files/zaqar.json:/var/lib/kolla/config_files/config.json:ro
+                    - /var/lib/config-data/zaqar/etc/zaqar/:/etc/zaqar/:ro
             environment:
               - KOLLA_CONFIG_STRATEGY=COPY_ALWAYS
           zaqar_websocket:
@@ -83,13 +85,17 @@ outputs:
             privileged: false
             restart: always
             volumes:
-              - /var/lib/kolla/config_files/zaqar_websocket.json:/var/lib/kolla/config_files/config.json:ro
-              - /var/lib/config-data/zaqar/etc/zaqar/:/etc/zaqar/:ro
-              - /etc/hosts:/etc/hosts:ro
-              - /etc/localtime:/etc/localtime:ro
+              yaql:
+                expression: $.data.common.concat($.data.service)
+                data:
+                  common: {get_attr: [ContainersCommon, volumes]}
+                  service:
+                    - /var/lib/kolla/config_files/zaqar_websocket.json:/var/lib/kolla/config_files/config.json:ro
+                    - /var/lib/config-data/zaqar/etc/zaqar/:/etc/zaqar/:ro
             environment:
               - KOLLA_CONFIG_STRATEGY=COPY_ALWAYS
       upgrade_tasks:
         - name: Stop and disable zaqar service
           tags: step2
-          service: name=httpd state=stopped enabled=no
+          service: name=openstack-zaqar.service state=stopped enabled=no
+