Merge "Make ceilometer crontab removal idempotent"
[apex-tripleo-heat-templates.git] / docker / services / nova-compute.yaml
index 3e14674..1277a8f 100644 (file)
@@ -12,6 +12,10 @@ parameters:
     description: image
     default: 'centos-binary-nova-compute:latest'
     type: string
+  DockerNovaLibvirtConfigImage:
+    description: The container image to use for the nova_libvirt config_volume
+    default: 'centos-binary-nova-compute:latest'
+    type: string
   ServiceNetMap:
     default: {}
     description: Mapping of service_name -> network name. Typically set
@@ -21,6 +25,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
@@ -38,6 +50,8 @@ resources:
       EndpointMap: {get_param: EndpointMap}
       ServiceNetMap: {get_param: ServiceNetMap}
       DefaultPasswords: {get_param: DefaultPasswords}
+      RoleName: {get_param: RoleName}
+      RoleParameters: {get_param: RoleParameters}
 
 outputs:
   role_data:
@@ -59,12 +73,12 @@ outputs:
         config_volume: nova_libvirt
         puppet_tags: nova_config,nova_paste_api_ini
         step_config: *step_config
-        config_image: &nova_compute_image
+        config_image:
           list_join:
           - '/'
-          - [ {get_param: DockerNamespace}, {get_param: DockerNovaComputeImage} ]
+          - [ {get_param: DockerNamespace}, {get_param: DockerNovaLibvirtConfigImage} ]
       kolla_config:
-        /var/lib/kolla/config_files/nova-compute.json:
+        /var/lib/kolla/config_files/nova_compute.json:
           command: /usr/bin/nova-compute --config-file /etc/nova/nova.conf --config-file /etc/nova/rootwrap.conf
           permissions:
             - path: /var/log/nova
@@ -76,17 +90,20 @@ outputs:
       docker_config:
         # FIXME: run discover hosts here
         step_4:
-          novacompute:
-            image: *nova_compute_image
+          nova_compute:
+            image: &nova_compute_image
+              list_join:
+              - '/'
+              - [ {get_param: DockerNamespace}, {get_param: DockerNovaComputeImage} ]
             net: host
             privileged: true
-            user: root
+            user: nova
             restart: always
             volumes:
               list_concat:
                 - {get_attr: [ContainersCommon, volumes]}
                 -
-                  - /var/lib/kolla/config_files/nova-compute.json:/var/lib/kolla/config_files/config.json:ro
+                  - /var/lib/kolla/config_files/nova_compute.json:/var/lib/kolla/config_files/config.json:ro
                   - /var/lib/config-data/nova_libvirt/etc/nova/:/etc/nova/:ro
                   - /dev:/dev
                   - /etc/iscsi:/etc/iscsi