Merge "Disable ComputeNeutron* for cisco-nexus-ucsm"
[apex-tripleo-heat-templates.git] / puppet / services / opendaylight-api.yaml
1 heat_template_version: ocata
2
3 description: >
4   OpenDaylight SDN Controller.
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   OpenDaylightEnableDHCP:
25     description: Knob to enable/disable ODL DHCP Server
26     type: boolean
27     default: false
28   OpenDaylightFeatures:
29     description: List of features to install with ODL
30     type: comma_delimited_list
31     default: ["odl-netvirt-openstack","odl-netvirt-ui","odl-jolokia"]
32   OpenDaylightApiVirtualIP:
33     type: string
34     default: ''
35   EndpointMap:
36     default: {}
37     description: Mapping of service endpoint -> protocol. Typically set
38                  via parameter_defaults in the resource registry.
39     type: json
40   ServiceNetMap:
41     default: {}
42     description: Mapping of service_name -> network name. Typically set
43                  via parameter_defaults in the resource registry.  This
44                  mapping overrides those in ServiceNetMapDefaults.
45     type: json
46   DefaultPasswords:
47     default: {}
48     type: json
49   RoleName:
50     default: ''
51     description: Role name on which the service is applied
52     type: string
53   RoleParameters:
54     default: {}
55     description: Parameters specific to the role
56     type: json
57
58 outputs:
59   role_data:
60     description: Role data for the OpenDaylight service.
61     value:
62       service_name: opendaylight_api
63       config_settings:
64         opendaylight::odl_rest_port: {get_param: OpenDaylightPort}
65         opendaylight::username: {get_param: OpenDaylightUsername}
66         opendaylight::password: {get_param: OpenDaylightPassword}
67         opendaylight::extra_features: {get_param: OpenDaylightFeatures}
68         opendaylight::enable_dhcp: {get_param: OpenDaylightEnableDHCP}
69         opendaylight::odl_bind_ip: {get_param: [ServiceNetMap, OpendaylightApiNetwork]}
70         opendaylight::nb_connection_protocol: {get_param: OpenDaylightConnectionProtocol}
71         tripleo.opendaylight_api.firewall_rules:
72               '137 opendaylight api':
73                 dport:
74                   - {get_param: OpenDaylightPort}
75                   - 6640
76                   - 6653
77                   - 2550
78       step_config: |
79         include tripleo::profile::base::neutron::opendaylight
80       upgrade_tasks:
81         - name: Check if opendaylight is deployed
82           command: systemctl is-enabled opendaylight
83           tags: common
84           ignore_errors: True
85           register: opendaylight_enabled
86         - name: "PreUpgrade step0,validation: Check service opendaylight is running"
87           shell: /usr/bin/systemctl show 'opendaylight' --property ActiveState | grep '\bactive\b'
88           when: opendaylight_enabled.rc == 0
89           tags: step0,validation
90         - name: Stop opendaylight service
91           tags: step1
92           when: opendaylight_enabled.rc == 0
93           service: name=opendaylight state=stopped
94         - name: Removes ODL snapshots, data, journal directories
95           file:
96             state: absent
97             path: /opt/opendaylight/{{item}}
98           tags: step2
99           with_items:
100             - snapshots
101             - data
102             - journal