Change flat network name for nosdn fdio scenario
[apex-tripleo-heat-templates.git] / puppet / services / neutron-l2gw-agent.yaml
1 heat_template_version: pike
2
3 description: >
4   L2 Gateway agent configured with Puppet
5 parameters:
6   ServiceData:
7     default: {}
8     description: Dictionary packing service data
9     type: json
10   ServiceNetMap:
11     default: {}
12     description: Mapping of service_name -> network name. Typically set
13                  via parameter_defaults in the resource registry.  This
14                  mapping overrides those in ServiceNetMapDefaults.
15     type: json
16   DefaultPasswords:
17     default: {}
18     type: json
19   RoleName:
20     default: ''
21     description: Role name on which the service is applied
22     type: string
23   RoleParameters:
24     default: {}
25     description: Parameters specific to the role
26     type: json
27   EndpointMap:
28     default: {}
29     description: Mapping of service endpoint -> protocol. Typically set
30                  via parameter_defaults in the resource registry.
31     type: json
32   L2gwAgentOvsdbHosts:
33     default: ''
34     description: L2 gateway agent OVSDB server list.
35     type: comma_delimited_list
36   L2gwAgentEnableManager:
37     default: false
38     description: Connection can be initiated by the ovsdb server.
39     type: boolean
40   L2gwAgentManagerTableListeningPort:
41     default: 6632
42     description: port number for L2 gateway agent, so that it can listen
43     type: number
44   L2gwAgentPeriodicInterval:
45     default: 20
46     description: The L2 gateway agent checks connection state with the OVSDB
47                  servers. The interval is number of seconds between attempts.
48     type: number
49   L2gwAgentMaxConnectionRetries:
50     default: 10
51     description: The L2 gateway agent retries to connect to the OVSDB server
52     type: number
53   L2gwAgentSocketTimeout:
54     default: 30
55     description: socket timeout
56     type: number
57   MonitoringSubscriptionNeutronL2gwAgent:
58     default: 'overcloud-neutron-l2gw-agent'
59     type: string
60   NeutronL2gwAgentLoggingSource:
61     type: json
62     default:
63       tag: openstack.neutron.agent.l2gw
64       path: /var/log/neutron/l2gw-agent.log
65
66 conditions:
67   internal_manager_enabled: {equals: [{get_param: L2gwAgentEnableManager}, True]}
68
69 outputs:
70   role_data:
71     description: Role data for the L2 Gateway role.
72     value:
73       service_name: neutron_l2gw_agent
74       monitoring_subscription: {get_param: MonitoringSubscriptionNeutronL2gwAgent}
75       logging_source: {get_param: NeutronL2gwAgentLoggingSource}
76       logging_groups:
77         - neutron
78       config_settings:
79         map_merge:
80           - neutron::agents::l2gw::ovsdb_hosts: {get_param: L2gwAgentOvsdbHosts}
81             neutron::agents::l2gw::enable_manager: {get_param: L2gwAgentEnableManager}
82             neutron::agents::l2gw::manager_table_listening_port: {get_param: L2gwAgentManagerTableListeningPort}
83             neutron::agents::l2gw::periodic_interval: {get_param: L2gwAgentPeriodicInterval}
84             neutron::agents::l2gw::max_connection_retries: {get_param: L2gwAgentMaxConnectionRetries}
85             neutron::agents::l2gw::socket_timeout: {get_param: L2gwAgentSocketTimeout}
86           -
87             if:
88               - internal_manager_enabled
89               - tripleo.neutron_l2gw_agent.firewall_rules:
90                   '142 neutron l2gw agent input':
91                     proto: 'tcp'
92                     dport: {get_param: L2gwAgentManagerTableListeningPort}
93               - null
94
95       step_config: |
96         include tripleo::profile::base::neutron::agents::l2gw
97       upgrade_tasks:
98         - name: Check if neutron_l2gw_agent is deployed
99           command: systemctl is-enabled neutron-l2gw-agent
100           tags: common
101           ignore_errors: True
102           register: neutron_l2gw_agent_enabled
103         - name: "PreUpgrade step0,validation: Check service neutron-l2gw-agent is running"
104           shell: /usr/bin/systemctl show 'neutron-l2gw-agent' --property ActiveState | grep '\bactive\b'
105           when: neutron_l2gw_agent_enabled.rc == 0
106           tags: step0,validation
107         - name: Stop neutron_l2gw_agent service
108           tags: step1
109           when: neutron_l2gw_agent_enabled.rc == 0
110           service: name=neutron-l2gw-agent state=stopped