Merge "nova_api_cron docker fix: add /var/spool/cron/nova"
[apex-tripleo-heat-templates.git] / docker / services / nova-api.yaml
index f8355c1..4bec803 100644 (file)
@@ -4,17 +4,11 @@ description: >
   OpenStack containerized Nova API service
 
 parameters:
-  DockerNamespace:
-    description: namespace
-    default: 'tripleoupstream'
-    type: string
   DockerNovaApiImage:
     description: image
-    default: 'centos-binary-nova-api:latest'
     type: string
   DockerNovaConfigImage:
     description: The container image to use for the nova config_volume
-    default: 'centos-binary-nova-base:latest'
     type: string
   EndpointMap:
     default: {}
@@ -81,10 +75,7 @@ outputs:
         config_volume: nova
         puppet_tags: nova_config
         step_config: *step_config
-        config_image:
-          list_join:
-          - '/'
-          - [ {get_param: DockerNamespace}, {get_param: DockerNovaConfigImage} ]
+        config_image: {get_param: DockerNovaConfigImage}
       kolla_config:
         /var/lib/kolla/config_files/nova_api.json:
           command: /usr/bin/nova-api
@@ -97,14 +88,22 @@ 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:
           nova_init_logs:
-            image: &nova_api_image
-              list_join:
-                - '/'
-                - [ {get_param: DockerNamespace}, {get_param: DockerNovaApiImage} ]
+            image: &nova_api_image {get_param: DockerNovaApiImage}
             privileged: false
             user: root
             volumes:
@@ -163,7 +162,7 @@ outputs:
             user: nova
             privileged: true
             restart: always
-            volumes: &nova_api_volumes
+            volumes:
               list_concat:
                 - {get_attr: [ContainersCommon, volumes]}
                 -
@@ -176,12 +175,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