Change flat network name for nosdn fdio scenario
[apex-tripleo-heat-templates.git] / puppet / services / opendaylight-api.yaml
1 heat_template_version: pike
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   ServiceData:
41     default: {}
42     description: Dictionary packing service data
43     type: json
44   ServiceNetMap:
45     default: {}
46     description: Mapping of service_name -> network name. Typically set
47                  via parameter_defaults in the resource registry.  This
48                  mapping overrides those in ServiceNetMapDefaults.
49     type: json
50   DefaultPasswords:
51     default: {}
52     type: json
53   RoleName:
54     default: ''
55     description: Role name on which the service is applied
56     type: string
57   RoleParameters:
58     default: {}
59     description: Parameters specific to the role
60     type: json
61   OpenDaylightManageRepositories:
62     description: Whether to manage the OpenDaylight repository
63     type: boolean
64     default: false
65   OpenDaylightSNATMechanism:
66     description: SNAT mechanism to be used
67     default: 'conntrack'
68     type: string
69     constraints:
70       - allowed_values:
71           - conntrack
72           - controller
73
74 outputs:
75   role_data:
76     description: Role data for the OpenDaylight service.
77     value:
78       service_name: opendaylight_api
79       config_settings:
80         opendaylight::odl_rest_port: {get_param: OpenDaylightPort}
81         opendaylight::username: {get_param: OpenDaylightUsername}
82         opendaylight::password: {get_param: OpenDaylightPassword}
83         opendaylight::extra_features: {get_param: OpenDaylightFeatures}
84         opendaylight::enable_dhcp: {get_param: OpenDaylightEnableDHCP}
85         opendaylight::odl_bind_ip: {get_param: [ServiceNetMap, OpendaylightApiNetwork]}
86         opendaylight::nb_connection_protocol: {get_param: OpenDaylightConnectionProtocol}
87         opendaylight::manage_repositories: {get_param: OpenDaylightManageRepositories}
88         tripleo.opendaylight_api.firewall_rules:
89               '137 opendaylight api':
90                 dport:
91                   - {get_param: OpenDaylightPort}
92                   - 6640
93                   - 6653
94                   - 2550
95                   - 8185
96         opendaylight::snat_mechanism: {get_param: OpenDaylightSNATMechanism}
97       step_config: |
98         include tripleo::profile::base::neutron::opendaylight
99       upgrade_tasks:
100         - name: Check if opendaylight is deployed
101           command: systemctl is-enabled opendaylight
102           tags: common
103           ignore_errors: True
104           register: opendaylight_enabled
105         - name: "PreUpgrade step0,validation: Check service opendaylight is running"
106           shell: /usr/bin/systemctl show 'opendaylight' --property ActiveState | grep '\bactive\b'
107           when: opendaylight_enabled.rc == 0
108           tags: step0,validation
109         - name: Stop opendaylight service
110           tags: step1
111           when: opendaylight_enabled.rc == 0
112           service: name=opendaylight state=stopped
113         - name: Removes ODL snapshots, data, journal directories
114           file:
115             state: absent
116             path: /opt/opendaylight/{{item}}
117           tags: step2
118           with_items:
119             - snapshots
120             - data
121             - journal