1 heat_template_version: ocata
4 OpenStack EC2-API service configured with Puppet
9 description: Mapping of service_name -> network name. Typically set
10 via parameter_defaults in the resource registry. This
11 mapping overrides those in ServiceNetMapDefaults.
18 description: Mapping of service endpoint -> protocol. Typically set
19 via parameter_defaults in the resource registry.
23 description: Number of workers for EC2-API service.
26 description: The password for the nova service and db account, used by nova-api.
32 description: Keystone region for endpoint
33 MonitoringSubscriptionEc2Api:
34 default: 'overcloud-ec2-api'
39 tag: openstack.ec2.api
40 path: /var/log/ec2api/ec2api.log
43 description: Set to true to enable package installation via Puppet
47 A hash of policies to configure for EC2-API.
48 e.g. { ec2api-context_is_admin: { key: context_is_admin, value: 'role:admin' } }
54 nova_workers_zero: {equals : [{get_param: Ec2ApiWorkers}, 0]}
58 description: Role data for the EC2-API service.
61 monitoring_subscription: {get_param: MonitoringSubscriptionEc2Api}
62 logging_source: {get_param: Ec2ApiLoggingSource}
67 - tripleo.ec2_api.firewall_rules:
72 ec2api::keystone::authtoken::project_name: 'service'
73 ec2api::keystone::authtoken::password: {get_param: Ec2ApiPassword}
74 ec2api::keystone::authtoken::auth_uri: {get_param: [EndpointMap, KeystoneInternal, uri] }
75 ec2api::keystone::authtoken::auth_url: {get_param: [EndpointMap, KeystoneInternal, uri_no_suffix]}
76 ec2api::policy::policies: {get_param: Ec2ApiPolicies}
77 ec2api::api::enabled: true
78 ec2api::package_manage: {get_param: EnablePackageInstall}
79 ec2api::api::ec2api_listen:
82 "%{hiera('fqdn_$NETWORK')}"
84 $NETWORK: {get_param: [ServiceNetMap, Ec2ApiNetwork]}
85 ec2api::metadata::metadata_listen:
88 "%{hiera('fqdn_$NETWORK')}"
90 $NETWORK: {get_param: [ServiceNetMap, Ec2ApiMetadataNetwork]}
91 ec2api::db::database_connection:
94 - - {get_param: [EndpointMap, MysqlInternal, protocol]}
96 - {get_param: Ec2ApiPassword}
98 - {get_param: [EndpointMap, MysqlInternal, host]}
100 - '?read_default_file=/etc/my.cnf.d/tripleo.cnf&read_default_group=tripleo'
101 ec2api::api::keystone_ec2_tokens_url:
104 - - {get_param: [EndpointMap, KeystoneV3Internal, uri]}
110 - ec2api::api::ec2api_workers: {get_param: Ec2ApiWorkers}
111 ec2api::metadata::metadata_workers: {get_param: Ec2ApiWorkers}
113 include tripleo::profile::base::nova::ec2api
114 service_config_settings:
116 ec2api::keystone::auth::tenant: 'service'
117 ec2api::keystone::auth::public_url: {get_param: [EndpointMap, Ec2ApiPublic, uri]}
118 ec2api::keystone::auth::internal_url: {get_param: [EndpointMap, Ec2ApiInternal, uri]}
119 ec2api::keystone::auth::admin_url: {get_param: [EndpointMap, Ec2ApiAdmin, uri]}
120 ec2api::keystone::auth::password: {get_param: Ec2ApiPassword}
121 ec2api::keystone::auth::region: {get_param: KeystoneRegion}
123 ec2api::db::mysql::password: {get_param: Ec2ApiPassword}
124 ec2api::db::mysql::user: ec2_api
125 ec2api::db::mysql::host: {get_param: [EndpointMap, MysqlInternal, host_nobrackets]}
126 ec2api::db::mysql::dbname: ec2_api
127 ec2api::db::mysql::allowed_hosts:
129 - "%{hiera('mysql_bind_host')}"
131 - name: Check if ec2-api is deployed
132 command: systemctl is-enabled openstack-ec2-api
135 register: ec2_api_enabled
136 - name: "PreUpgrade step0,validation: Check if openstack-ec2-api is running"
138 /usr/bin/systemctl show 'openstack-ec2-api' --property ActiveState |
140 when: ec2_api_enabled.rc == 0
141 tags: step0,validation
142 - name: Stop openstack-ec2-api service
144 when: ec2_api_enabled.rc == 0
145 service: name=openstack-ec2-api state=stopped
146 - name: Install openstack-ec2-api package if it was disabled
148 yum: name=openstack-ec2-api state=latest
149 when: ec2_api_enabled.rc != 0