Merge "Specify the Ceph packages to be installed"
[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   NovaPassword:
41     description: The password for the nova service and db account, used by nova-api.
42     type: string
43     hidden: true
44   NeutronEnableDVR:
45     description: Enable Neutron DVR.
46     default: false
47     type: boolean
48   KeystoneRegion:
49     type: string
50     default: 'regionOne'
51     description: Keystone region for endpoint
52   MonitoringSubscriptionNeutronServer:
53     default: 'overcloud-neutron-server'
54     type: string
55   NeutronApiLoggingSource:
56     type: json
57     default:
58       tag: openstack.neutron.api
59       path: /var/log/neutron/server.log
60   ControllerCount:
61     description: |
62       Under normal conditions, this should not be overridden manually and is
63       set at deployment time. The default value is present to allow the
64       template to be used in environments that do not override it.
65     default: 1
66     type: number
67
68   # DEPRECATED: the following options are deprecated and are currently maintained
69   # for backwards compatibility. They will be removed in the Ocata cycle.
70   NeutronL3HA:
71     default: false
72     description: |
73       Whether to enable HA for virtual routers. While the default value is
74       'false', L3 HA will be automatically enabled if the number of nodes
75       hosting controller configurations and DVR is disabled. This parameter is
76       being deprecated in Newton and is scheduled to be removed in Ocata.
77       Future releases will enable L3 HA by default if it is appropriate for the
78       deployment type. Alternate mechanisms will be available to override.
79     type: boolean
80
81 parameter_groups:
82 - label: deprecated
83   description: |
84    The following parameters are deprecated and will be removed. They should not
85    be relied on for new deployments. If you have concerns regarding deprecated
86    parameters, please contact the TripleO development team on IRC or the
87    OpenStack mailing list.
88   parameters:
89   - NeutronL3HA
90
91 resources:
92
93   NeutronBase:
94     type: ./neutron-base.yaml
95     properties:
96       ServiceNetMap: {get_param: ServiceNetMap}
97       DefaultPasswords: {get_param: DefaultPasswords}
98       EndpointMap: {get_param: EndpointMap}
99
100 conditions:
101
102   auto_enable_l3_ha:
103     and:
104       - not:
105           equals:
106             - get_param: ControllerCount
107             - 1
108       - equals:
109         - get_param: NeutronEnableDVR
110         - false
111
112 outputs:
113   role_data:
114     description: Role data for the Neutron Server agent service.
115     value:
116       service_name: neutron_api
117       monitoring_subscription: {get_param: MonitoringSubscriptionNeutronServer}
118       logging_source: {get_param: NeutronApiLoggingSource}
119       logging_groups:
120         - neutron
121       config_settings:
122         map_merge:
123           - get_attr: [NeutronBase, role_data, config_settings]
124           - neutron::server::database_connection:
125               list_join:
126                 - ''
127                 - - {get_param: [EndpointMap, MysqlInternal, protocol]}
128                   - '://neutron:'
129                   - {get_param: NeutronPassword}
130                   - '@'
131                   - {get_param: [EndpointMap, MysqlInternal, host]}
132                   - '/ovs_neutron'
133             neutron::keystone::authtoken::auth_uri: {get_param: [EndpointMap, KeystoneInternal, uri] }
134             neutron::keystone::authtoken::auth_url: {get_param: [EndpointMap, KeystoneAdmin, uri_no_suffix]}
135             neutron::server::api_workers: {get_param: NeutronWorkers}
136             neutron::server::rpc_workers: {get_param: NeutronWorkers}
137             neutron::server::allow_automatic_l3agent_failover: {get_param: NeutronAllowL3AgentFailover}
138             neutron::server::l3_ha: {if: ["auto_enable_l3_ha", true, {get_param: NeutronL3HA}]}
139             neutron::keystone::authtoken::password: {get_param: NeutronPassword}
140
141             neutron::server::notifications::nova_url: { get_param: [ EndpointMap, NovaInternal, uri ] }
142             neutron::server::notifications::auth_url: { get_param: [ EndpointMap, KeystoneV3Admin, uri ] }
143             neutron::server::notifications::tenant_name: 'service'
144             neutron::server::notifications::project_name: 'service'
145             neutron::server::notifications::password: {get_param: NovaPassword}
146             neutron::keystone::authtoken::project_name: 'service'
147             neutron::server::sync_db: true
148             tripleo.neutron_api.firewall_rules:
149               '114 neutron api':
150                 dport:
151                   - 9696
152                   - 13696
153             neutron::server::router_distributed: {get_param: NeutronEnableDVR}
154             # NOTE: bind IP is found in Heat replacing the network name with the local node IP
155             # for the given network; replacement examples (eg. for internal_api):
156             # internal_api -> IP
157             # internal_api_uri -> [IP]
158             # internal_api_subnet - > IP/CIDR
159             neutron::bind_host: {get_param: [ServiceNetMap, NeutronApiNetwork]}
160       step_config: |
161         include tripleo::profile::base::neutron::server
162       service_config_settings:
163         keystone:
164           neutron::keystone::auth::tenant: 'service'
165           neutron::keystone::auth::public_url: {get_param: [EndpointMap, NeutronPublic, uri]}
166           neutron::keystone::auth::internal_url: { get_param: [ EndpointMap, NeutronInternal, uri ] }
167           neutron::keystone::auth::admin_url: { get_param: [ EndpointMap, NeutronAdmin, uri ] }
168           neutron::keystone::auth::password: {get_param: NeutronPassword}
169           neutron::keystone::auth::region: {get_param: KeystoneRegion}
170         mysql:
171           neutron::db::mysql::password: {get_param: NeutronPassword}
172           neutron::db::mysql::user: neutron
173           neutron::db::mysql::host: {get_param: [EndpointMap, MysqlInternal, host_nobrackets]}
174           neutron::db::mysql::dbname: ovs_neutron
175           neutron::db::mysql::allowed_hosts:
176             - '%'
177             - "%{hiera('mysql_bind_host')}"