Merge "Allow volumes in puppet_config containers spec"
[apex-tripleo-heat-templates.git] / docker / services / database / redis.yaml
index 9000aee..0a490cd 100644 (file)
@@ -12,6 +12,10 @@ parameters:
     description: image
     default: 'centos-binary-redis:latest'
     type: string
+  DockerRedisConfigImage:
+    description: The container image to use for the redis config_volume
+    default: 'centos-binary-redis:latest'
+    type: string
   EndpointMap:
     default: {}
     description: Mapping of service endpoint -> protocol. Typically set
@@ -64,10 +68,10 @@ outputs:
         # https://github.com/arioch/puppet-redis/commit/1c004143223e660cbd433422ff8194508aab9763
         puppet_tags: 'exec'
         step_config: *step_config
-        config_image: &redis_image
+        config_image:
           list_join:
             - '/'
-            - [ {get_param: DockerNamespace}, {get_param: DockerRedisImage} ]
+            - [ {get_param: DockerNamespace}, {get_param: DockerRedisConfigImage} ]
       kolla_config:
         /var/lib/kolla/config_files/redis.json:
           command: /usr/bin/redis-server /etc/redis.conf
@@ -79,13 +83,18 @@ outputs:
         step_1:
           redis_init_logs:
             start_order: 0
-            image: *redis_image
+            detach: false
+            image: &redis_image
+              list_join:
+                - '/'
+                - [ {get_param: DockerNamespace}, {get_param: DockerRedisImage} ]
             privileged: false
             user: root
             volumes:
               - /var/log/containers/redis:/var/log/redis
             command: ['/bin/bash', '-c', 'chown -R redis:redis /var/log/redis']
           redis:
+            start_order: 1
             image: *redis_image
             net: host
             privileged: false
@@ -93,7 +102,7 @@ outputs:
             volumes:
               - /run:/run
               - /var/lib/kolla/config_files/redis.json:/var/lib/kolla/config_files/config.json:ro
-              - /var/lib/config-data/redis/etc/:/etc/:ro
+              - /var/lib/config-data/redis/etc/redis.conf:/etc/redis.conf:ro
               - /etc/localtime:/etc/localtime:ro
               - /var/log/containers/redis:/var/log/redis
             environment: