Merge "Add parameters to run nova over httpd"
[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   GnocchiApiLoggingSource:
40     type: json
41     default:
42       tag: openstack.gnocchi.api
43       path: /var/log/gnocchi/app.log
44
45 resources:
46
47   GnocchiServiceBase:
48     type: ./gnocchi-base.yaml
49     properties:
50       ServiceNetMap: {get_param: ServiceNetMap}
51       DefaultPasswords: {get_param: DefaultPasswords}
52       EndpointMap: {get_param: EndpointMap}
53
54   ApacheServiceBase:
55     type: ./apache.yaml
56     properties:
57       ServiceNetMap: {get_param: ServiceNetMap}
58       DefaultPasswords: {get_param: DefaultPasswords}
59       EndpointMap: {get_param: EndpointMap}
60
61 outputs:
62   role_data:
63     description: Role data for the Gnocchi role.
64     value:
65       service_name: gnocchi_api
66       monitoring_subscription: {get_param: MonitoringSubscriptionGnocchiApi}
67       logging_source: {get_param: GnocchiApiLoggingSource}
68       logging_groups:
69         - gnocchi
70       config_settings:
71         map_merge:
72           - get_attr: [ApacheServiceBase, role_data, config_settings]
73           - get_attr: [GnocchiServiceBase, role_data, config_settings]
74           - tripleo.gnocchi_api.firewall_rules:
75               '129 gnocchi-api':
76                 dport:
77                   - 8041
78                   - 13041
79             gnocchi::api::enabled: true
80             gnocchi::api::service_name: 'httpd'
81             gnocchi::keystone::authtoken::auth_uri: {get_param: [EndpointMap, KeystoneInternal, uri]}
82             gnocchi::keystone::authtoken::auth_url: {get_param: [EndpointMap, KeystoneAdmin, uri_no_suffix]}
83             gnocchi::keystone::authtoken::password: {get_param: GnocchiPassword}
84             gnocchi::keystone::authtoken::project_name: 'service'
85             gnocchi::wsgi::apache::ssl: false
86             gnocchi::wsgi::apache::servername:
87               str_replace:
88                 template:
89                   '"%{::fqdn_$NETWORK}"'
90                 params:
91                   $NETWORK: {get_param: [ServiceNetMap, GnocchiApiNetwork]}
92             tripleo::profile::base::gnocchi::api::gnocchi_backend: {get_param: GnocchiBackend}
93             # NOTE: bind IP is found in Heat replacing the network name with the
94             # local node IP for the given network; replacement examples
95             # (eg. for internal_api):
96             # internal_api -> IP
97             # internal_api_uri -> [IP]
98             # internal_api_subnet - > IP/CIDR
99             gnocchi::wsgi::apache::bind_host: {get_param: [ServiceNetMap, GnocchiApiNetwork]}
100             gnocchi::api::host: {get_param: [ServiceNetMap, GnocchiApiNetwork]}
101
102             gnocchi::api::keystone_auth_uri: {get_param: [EndpointMap, KeystoneInternal, uri]}
103             gnocchi::api::keystone_identity_uri: {get_param: [EndpointMap, KeystoneAdmin, uri_no_suffix]}
104             gnocchi::storage::swift::swift_authurl: {get_param: [EndpointMap, KeystoneInternal, uri]}
105       step_config: |
106         include ::tripleo::profile::base::gnocchi::api
107       service_config_settings:
108         keystone:
109           gnocchi::keystone::auth::admin_url: { get_param: [ EndpointMap, GnocchiAdmin, uri ] }
110           gnocchi::keystone::auth::internal_url: {get_param: [EndpointMap, GnocchiInternal, uri]}
111           gnocchi::keystone::auth::password: {get_param: GnocchiPassword}
112           gnocchi::keystone::auth::public_url: { get_param: [ EndpointMap, GnocchiPublic, uri ] }
113           gnocchi::keystone::auth::region: {get_param: KeystoneRegion}
114           gnocchi::keystone::auth::tenant: 'service'
115         mysql:
116           gnocchi::db::mysql::password: {get_param: GnocchiPassword}
117           gnocchi::db::mysql::user: gnocchi
118           gnocchi::db::mysql::host: {get_param: [EndpointMap, MysqlInternal, host_nobrackets]}
119           gnocchi::db::mysql::dbname: gnocchi
120           gnocchi::db::mysql::allowed_hosts:
121             - '%'
122             - "%{hiera('mysql_bind_host')}"