1 heat_template_version: pike
4 OpenStack EC2-API service configured with Puppet
9 description: Dictionary packing service data
13 description: Mapping of service_name -> network name. Typically set
14 via parameter_defaults in the resource registry. This
15 mapping overrides those in ServiceNetMapDefaults.
22 description: Role name on which the service is applied
26 description: Parameters specific to the role
30 description: Mapping of service endpoint -> protocol. Typically set
31 via parameter_defaults in the resource registry.
35 description: Number of workers for EC2-API service.
38 description: The password for the nova service and db account, used by nova-api.
44 description: Keystone region for endpoint
45 Ec2ApiExternalNetwork:
48 description: Name of the external network, which is used to connect VPCs to
49 Internet and to allocate Elastic IPs
50 NovaDefaultFloatingPool:
52 description: Default pool for floating IP addresses
54 MonitoringSubscriptionEc2Api:
55 default: 'overcloud-ec2-api'
60 tag: openstack.ec2.api
61 path: /var/log/ec2api/ec2api.log
64 description: Set to true to enable package installation at deploy time
68 A hash of policies to configure for EC2-API.
69 e.g. { ec2api-context_is_admin: { key: context_is_admin, value: 'role:admin' } }
75 nova_workers_zero: {equals : [{get_param: Ec2ApiWorkers}, 0]}
76 external_network_unset: {equals : [{get_param: Ec2ApiExternalNetwork}, '']}
80 description: Role data for the EC2-API service.
83 monitoring_subscription: {get_param: MonitoringSubscriptionEc2Api}
84 logging_source: {get_param: Ec2ApiLoggingSource}
89 - tripleo.ec2_api.firewall_rules:
94 ec2api::keystone::authtoken::project_name: 'service'
95 ec2api::keystone::authtoken::password: {get_param: Ec2ApiPassword}
96 ec2api::keystone::authtoken::auth_uri: {get_param: [EndpointMap, KeystoneInternal, uri] }
97 ec2api::keystone::authtoken::auth_url: {get_param: [EndpointMap, KeystoneInternal, uri_no_suffix]}
98 ec2api::policy::policies: {get_param: Ec2ApiPolicies}
99 ec2api::api::enabled: true
100 ec2api::package_manage: {get_param: EnablePackageInstall}
101 ec2api::api::ec2api_listen:
104 "%{hiera('fqdn_$NETWORK')}"
106 $NETWORK: {get_param: [ServiceNetMap, Ec2ApiNetwork]}
107 ec2api::metadata::metadata_listen:
110 "%{hiera('fqdn_$NETWORK')}"
112 $NETWORK: {get_param: [ServiceNetMap, Ec2ApiMetadataNetwork]}
113 ec2api::db::database_connection:
115 scheme: {get_param: [EndpointMap, MysqlInternal, protocol]}
117 password: {get_param: Ec2ApiPassword}
118 host: {get_param: [EndpointMap, MysqlInternal, host]}
121 read_default_file: /etc/my.cnf.d/tripleo.cnf
122 read_default_group: tripleo
123 ec2api::api::keystone_ec2_tokens_url:
126 - - {get_param: [EndpointMap, KeystoneV3Internal, uri]}
132 - ec2api::api::ec2api_workers: {get_param: Ec2ApiWorkers}
133 ec2api::metadata::metadata_workers: {get_param: Ec2ApiWorkers}
136 - external_network_unset
137 - ec2api::api::external_network: {get_param: NovaDefaultFloatingPool}
138 - ec2api::api::external_network: {get_param: Ec2ApiExternalNetwork}
140 include tripleo::profile::base::nova::ec2api
141 service_config_settings:
143 ec2api::keystone::auth::tenant: 'service'
144 ec2api::keystone::auth::public_url: {get_param: [EndpointMap, Ec2ApiPublic, uri]}
145 ec2api::keystone::auth::internal_url: {get_param: [EndpointMap, Ec2ApiInternal, uri]}
146 ec2api::keystone::auth::admin_url: {get_param: [EndpointMap, Ec2ApiAdmin, uri]}
147 ec2api::keystone::auth::password: {get_param: Ec2ApiPassword}
148 ec2api::keystone::auth::region: {get_param: KeystoneRegion}
150 ec2api::db::mysql::password: {get_param: Ec2ApiPassword}
151 ec2api::db::mysql::user: ec2_api
152 ec2api::db::mysql::host: {get_param: [EndpointMap, MysqlInternal, host_nobrackets]}
153 ec2api::db::mysql::dbname: ec2_api
154 ec2api::db::mysql::allowed_hosts:
156 - "%{hiera('mysql_bind_host')}"
158 - name: Check if ec2-api is deployed
159 command: systemctl is-enabled openstack-ec2-api
162 register: ec2_api_enabled
163 - name: "PreUpgrade step0,validation: Check if openstack-ec2-api is running"
165 /usr/bin/systemctl show 'openstack-ec2-api' --property ActiveState |
167 when: ec2_api_enabled.rc == 0
168 tags: step0,validation
169 - name: Stop openstack-ec2-api service
171 when: ec2_api_enabled.rc == 0
172 service: name=openstack-ec2-api state=stopped
173 - name: Install openstack-ec2-api package if it was disabled
175 yum: name=openstack-ec2-api state=latest
176 when: ec2_api_enabled.rc != 0