1 heat_template_version: pike
4 OpenStack containerized Keystone service
10 DockerKeystoneConfigImage:
11 description: The container image to use for the keystone config_volume
15 description: Mapping of service endpoint -> protocol. Typically set
16 via parameter_defaults in the resource registry.
20 description: Dictionary packing service data
24 description: Mapping of service_name -> network name. Typically set
25 via parameter_defaults in the resource registry. This
26 mapping overrides those in ServiceNetMapDefaults.
33 description: Role name on which the service is applied
37 description: Parameters specific to the role
40 description: The password for the keystone admin account, used for monitoring, querying neutron etc.
43 KeystoneTokenProvider:
44 description: The keystone token format
48 - allowed_values: ['uuid', 'fernet']
56 type: ./containers-common.yaml
59 type: ../../puppet/services/database/mysql-client.yaml
62 type: ../../puppet/services/keystone.yaml
64 EndpointMap: {get_param: EndpointMap}
65 ServiceData: {get_param: ServiceData}
66 ServiceNetMap: {get_param: ServiceNetMap}
67 DefaultPasswords: {get_param: DefaultPasswords}
68 RoleName: {get_param: RoleName}
69 RoleParameters: {get_param: RoleParameters}
73 internal_tls_enabled: {equals: [{get_param: EnableInternalTLS}, true]}
77 description: Role data for the Keystone API role.
79 service_name: {get_attr: [KeystoneBase, role_data, service_name]}
82 - get_attr: [KeystoneBase, role_data, config_settings]
83 - apache::default_vhost: false
84 step_config: &step_config
87 - - "['Keystone_user', 'Keystone_endpoint', 'Keystone_domain', 'Keystone_tenant', 'Keystone_user_role', 'Keystone_role', 'Keystone_service'].each |String $val| { noop_resource($val) }"
88 - {get_attr: [KeystoneBase, role_data, step_config]}
89 - {get_attr: [MySQLClient, role_data, step_config]}
90 service_config_settings: {get_attr: [KeystoneBase, role_data, service_config_settings]}
91 # BEGIN DOCKER SETTINGS
93 config_volume: keystone
94 puppet_tags: keystone_config
95 step_config: *step_config
96 config_image: &keystone_config_image {get_param: DockerKeystoneConfigImage}
98 /var/lib/kolla/config_files/keystone.json:
99 command: /usr/sbin/httpd -DFOREGROUND
101 - source: "/var/lib/kolla/config_files/src/*"
104 preserve_properties: true
105 /var/lib/kolla/config_files/keystone_cron.json:
106 # FIXME(dprince): this is unused ATM because Kolla hardcodes the
107 # args for the keystone container to -DFOREGROUND
108 command: /usr/sbin/crond -n
110 - source: "/var/lib/kolla/config_files/src/*"
113 preserve_properties: true
115 - path: /var/log/keystone
116 owner: keystone:keystone
119 # Kolla_bootstrap/db sync runs before permissions set by kolla_config
122 image: &keystone_image {get_param: DockerKeystoneImage}
124 command: ['/bin/bash', '-c', 'chown -R keystone:keystone /var/log/keystone']
126 - /var/log/containers/keystone:/var/log/keystone
127 - /var/log/containers/httpd/keystone:/var/log/httpd
130 image: *keystone_image
135 volumes: &keystone_volumes
137 - {get_attr: [ContainersCommon, volumes]}
139 - /var/lib/kolla/config_files/keystone.json:/var/lib/kolla/config_files/config.json:ro
140 - /var/lib/config-data/puppet-generated/keystone/:/var/lib/kolla/config_files/src:ro
141 - /var/log/containers/keystone:/var/log/keystone
142 - /var/log/containers/httpd/keystone:/var/log/httpd
145 - internal_tls_enabled
146 - /etc/pki/tls/certs/httpd:/etc/pki/tls/certs/httpd:ro
150 - internal_tls_enabled
151 - /etc/pki/tls/private/httpd:/etc/pki/tls/private/httpd:ro
154 - KOLLA_BOOTSTRAP=True
155 - KOLLA_CONFIG_STRATEGY=COPY_ALWAYS
156 command: ['/usr/bin/bootstrap_host_exec', 'keystone', '/usr/local/bin/kolla_start']
159 image: *keystone_image
163 volumes: *keystone_volumes
165 - KOLLA_CONFIG_STRATEGY=COPY_ALWAYS
171 [ 'keystone', '/usr/bin/bootstrap_host_exec', 'keystone' ,'keystone-manage', 'bootstrap', '--bootstrap-password', {get_param: AdminPassword} ]
174 image: *keystone_image
179 command: ['/bin/bash', '-c', '/usr/local/bin/kolla_set_configs && /usr/sbin/crond -n']
184 - {get_attr: [ContainersCommon, volumes]}
186 - /var/lib/kolla/config_files/keystone_cron.json:/var/lib/kolla/config_files/config.json:ro
187 - /var/lib/config-data/puppet-generated/keystone/:/var/lib/kolla/config_files/src:ro
188 - /var/log/containers/keystone:/var/log/keystone
189 - /var/log/containers/httpd/keystone:/var/log/httpd
191 - KOLLA_CONFIG_STRATEGY=COPY_ALWAYS
193 # Keystone endpoint creation occurs only on single node
195 config_volume: 'keystone_init_tasks'
196 puppet_tags: 'keystone_config,keystone_domain_config,keystone_endpoint,keystone_identity_provider,keystone_paste_ini,keystone_role,keystone_service,keystone_tenant,keystone_user,keystone_user_role,keystone_domain'
197 step_config: 'include ::tripleo::profile::base::keystone'
198 config_image: *keystone_config_image
200 - name: create persistent logs directory
205 - /var/log/containers/keystone
206 - /var/log/containers/httpd/keystone
208 - name: Stop and disable keystone service (running under httpd)
210 service: name=httpd state=stopped enabled=no
211 - name: remove old keystone cron jobs
213 path: /var/spool/cron/keystone
216 get_attr: [KeystoneBase, role_data, metadata_settings]