Merge "Make collectd run as root inside the container"
[apex-tripleo-heat-templates.git] / docker / services / horizon.yaml
index 022eb5d..3d3bc7c 100644 (file)
@@ -4,19 +4,21 @@ description: >
   OpenStack containerized Horizon service
 
 parameters:
-  DockerNamespace:
-    description: namespace
-    default: 'tripleoupstream'
-    type: string
   DockerHorizonImage:
     description: image
-    default: 'centos-binary-horizon:latest'
+    type: string
+  DockerHorizonConfigImage:
+    description: The container image to use for the horizon config_volume
     type: string
   EndpointMap:
     default: {}
     description: Mapping of service endpoint -> protocol. Typically set
                  via parameter_defaults in the resource registry.
     type: json
+  ServiceData:
+    default: {}
+    description: Dictionary packing service data
+    type: json
   ServiceNetMap:
     default: {}
     description: Mapping of service_name -> network name. Typically set
@@ -44,6 +46,7 @@ resources:
     type: ../../puppet/services/horizon.yaml
     properties:
       EndpointMap: {get_param: EndpointMap}
+      ServiceData: {get_param: ServiceData}
       ServiceNetMap: {get_param: ServiceNetMap}
       DefaultPasswords: {get_param: DefaultPasswords}
       RoleName: {get_param: RoleName}
@@ -70,13 +73,15 @@ outputs:
         config_volume: horizon
         puppet_tags: horizon_config
         step_config: {get_attr: [HorizonBase, role_data, step_config]}
-        config_image: &horizon_image
-          list_join:
-            - '/'
-            - [ {get_param: DockerNamespace}, {get_param: DockerHorizonImage} ]
+        config_image: {get_param: DockerHorizonConfigImage}
       kolla_config:
         /var/lib/kolla/config_files/horizon.json:
           command: /usr/sbin/httpd -DFOREGROUND
+          config_files:
+            - source: "/var/lib/kolla/config_files/src/*"
+              dest: "/"
+              merge: true
+              preserve_properties: true
           permissions:
             - path: /var/log/horizon/
               owner: apache:apache
@@ -86,9 +91,9 @@ outputs:
               owner: apache:apache
               recurse: false
       docker_config:
-        step_3:
+        step_2:
           horizon_fix_perms:
-            image: *horizon_image
+            image: &horizon_image {get_param: DockerHorizonImage}
             user: root
             # NOTE Set ownership for /var/log/horizon/horizon.log file here,
             # otherwise it's created by root when generating django cache.
@@ -99,8 +104,8 @@ outputs:
             volumes:
               - /var/log/containers/horizon:/var/log/horizon
               - /var/lib/config-data/horizon/etc/:/etc/
+        step_3:
           horizon:
-            start_order: 1
             image: *horizon_image
             net: host
             privileged: false
@@ -110,8 +115,7 @@ outputs:
                 - {get_attr: [ContainersCommon, volumes]}
                 -
                   - /var/lib/kolla/config_files/horizon.json:/var/lib/kolla/config_files/config.json:ro
-                  - /var/lib/config-data/horizon/etc/httpd:/etc/httpd:ro
-                  - /var/lib/config-data/horizon/etc/openstack-dashboard:/etc/openstack-dashboard:ro
+                  - /var/lib/config-data/puppet-generated/horizon/:/var/lib/kolla/config_files/src:ro
                   - /var/log/containers/horizon:/var/log/horizon
             environment:
               - KOLLA_CONFIG_STRATEGY=COPY_ALWAYS