Merge "Expose instance discovery method for compute agent"
[apex-tripleo-heat-templates.git] / puppet / services / neutron-l3.yaml
1 heat_template_version: ocata
2
3 description: >
4   OpenStack Neutron L3 agent 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   Debug:
22     type: string
23     default: ''
24   NeutronExternalNetworkBridge:
25     description: Name of bridge used for external network traffic.
26     type: string
27     default: 'br-ex'
28   NeutronL3AgentMode:
29     description: |
30       Agent mode for L3 agent. Must be one of legacy or dvr_snat.
31     default: 'legacy'
32     type: string
33     constraints:
34       - allowed_values:
35         - legacy
36         - dvr_snat
37   MonitoringSubscriptionNeutronL3:
38     default: 'overcloud-neutron-l3-agent'
39     type: string
40   NeutronL3AgentLoggingSource:
41     type: json
42     default:
43       tag: openstack.neutron.agent.l3
44       path: /var/log/neutron/l3-agent.log
45
46 conditions:
47
48   external_network_bridge_empty: {equals : [{get_param: NeutronExternalNetworkBridge}, "''"]}
49
50 resources:
51
52   NeutronBase:
53     type: ./neutron-base.yaml
54     properties:
55       ServiceNetMap: {get_param: ServiceNetMap}
56       DefaultPasswords: {get_param: DefaultPasswords}
57       EndpointMap: {get_param: EndpointMap}
58
59 outputs:
60   role_data:
61     description: Role data for the Neutron L3 agent service.
62     value:
63       service_name: neutron_l3
64       monitoring_subscription: {get_param: MonitoringSubscriptionNeutronL3}
65       logging_source: {get_param: NeutronL3AgentLoggingSource}
66       logging_groups:
67         - neutron
68       config_settings:
69         map_merge:
70         - get_attr: [NeutronBase, role_data, config_settings]
71         - neutron::agents::l3::agent_mode: {get_param: NeutronL3AgentMode}
72           tripleo.neutron_l3.firewall_rules:
73             '106 neutron_l3 vrrp':
74               proto: vrrp
75         -
76           if:
77           - external_network_bridge_empty
78           - {}
79           - neutron::agents::l3::external_network_bridge: {get_param: NeutronExternalNetworkBridge}
80       step_config: |
81         include tripleo::profile::base::neutron::l3
82       upgrade_tasks:
83         - name: Stop neutron_l3 service
84           tags: step2
85           service: name=neutron-l3-agent state=stopped