1 heat_template_version: pike
4 OpenStack containerized Barbican API service
7 DockerBarbicanApiImage:
10 DockerBarbicanConfigImage:
11 description: The container image to use for the barbican 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
45 internal_tls_enabled: {equals: [{get_param: EnableInternalTLS}, true]}
50 type: ./containers-common.yaml
53 type: ../../puppet/services/database/mysql-client.yaml
56 type: ../../puppet/services/barbican-api.yaml
58 EndpointMap: {get_param: EndpointMap}
59 ServiceData: {get_param: ServiceData}
60 ServiceNetMap: {get_param: ServiceNetMap}
61 DefaultPasswords: {get_param: DefaultPasswords}
62 RoleName: {get_param: RoleName}
63 RoleParameters: {get_param: RoleParameters}
67 description: Role data for the Barbican API role.
69 service_name: {get_attr: [BarbicanApiBase, role_data, service_name]}
72 - get_attr: [BarbicanApiBase, role_data, config_settings]
73 - apache::default_vhost: false
74 logging_source: {get_attr: [BarbicanApiBase, role_data, logging_source]}
75 logging_groups: {get_attr: [BarbicanApiBase, role_data, logging_groups]}
76 step_config: &step_config
79 - - {get_attr: [BarbicanApiBase, role_data, step_config]}
80 - {get_attr: [MySQLClient, role_data, step_config]}
81 service_config_settings: {get_attr: [BarbicanApiBase, role_data, service_config_settings]}
82 # BEGIN DOCKER SETTINGS
84 config_volume: barbican
85 puppet_tags: barbican_api_paste_ini,barbican_config
86 step_config: *step_config
87 config_image: {get_param: DockerBarbicanConfigImage}
89 /var/lib/kolla/config_files/barbican_api.json:
90 command: /usr/sbin/httpd -DFOREGROUND
92 - source: "/var/lib/kolla/config_files/src/*"
95 preserve_properties: true
97 # db sync runs before permissions set by kolla_config
100 image: &barbican_api_image {get_param: DockerBarbicanApiImage}
104 - /var/log/containers/barbican:/var/log/barbican
105 command: ['/bin/bash', '-c', 'chown -R barbican:barbican /var/log/barbican']
107 barbican_api_db_sync:
109 image: *barbican_api_image
113 volumes: &barbican_api_volumes
115 - {get_attr: [ContainersCommon, volumes]}
117 - /var/lib/config-data/barbican/etc/barbican/:/etc/barbican/:ro
118 - /var/log/containers/barbican:/var/log/barbican
119 command: "/usr/bin/bootstrap_host_exec barbican_api su barbican -s /bin/bash -c '/usr/bin/barbican-manage db upgrade'"
122 image: *barbican_api_image
129 - {get_attr: [ContainersCommon, volumes]}
131 - /var/lib/kolla/config_files/barbican_api.json:/var/lib/kolla/config_files/config.json:ro
132 - /var/log/containers/barbican:/var/log/barbican
133 - /var/lib/config-data/puppet-generated/barbican/:/var/lib/kolla/config_files/src:ro
136 - internal_tls_enabled
137 - /etc/pki/tls/certs/httpd:/etc/pki/tls/certs/httpd:ro
141 - internal_tls_enabled
142 - /etc/pki/tls/private/httpd:/etc/pki/tls/private/httpd:ro
145 - KOLLA_CONFIG_STRATEGY=COPY_ALWAYS
147 - name: create persistent logs directory
149 path: /var/log/containers/barbican
152 - name: Stop and disable barbican_api service
154 service: name=openstack-barbican-api state=stopped enabled=no
156 get_attr: [BarbicanApiBase, role_data, metadata_settings]