Update the template_version alias for all the templates to pike.
[apex-tripleo-heat-templates.git] / puppet / services / sahara-api.yaml
1 heat_template_version: pike
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   RoleName:
17     default: ''
18     description: Role name on which the service is applied
19     type: string
20   RoleParameters:
21     default: {}
22     description: Parameters specific to the role
23     type: json
24   EndpointMap:
25     default: {}
26     description: Mapping of service endpoint -> protocol. Typically set
27                  via parameter_defaults in the resource registry.
28     type: json
29   SaharaPassword:
30     description: The password for the sahara service account, used by sahara-api.
31     type: string
32     hidden: true
33   SaharaWorkers:
34     default: 0
35     description: The number of workers for the sahara-api.
36     type: number
37   KeystoneRegion:
38     type: string
39     default: 'regionOne'
40     description: Keystone region for endpoint
41   MonitoringSubscriptionSaharaApi:
42     default: 'overcloud-sahara-api'
43     type: string
44   SaharaApiLoggingSource:
45     type: json
46     default:
47       tag: openstack.sahara.api
48       path: /var/log/sahara/sahara-api.log
49   SaharaApiPolicies:
50     description: |
51       A hash of policies to configure for Sahara API.
52       e.g. { sahara-context_is_admin: { key: context_is_admin, value: 'role:admin' } }
53     default: {}
54     type: json
55
56 resources:
57   SaharaBase:
58     type: ./sahara-base.yaml
59     properties:
60       ServiceNetMap: {get_param: ServiceNetMap}
61       DefaultPasswords: {get_param: DefaultPasswords}
62       EndpointMap: {get_param: EndpointMap}
63       RoleName: {get_param: RoleName}
64       RoleParameters: {get_param: RoleParameters}
65
66 outputs:
67   role_data:
68     description: Role data for the Sahara API role.
69     value:
70       service_name: sahara_api
71       monitoring_subscription: {get_param: MonitoringSubscriptionSaharaApi}
72       logging_source: {get_param: SaharaApiLoggingSource}
73       logging_groups:
74         - sahara
75       config_settings:
76         map_merge:
77           - get_attr: [SaharaBase, role_data, config_settings]
78           - sahara::port: {get_param: [EndpointMap, SaharaInternal, port]}
79             sahara::policy::policies: {get_param: SaharaApiPolicies}
80             sahara::service::api::api_workers: {get_param: SaharaWorkers}
81             # NOTE: bind IP is found in Heat replacing the network name with the local node IP
82             # for the given network; replacement examples (eg. for internal_api):
83             # internal_api -> IP
84             # internal_api_uri -> [IP]
85             # internal_api_subnet - > IP/CIDR
86             sahara::host: {get_param: [ServiceNetMap, SaharaApiNetwork]}
87             tripleo.sahara_api.firewall_rules:
88               '132 sahara':
89                 dport:
90                   - 8386
91                   - 13386
92       step_config: |
93         include ::tripleo::profile::base::sahara::api
94       service_config_settings:
95         keystone:
96           sahara::keystone::auth::tenant: 'service'
97           sahara::keystone::auth::public_url: {get_param: [EndpointMap, SaharaPublic, uri]}
98           sahara::keystone::auth::internal_url: {get_param: [EndpointMap, SaharaInternal, uri]}
99           sahara::keystone::auth::admin_url: {get_param: [EndpointMap, SaharaAdmin, uri]}
100           sahara::keystone::auth::password: {get_param: SaharaPassword }
101           sahara::keystone::auth::region: {get_param: KeystoneRegion}
102         mysql:
103           sahara::db::mysql::password: {get_param: SaharaPassword}
104           sahara::db::mysql::user: sahara
105           sahara::db::mysql::host: {get_param: [EndpointMap, MysqlInternal, host_nobrackets]}
106           sahara::db::mysql::dbname: sahara
107           sahara::db::mysql::allowed_hosts:
108             - '%'
109             - "%{hiera('mysql_bind_host')}"
110       upgrade_tasks:
111         - name: Stop sahara_api service
112           tags: step1
113           service: name=openstack-sahara-api state=stopped