Merge "Corrected wrong os_region_name in glance-api conf file"
[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   ServiceData:
42     default: {}
43     description: Dictionary packing service data
44     type: json
45   ServiceNetMap:
46     default: {}
47     description: Mapping of service_name -> network name. Typically set
48                  via parameter_defaults in the resource registry.  This
49                  mapping overrides those in ServiceNetMapDefaults.
50     type: json
51   DefaultPasswords:
52     default: {}
53     type: json
54   RoleName:
55     default: ''
56     description: Role name on which the service is applied
57     type: string
58   RoleParameters:
59     default: {}
60     description: Parameters specific to the role
61     type: json
62
63 resources:
64   Ovs:
65     type: ./openvswitch.yaml
66     properties:
67       ServiceData: {get_param: ServiceData}
68       ServiceNetMap: {get_param: ServiceNetMap}
69       DefaultPasswords: {get_param: DefaultPasswords}
70       EndpointMap: {get_param: EndpointMap}
71       RoleName: {get_param: RoleName}
72       RoleParameters: {get_param: RoleParameters}
73
74 outputs:
75   role_data:
76     description: Role data for the OpenDaylight service.
77     value:
78       service_name: opendaylight_ovs
79       config_settings:
80         map_merge:
81           - opendaylight::odl_rest_port: {get_param: OpenDaylightPort}
82             opendaylight::username: {get_param: OpenDaylightUsername}
83             opendaylight::password: {get_param: OpenDaylightPassword}
84             opendaylight_check_url: {get_param: OpenDaylightCheckURL}
85             opendaylight::nb_connection_protocol: {get_param: OpenDaylightConnectionProtocol}
86             neutron::agents::ml2::ovs::local_ip: {get_param: [ServiceNetMap, NeutronTenantNetwork]}
87             neutron::plugins::ovs::opendaylight::provider_mappings: {get_param: OpenDaylightProviderMappings}
88             tripleo.opendaylight_ovs.firewall_rules:
89               '118 neutron vxlan networks':
90                proto: 'udp'
91                dport: 4789
92               '136 neutron gre networks':
93                proto: 'gre'
94           - get_attr: [Ovs, role_data, config_settings]
95       step_config: |
96         include tripleo::profile::base::neutron::plugins::ovs::opendaylight
97       upgrade_tasks:
98         yaql:
99           expression: $.data.ovs_upgrade + $.data.opendaylight_upgrade
100           data:
101             ovs_upgrade:
102               get_attr: [Ovs, role_data, upgrade_tasks]
103             opendaylight_upgrade:
104               - name: Check if openvswitch is deployed
105                 command: systemctl is-enabled openvswitch
106                 tags: common
107                 ignore_errors: True
108                 register: openvswitch_enabled
109               - name: "PreUpgrade step0,validation: Check service openvswitch is running"
110                 shell: /usr/bin/systemctl show 'openvswitch' --property ActiveState | grep '\bactive\b'
111                 when: openvswitch_enabled.rc == 0
112                 tags: step0,validation
113               - name: Stop openvswitch service
114                 tags: step1
115                 when: openvswitch_enabled.rc == 0
116                 service: name=openvswitch state=stopped