2017-09-04 08:31:57 +02:00
|
|
|
heat_template_version: queens
|
2016-05-13 14:31:45 +00:00
|
|
|
|
|
|
|
description: >
|
|
|
|
OpenStack Ironic API configured with Puppet
|
|
|
|
|
|
|
|
parameters:
|
2017-06-22 17:25:03 +02:00
|
|
|
ServiceData:
|
|
|
|
default: {}
|
|
|
|
description: Dictionary packing service data
|
|
|
|
type: json
|
2016-08-11 23:07:46 +02:00
|
|
|
ServiceNetMap:
|
|
|
|
default: {}
|
|
|
|
description: Mapping of service_name -> network name. Typically set
|
|
|
|
via parameter_defaults in the resource registry. This
|
|
|
|
mapping overrides those in ServiceNetMapDefaults.
|
|
|
|
type: json
|
2016-08-17 09:26:05 -04:00
|
|
|
DefaultPasswords:
|
|
|
|
default: {}
|
|
|
|
type: json
|
2017-02-24 06:27:58 -05:00
|
|
|
RoleName:
|
|
|
|
default: ''
|
|
|
|
description: Role name on which the service is applied
|
|
|
|
type: string
|
|
|
|
RoleParameters:
|
|
|
|
default: {}
|
|
|
|
description: Parameters specific to the role
|
|
|
|
type: json
|
2016-05-13 14:31:45 +00:00
|
|
|
EndpointMap:
|
|
|
|
default: {}
|
|
|
|
description: Mapping of service endpoint -> protocol. Typically set
|
|
|
|
via parameter_defaults in the resource registry.
|
|
|
|
type: json
|
|
|
|
IronicPassword:
|
|
|
|
description: The password for the Ironic service and db account, used by the Ironic services
|
|
|
|
type: string
|
|
|
|
hidden: true
|
2016-06-09 15:39:22 +02:00
|
|
|
MonitoringSubscriptionIronicApi:
|
|
|
|
default: 'overcloud-ironic-api'
|
|
|
|
type: string
|
2017-02-04 13:50:08 +00:00
|
|
|
KeystoneRegion:
|
|
|
|
type: string
|
|
|
|
default: 'regionOne'
|
|
|
|
description: Keystone region for endpoint
|
2017-03-14 21:09:11 -04:00
|
|
|
IronicApiPolicies:
|
|
|
|
description: |
|
|
|
|
A hash of policies to configure for Ironic API.
|
|
|
|
e.g. { ironic-context_is_admin: { key: context_is_admin, value: 'role:admin' } }
|
|
|
|
default: {}
|
|
|
|
type: json
|
2017-06-12 15:16:06 +02:00
|
|
|
EnableInternalTLS:
|
|
|
|
type: boolean
|
|
|
|
default: false
|
2016-05-13 14:31:45 +00:00
|
|
|
|
|
|
|
resources:
|
2017-06-12 15:16:06 +02:00
|
|
|
ApacheServiceBase:
|
|
|
|
type: ./apache.yaml
|
|
|
|
properties:
|
2017-06-22 17:25:03 +02:00
|
|
|
ServiceData: {get_param: ServiceData}
|
2017-06-12 15:16:06 +02:00
|
|
|
ServiceNetMap: {get_param: ServiceNetMap}
|
|
|
|
DefaultPasswords: {get_param: DefaultPasswords}
|
|
|
|
EndpointMap: {get_param: EndpointMap}
|
|
|
|
RoleName: {get_param: RoleName}
|
|
|
|
RoleParameters: {get_param: RoleParameters}
|
|
|
|
EnableInternalTLS: {get_param: EnableInternalTLS}
|
|
|
|
|
2016-05-13 14:31:45 +00:00
|
|
|
IronicBase:
|
|
|
|
type: ./ironic-base.yaml
|
|
|
|
properties:
|
2017-06-22 17:25:03 +02:00
|
|
|
ServiceData: {get_param: ServiceData}
|
2016-08-11 23:07:46 +02:00
|
|
|
ServiceNetMap: {get_param: ServiceNetMap}
|
2016-08-17 09:26:05 -04:00
|
|
|
DefaultPasswords: {get_param: DefaultPasswords}
|
2016-05-13 14:31:45 +00:00
|
|
|
EndpointMap: {get_param: EndpointMap}
|
2017-02-24 06:27:58 -05:00
|
|
|
RoleName: {get_param: RoleName}
|
|
|
|
RoleParameters: {get_param: RoleParameters}
|
2016-05-13 14:31:45 +00:00
|
|
|
|
|
|
|
outputs:
|
|
|
|
role_data:
|
|
|
|
description: Role data for the Ironic API role.
|
|
|
|
value:
|
2016-07-28 10:30:10 +01:00
|
|
|
service_name: ironic_api
|
2016-06-09 15:39:22 +02:00
|
|
|
monitoring_subscription: {get_param: MonitoringSubscriptionIronicApi}
|
2016-05-13 14:31:45 +00:00
|
|
|
config_settings:
|
|
|
|
map_merge:
|
|
|
|
- get_attr: [IronicBase, role_data, config_settings]
|
2017-06-12 15:16:06 +02:00
|
|
|
- get_attr: [ApacheServiceBase, role_data, config_settings]
|
2016-08-26 16:39:53 -04:00
|
|
|
- ironic::api::authtoken::password: {get_param: IronicPassword}
|
2016-08-23 16:09:03 -04:00
|
|
|
ironic::api::authtoken::project_name: 'service'
|
2017-03-10 12:28:41 -05:00
|
|
|
ironic::api::authtoken::user_domain_name: 'Default'
|
|
|
|
ironic::api::authtoken::project_domain_name: 'Default'
|
2016-08-23 16:09:03 -04:00
|
|
|
ironic::api::authtoken::username: 'ironic'
|
2017-03-10 12:28:41 -05:00
|
|
|
ironic::api::authtoken::auth_uri: {get_param: [EndpointMap, KeystoneInternal, uri_no_suffix] }
|
2017-02-10 20:47:13 +02:00
|
|
|
ironic::api::authtoken::auth_url: {get_param: [EndpointMap, KeystoneInternal, uri_no_suffix]}
|
2016-08-26 16:39:53 -04:00
|
|
|
# NOTE: bind IP is found in Heat replacing the network name with the
|
|
|
|
# local node IP for the given network; replacement examples
|
|
|
|
# (eg. for internal_api):
|
|
|
|
# internal_api -> IP
|
|
|
|
# internal_api_uri -> [IP]
|
|
|
|
# internal_api_subnet - > IP/CIDR
|
|
|
|
ironic::api::host_ip: {get_param: [ServiceNetMap, IronicApiNetwork]}
|
2016-07-13 13:12:27 +02:00
|
|
|
ironic::api::port: {get_param: [EndpointMap, IronicInternal, port]}
|
|
|
|
# This is used to build links in responses
|
|
|
|
ironic::api::public_endpoint: {get_param: [EndpointMap, IronicPublic, uri_no_suffix]}
|
2017-06-12 15:16:06 +02:00
|
|
|
ironic::api::service_name: 'httpd'
|
2017-03-14 21:09:11 -04:00
|
|
|
ironic::policy::policies: {get_param: IronicApiPolicies}
|
2017-06-12 15:16:06 +02:00
|
|
|
ironic::wsgi::apache::bind_host: {get_param: [ServiceNetMap, IronicApiNetwork]}
|
|
|
|
ironic::wsgi::apache::port: {get_param: [EndpointMap, IronicInternal, port]}
|
|
|
|
ironic::wsgi::apache::servername:
|
|
|
|
str_replace:
|
|
|
|
template:
|
|
|
|
"%{hiera('fqdn_$NETWORK')}"
|
|
|
|
params:
|
|
|
|
$NETWORK: {get_param: [ServiceNetMap, IronicApiNetwork]}
|
|
|
|
ironic::wsgi::apache::ssl: {get_param: EnableInternalTLS}
|
2016-08-17 17:12:26 +02:00
|
|
|
tripleo.ironic_api.firewall_rules:
|
|
|
|
'133 ironic api':
|
|
|
|
dport:
|
|
|
|
- 6385
|
|
|
|
- 13385
|
2016-05-13 14:31:45 +00:00
|
|
|
step_config: |
|
|
|
|
include ::tripleo::profile::base::ironic::api
|
2016-09-15 09:19:15 +02:00
|
|
|
service_config_settings:
|
|
|
|
keystone:
|
|
|
|
ironic::keystone::auth::admin_url: {get_param: [EndpointMap, IronicAdmin, uri_no_suffix]}
|
|
|
|
ironic::keystone::auth::internal_url: {get_param: [EndpointMap, IronicInternal, uri_no_suffix]}
|
|
|
|
ironic::keystone::auth::public_url: {get_param: [EndpointMap, IronicPublic, uri_no_suffix]}
|
|
|
|
ironic::keystone::auth::auth_name: 'ironic'
|
|
|
|
ironic::keystone::auth::password: {get_param: IronicPassword }
|
|
|
|
ironic::keystone::auth::tenant: 'service'
|
2017-02-04 13:50:08 +00:00
|
|
|
ironic::keystone::auth::region: {get_param: KeystoneRegion}
|
2016-09-26 13:52:46 -04:00
|
|
|
mysql:
|
|
|
|
ironic::db::mysql::password: {get_param: IronicPassword}
|
|
|
|
ironic::db::mysql::user: ironic
|
|
|
|
ironic::db::mysql::host: {get_param: [EndpointMap, MysqlInternal, host_nobrackets]}
|
|
|
|
ironic::db::mysql::dbname: ironic
|
|
|
|
ironic::db::mysql::allowed_hosts:
|
|
|
|
- '%'
|
|
|
|
- "%{hiera('mysql_bind_host')}"
|
2016-12-01 10:06:11 +00:00
|
|
|
upgrade_tasks:
|
2017-06-12 15:16:06 +02:00
|
|
|
- name: Stop ironic_api service (before httpd support)
|
2017-10-11 09:51:08 +03:00
|
|
|
when: step|int == 1
|
2017-06-12 15:16:06 +02:00
|
|
|
service: name=openstack-ironic-api state=stopped enabled=no
|
|
|
|
- name: Stop ironic_api service (running under httpd)
|
2017-10-11 09:51:08 +03:00
|
|
|
when: step|int == 1
|
2017-06-12 15:16:06 +02:00
|
|
|
service: name=httpd state=stopped
|