2017-02-17 11:12:36 +01:00
|
|
|
heat_template_version: pike
|
2016-05-19 14:30:38 -04:00
|
|
|
|
|
|
|
description: >
|
|
|
|
OpenStack Sahara API service configured with Puppet
|
|
|
|
|
|
|
|
parameters:
|
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-19 14:30:38 -04:00
|
|
|
EndpointMap:
|
|
|
|
default: {}
|
|
|
|
description: Mapping of service endpoint -> protocol. Typically set
|
|
|
|
via parameter_defaults in the resource registry.
|
|
|
|
type: json
|
|
|
|
SaharaPassword:
|
|
|
|
description: The password for the sahara service account, used by sahara-api.
|
|
|
|
type: string
|
|
|
|
hidden: true
|
|
|
|
SaharaWorkers:
|
|
|
|
default: 0
|
|
|
|
description: The number of workers for the sahara-api.
|
|
|
|
type: number
|
|
|
|
KeystoneRegion:
|
|
|
|
type: string
|
|
|
|
default: 'regionOne'
|
|
|
|
description: Keystone region for endpoint
|
2016-06-09 15:39:22 +02:00
|
|
|
MonitoringSubscriptionSaharaApi:
|
|
|
|
default: 'overcloud-sahara-api'
|
|
|
|
type: string
|
2016-08-09 16:20:18 -04:00
|
|
|
SaharaApiLoggingSource:
|
|
|
|
type: json
|
|
|
|
default:
|
|
|
|
tag: openstack.sahara.api
|
|
|
|
path: /var/log/sahara/sahara-api.log
|
2017-03-14 21:09:11 -04:00
|
|
|
SaharaApiPolicies:
|
|
|
|
description: |
|
|
|
|
A hash of policies to configure for Sahara API.
|
|
|
|
e.g. { sahara-context_is_admin: { key: context_is_admin, value: 'role:admin' } }
|
|
|
|
default: {}
|
|
|
|
type: json
|
2016-05-19 14:30:38 -04:00
|
|
|
|
|
|
|
resources:
|
|
|
|
SaharaBase:
|
|
|
|
type: ./sahara-base.yaml
|
2016-06-30 17:50:28 +01:00
|
|
|
properties:
|
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-06-30 17:50:28 +01:00
|
|
|
EndpointMap: {get_param: EndpointMap}
|
2017-02-24 06:27:58 -05:00
|
|
|
RoleName: {get_param: RoleName}
|
|
|
|
RoleParameters: {get_param: RoleParameters}
|
2016-05-19 14:30:38 -04:00
|
|
|
|
|
|
|
outputs:
|
|
|
|
role_data:
|
|
|
|
description: Role data for the Sahara API role.
|
|
|
|
value:
|
2016-07-28 10:30:10 +01:00
|
|
|
service_name: sahara_api
|
2016-06-09 15:39:22 +02:00
|
|
|
monitoring_subscription: {get_param: MonitoringSubscriptionSaharaApi}
|
2016-08-09 16:20:18 -04:00
|
|
|
logging_source: {get_param: SaharaApiLoggingSource}
|
|
|
|
logging_groups:
|
|
|
|
- sahara
|
2016-05-19 14:30:38 -04:00
|
|
|
config_settings:
|
|
|
|
map_merge:
|
|
|
|
- get_attr: [SaharaBase, role_data, config_settings]
|
2016-06-30 17:50:28 +01:00
|
|
|
- sahara::port: {get_param: [EndpointMap, SaharaInternal, port]}
|
2017-03-14 21:09:11 -04:00
|
|
|
sahara::policy::policies: {get_param: SaharaApiPolicies}
|
2016-06-30 17:50:28 +01:00
|
|
|
sahara::service::api::api_workers: {get_param: SaharaWorkers}
|
2016-08-25 19:29:57 +02: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
|
|
|
|
sahara::host: {get_param: [ServiceNetMap, SaharaApiNetwork]}
|
2016-07-20 10:48:23 -04:00
|
|
|
tripleo.sahara_api.firewall_rules:
|
|
|
|
'132 sahara':
|
|
|
|
dport:
|
|
|
|
- 8386
|
|
|
|
- 13386
|
2016-05-19 14:30:38 -04:00
|
|
|
step_config: |
|
|
|
|
include ::tripleo::profile::base::sahara::api
|
2016-09-15 09:19:15 +02:00
|
|
|
service_config_settings:
|
|
|
|
keystone:
|
|
|
|
sahara::keystone::auth::tenant: 'service'
|
|
|
|
sahara::keystone::auth::public_url: {get_param: [EndpointMap, SaharaPublic, uri]}
|
|
|
|
sahara::keystone::auth::internal_url: {get_param: [EndpointMap, SaharaInternal, uri]}
|
|
|
|
sahara::keystone::auth::admin_url: {get_param: [EndpointMap, SaharaAdmin, uri]}
|
|
|
|
sahara::keystone::auth::password: {get_param: SaharaPassword }
|
|
|
|
sahara::keystone::auth::region: {get_param: KeystoneRegion}
|
2016-09-26 13:52:46 -04:00
|
|
|
mysql:
|
|
|
|
sahara::db::mysql::password: {get_param: SaharaPassword}
|
|
|
|
sahara::db::mysql::user: sahara
|
|
|
|
sahara::db::mysql::host: {get_param: [EndpointMap, MysqlInternal, host_nobrackets]}
|
|
|
|
sahara::db::mysql::dbname: sahara
|
|
|
|
sahara::db::mysql::allowed_hosts:
|
|
|
|
- '%'
|
|
|
|
- "%{hiera('mysql_bind_host')}"
|
2016-12-01 10:05:35 +00:00
|
|
|
upgrade_tasks:
|
|
|
|
- name: Stop sahara_api service
|
2017-02-24 22:31:29 +01:00
|
|
|
tags: step1
|
2016-12-01 10:05:35 +00:00
|
|
|
service: name=openstack-sahara-api state=stopped
|