1 heat_template_version: pike
4 OpenStack containerized Keystone service
9 default: 'tripleoupstream'
13 default: 'centos-binary-keystone:latest'
15 DockerKeystoneConfigImage:
16 description: The container image to use for the keystone config_volume
17 default: 'centos-binary-keystone:latest'
21 description: Mapping of service endpoint -> protocol. Typically set
22 via parameter_defaults in the resource registry.
26 description: Dictionary packing service data
30 description: Mapping of service_name -> network name. Typically set
31 via parameter_defaults in the resource registry. This
32 mapping overrides those in ServiceNetMapDefaults.
39 description: Role name on which the service is applied
43 description: Parameters specific to the role
46 description: The password for the keystone admin account, used for monitoring, querying neutron etc.
49 KeystoneTokenProvider:
50 description: The keystone token format
54 - allowed_values: ['uuid', 'fernet']
62 type: ./containers-common.yaml
65 type: ../../puppet/services/keystone.yaml
67 EndpointMap: {get_param: EndpointMap}
68 ServiceData: {get_param: ServiceData}
69 ServiceNetMap: {get_param: ServiceNetMap}
70 DefaultPasswords: {get_param: DefaultPasswords}
71 RoleName: {get_param: RoleName}
72 RoleParameters: {get_param: RoleParameters}
76 internal_tls_enabled: {equals: [{get_param: EnableInternalTLS}, true]}
80 description: Role data for the Keystone API role.
82 service_name: {get_attr: [KeystoneBase, role_data, service_name]}
85 - get_attr: [KeystoneBase, role_data, config_settings]
86 - apache::default_vhost: false
87 step_config: &step_config
90 - - "['Keystone_user', 'Keystone_endpoint', 'Keystone_domain', 'Keystone_tenant', 'Keystone_user_role', 'Keystone_role', 'Keystone_service'].each |String $val| { noop_resource($val) }"
91 - {get_attr: [KeystoneBase, role_data, step_config]}
92 service_config_settings: {get_attr: [KeystoneBase, role_data, service_config_settings]}
93 # BEGIN DOCKER SETTINGS
95 config_volume: keystone
96 puppet_tags: keystone_config
97 step_config: *step_config
98 config_image: &keystone_config_image
101 - [ {get_param: DockerNamespace}, {get_param: DockerKeystoneConfigImage} ]
103 /var/lib/kolla/config_files/keystone.json:
104 command: /usr/sbin/httpd -DFOREGROUND
106 - source: "/var/lib/kolla/config_files/src/*"
109 preserve_properties: true
111 # Kolla_bootstrap/db sync runs before permissions set by kolla_config
114 image: &keystone_image
117 - [ {get_param: DockerNamespace}, {get_param: DockerKeystoneImage} ]
119 command: ['/bin/bash', '-c', 'mkdir -p /var/log/httpd; chown -R keystone:keystone /var/log/keystone']
121 - /var/log/containers/keystone:/var/log/keystone
124 image: *keystone_image
129 volumes: &keystone_volumes
131 - {get_attr: [ContainersCommon, volumes]}
133 - /var/lib/kolla/config_files/keystone.json:/var/lib/kolla/config_files/config.json:ro
134 - /var/lib/config-data/puppet-generated/keystone/:/var/lib/kolla/config_files/src:ro
135 - /var/log/containers/keystone:/var/log/keystone
138 - internal_tls_enabled
139 - /etc/pki/tls/certs/httpd:/etc/pki/tls/certs/httpd:ro
143 - internal_tls_enabled
144 - /etc/pki/tls/private/httpd:/etc/pki/tls/private/httpd:ro
147 - KOLLA_BOOTSTRAP=True
148 - KOLLA_CONFIG_STRATEGY=COPY_ALWAYS
149 command: ['/usr/bin/bootstrap_host_exec', 'keystone', '/usr/local/bin/kolla_start']
152 image: *keystone_image
156 volumes: *keystone_volumes
158 - KOLLA_CONFIG_STRATEGY=COPY_ALWAYS
164 [ 'keystone', '/usr/bin/bootstrap_host_exec', 'keystone' ,'keystone-manage', 'bootstrap', '--bootstrap-password', {get_param: AdminPassword} ]
166 # Keystone endpoint creation occurs only on single node
168 config_volume: 'keystone_init_tasks'
169 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'
170 step_config: 'include ::tripleo::profile::base::keystone'
171 config_image: *keystone_config_image
173 - name: create persistent logs directory
175 path: /var/log/containers/keystone
178 - name: Stop and disable keystone service (running under httpd)
180 service: name=httpd state=stopped enabled=no
182 get_attr: [KeystoneBase, role_data, metadata_settings]