Merge "Add base neutron service configuration"
[apex-tripleo-heat-templates.git] / puppet / services / gnocchi-api.yaml
1 heat_template_version: 2016-04-08
2
3 description: >
4   Gnocchi 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   GnocchiPassword:
22     description: The password for the gnocchi service and db account.
23     type: string
24     hidden: true
25   GnocchiBackend:
26     default: swift
27     description: The short name of the Gnocchi backend to use. Should be one
28       of swift, rbd, or file
29     type: string
30     constraints:
31     - allowed_values: ['swift', 'file', 'rbd']
32   KeystoneRegion:
33     type: string
34     default: 'regionOne'
35     description: Keystone region for endpoint
36   MonitoringSubscriptionGnocchiApi:
37     default: 'overcloud-gnocchi-api'
38     type: string
39
40 resources:
41
42   GnocchiServiceBase:
43     type: ./gnocchi-base.yaml
44     properties:
45       ServiceNetMap: {get_param: ServiceNetMap}
46       DefaultPasswords: {get_param: DefaultPasswords}
47       EndpointMap: {get_param: EndpointMap}
48
49   ApacheServiceBase:
50     type: ./apache.yaml
51     properties:
52       ServiceNetMap: {get_param: ServiceNetMap}
53       DefaultPasswords: {get_param: DefaultPasswords}
54       EndpointMap: {get_param: EndpointMap}
55
56 outputs:
57   role_data:
58     description: Role data for the Gnocchi role.
59     value:
60       service_name: gnocchi_api
61       monitoring_subscription: {get_param: MonitoringSubscriptionGnocchiApi}
62       config_settings:
63         map_merge:
64           - get_attr: [ApacheServiceBase, role_data, config_settings]
65           - get_attr: [GnocchiServiceBase, role_data, config_settings]
66           - tripleo.gnocchi_api.firewall_rules:
67               '129 gnocchi-api':
68                 dport:
69                   - 8041
70                   - 13041
71             gnocchi::api::enabled: true
72             gnocchi::api::service_name: 'httpd'
73             gnocchi::keystone::auth::admin_url: { get_param: [ EndpointMap, GnocchiAdmin, uri ] }
74             gnocchi::keystone::auth::internal_url: {get_param: [EndpointMap, GnocchiInternal, uri]}
75             gnocchi::keystone::auth::password: {get_param: GnocchiPassword}
76             gnocchi::keystone::auth::public_url: { get_param: [ EndpointMap, GnocchiPublic, uri ] }
77             gnocchi::keystone::auth::region: {get_param: KeystoneRegion}
78             gnocchi::keystone::auth::tenant: 'service'
79             gnocchi::keystone::authtoken::auth_uri: {get_param: [EndpointMap, KeystoneInternal, uri]}
80             gnocchi::keystone::authtoken::auth_url: {get_param: [EndpointMap, KeystoneAdmin, uri_no_suffix]}
81             gnocchi::keystone::authtoken::password: {get_param: GnocchiPassword}
82             gnocchi::keystone::authtoken::project_name: 'service'
83             gnocchi::wsgi::apache::ssl: false
84             tripleo::profile::base::gnocchi::api::gnocchi_backend: {get_param: GnocchiBackend}
85             # NOTE: bind IP is found in Heat replacing the network name with the
86             # local node IP for the given network; replacement examples
87             # (eg. for internal_api):
88             # internal_api -> IP
89             # internal_api_uri -> [IP]
90             # internal_api_subnet - > IP/CIDR
91             gnocchi::wsgi::apache::bind_host: {get_param: [ServiceNetMap, GnocchiApiNetwork]}
92             gnocchi::api::host: {get_param: [ServiceNetMap, GnocchiApiNetwork]}
93
94             gnocchi::api::keystone_auth_uri: {get_param: [EndpointMap, KeystoneInternal, uri]}
95             gnocchi::api::keystone_identity_uri: {get_param: [EndpointMap, KeystoneAdmin, uri_no_suffix]}
96             gnocchi::storage::swift::swift_authurl: {get_param: [EndpointMap, KeystoneInternal, uri]}
97       step_config: |
98         include ::tripleo::profile::base::gnocchi::api