Merge "Availability monitoring agents support"
[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   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: 0
23     description: Number of workers for Neutron service.
24     type: number
25   NeutronPassword:
26     description: The password for the neutron service and db account, used by neutron agents.
27     type: string
28     hidden: true
29   NeutronAllowL3AgentFailover:
30     default: 'True'
31     description: Allow automatic l3-agent failover
32     type: string
33   NeutronL3HA:
34     default: false
35     description: Whether to enable HA for virtual routers
36     type: boolean
37   NovaPassword:
38     description: The password for the nova service and db account, used by nova-api.
39     type: string
40     hidden: true
41   NeutronEnableDVR:
42     description: Enable Neutron DVR.
43     default: false
44     type: boolean
45   KeystoneRegion:
46     type: string
47     default: 'regionOne'
48     description: Keystone region for endpoint
49   MonitoringSubscriptionNeutronServer:
50     default: 'overcloud-neutron-server'
51     type: string
52
53 resources:
54
55   NeutronBase:
56     type: ./neutron-base.yaml
57     properties:
58       ServiceNetMap: {get_param: ServiceNetMap}
59       DefaultPasswords: {get_param: DefaultPasswords}
60       EndpointMap: {get_param: EndpointMap}
61
62 outputs:
63   role_data:
64     description: Role data for the Neutron Server agent service.
65     value:
66       service_name: neutron_api
67       monitoring_subscription: {get_param: MonitoringSubscriptionNeutronServer}
68       config_settings:
69         map_merge:
70           - get_attr: [NeutronBase, role_data, config_settings]
71             neutron::server::database_connection:
72               list_join:
73                 - ''
74                 - - {get_param: [EndpointMap, MysqlInternal, protocol]}
75                   - '://neutron:'
76                   - {get_param: NeutronPassword}
77                   - '@'
78                   - {get_param: [EndpointMap, MysqlInternal, host]}
79                   - '/ovs_neutron'
80             neutron::keystone::auth::tenant: 'service'
81             neutron::keystone::auth::public_url: {get_param: [EndpointMap, NeutronPublic, uri]}
82             neutron::keystone::auth::internal_url: { get_param: [ EndpointMap, NeutronInternal, uri ] }
83             neutron::keystone::auth::admin_url: { get_param: [ EndpointMap, NeutronAdmin, uri ] }
84             neutron::keystone::auth::password: {get_param: NeutronPassword}
85             neutron::keystone::auth::region: {get_param: KeystoneRegion}
86             neutron::keystone::authtoken::auth_uri: {get_param: [EndpointMap, KeystoneInternal, uri] }
87             neutron::keystone::authtoken::auth_url: {get_param: [EndpointMap, KeystoneAdmin, uri_no_suffix]}
88             neutron::server::api_workers: {get_param: NeutronWorkers}
89             neutron::server::allow_automatic_l3agent_failover: {get_param: NeutronAllowL3AgentFailover}
90             neutron::server::l3_ha: {get_param: NeutronL3HA}
91             neutron::keystone::authtoken::password: {get_param: NeutronPassword}
92
93             neutron::server::notifications::nova_url: { get_param: [ EndpointMap, NovaInternal, uri ] }
94             neutron::server::notifications::auth_url: { get_param: [ EndpointMap, KeystoneV3Admin, uri ] }
95             neutron::server::notifications::tenant_name: 'service'
96             neutron::server::notifications::project_name: 'service'
97             neutron::server::notifications::password: {get_param: NovaPassword}
98             neutron::keystone::authtoken::project_name: 'service'
99             neutron::server::sync_db: true
100             neutron::db::mysql::password: {get_param: NeutronPassword}
101             neutron::db::mysql::user: neutron
102             neutron::db::mysql::host: {get_param: [EndpointMap, MysqlInternal, host_nobrackets]}
103             neutron::db::mysql::dbname: ovs_neutron
104             neutron::db::mysql::allowed_hosts:
105               - '%'
106               - "%{hiera('mysql_bind_host')}"
107             tripleo.neutron_server.firewall_rules:
108               '114 neutron server':
109                 dport:
110                   - 9696
111                   - 13696
112               '118 neutron vxlan networks':
113                 proto: 'udp'
114                 dport: 4789
115               '106 vrrp':
116                 proto: vrrp
117             neutron::server::router_distributed: {get_param: NeutronEnableDVR}
118             # NOTE: bind IP is found in Heat replacing the network name with the local node IP
119             # for the given network; replacement examples (eg. for internal_api):
120             # internal_api -> IP
121             # internal_api_uri -> [IP]
122             # internal_api_subnet - > IP/CIDR
123             neutron::bind_host: {get_param: [ServiceNetMap, NeutronApiNetwork]}
124       step_config: |
125         include tripleo::profile::base::neutron::server