Change flat network name for nosdn fdio scenario
[apex-tripleo-heat-templates.git] / puppet / services / neutron-l3.yaml
1 heat_template_version: pike
2
3 description: >
4   OpenStack Neutron L3 agent configured with Puppet
5
6 parameters:
7   ServiceData:
8     default: {}
9     description: Dictionary packing service data
10     type: json
11   ServiceNetMap:
12     default: {}
13     description: Mapping of service_name -> network name. Typically set
14                  via parameter_defaults in the resource registry.  This
15                  mapping overrides those in ServiceNetMapDefaults.
16     type: json
17   DefaultPasswords:
18     default: {}
19     type: json
20   RoleName:
21     default: ''
22     description: Role name on which the service is applied
23     type: string
24   RoleParameters:
25     default: {}
26     description: Parameters specific to the role
27     type: json
28   EndpointMap:
29     default: {}
30     description: Mapping of service endpoint -> protocol. Typically set
31                  via parameter_defaults in the resource registry.
32     type: json
33   Debug:
34     type: string
35     default: ''
36     description: Set to True to enable debugging on all services.
37   NeutronL3AgentMode:
38     description: |
39       Agent mode for L3 agent. Must be one of legacy or dvr_snat.
40     default: 'legacy'
41     type: string
42     constraints:
43       - allowed_values:
44         - legacy
45         - dvr_snat
46   MonitoringSubscriptionNeutronL3:
47     default: 'overcloud-neutron-l3-agent'
48     type: string
49   NeutronL3AgentLoggingSource:
50     type: json
51     default:
52       tag: openstack.neutron.agent.l3
53       path: /var/log/neutron/l3-agent.log
54
55   # DEPRECATED: the following options are deprecated and are currently maintained
56   # for backwards compatibility. They will be removed in the Pike cycle.
57   NeutronExternalNetworkBridge:
58     description: Name of bridge used for external network traffic. Usually L2
59                  agent handles port wiring into external bridge, and hence the
60                  parameter should be unset.
61     type: string
62     default: ''
63
64 conditions:
65
66   external_network_bridge_empty: {equals : [{get_param: NeutronExternalNetworkBridge}, "''"]}
67
68 resources:
69
70   NeutronBase:
71     type: ./neutron-base.yaml
72     properties:
73       ServiceData: {get_param: ServiceData}
74       ServiceNetMap: {get_param: ServiceNetMap}
75       DefaultPasswords: {get_param: DefaultPasswords}
76       EndpointMap: {get_param: EndpointMap}
77       RoleName: {get_param: RoleName}
78       RoleParameters: {get_param: RoleParameters}
79
80 outputs:
81   role_data:
82     description: Role data for the Neutron L3 agent service.
83     value:
84       service_name: neutron_l3
85       monitoring_subscription: {get_param: MonitoringSubscriptionNeutronL3}
86       logging_source: {get_param: NeutronL3AgentLoggingSource}
87       logging_groups:
88         - neutron
89       config_settings:
90         map_merge:
91         - get_attr: [NeutronBase, role_data, config_settings]
92         - neutron::agents::l3::agent_mode: {get_param: NeutronL3AgentMode}
93           tripleo.neutron_l3.firewall_rules:
94             '106 neutron_l3 vrrp':
95               proto: vrrp
96         -
97           if:
98           - external_network_bridge_empty
99           - {}
100           - neutron::agents::l3::external_network_bridge: {get_param: NeutronExternalNetworkBridge}
101       step_config: |
102         include tripleo::profile::base::neutron::l3
103       upgrade_tasks:
104         - name: Check if neutron_l3_agent is deployed
105           command: systemctl is-enabled neutron-l3-agent
106           tags: common
107           ignore_errors: True
108           register: neutron_l3_agent_enabled
109         - name: "PreUpgrade step0,validation: Check service neutron-l3-agent is running"
110           shell: /usr/bin/systemctl show 'neutron-l3-agent' --property ActiveState | grep '\bactive\b'
111           when: neutron_l3_agent_enabled.rc == 0
112           tags: step0,validation
113         - name: Stop neutron_l3 service
114           tags: step1
115           when: neutron_l3_agent_enabled.rc == 0
116           service: name=neutron-l3-agent state=stopped