Merge "Add NodeCreateBatchSize parameter"
[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
50 outputs:
51   role_data:
52     description: Role data for the OpenDaylight service.
53     value:
54       service_name: opendaylight_api
55       config_settings:
56         opendaylight::odl_rest_port: {get_param: OpenDaylightPort}
57         opendaylight::username: {get_param: OpenDaylightUsername}
58         opendaylight::password: {get_param: OpenDaylightPassword}
59         opendaylight::extra_features: {get_param: OpenDaylightFeatures}
60         opendaylight::enable_dhcp: {get_param: OpenDaylightEnableDHCP}
61         opendaylight::odl_bind_ip: {get_param: [ServiceNetMap, OpendaylightApiNetwork]}
62         opendaylight::nb_connection_protocol: {get_param: OpenDaylightConnectionProtocol}
63         tripleo.opendaylight_api.firewall_rules:
64               '137 opendaylight api':
65                 dport:
66                   - {get_param: OpenDaylightPort}
67                   - 6640
68                   - 6653
69                   - 2550
70       step_config: |
71         include tripleo::profile::base::neutron::opendaylight
72       upgrade_tasks:
73         - name: Check if opendaylight is deployed
74           command: systemctl is-enabled opendaylight
75           tags: common
76           ignore_errors: True
77           register: opendaylight_enabled
78         - name: "PreUpgrade step0,validation: Check service opendaylight is running"
79           shell: /usr/bin/systemctl show 'opendaylight' --property ActiveState | grep '\bactive\b'
80           when: opendaylight_enabled.rc == 0
81           tags: step0,validation
82         - name: Stop opendaylight service
83           tags: step1
84           when: opendaylight_enabled.rc == 0
85           service: name=opendaylight state=stopped
86         - name: Removes ODL snapshots, data, journal directories
87           file:
88             state: absent
89             path: /opt/opendaylight/{{item}}
90           tags: step2
91           with_items:
92             - snapshots
93             - data
94             - journal