Merge "Add missing xinetd/rsync container for Swift"
[apex-tripleo-heat-templates.git] / puppet / services / opendaylight-ovs.yaml
1 heat_template_version: pike
2
3 description: >
4   OpenDaylight OVS Configuration.
5
6 parameters:
7   OpenDaylightPort:
8     default: 8081
9     description: Set opendaylight service port
10     type: number
11   OpenDaylightUsername:
12     default: 'admin'
13     description: The username for the opendaylight server.
14     type: string
15   OpenDaylightPassword:
16     default: 'admin'
17     type: string
18     description: The password for the opendaylight server.
19     hidden: true
20   OpenDaylightConnectionProtocol:
21     description: L7 protocol used for REST access
22     type: string
23     default: 'http'
24   OpenDaylightCheckURL:
25     description: URL postfix to verify ODL has finished starting up
26     type: string
27     default: 'restconf/operational/network-topology:network-topology/topology/netvirt:1'
28   OpenDaylightApiVirtualIP:
29     type: string
30     default: ''
31   OpenDaylightProviderMappings:
32     description: Mappings between logical networks and physical interfaces.
33                  Required for VLAN deployments.  For example physnet1 -> eth1.
34     type: comma_delimited_list
35     default: "datacentre:br-ex"
36   EndpointMap:
37     default: {}
38     description: Mapping of service endpoint -> protocol. Typically set
39                  via parameter_defaults in the resource registry.
40     type: json
41   ServiceNetMap:
42     default: {}
43     description: Mapping of service_name -> network name. Typically set
44                  via parameter_defaults in the resource registry.  This
45                  mapping overrides those in ServiceNetMapDefaults.
46     type: json
47   DefaultPasswords:
48     default: {}
49     type: json
50   RoleName:
51     default: ''
52     description: Role name on which the service is applied
53     type: string
54   RoleParameters:
55     default: {}
56     description: Parameters specific to the role
57     type: json
58
59 resources:
60   Ovs:
61     type: ./openvswitch.yaml
62     properties:
63       ServiceNetMap: {get_param: ServiceNetMap}
64       DefaultPasswords: {get_param: DefaultPasswords}
65       EndpointMap: {get_param: EndpointMap}
66       RoleName: {get_param: RoleName}
67       RoleParameters: {get_param: RoleParameters}
68
69 outputs:
70   role_data:
71     description: Role data for the OpenDaylight service.
72     value:
73       service_name: opendaylight_ovs
74       config_settings:
75         map_merge:
76           - opendaylight::odl_rest_port: {get_param: OpenDaylightPort}
77             opendaylight::username: {get_param: OpenDaylightUsername}
78             opendaylight::password: {get_param: OpenDaylightPassword}
79             opendaylight_check_url: {get_param: OpenDaylightCheckURL}
80             opendaylight::nb_connection_protocol: {get_param: OpenDaylightConnectionProtocol}
81             neutron::agents::ml2::ovs::local_ip: {get_param: [ServiceNetMap, NeutronTenantNetwork]}
82             neutron::plugins::ovs::opendaylight::provider_mappings: {get_param: OpenDaylightProviderMappings}
83             tripleo.opendaylight_ovs.firewall_rules:
84               '118 neutron vxlan networks':
85                proto: 'udp'
86                dport: 4789
87               '136 neutron gre networks':
88                proto: 'gre'
89           - get_attr: [Ovs, role_data, config_settings]
90       step_config: |
91         include tripleo::profile::base::neutron::plugins::ovs::opendaylight
92       upgrade_tasks:
93         yaql:
94           expression: $.data.ovs_upgrade + $.data.opendaylight_upgrade
95           data:
96             ovs_upgrade:
97               get_attr: [Ovs, role_data, upgrade_tasks]
98             opendaylight_upgrade:
99               - name: Check if openvswitch is deployed
100                 command: systemctl is-enabled openvswitch
101                 tags: common
102                 ignore_errors: True
103                 register: openvswitch_enabled
104               - name: "PreUpgrade step0,validation: Check service openvswitch is running"
105                 shell: /usr/bin/systemctl show 'openvswitch' --property ActiveState | grep '\bactive\b'
106                 when: openvswitch_enabled.rc == 0
107                 tags: step0,validation
108               - name: Stop openvswitch service
109                 tags: step1
110                 when: openvswitch_enabled.rc == 0
111                 service: name=openvswitch state=stopped