Merge "Fix creation of iptables rules for non-HA containerized HAproxy"
[apex-tripleo-heat-templates.git] / docker / services / keystone.yaml
index 6fabcec..7ecfc32 100644 (file)
@@ -4,17 +4,11 @@ description: >
   OpenStack containerized Keystone service
 
 parameters:
-  DockerNamespace:
-    description: namespace
-    default: 'tripleoupstream'
-    type: string
   DockerKeystoneImage:
     description: image
-    default: 'centos-binary-keystone:latest'
     type: string
   DockerKeystoneConfigImage:
     description: The container image to use for the keystone config_volume
-    default: 'centos-binary-keystone:latest'
     type: string
   EndpointMap:
     default: {}
@@ -95,10 +89,7 @@ outputs:
         config_volume: keystone
         puppet_tags: keystone_config
         step_config: *step_config
-        config_image: &keystone_config_image
-          list_join:
-            - '/'
-            - [ {get_param: DockerNamespace}, {get_param: DockerKeystoneConfigImage} ]
+        config_image: &keystone_config_image {get_param: DockerKeystoneConfigImage}
       kolla_config:
         /var/lib/kolla/config_files/keystone.json:
           command: /usr/sbin/httpd -DFOREGROUND
@@ -107,14 +98,22 @@ outputs:
               dest: "/"
               merge: true
               preserve_properties: true
+        /var/lib/kolla/config_files/keystone_cron.json:
+          command: /usr/sbin/cron -n
+          config_files:
+            - source: "/var/lib/kolla/config_files/src/*"
+              dest: "/"
+              merge: true
+              preserve_properties: true
+          permissions:
+            - path: /var/log/keystone
+              owner: keystone:keystone
+              recurse: true
       docker_config:
         # Kolla_bootstrap/db sync runs before permissions set by kolla_config
         step_2:
           keystone_init_log:
-            image: &keystone_image
-              list_join:
-                - '/'
-                - [ {get_param: DockerNamespace}, {get_param: DockerKeystoneImage} ]
+            image: &keystone_image {get_param: DockerKeystoneImage}
             user: root
             command: ['/bin/bash', '-c', 'mkdir -p /var/log/httpd; chown -R keystone:keystone /var/log/keystone']
             volumes:
@@ -162,6 +161,21 @@ outputs:
             user: root
             command:
               [ 'keystone', '/usr/bin/bootstrap_host_exec', 'keystone' ,'keystone-manage', 'bootstrap', '--bootstrap-password', {get_param: AdminPassword} ]
+          keystone_cron:
+            start_order: 4
+            image: *keystone_image
+            net: host
+            privileged: false
+            restart: always
+            volumes:
+              list_concat:
+                - {get_attr: [ContainersCommon, volumes]}
+                -
+                  - /var/lib/kolla/config_files/keystone_cron.json:/var/lib/kolla/config_files/config.json:ro
+                  - /var/lib/config-data/puppet-generated/keystone/:/var/lib/kolla/config_files/src:ro
+                  - /var/log/containers/keystone:/var/log/keystone
+            environment:
+              - KOLLA_CONFIG_STRATEGY=COPY_ALWAYS
       docker_puppet_tasks:
         # Keystone endpoint creation occurs only on single node
         step_3: