Change flat network name for nosdn fdio scenario
[apex-tripleo-heat-templates.git] / puppet / services / octavia-api.yaml
1 heat_template_version: pike
2
3 description: >
4   OpenStack Octavia API service.
5
6 parameters:
7   ServiceData:
8     default: {}
9     description: Dictionary packing service data
10     type: json
11   ServiceNetMap:
12     default: {}
13     description: Mapping of service_name -> network name. Typically set
14                  via parameter_defaults in the resource registry.  This
15                  mapping overrides those in ServiceNetMapDefaults.
16     type: json
17   DefaultPasswords:
18     default: {}
19     type: json
20   RoleName:
21     default: ''
22     description: Role name on which the service is applied
23     type: string
24   RoleParameters:
25     default: {}
26     description: Parameters specific to the role
27     type: json
28   EndpointMap:
29     default: {}
30     description: Mapping of service endpoint -> protocol. Typically set
31                  via parameter_defaults in the resource registry.
32     type: json
33   OctaviaPassword:
34     description: The password for the Octavia's database account.
35     type: string
36     hidden: true
37   KeystoneRegion:
38     type: string
39     default: 'regionOne'
40     description: Keystone region for endpoint
41   MonitoringSubscriptionOctaviaApi:
42     default: 'overcloud-octavia-api'
43     type: string
44   OctaviaApiLoggingSource:
45     type: json
46     default:
47       tag: openstack.octavia.api
48       path: /var/log/octavia/api.log
49   OctaviaApiPolicies:
50     description: |
51       A hash of policies to configure for Octavia API.
52       e.g. { octavia-context_is_admin: { key: context_is_admin, value: 'role:admin' } }
53     default: {}
54     type: json
55
56 resources:
57
58   OctaviaBase:
59     type: ./octavia-base.yaml
60     properties:
61       ServiceData: {get_param: ServiceData}
62       ServiceNetMap: {get_param: ServiceNetMap}
63       DefaultPasswords: {get_param: DefaultPasswords}
64       EndpointMap: {get_param: EndpointMap}
65       RoleName: {get_param: RoleName}
66       RoleParameters: {get_param: RoleParameters}
67
68 outputs:
69   role_data:
70     description: Role data for the Octavia API service.
71     value:
72       service_name: octavia_api
73       monitoring_subscription: {get_param: MonitoringSubscriptionOctaviaApi}
74       logging_source: {get_param: OctaviaApiLoggingSource}
75       logging_groups:
76         - octavia
77       config_settings:
78         map_merge:
79           - get_attr: [OctaviaBase, role_data, config_settings]
80           - octavia::keystone::authtoken::auth_uri: {get_param: [EndpointMap, KeystoneInternal, uri] }
81             octavia::policy::policies: {get_param: OctaviaApiPolicies}
82             octavia::db::database_connection:
83               make_url:
84                 scheme: {get_param: [EndpointMap, MysqlInternal, protocol]}
85                 username: octavia
86                 password: {get_param: OctaviaPassword}
87                 host: {get_param: [EndpointMap, MysqlInternal, host]}
88                 path: /octavia
89                 query:
90                   read_default_file: /etc/my.cnf.d/tripleo.cnf
91                   read_default_group: tripleo
92             octavia::keystone::authtoken::auth_url: {get_param: [EndpointMap, KeystoneInternal, uri_no_suffix]}
93             octavia::keystone::authtoken::project_name: 'service'
94             octavia::keystone::authtoken::password: {get_param: OctaviaPassword}
95             octavia::api::sync_db: true
96             tripleo.octavia_api.firewall_rules:
97               '120 octavia api':
98                 dport:
99                   - 9876
100                   - 13876
101             octavia::api::host: {get_param: [ServiceNetMap, OctaviaApiNetwork]}
102       step_config: |
103         include tripleo::profile::base::octavia::api
104       service_config_settings:
105         keystone:
106           octavia::keystone::auth::tenant: 'service'
107           octavia::keystone::auth::public_url: {get_param: [EndpointMap, OctaviaPublic, uri]}
108           octavia::keystone::auth::internal_url: { get_param: [ EndpointMap, OctaviaInternal, uri ] }
109           octavia::keystone::auth::admin_url: { get_param: [ EndpointMap, OctaviaAdmin, uri ] }
110           octavia::keystone::auth::password: {get_param: OctaviaPassword}
111           octavia::keystone::auth::region: {get_param: KeystoneRegion}
112         mysql:
113           octavia::db::mysql::password: {get_param: OctaviaPassword}
114           octavia::db::mysql::user: octavia
115           octavia::db::mysql::host: {get_param: [EndpointMap, MysqlInternal, host_nobrackets]}
116           octavia::db::mysql::dbname: octavia
117           octavia::db::mysql::allowed_hosts:
118             - '%'
119             - "%{hiera('mysql_bind_host')}"
120         neutron_api:
121           neutron::server::service_providers: ['LOADBALANCERV2:Octavia:neutron_lbaas.drivers.octavia.driver.OctaviaDriver:default']