853dcf6a517f481b4e801473884d3e881ceba406
[apex-tripleo-heat-templates.git] / puppet / services / neutron-api.yaml
1 heat_template_version: 2016-04-08
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   EndpointMap:
14     default: {}
15     description: Mapping of service endpoint -> protocol. Typically set
16                  via parameter_defaults in the resource registry.
17     type: json
18   NeutronWorkers:
19     default: 0
20     description: Number of workers for Neutron service.
21     type: number
22   NeutronPassword:
23     description: The password for the neutron service and db account, used by neutron agents.
24     type: string
25     hidden: true
26   NeutronAllowL3AgentFailover:
27     default: 'True'
28     description: Allow automatic l3-agent failover
29     type: string
30   NeutronL3HA:
31     default: false
32     description: Whether to enable HA for virtual routers
33     type: boolean
34   NovaPassword:
35     description: The password for the nova service and db account, used by nova-api.
36     type: string
37     hidden: true
38   NeutronEnableDVR:
39     description: Enable Neutron DVR.
40     default: false
41     type: boolean
42   KeystoneRegion:
43     type: string
44     default: 'regionOne'
45     description: Keystone region for endpoint
46
47 resources:
48
49   NeutronBase:
50     type: ./neutron-base.yaml
51     properties:
52       ServiceNetMap: {get_param: ServiceNetMap}
53       EndpointMap: {get_param: EndpointMap}
54
55 outputs:
56   role_data:
57     description: Role data for the Neutron Server agent service.
58     value:
59       service_name: neutron_api
60       config_settings:
61         map_merge:
62           - get_attr: [NeutronBase, role_data, config_settings]
63             neutron::server::database_connection:
64               list_join:
65                 - ''
66                 - - {get_param: [EndpointMap, MysqlInternal, protocol]}
67                   - '://neutron:'
68                   - {get_param: NeutronPassword}
69                   - '@'
70                   - {get_param: [EndpointMap, MysqlInternal, host]}
71                   - '/ovs_neutron'
72             neutron::keystone::auth::tenant: 'service'
73             neutron::keystone::auth::public_url: {get_param: [EndpointMap, NeutronPublic, uri]}
74             neutron::keystone::auth::internal_url: { get_param: [ EndpointMap, NeutronInternal, uri ] }
75             neutron::keystone::auth::admin_url: { get_param: [ EndpointMap, NeutronAdmin, uri ] }
76             neutron::keystone::auth::password: {get_param: NeutronPassword}
77             neutron::keystone::auth::region: {get_param: KeystoneRegion}
78             neutron::server::auth_uri: {get_param: [EndpointMap, KeystoneInternal, uri] }
79             neutron::server::auth_url: {get_param: [EndpointMap, KeystoneAdmin, uri_no_suffix]}
80             neutron::server::api_workers: {get_param: NeutronWorkers}
81             neutron::server::allow_automatic_l3agent_failover: {get_param: NeutronAllowL3AgentFailover}
82             neutron::server::l3_ha: {get_param: NeutronL3HA}
83             neutron::server::password: {get_param: NeutronPassword}
84
85             neutron::server::notifications::nova_url: { get_param: [ EndpointMap, NovaInternal, uri ] }
86             neutron::server::notifications::auth_url: { get_param: [ EndpointMap, KeystoneV3Admin, uri ] }
87             neutron::server::notifications::tenant_name: 'service'
88             neutron::server::notifications::project_name: 'service'
89             neutron::server::notifications::password: {get_param: NovaPassword}
90             neutron::server::project_name: 'service'
91             neutron::server::sync_db: true
92             neutron::db::mysql::password: {get_param: NeutronPassword}
93             neutron::db::mysql::user: neutron
94             neutron::db::mysql::host: {get_param: [EndpointMap, MysqlInternal, host_nobrackets]}
95             neutron::db::mysql::dbname: ovs_neutron
96             neutron::db::mysql::allowed_hosts:
97               - '%'
98               - "%{hiera('mysql_bind_host')}"
99             tripleo.neutron_server.firewall_rules:
100               '114 neutron server':
101                 dport:
102                   - 9696
103                   - 13696
104               '118 neutron vxlan networks':
105                 proto: 'udp'
106                 dport: 4789
107               '106 vrrp':
108                 proto: vrrp
109             neutron::server::router_distributed: {get_param: NeutronEnableDVR}
110       step_config: |
111         include tripleo::profile::base::neutron::server