Merge "Change the directory for haproxy certs/keys to be service-specific"
[apex-tripleo-heat-templates.git] / docker / services / nova-api.yaml
index 1d73a53..da46104 100644 (file)
@@ -42,6 +42,9 @@ resources:
   ContainersCommon:
     type: ./containers-common.yaml
 
+  MySQLClient:
+    type: ../../puppet/services/database/mysql-client.yaml
+
   NovaApiBase:
     type: ../../puppet/services/nova-api.yaml
     properties:
@@ -69,6 +72,7 @@ outputs:
           - "\n"
           - - "['Nova_cell_v2'].each |String $val| { noop_resource($val) }"
             - {get_attr: [NovaApiBase, role_data, step_config]}
+            - {get_attr: [MySQLClient, role_data, step_config]}
       service_config_settings: {get_attr: [NovaApiBase, role_data, service_config_settings]}
       # BEGIN DOCKER SETTINGS
       puppet_config:
@@ -88,6 +92,17 @@ outputs:
             - path: /var/log/nova
               owner: nova:nova
               recurse: true
+        /var/lib/kolla/config_files/nova_api_cron.json:
+          command: /usr/sbin/crond -n
+          config_files:
+            - source: "/var/lib/kolla/config_files/src/*"
+              dest: "/"
+              merge: true
+              preserve_properties: true
+          permissions:
+            - path: /var/log/nova
+              owner: nova:nova
+              recurse: true
       docker_config:
         # db sync runs before permissions set by kolla_config
         step_2:
@@ -151,7 +166,7 @@ outputs:
             user: nova
             privileged: true
             restart: always
-            volumes: &nova_api_volumes
+            volumes:
               list_concat:
                 - {get_attr: [ContainersCommon, volumes]}
                 -
@@ -164,12 +179,17 @@ outputs:
             image: *nova_api_image
             net: host
             user: root
-            privileged: true
+            privileged: false
             restart: always
-            volumes: *nova_api_volumes
+            volumes:
+              list_concat:
+                - {get_attr: [ContainersCommon, volumes]}
+                -
+                  - /var/lib/kolla/config_files/nova_api_cron.json:/var/lib/kolla/config_files/config.json:ro
+                  - /var/lib/config-data/puppet-generated/nova/:/var/lib/kolla/config_files/src:ro
+                  - /var/log/containers/nova:/var/log/nova
             environment:
               - KOLLA_CONFIG_STRATEGY=COPY_ALWAYS
-            command: "/usr/sbin/crond -n"
         step_5:
           nova_api_discover_hosts:
             start_order: 1
@@ -179,6 +199,8 @@ outputs:
             volumes: *nova_api_bootstrap_volumes
             user: root
             command: "/usr/bin/bootstrap_host_exec nova_api su nova -s /bin/bash -c '/usr/bin/nova-manage cell_v2 discover_hosts'"
+      metadata_settings:
+        get_attr: [NovaApiBase, role_data, metadata_settings]
       host_prep_tasks:
         - name: create persistent logs directory
           file: