Merge "Use parameter name to configure gmcast_listen_addr"
[apex-tripleo-heat-templates.git] / puppet / services / neutron-api.yaml
1 heat_template_version: 2016-10-14
2
3 description: >
4   OpenStack Neutron Server 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   NeutronWorkers:
22     default: ''
23     description: |
24       Sets the number of API and RPC workers for the Neutron service. The
25       default value results in the configuration being left unset and a
26       system-dependent default will be chosen (usually the number of
27       processors). Please note that this can result in a large number of
28       processes and memory consumption on systems with a large core count. On
29       such systems it is recommended that a non-default value be selected that
30       matches the load requirements.
31     type: string
32   NeutronPassword:
33     description: The password for the neutron service and db account, used by neutron agents.
34     type: string
35     hidden: true
36   NeutronAllowL3AgentFailover:
37     default: 'True'
38     description: Allow automatic l3-agent failover
39     type: string
40   NeutronL3HA:
41     default: false
42     description: |
43       Whether to enable HA for virtual routers. While the default value is
44       'false', L3 HA will be automatically enabled if the number of nodes hosting
45       controller configurations and DVR is disabled.
46     type: boolean
47   NovaPassword:
48     description: The password for the nova service and db account, used by nova-api.
49     type: string
50     hidden: true
51   NeutronEnableDVR:
52     description: Enable Neutron DVR.
53     default: false
54     type: boolean
55   KeystoneRegion:
56     type: string
57     default: 'regionOne'
58     description: Keystone region for endpoint
59   MonitoringSubscriptionNeutronServer:
60     default: 'overcloud-neutron-server'
61     type: string
62   NeutronApiLoggingSource:
63     type: json
64     default:
65       tag: openstack.neutron.api
66       path: /var/log/neutron/server.log
67   ControllerCount:
68     description: |
69       Under normal conditions, this should not be overridden manually and is
70       set at deployment time. The default value is present to allow the
71       template to be used in environments that do not override it.
72     default: 1
73     type: number
74
75 resources:
76
77   NeutronBase:
78     type: ./neutron-base.yaml
79     properties:
80       ServiceNetMap: {get_param: ServiceNetMap}
81       DefaultPasswords: {get_param: DefaultPasswords}
82       EndpointMap: {get_param: EndpointMap}
83
84 conditions:
85
86   auto_enable_l3_ha:
87     and:
88       - not:
89           equals:
90             - get_param: ControllerCount
91             - 1
92       - equals:
93         - get_param: NeutronEnableDVR
94         - false
95
96 outputs:
97   role_data:
98     description: Role data for the Neutron Server agent service.
99     value:
100       service_name: neutron_api
101       monitoring_subscription: {get_param: MonitoringSubscriptionNeutronServer}
102       logging_source: {get_param: NeutronApiLoggingSource}
103       logging_groups:
104         - neutron
105       config_settings:
106         map_merge:
107           - get_attr: [NeutronBase, role_data, config_settings]
108           - neutron::server::database_connection:
109               list_join:
110                 - ''
111                 - - {get_param: [EndpointMap, MysqlInternal, protocol]}
112                   - '://neutron:'
113                   - {get_param: NeutronPassword}
114                   - '@'
115                   - {get_param: [EndpointMap, MysqlInternal, host]}
116                   - '/ovs_neutron'
117             neutron::keystone::authtoken::auth_uri: {get_param: [EndpointMap, KeystoneInternal, uri] }
118             neutron::keystone::authtoken::auth_url: {get_param: [EndpointMap, KeystoneAdmin, uri_no_suffix]}
119             neutron::server::api_workers: {get_param: NeutronWorkers}
120             neutron::server::rpc_workers: {get_param: NeutronWorkers}
121             neutron::server::allow_automatic_l3agent_failover: {get_param: NeutronAllowL3AgentFailover}
122             neutron::server::l3_ha: {if: ["auto_enable_l3_ha", true, {get_param: NeutronL3HA}]}
123             neutron::keystone::authtoken::password: {get_param: NeutronPassword}
124
125             neutron::server::notifications::nova_url: { get_param: [ EndpointMap, NovaInternal, uri ] }
126             neutron::server::notifications::auth_url: { get_param: [ EndpointMap, KeystoneV3Admin, uri ] }
127             neutron::server::notifications::tenant_name: 'service'
128             neutron::server::notifications::project_name: 'service'
129             neutron::server::notifications::password: {get_param: NovaPassword}
130             neutron::keystone::authtoken::project_name: 'service'
131             neutron::server::sync_db: true
132             neutron::db::mysql::password: {get_param: NeutronPassword}
133             neutron::db::mysql::user: neutron
134             neutron::db::mysql::host: {get_param: [EndpointMap, MysqlInternal, host_nobrackets]}
135             neutron::db::mysql::dbname: ovs_neutron
136             neutron::db::mysql::allowed_hosts:
137               - '%'
138               - "%{hiera('mysql_bind_host')}"
139             tripleo.neutron_server.firewall_rules:
140               '114 neutron server':
141                 dport:
142                   - 9696
143                   - 13696
144               '118 neutron vxlan networks':
145                 proto: 'udp'
146                 dport: 4789
147               '106 vrrp':
148                 proto: vrrp
149             neutron::server::router_distributed: {get_param: NeutronEnableDVR}
150             # NOTE: bind IP is found in Heat replacing the network name with the local node IP
151             # for the given network; replacement examples (eg. for internal_api):
152             # internal_api -> IP
153             # internal_api_uri -> [IP]
154             # internal_api_subnet - > IP/CIDR
155             neutron::bind_host: {get_param: [ServiceNetMap, NeutronApiNetwork]}
156       step_config: |
157         include tripleo::profile::base::neutron::server
158       service_config_settings:
159         keystone:
160           neutron::keystone::auth::tenant: 'service'
161           neutron::keystone::auth::public_url: {get_param: [EndpointMap, NeutronPublic, uri]}
162           neutron::keystone::auth::internal_url: { get_param: [ EndpointMap, NeutronInternal, uri ] }
163           neutron::keystone::auth::admin_url: { get_param: [ EndpointMap, NeutronAdmin, uri ] }
164           neutron::keystone::auth::password: {get_param: NeutronPassword}
165           neutron::keystone::auth::region: {get_param: KeystoneRegion}