Merge "Use list_concat for metadata_settings for haproxy"
[apex-tripleo-heat-templates.git] / puppet / services / octavia-api.yaml
1 heat_template_version: ocata
2
3 description: >
4   OpenStack Octavia API service.
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   OctaviaPassword:
22     description: The password for the Octavia's database account.
23     type: string
24     hidden: true
25   KeystoneRegion:
26     type: string
27     default: 'regionOne'
28     description: Keystone region for endpoint
29   MonitoringSubscriptionOctaviaApi:
30     default: 'overcloud-octavia-api'
31     type: string
32   OctaviaApiLoggingSource:
33     type: json
34     default:
35       tag: openstack.octavia.api
36       path: /var/log/octavia/api.log
37   OctaviaApiPolicies:
38     description: |
39       A hash of policies to configure for Octavia API.
40       e.g. { octavia-context_is_admin: { key: context_is_admin, value: 'role:admin' } }
41     default: {}
42     type: json
43
44 resources:
45
46   OctaviaBase:
47     type: ./octavia-base.yaml
48     properties:
49       ServiceNetMap: {get_param: ServiceNetMap}
50       DefaultPasswords: {get_param: DefaultPasswords}
51       EndpointMap: {get_param: EndpointMap}
52
53 outputs:
54   role_data:
55     description: Role data for the Octavia API service.
56     value:
57       service_name: octavia_api
58       monitoring_subscription: {get_param: MonitoringSubscriptionOctaviaApi}
59       logging_source: {get_param: OctaviaApiLoggingSource}
60       logging_groups:
61         - octavia
62       config_settings:
63         map_merge:
64           - get_attr: [OctaviaBase, role_data, config_settings]
65           - octavia::keystone::authtoken::auth_uri: {get_param: [EndpointMap, KeystoneInternal, uri] }
66             octavia::policy::policies: {get_param: OctaviaApiPolicies}
67             octavia::db::database_connection:
68               list_join:
69                 - ''
70                 - - {get_param: [EndpointMap, MysqlInternal, protocol]}
71                   - '://octavia:'
72                   - {get_param: OctaviaPassword}
73                   - '@'
74                   - {get_param: [EndpointMap, MysqlInternal, host]}
75                   - '/octavia'
76                   - '?read_default_file=/etc/my.cnf.d/tripleo.cnf&read_default_group=tripleo'
77             octavia::keystone::authtoken::auth_url: {get_param: [EndpointMap, KeystoneInternal, uri_no_suffix]}
78             octavia::keystone::authtoken::project_name: 'service'
79             octavia::keystone::authtoken::password: {get_param: OctaviaPassword}
80             octavia::api::sync_db: true
81             tripleo.octavia_api.firewall_rules:
82               '120 octavia api':
83                 dport:
84                   - 9876
85                   - 13876
86             octavia::api::host: {get_param: [ServiceNetMap, OctaviaApiNetwork]}
87       step_config: |
88         include tripleo::profile::base::octavia::api
89       service_config_settings:
90         keystone:
91           octavia::keystone::auth::tenant: 'service'
92           octavia::keystone::auth::public_url: {get_param: [EndpointMap, OctaviaPublic, uri]}
93           octavia::keystone::auth::internal_url: { get_param: [ EndpointMap, OctaviaInternal, uri ] }
94           octavia::keystone::auth::admin_url: { get_param: [ EndpointMap, OctaviaAdmin, uri ] }
95           octavia::keystone::auth::password: {get_param: OctaviaPassword}
96           octavia::keystone::auth::region: {get_param: KeystoneRegion}
97         mysql:
98           octavia::db::mysql::password: {get_param: OctaviaPassword}
99           octavia::db::mysql::user: octavia
100           octavia::db::mysql::host: {get_param: [EndpointMap, MysqlInternal, host_nobrackets]}
101           octavia::db::mysql::dbname: octavia
102           octavia::db::mysql::allowed_hosts:
103             - '%'
104             - "%{hiera('mysql_bind_host')}"
105         neutron_api:
106           neutron::server::service_providers: ['LOADBALANCERV2:Octavia:neutron_lbaas.drivers.octavia.driver.OctaviaDriver:default']