Merge "Create entries for overcloud VIPs in /etc/hosts"
[apex-tripleo-heat-templates.git] / puppet / services / sahara-api.yaml
1 heat_template_version: 2016-04-08
2
3 description: >
4   OpenStack Sahara API service configured with Puppet
5
6 parameters:
7   ServiceNetMap:
8     default: {}
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.
12     type: json
13   DefaultPasswords:
14     default: {}
15     type: json
16   EndpointMap:
17     default: {}
18     description: Mapping of service endpoint -> protocol. Typically set
19                  via parameter_defaults in the resource registry.
20     type: json
21   SaharaPassword:
22     description: The password for the sahara service account, used by sahara-api.
23     type: string
24     hidden: true
25   SaharaWorkers:
26     default: 0
27     description: The number of workers for the sahara-api.
28     type: number
29   KeystoneRegion:
30     type: string
31     default: 'regionOne'
32     description: Keystone region for endpoint
33   MonitoringSubscriptionSaharaApi:
34     default: 'overcloud-sahara-api'
35     type: string
36
37 resources:
38   SaharaBase:
39     type: ./sahara-base.yaml
40     properties:
41       ServiceNetMap: {get_param: ServiceNetMap}
42       DefaultPasswords: {get_param: DefaultPasswords}
43       EndpointMap: {get_param: EndpointMap}
44
45 outputs:
46   role_data:
47     description: Role data for the Sahara API role.
48     value:
49       service_name: sahara_api
50       monitoring_subscription: {get_param: MonitoringSubscriptionSaharaApi}
51       config_settings:
52         map_merge:
53           - get_attr: [SaharaBase, role_data, config_settings]
54           - sahara::port: {get_param: [EndpointMap, SaharaInternal, port]}
55             sahara::service::api::api_workers: {get_param: SaharaWorkers}
56             sahara::keystone::auth::public_url: {get_param: [EndpointMap, SaharaPublic, uri]}
57             sahara::keystone::auth::internal_url: {get_param: [EndpointMap, SaharaInternal, uri]}
58             sahara::keystone::auth::admin_url: {get_param: [EndpointMap, SaharaAdmin, uri]}
59             sahara::keystone::auth::password: {get_param: SaharaPassword }
60             sahara::keystone::auth::region: {get_param: KeystoneRegion}
61             # NOTE: bind IP is found in Heat replacing the network name with the local node IP
62             # for the given network; replacement examples (eg. for internal_api):
63             # internal_api -> IP
64             # internal_api_uri -> [IP]
65             # internal_api_subnet - > IP/CIDR
66             sahara::host: {get_param: [ServiceNetMap, SaharaApiNetwork]}
67             tripleo.sahara_api.firewall_rules:
68               '132 sahara':
69                 dport:
70                   - 8386
71                   - 13386
72       step_config: |
73         include ::tripleo::profile::base::sahara::api