1 heat_template_version: pike
4 OpenStack containerized EC2 API service
9 default: 'tripleoupstream'
13 default: 'centos-binary-ec2-api:latest'
17 description: Mapping of service endpoint -> protocol. Typically set
18 via parameter_defaults in the resource registry.
22 description: Mapping of service_name -> network name. Typically set
23 via parameter_defaults in the resource registry. This
24 mapping overrides those in ServiceNetMapDefaults.
31 description: Role name on which the service is applied
35 description: Parameters specific to the role
41 type: ./containers-common.yaml
44 type: ../../puppet/services/ec2-api.yaml
46 EndpointMap: {get_param: EndpointMap}
47 ServiceNetMap: {get_param: ServiceNetMap}
48 DefaultPasswords: {get_param: DefaultPasswords}
49 RoleName: {get_param: RoleName}
50 RoleParameters: {get_param: RoleParameters}
54 description: Role data for the EC2 API role.
56 service_name: {get_attr: [Ec2ApiPuppetBase, role_data, service_name]}
57 config_settings: {get_attr: [Ec2ApiPuppetBase, role_data, config_settings]}
58 step_config: &step_config
59 get_attr: [Ec2ApiPuppetBase, role_data, step_config]
60 service_config_settings: {get_attr: [Ec2ApiPuppetBase, role_data, service_config_settings]}
61 # BEGIN DOCKER SETTINGS
64 puppet_tags: ec2api_api_paste_ini,ec2api_config
65 step_config: *step_config
66 config_image: &ec2_api_image
69 - [ {get_param: DockerNamespace}, {get_param: DockerEc2ApiImage} ]
71 /var/lib/kolla/config_files/ec2_api.json:
72 command: /usr/bin/ec2-api
74 - path: /var/log/ec2api
77 /var/lib/kolla/config_files/ec2_api_metadata.json:
78 command: /usr/bin/ec2-api-metadata
80 - path: /var/log/ec2api # default log dir for metadata service as well
84 # db sync runs before permissions set by kolla_config
91 - /var/log/containers/ec2_api:/var/log/ec2api
92 # mount ec2_api_metadata to "ec2api-metadata" only here to fix
93 # permissions of both directories in one go
94 - /var/log/containers/ec2_api_metadata:/var/log/ec2api-metadata
95 command: ['/bin/bash', '-c', 'chown -R ec2api:ec2api /var/log/ec2api /var/log/ec2api-metadata']
105 - {get_attr: [ContainersCommon, volumes]}
107 - /var/lib/config-data/ec2_api/etc/ec2api/:/etc/ec2api/:ro
108 - /var/log/containers/ec2_api:/var/log/ec2api
109 command: "/usr/bin/bootstrap_host_exec ec2_api su ec2api -s /bin/bash -c '/usr/bin/ec2-api-manage db_sync'"
112 image: *ec2_api_image
118 - {get_attr: [ContainersCommon, volumes]}
120 - /var/lib/kolla/config_files/ec2_api.json:/var/lib/kolla/config_files/config.json:ro
121 - /var/lib/config-data/ec2_api/etc/ec2api/:/etc/ec2api/:ro
122 - /var/log/containers/ec2_api:/var/log/ec2api
124 - KOLLA_CONFIG_STRATEGY=COPY_ALWAYS
126 image: *ec2_api_image
132 - {get_attr: [ContainersCommon, volumes]}
134 - /var/lib/kolla/config_files/ec2_api_metadata.json:/var/lib/kolla/config_files/config.json:ro
135 - /var/lib/config-data/ec2_api/etc/ec2api/:/etc/ec2api/:ro
136 - /var/log/containers/ec2_api_metadata:/var/log/ec2api
138 - KOLLA_CONFIG_STRATEGY=COPY_ALWAYS
140 - name: create persistent log directories
142 path: /var/log/containers/{{ item }}
148 - name: Stop and disable EC2-API services
150 service: name={{ item }} state=stopped enabled=no
153 - openstack-ec2-api-metadata