04ba061eb4ffde16fc3f0d72eb0d47190e19f1ac
[apex.git] / build / opnfv-tripleo-heat-templates.patch
1 From 38d7938ada285c980298ccee22bea3e4c4c9ff33 Mon Sep 17 00:00:00 2001
2 From: Tim Rozet <tdrozet@gmail.com>
3 Date: Tue, 12 Jan 2016 16:49:57 -0500
4 Subject: [PATCH] Adds current opnfv patch with ODL and ONOS support
5
6 ---
7  environments/onos.yaml                             |   8 +
8  environments/opendaylight-external.yaml            |  25 ++
9  environments/opendaylight.yaml                     |  25 ++
10  environments/opendaylight_l3.yaml                  |   9 +
11  network/endpoints/endpoint_map.yaml                |  31 ++
12  overcloud-resource-registry-puppet.yaml            |   3 +
13  overcloud-without-mergepy.yaml                     |  87 +++++
14  puppet/all-nodes-config.yaml                       |  16 +
15  puppet/compute.yaml                                |  35 ++
16  puppet/controller.yaml                             |  87 ++++-
17  puppet/hieradata/common.yaml                       |   1 +
18  puppet/hieradata/controller.yaml                   |   3 +
19  puppet/manifests/overcloud_compute.pp              |  33 +-
20  puppet/manifests/overcloud_controller.pp           | 104 +++++-
21  puppet/manifests/overcloud_controller_pacemaker.pp | 394 +++++++++++++++------
22  puppet/manifests/overcloud_opendaylight.pp         |  27 ++
23  puppet/opendaylight-puppet.yaml                    | 217 ++++++++++++
24  17 files changed, 979 insertions(+), 126 deletions(-)
25  create mode 100644 environments/onos.yaml
26  create mode 100644 environments/opendaylight-external.yaml
27  create mode 100644 environments/opendaylight.yaml
28  create mode 100644 environments/opendaylight_l3.yaml
29  create mode 100644 puppet/manifests/overcloud_opendaylight.pp
30  create mode 100644 puppet/opendaylight-puppet.yaml
31
32 diff --git a/environments/onos.yaml b/environments/onos.yaml
33 new file mode 100644
34 index 0000000..510aca9
35 --- /dev/null
36 +++ b/environments/onos.yaml
37 @@ -0,0 +1,8 @@
38 +parameters:
39 +    #This a bug for odl deployment. Once bug fixed OpenDaylightCount can be remove.
40 +    OpenDaylightCount: 0
41 +    NeutronL3HA: false
42 +    ExtraConfig:
43 +      neutron_service_plugins: ['onos_router']
44 +      neutron_mechanism_drivers: ['onos_ml2']
45 +      neutron_tenant_network_type: vxlan
46 diff --git a/environments/opendaylight-external.yaml b/environments/opendaylight-external.yaml
47 new file mode 100644
48 index 0000000..411df21
49 --- /dev/null
50 +++ b/environments/opendaylight-external.yaml
51 @@ -0,0 +1,25 @@
52 +# Environment file used to enable OpenDaylight
53 +# Currently uses overcloud image that is assumed
54 +# to be virt-customized with ODL RPM already on it
55 +
56 +# These parameters customize the OpenDaylight Node
57 +# The user name and password are for the ODL service
58 +# Defaults are included here for reference
59 +#parameter_defaults:
60 +#  OpenDaylightFlavor: baremetal
61 +#  OpenDaylightHostname: opendaylight-server
62 +#  OpenDaylightImage: overcloud-full
63 +#  OpenDaylightUsername: admin
64 +#  OpenDaylightPassword: admin
65 +
66 +parameters:
67 +    # increase this if you need more ODL nodes
68 +    OpenDaylightCount: 1
69 +    NeutronL3HA: false
70 +    ExtraConfig:
71 +      neutron_mechanism_drivers: ['opendaylight']
72 +      neutron_tenant_network_type: vxlan
73 +      # Enable this if you want OpenDaylight on the contollers
74 +      # reduce OpenDaylightCount to 0 if you don't want any
75 +      # OpenDaylight only nodes
76 +      #opendaylight_install: true
77 diff --git a/environments/opendaylight.yaml b/environments/opendaylight.yaml
78 new file mode 100644
79 index 0000000..c8abf75
80 --- /dev/null
81 +++ b/environments/opendaylight.yaml
82 @@ -0,0 +1,25 @@
83 +# Environment file used to enable OpenDaylight
84 +# Currently uses overcloud image that is assumed
85 +# to be virt-customized with ODL RPM already on it
86 +
87 +# These parameters customize the OpenDaylight Node
88 +# The user name and password are for the ODL service
89 +# Defaults are included here for reference
90 +#parameter_defaults:
91 +#  OpenDaylightFlavor: baremetal
92 +#  OpenDaylightHostname: opendaylight-server
93 +#  OpenDaylightImage: overcloud-full
94 +#  OpenDaylightUsername: admin
95 +#  OpenDaylightPassword: admin
96 +
97 +parameters:
98 +    # increase this if you need more ODL nodes
99 +    # OpenDaylightCount: 1
100 +    NeutronL3HA: false
101 +    ExtraConfig:
102 +      neutron_mechanism_drivers: ['opendaylight']
103 +      neutron_tenant_network_type: vxlan
104 +      # Enable this if you want OpenDaylight on the contollers
105 +      # reduce OpenDaylightCount to 0 if you don't want any
106 +      # OpenDaylight only nodes
107 +      opendaylight_install: true
108 diff --git a/environments/opendaylight_l3.yaml b/environments/opendaylight_l3.yaml
109 new file mode 100644
110 index 0000000..05c0aff
111 --- /dev/null
112 +++ b/environments/opendaylight_l3.yaml
113 @@ -0,0 +1,9 @@
114 +parameters:
115 +    #NeutronEnableL3Agent: false
116 +    NeutronEnableForceMetadata: true
117 +    OpenDaylightEnableL3: "'yes'"
118 +    NeutronServicePlugins: "networking_odl.l3.l3_odl.OpenDaylightL3RouterPlugin"
119 +    ExtraConfig:
120 +      neutron_mechanism_drivers: ['opendaylight']
121 +      neutron_tenant_network_type: vxlan
122 +      opendaylight_install: true
123 diff --git a/network/endpoints/endpoint_map.yaml b/network/endpoints/endpoint_map.yaml
124 index 0521401..7caa91b 100644
125 --- a/network/endpoints/endpoint_map.yaml
126 +++ b/network/endpoints/endpoint_map.yaml
127 @@ -4,6 +4,9 @@ description: >
128    A Map of OpenStack Endpoints
129  
130  parameters:
131 +  AodhApiVirtualIP:
132 +    type: string
133 +    default: ''
134    CeilometerApiVirtualIP:
135      type: string
136      default: ''
137 @@ -43,6 +46,9 @@ parameters:
138    EndpointMap:
139      type: json
140      default:
141 +      AodhAdmin: {protocol: 'http', port: '8042', host: 'IP_ADDRESS'}
142 +      AodhInternal: {protocol: 'http', port: '8042', host: 'IP_ADDRESS'}
143 +      AodhPublic: {protocol: 'http', port: '8042', host: 'IP_ADDRESS'}
144        CeilometerAdmin: {protocol: 'http', port: '8777', host: 'IP_ADDRESS'}
145        CeilometerInternal: {protocol: 'http', port: '8777', host: 'IP_ADDRESS'}
146        CeilometerPublic: {protocol: 'http', port: '8777', host: 'IP_ADDRESS'}
147 @@ -83,6 +89,28 @@ parameters:
148  
149  resources:
150  
151 +  AodhInternal:
152 +    type: OS::TripleO::Endpoint
153 +    properties:
154 +      EndpointName: AodhInternal
155 +      EndpointMap: { get_param: EndpointMap }
156 +      CloudName: {get_param: CloudName}
157 +      IP: {get_param: AodhApiVirtualIP}
158 +  AodhPublic:
159 +    type: OS::TripleO::Endpoint
160 +    properties:
161 +      EndpointName: AodhPublic
162 +      EndpointMap: { get_param: EndpointMap }
163 +      CloudName: {get_param: CloudName}
164 +      IP: {get_param: PublicVirtualIP}
165 +  AodhAdmin:
166 +    type: OS::TripleO::Endpoint
167 +    properties:
168 +      EndpointName: AodhAdmin
169 +      EndpointMap: { get_param: EndpointMap }
170 +      CloudName: {get_param: CloudName}
171 +      IP: {get_param: AodhApiVirtualIP}
172 +
173    CeilometerInternal:
174      type: OS::TripleO::Endpoint
175      properties:
176 @@ -407,6 +435,9 @@ resources:
177  outputs:
178    endpoint_map:
179      value:
180 +      AodhInternal: {get_attr: [ AodhInternal, endpoint] }
181 +      AodhPublic: {get_attr: [ AodhPublic, endpoint] }
182 +      AodhAdmin: {get_attr: [ AodhAdmin, endpoint] }
183        CeilometerInternal: {get_attr: [ CeilometerInternal, endpoint] }
184        CeilometerPublic: {get_attr: [ CeilometerPublic, endpoint] }
185        CeilometerAdmin: {get_attr: [ CeilometerAdmin, endpoint] }
186 diff --git a/overcloud-resource-registry-puppet.yaml b/overcloud-resource-registry-puppet.yaml
187 index 4cfed6b..adecc79 100644
188 --- a/overcloud-resource-registry-puppet.yaml
189 +++ b/overcloud-resource-registry-puppet.yaml
190 @@ -27,6 +27,9 @@ resource_registry:
191    # To disable, replace with firstboot/userdata_default.yaml
192    OS::TripleO::NodeAdminUserData: firstboot/userdata_heat_admin.yaml
193  
194 +  # This configures OpenDaylight to drive the network
195 +  OS::TripleO::OpenDaylightNode: puppet/opendaylight-puppet.yaml
196 +
197    # Hooks for operator extra config
198    # NodeUserData == Cloud-init additional user-data, e.g cloud-config
199    # ControllerExtraConfigPre == Controller configuration pre service deployment
200 diff --git a/overcloud-without-mergepy.yaml b/overcloud-without-mergepy.yaml
201 index a532c2f..5206004 100644
202 --- a/overcloud-without-mergepy.yaml
203 +++ b/overcloud-without-mergepy.yaml
204 @@ -15,6 +15,11 @@ parameters:
205      description: The password for the keystone admin account, used for monitoring, querying neutron etc.
206      type: string
207      hidden: true
208 +  AodhPassword:
209 +    default: unset
210 +    description: The password for the aodh services
211 +    type: string
212 +    hidden: true
213    CeilometerBackend:
214      default: 'mongodb'
215      description: The ceilometer backend type.
216 @@ -113,6 +118,10 @@ parameters:
217      default: ''
218      type: string
219      description: Neutron ID for ctlplane network.
220 +  NeutronEnableForceMetadata:
221 +    default: 'False'
222 +    description: If True, DHCP always provides metadata route to VM.
223 +    type: string
224    NeutronEnableTunnelling:
225      type: string
226      default: "True"
227 @@ -227,6 +236,27 @@ parameters:
228      default: false
229      description: Should MongoDb journaling be disabled
230      type: boolean
231 +  OpenDaylightPort:
232 +    default: 8081
233 +    description: Set opendaylight service port
234 +    type: number
235 +  OpenDaylightEnableL3:
236 +    description: Knob to enable/disable ODL L3
237 +    type: string
238 +    default: 'no'
239 +  OpenDaylightInstall:
240 +    default: false
241 +    description: Whether to install OpenDaylight on the control nodes.
242 +    type: boolean
243 +  OpenDaylightUsername:
244 +    default: 'admin'
245 +    description: The username for the opendaylight server.
246 +    type: string
247 +  OpenDaylightPassword:
248 +    default: 'admin'
249 +    type: string
250 +    description: The password for the opendaylight server.
251 +    hidden: true
252    PublicVirtualFixedIPs:
253      default: []
254      description: >
255 @@ -575,6 +605,7 @@ parameters:
256      default:
257        NeutronTenantNetwork: tenant
258        CeilometerApiNetwork: internal_api
259 +      AodhApiNetwork: internal_api
260        MongoDbNetwork: internal_api
261        CinderApiNetwork: internal_api
262        CinderIscsiNetwork: storage
263 @@ -664,6 +695,18 @@ parameters:
264        structure as ExtraConfig.
265      type: json
266  
267 +# OpenDaylight specific parameters
268 +  OpenDaylightCount:
269 +    type: number
270 +    default: 0
271 +  OpenDaylightImage:
272 +    default: overcloud-full
273 +    type: string
274 +  OpenDaylightFlavor:
275 +    default: baremetal
276 +    description: Flavor for OpenDaylight node
277 +    type: string
278 +
279    # Hostname format for each role
280    # Note %index% is translated into the index of the node, e.g 0/1/2 etc
281    # and %stackname% is replaced with OS::stack_name in the template below.
282 @@ -688,6 +731,10 @@ parameters:
283      type: string
284      description: Format for CephStorage node hostnames
285      default: '%stackname%-cephstorage-%index%'
286 +  OpenDaylightHostnameFormat:
287 +    type: string
288 +    description: Format for OpenDaylight node hostnames
289 +    default: '%stackname%-opendaylight-%index%'
290  
291    # Identifiers to trigger tasks on nodes
292    UpdateIdentifier:
293 @@ -758,6 +805,7 @@ resources:
294      properties:
295        CloudName: {get_param: CloudName}
296        CeilometerApiVirtualIP: {get_attr: [VipMap, net_ip_map, {get_param: [ServiceNetMap, CeilometerApiNetwork]}]}
297 +      AodhApiVirtualIP: {get_attr: [VipMap, net_ip_map, {get_param: [ServiceNetMap, AodhApiNetwork]}]}
298        CinderApiVirtualIP: {get_attr: [VipMap, net_ip_map, {get_param: [ServiceNetMap, CinderApiNetwork]}]}
299        GlanceApiVirtualIP: {get_attr: [VipMap, net_ip_map, {get_param: [ServiceNetMap, GlanceApiNetwork]}]}
300        GlanceRegistryVirtualIP: {get_attr: [VipMap, net_ip_map, {get_param: [ServiceNetMap, GlanceRegistryNetwork]}]}
301 @@ -770,6 +818,28 @@ resources:
302        SwiftProxyVirtualIP: {get_attr: [VipMap, net_ip_map, {get_param: [ServiceNetMap, SwiftProxyNetwork]}]}
303        PublicVirtualIP: {get_attr: [VipMap, net_ip_map, external]}
304  
305 +  OpenDaylightNode:
306 +    type: OS::Heat::ResourceGroup
307 +    depends_on: Networks
308 +    properties:
309 +      count: {get_param: OpenDaylightCount}
310 +      removal_policies: {get_param: ComputeRemovalPolicies}
311 +      resource_def:
312 +        type: OS::TripleO::OpenDaylightNode
313 +        properties:
314 +          UpdateIdentifier: {get_param: UpdateIdentifier}
315 +          OpenDaylightFlavor: {get_param: OpenDaylightFlavor}
316 +          OpenDaylightImage: {get_param: OpenDaylightImage}
317 +          OpenDaylightPort: {get_param: OpenDaylightPort}
318 +          OpenDaylightUsername: {get_param: OpenDaylightUsername}
319 +          OpenDaylightPassword: {get_param: OpenDaylightPassword}
320 +          OpenDaylightEnableL3: {get_param: OpenDaylightEnableL3}
321 +          OpenDaylightHostname:
322 +            str_replace:
323 +              template: {get_param: OpenDaylightHostnameFormat}
324 +              params:
325 +                '%stackname%': {get_param: 'OS::stack_name'}
326 +
327    Controller:
328      type: OS::Heat::ResourceGroup
329      depends_on: Networks
330 @@ -781,6 +851,7 @@ resources:
331          properties:
332            AdminPassword: {get_param: AdminPassword}
333            AdminToken: {get_param: AdminToken}
334 +          AodhPassword: {get_param: AodhPassword}
335            CeilometerBackend: {get_param: CeilometerBackend}
336            CeilometerMeteringSecret: {get_param: CeilometerMeteringSecret}
337            CeilometerPassword: {get_param: CeilometerPassword}
338 @@ -832,6 +903,7 @@ resources:
339            NeutronBridgeMappings: {get_param: NeutronBridgeMappings}
340            NeutronExternalNetworkBridge: {get_param: NeutronExternalNetworkBridge}
341            NeutronEnableTunnelling: {get_param: NeutronEnableTunnelling}
342 +          NeutronEnableForceMetadata: {get_param: NeutronEnableForceMetadata}
343            NeutronNetworkVLANRanges: {get_param: NeutronNetworkVLANRanges}
344            NeutronPublicInterface: {get_param: NeutronPublicInterface}
345            NeutronPublicInterfaceDefaultRoute: {get_param: NeutronPublicInterfaceDefaultRoute}
346 @@ -853,6 +925,11 @@ resources:
347            NovaPassword: {get_param: NovaPassword}
348            NtpServer: {get_param: NtpServer}
349            MongoDbNoJournal: {get_param: MongoDbNoJournal}
350 +          OpenDaylightPort: {get_param: OpenDaylightPort}
351 +          OpenDaylightInstall: {get_param: OpenDaylightInstall}
352 +          OpenDaylightUsername: {get_param: OpenDaylightUsername}
353 +          OpenDaylightPassword: {get_param: OpenDaylightPassword}
354 +          OpenDaylightEnableL3: {get_param: OpenDaylightEnableL3}
355            PcsdPassword: {get_resource: PcsdPassword}
356            PublicVirtualInterface: {get_param: PublicVirtualInterface}
357            RabbitPassword: {get_param: RabbitPassword}
358 @@ -878,6 +955,7 @@ resources:
359            ServiceNetMap: {get_param: ServiceNetMap}
360            EndpointMap: {get_attr: [EndpointMap, endpoint_map]}
361            CeilometerApiVirtualIP: {get_attr: [VipMap, net_ip_map, {get_param: [ServiceNetMap, CeilometerApiNetwork]}]}
362 +          AodhApiVirtualIP: {get_attr: [VipMap, net_ip_map, {get_param: [ServiceNetMap, AodhApiNetwork]}]}
363            CinderApiVirtualIP: {get_attr: [VipMap, net_ip_map, {get_param: [ServiceNetMap, CinderApiNetwork]}]}
364            HeatApiVirtualIP: {get_attr: [VipMap, net_ip_map, {get_param: [ServiceNetMap, HeatApiNetwork]}]}
365            GlanceApiVirtualIP: {get_attr: [VipMap, net_ip_map, {get_param: [ServiceNetMap, GlanceApiNetwork]}]}
366 @@ -948,6 +1026,9 @@ resources:
367            NovaPublicIP: {get_attr: [PublicVirtualIP, ip_address]}
368            NovaPassword: {get_param: NovaPassword}
369            NtpServer: {get_param: NtpServer}
370 +          OpenDaylightPort: {get_param: OpenDaylightPort}
371 +          OpenDaylightUsername: {get_param: OpenDaylightUsername}
372 +          OpenDaylightPassword: {get_param: OpenDaylightPassword}
373            RabbitHost: {get_attr: [VipMap, net_ip_map, {get_param: [ServiceNetMap, RabbitMqNetwork]}]}
374            RabbitPassword: {get_param: RabbitPassword}
375            RabbitUserName: {get_param: RabbitUserName}
376 @@ -1068,6 +1149,7 @@ resources:
377        compute_hosts: {get_attr: [Compute, hosts_entry]}
378        controller_hosts: {get_attr: [Controller, hosts_entry]}
379        controller_ips: {get_attr: [Controller, ip_address]}
380 +      opendaylight_ip: {get_attr: [OpenDaylightNode, ip_address]}
381        block_storage_hosts: {get_attr: [BlockStorage, hosts_entry]}
382        object_storage_hosts: {get_attr: [ObjectStorage, hosts_entry]}
383        ceph_storage_hosts: {get_attr: [CephStorage, hosts_entry]}
384 @@ -1081,6 +1163,7 @@ resources:
385        heat_api_node_ips: {get_attr: [ControllerIpListMap, net_ip_map, {get_param: [ServiceNetMap, HeatApiNetwork]}]}
386        swift_proxy_node_ips: {get_attr: [ControllerIpListMap, net_ip_map, {get_param: [ServiceNetMap, SwiftProxyNetwork]}]}
387        ceilometer_api_node_ips: {get_attr: [ControllerIpListMap, net_ip_map, {get_param: [ServiceNetMap, CeilometerApiNetwork]}]}
388 +      aodh_api_node_ips: {get_attr: [ControllerIpListMap, net_ip_map, {get_param: [ServiceNetMap, AodhApiNetwork]}]}
389        nova_api_node_ips: {get_attr: [ControllerIpListMap, net_ip_map, {get_param: [ServiceNetMap, NovaApiNetwork]}]}
390        nova_metadata_node_ips: {get_attr: [ControllerIpListMap, net_ip_map, {get_param: [ServiceNetMap, NovaMetadataNetwork]}]}
391        glance_api_node_ips: {get_attr: [ControllerIpListMap, net_ip_map, {get_param: [ServiceNetMap, GlanceApiNetwork]}]}
392 @@ -1189,6 +1272,7 @@ resources:
393          nova_api_vip: {get_attr: [VipMap, net_ip_map, {get_param: [ServiceNetMap, NovaApiNetwork]}]}
394          nova_metadata_vip: {get_attr: [VipMap, net_ip_map, {get_param: [ServiceNetMap, NovaMetadataNetwork]}]}
395          ceilometer_api_vip: {get_attr: [VipMap, net_ip_map, {get_param: [ServiceNetMap, CeilometerApiNetwork]}]}
396 +        aodh_api_vip: {get_attr: [VipMap, net_ip_map, {get_param: [ServiceNetMap, AodhApiNetwork]}]}
397          heat_api_vip: {get_attr: [VipMap, net_ip_map, {get_param: [ServiceNetMap, HeatApiNetwork]}]}
398          horizon_vip: {get_attr: [VipMap, net_ip_map, {get_param: [ServiceNetMap, HorizonNetwork]}]}
399          redis_vip: {get_attr: [RedisVirtualIP, ip_address]}
400 @@ -1434,6 +1518,9 @@ outputs:
401    PublicVip:
402      description: Controller VIP for public API endpoints
403      value: {get_attr: [PublicVirtualIP, ip_address]}
404 +  AodhInternalVip:
405 +    description: VIP for Aodh API internal endpoint
406 +    value: {get_attr: [VipMap, net_ip_map, {get_param: [ServiceNetMap, AodhApiNetwork]}]}
407    CeilometerInternalVip:
408      description: VIP for Ceilometer API internal endpoint
409      value: {get_attr: [VipMap, net_ip_map, {get_param: [ServiceNetMap, CeilometerApiNetwork]}]}
410 diff --git a/puppet/all-nodes-config.yaml b/puppet/all-nodes-config.yaml
411 index 2bc519b..6342df3 100644
412 --- a/puppet/all-nodes-config.yaml
413 +++ b/puppet/all-nodes-config.yaml
414 @@ -8,6 +8,8 @@ parameters:
415      type: comma_delimited_list
416    controller_ips:
417      type: comma_delimited_list
418 +  opendaylight_ip:
419 +    type: comma_delimited_list
420    block_storage_hosts:
421      type: comma_delimited_list
422    object_storage_hosts:
423 @@ -34,6 +36,8 @@ parameters:
424      type: comma_delimited_list
425    ceilometer_api_node_ips:
426      type: comma_delimited_list
427 +  aodh_api_node_ips:
428 +    type: comma_delimited_list
429    nova_api_node_ips:
430      type: comma_delimited_list
431    nova_metadata_node_ips:
432 @@ -82,6 +86,10 @@ resources:
433                raw_data: {get_file: hieradata/RedHat.yaml}
434              all_nodes:
435                mapped_data:
436 +                opendaylight_controller_ip:
437 +                  list_join:
438 +                  - ','
439 +                  - {get_param: opendaylight_ip}
440                  controller_node_ips:
441                    list_join:
442                    - ','
443 @@ -166,6 +174,14 @@ resources:
444                          list_join:
445                          - "','"
446                          - {get_param: ceilometer_api_node_ips}
447 +                aodh_api_node_ips:
448 +                  str_replace:
449 +                    template: "['SERVERS_LIST']"
450 +                    params:
451 +                      SERVERS_LIST:
452 +                        list_join:
453 +                        - "','"
454 +                        - {get_param: aodh_api_node_ips}
455                  nova_api_node_ips:
456                    str_replace:
457                      template: "['SERVERS_LIST']"
458 diff --git a/puppet/compute.yaml b/puppet/compute.yaml
459 index 70c7403..13fd4f6 100644
460 --- a/puppet/compute.yaml
461 +++ b/puppet/compute.yaml
462 @@ -213,6 +213,23 @@ parameters:
463    NtpServer:
464      type: string
465      default: ''
466 +  OpenDaylightPort:
467 +    default: 8081
468 +    description: Set opendaylight service port
469 +    type: number
470 +  OpenDaylightUsername:
471 +    default: 'admin'
472 +    description: The username for the opendaylight server.
473 +    type: string
474 +  OpenDaylightPassword:
475 +    default: 'admin'
476 +    type: string
477 +    description: The password for the opendaylight server.
478 +    hidden: true
479 +  ONOSPort:
480 +    default: 8181
481 +    description: Set onos service port
482 +    type: number
483    RabbitHost:
484      type: string
485      default: ''  # Has to be here because of the ignored empty value bug
486 @@ -320,6 +337,11 @@ resources:
487      properties:
488        ControlPlaneIP: {get_attr: [NovaCompute, networks, ctlplane, 0]}
489  
490 +  ExternalPort:
491 +    type: OS::TripleO::Controller::Ports::ExternalPort
492 +    properties:
493 +      ControlPlaneIP: {get_attr: [NovaCompute, networks, ctlplane, 0]}
494 +
495    NetIpMap:
496      type: OS::TripleO::Network::Ports::NetIpMap
497      properties:
498 @@ -327,6 +349,7 @@ resources:
499        InternalApiIp: {get_attr: [InternalApiPort, ip_address]}
500        StorageIp: {get_attr: [StoragePort, ip_address]}
501        TenantIp: {get_attr: [TenantPort, ip_address]}
502 +      ExternalIp: {get_attr: [ExternalPort, ip_address]}
503  
504    NetworkConfig:
505      type: OS::TripleO::Compute::Net::SoftwareConfig
506 @@ -335,6 +358,7 @@ resources:
507        InternalApiIpSubnet: {get_attr: [InternalApiPort, ip_subnet]}
508        StorageIpSubnet: {get_attr: [StoragePort, ip_subnet]}
509        TenantIpSubnet: {get_attr: [TenantPort, ip_subnet]}
510 +      ExternalIpSubnet: {get_attr: [ExternalPort, ip_subnet]}
511  
512    NetworkDeployment:
513      type: OS::TripleO::SoftwareDeployment
514 @@ -406,6 +430,10 @@ resources:
515                  neutron::rabbit_user: {get_input: rabbit_user}
516                  neutron::rabbit_use_ssl: {get_input: rabbit_client_use_ssl}
517                  neutron::rabbit_port: {get_input: rabbit_client_port}
518 +                opendaylight_port: {get_input: opendaylight_port}
519 +                opendaylight_username: {get_input: opendaylight_username}
520 +                opendaylight_password: {get_input: opendaylight_password}
521 +                onos_port: {get_input: onos_port}
522                  neutron_flat_networks: {get_input: neutron_flat_networks}
523                  neutron_host: {get_input: neutron_host}
524                  neutron::agents::ml2::ovs::local_ip: {get_input: neutron_local_ip}
525 @@ -459,6 +487,10 @@ resources:
526          snmpd_readonly_user_name: {get_param: SnmpdReadonlyUserName}
527          snmpd_readonly_user_password: {get_param: SnmpdReadonlyUserPassword}
528          glance_api_servers: {get_param: [EndpointMap, GlanceInternal, uri]}
529 +        opendaylight_port: {get_param: OpenDaylightPort}
530 +        opendaylight_username: {get_param: OpenDaylightUsername}
531 +        opendaylight_password: {get_param: OpenDaylightPassword}
532 +        onos_port: {get_param: ONOSPort}
533          neutron_flat_networks: {get_param: NeutronFlatNetworks}
534          neutron_host: {get_param: NeutronHost}
535          neutron_local_ip: {get_attr: [NetIpMap, net_ip_map, {get_param: [ServiceNetMap, NeutronTenantNetwork]}]}
536 @@ -570,6 +602,9 @@ outputs:
537    tenant_ip_address:
538      description: IP address of the server in the tenant network
539      value: {get_attr: [TenantPort, ip_address]}
540 +  external_ip_address:
541 +    description: IP address of the server in the external network
542 +    value: {get_attr: [ExternalPort, ip_address]}
543    hostname:
544      description: Hostname of the server
545      value: {get_attr: [NovaCompute, name]}
546 diff --git a/puppet/controller.yaml b/puppet/controller.yaml
547 index ea0b3af..1e6539b 100644
548 --- a/puppet/controller.yaml
549 +++ b/puppet/controller.yaml
550 @@ -14,6 +14,14 @@ parameters:
551      description: The keystone auth secret and db password.
552      type: string
553      hidden: true
554 +  AodhApiVirtualIP:
555 +    type: string
556 +    default: ''
557 +  AodhPassword:
558 +    default: unset
559 +    description: The password for the aodh services.
560 +    type: string
561 +    hidden: true
562    CeilometerApiVirtualIP:
563      type: string
564      default: ''
565 @@ -357,6 +365,10 @@ parameters:
566      default: 'True'
567      description: Allow automatic l3-agent failover
568      type: string
569 +  NeutronEnableForceMetadata:
570 +    default: 'False'
571 +    description: If True, DHCP always provides metadata route to VM.
572 +    type: string
573    NeutronEnableTunnelling:
574      type: string
575      default: "True"
576 @@ -443,6 +455,31 @@ parameters:
577    NtpServer:
578      type: string
579      default: ''
580 +  OpenDaylightPort:
581 +    default: 8081
582 +    description: Set opendaylight service port
583 +    type: number
584 +  OpenDaylightInstall:
585 +    default: false
586 +    description: Whether to install OpenDaylight on the control nodes.
587 +    type: boolean
588 +  OpenDaylightUsername:
589 +    default: 'admin'
590 +    description: The username for the opendaylight server.
591 +    type: string
592 +  OpenDaylightPassword:
593 +    default: 'admin'
594 +    type: string
595 +    description: The password for the opendaylight server.
596 +    hidden: true
597 +  OpenDaylightEnableL3:
598 +    description: Knob to enable/disable ODL L3
599 +    type: string
600 +    default: 'no'
601 +  ONOSPort:
602 +    default: 8181
603 +    description: Set onos service port
604 +    type: number
605    PcsdPassword:
606      type: string
607      description: The password for the 'pcsd' user.
608 @@ -696,6 +733,7 @@ resources:
609        input_values:
610          bootstack_nodeid: {get_attr: [Controller, name]}
611          neutron_enable_tunneling: {get_param: NeutronEnableTunnelling}
612 +        neutron_enable_force_metadata: {get_param: NeutronEnableForceMetadata}
613          haproxy_log_address: {get_param: HAProxySyslogAddress}
614          heat.watch_server_url:
615            list_join:
616 @@ -774,6 +812,7 @@ resources:
617                - {get_param: MysqlVirtualIP}
618                - '/heat'
619          keystone_ca_certificate: {get_param: KeystoneCACertificate}
620 +        keystone_admin_vip: {get_param: KeystoneAdminApiVirtualIP}
621          keystone_signing_key: {get_param: KeystoneSigningKey}
622          keystone_signing_certificate: {get_param: KeystoneSigningCertificate}
623          keystone_ssl_certificate: {get_param: KeystoneSSLCertificate}
624 @@ -805,6 +844,12 @@ resources:
625              template: tripleo-CLUSTER
626              params:
627                CLUSTER: {get_param: MysqlClusterUniquePart}
628 +        opendaylight_port: {get_param: OpenDaylightPort}
629 +        opendaylight_install: {get_param: OpenDaylightInstall}
630 +        opendaylight_username: {get_param: OpenDaylightUsername}
631 +        opendaylight_password: {get_param: OpenDaylightPassword}
632 +        opendaylight_enable_l3: {get_param: OpenDaylightEnableL3}
633 +        onos_port: {get_param: ONOSPort}
634          neutron_flat_networks: {get_param: NeutronFlatNetworks}
635          neutron_metadata_proxy_shared_secret: {get_param: NeutronMetadataProxySharedSecret}
636          neutron_agent_mode: {get_param: NeutronAgentMode}
637 @@ -879,6 +924,7 @@ resources:
638          ceilometer_backend: {get_param: CeilometerBackend}
639          ceilometer_metering_secret: {get_param: CeilometerMeteringSecret}
640          ceilometer_password: {get_param: CeilometerPassword}
641 +        aodh_password: {get_param: AodhPassword}
642          ceilometer_coordination_url:
643            list_join:
644              - ''
645 @@ -891,6 +937,12 @@ resources:
646              - - 'mysql://ceilometer:unset@'
647                - {get_param: MysqlVirtualIP}
648                - '/ceilometer'
649 +        ceilometer_public_url: {get_param: [EndpointMap, CeilometerPublic, uri]}
650 +        ceilometer_internal_url: {get_param: [EndpointMap, CeilometerInternal, uri]}
651 +        ceilometer_admin_url: {get_param: [EndpointMap, CeilometerAdmin, uri]}
652 +        aodh_public_url: {get_param: [EndpointMap, AodhPublic, uri]}
653 +        aodh_internal_url: {get_param: [EndpointMap, AodhInternal, uri]}
654 +        aodh_admin_url: {get_param: [EndpointMap, AodhAdmin, uri]}
655          snmpd_readonly_user_name: {get_param: SnmpdReadonlyUserName}
656          snmpd_readonly_user_password: {get_param: SnmpdReadonlyUserPassword}
657          nova_password: {get_param: NovaPassword}
658 @@ -948,6 +1000,7 @@ resources:
659          neutron_api_network: {get_attr: [NetIpMap, net_ip_map, {get_param: [ServiceNetMap, NeutronApiNetwork]}]}
660          neutron_local_ip: {get_attr: [NetIpMap, net_ip_map, {get_param: [ServiceNetMap, NeutronTenantNetwork]}]}
661          ceilometer_api_network: {get_attr: [NetIpMap, net_ip_map, {get_param: [ServiceNetMap, CeilometerApiNetwork]}]}
662 +        aodh_api_network: {get_attr: [NetIpMap, net_ip_map, {get_param: [ServiceNetMap, AodhApiNetwork]}]}
663          nova_api_network: {get_attr: [NetIpMap, net_ip_map, {get_param: [ServiceNetMap, NovaApiNetwork]}]}
664          nova_metadata_network: {get_attr: [NetIpMap, net_ip_map, {get_param: [ServiceNetMap, NovaMetadataNetwork]}]}
665          horizon_network: {get_attr: [NetIpMap, net_ip_map, {get_param: [ServiceNetMap, HorizonNetwork]}]}
666 @@ -1041,7 +1094,7 @@ resources:
667                  cinder_iscsi_ip_address: {get_input: cinder_iscsi_network}
668                  cinder::database_connection: {get_input: cinder_dsn}
669                  cinder::api::keystone_password: {get_input: cinder_password}
670 -                cinder::api::auth_uri: {get_input: keystone_auth_uri}
671 +                cinder::api::keystone_auth_host: {get_input: keystone_admin_vip}
672                  cinder::api::identity_uri: {get_input: keystone_identity_uri}
673                  cinder::api::bind_host: {get_input: cinder_api_network}
674                  cinder::rabbit_userid: {get_input: rabbit_username}
675 @@ -1136,6 +1189,16 @@ resources:
676                  mysql_bind_host: {get_input: mysql_network}
677                  mysql_virtual_ip: {get_input: mysql_virtual_ip}
678  
679 +                # OpenDaylight
680 +                opendaylight_port: {get_input: opendaylight_port}
681 +                opendaylight_install: {get_input: opendaylight_install}
682 +                opendaylight_username: {get_input: opendaylight_username}
683 +                opendaylight_password: {get_input: opendaylight_password}
684 +                opendaylight_enable_l3: {get_input: opendaylight_enable_l3}
685 +
686 +                # ONOS
687 +                onos_port: {get_input: onos_port}
688 +
689                  # Neutron
690                  neutron::bind_host: {get_input: neutron_api_network}
691                  neutron::rabbit_password: {get_input: rabbit_password}
692 @@ -1152,6 +1215,7 @@ resources:
693                  neutron_flat_networks: {get_input: neutron_flat_networks}
694                  neutron::agents::metadata::shared_secret: {get_input: neutron_metadata_proxy_shared_secret}
695                  neutron::agents::metadata::metadata_ip: {get_input: neutron_api_network}
696 +                neutron::agents::dhcp::enable_force_metadata: {get_input: neutron_enable_force_metadata}
697                  neutron_agent_mode: {get_input: neutron_agent_mode}
698                  neutron_router_distributed: {get_input: neutron_router_distributed}
699                  neutron::core_plugin: {get_input: neutron_core_plugin}
700 @@ -1198,6 +1262,27 @@ resources:
701                  snmpd_readonly_user_name: {get_input: snmpd_readonly_user_name}
702                  snmpd_readonly_user_password: {get_input: snmpd_readonly_user_password}
703  
704 +                # Aodh
705 +                aodh::rabbit_userid: {get_input: rabbit_username}
706 +                aodh::rabbit_password: {get_input: rabbit_password}
707 +                aodh::rabbit_use_ssl: {get_input: rabbit_client_use_ssl}
708 +                aodh::rabbit_port: {get_input: rabbit_client_port}
709 +                aodh::debug: {get_input: debug}
710 +                aodh::wsgi::apache::ssl: false
711 +                aodh::api::service_name: 'httpd'
712 +                aodh::api::host: {get_input: aodh_api_network}
713 +                aodh::api::keystone_password: {get_input: aodh_password}
714 +                aodh::api::keystone_auth_uri: {get_input: keystone_auth_uri}
715 +                aodh::api::keystone_identity_uri: {get_input: keystone_identity_uri}
716 +                aodh::auth::auth_password: {get_input: aodh_password}
717 +                aodh::keystone::auth::public_url: {get_input: aodh_public_url }
718 +                aodh::keystone::auth::internal_url: {get_input: aodh_internal_url }
719 +                aodh::keystone::auth::admin_url: {get_input: aodh_admin_url }
720 +                aodh::keystone::auth::password: {get_input: aodh_password }
721 +                aodh::keystone::auth::region: {get_input: keystone_region}
722 +                # for a migration path from ceilometer-alarm to aodh, we use the same database & coordination
723 +                aodh::evaluator::coordination_url: {get_input: ceilometer_coordination_url}
724 +
725                  # Nova
726                  nova::rabbit_userid: {get_input: rabbit_username}
727                  nova::rabbit_password: {get_input: rabbit_password}
728 diff --git a/puppet/hieradata/common.yaml b/puppet/hieradata/common.yaml
729 index 030f661..5840016 100644
730 --- a/puppet/hieradata/common.yaml
731 +++ b/puppet/hieradata/common.yaml
732 @@ -6,6 +6,7 @@ ceilometer::agent::auth::auth_region: 'regionOne'
733  # FIXME: Might be better to use 'service' tenant here but this requires
734  # changes in the tripleo-incubator keystone role setup
735  ceilometer::agent::auth::auth_tenant_name: 'admin'
736 +aodh::auth::auth_tenant_name: 'admin'
737  
738  nova::network::neutron::neutron_admin_tenant_name: 'service'
739  nova::network::neutron::neutron_admin_username: 'neutron'
740 diff --git a/puppet/hieradata/controller.yaml b/puppet/hieradata/controller.yaml
741 index 4b7fd81..4f1fef6 100644
742 --- a/puppet/hieradata/controller.yaml
743 +++ b/puppet/hieradata/controller.yaml
744 @@ -32,6 +32,7 @@ redis::sentinel::notification_script: '/usr/local/bin/redis-notifications.sh'
745  # service tenant
746  nova::api::admin_tenant_name: 'service'
747  glance::api::keystone_tenant: 'service'
748 +aodh::api::keystone_tenant: 'service'
749  glance::registry::keystone_tenant: 'service'
750  neutron::server::auth_tenant: 'service'
751  neutron::agents::metadata::auth_tenant: 'service'
752 @@ -39,6 +40,7 @@ cinder::api::keystone_tenant: 'service'
753  swift::proxy::authtoken::admin_tenant_name: 'service'
754  ceilometer::api::keystone_tenant: 'service'
755  heat::keystone_tenant: 'service'
756 +aodh::keystone::auth::tenant: 'service'
757  
758  # keystone
759  keystone::cron::token_flush::maxdelay: 3600
760 @@ -115,6 +117,7 @@ tripleo::loadbalancer::mysql: true
761  tripleo::loadbalancer::redis: true
762  tripleo::loadbalancer::swift_proxy_server: true
763  tripleo::loadbalancer::ceilometer: true
764 +tripleo::loadbalancer::aodh: true
765  tripleo::loadbalancer::heat_api: true
766  tripleo::loadbalancer::heat_cloudwatch: true
767  tripleo::loadbalancer::heat_cfn: true
768 diff --git a/puppet/manifests/overcloud_compute.pp b/puppet/manifests/overcloud_compute.pp
769 index cd41cc7..b8336ee 100644
770 --- a/puppet/manifests/overcloud_compute.pp
771 +++ b/puppet/manifests/overcloud_compute.pp
772 @@ -75,9 +75,36 @@ class { '::neutron::plugins::ml2':
773    tenant_network_types => [hiera('neutron_tenant_network_type')],
774  }
775  
776 -class { '::neutron::agents::ml2::ovs':
777 -  bridge_mappings => split(hiera('neutron_bridge_mappings'), ','),
778 -  tunnel_types    => split(hiera('neutron_tunnel_types'), ','),
779 +if 'opendaylight' in hiera('neutron_mechanism_drivers') {
780 +
781 +  if str2bool(hiera('opendaylight_install', 'false')) {
782 +    $controller_ips = split(hiera('controller_node_ips'), ',')
783 +    $opendaylight_controller_ip = $controller_ips[0]
784 +  } else {
785 +    $opendaylight_controller_ip = hiera('opendaylight_controller_ip')
786 +  }
787 +
788 +  if str2bool(hiera('opendaylight_install', 'false')) {
789 +    class { 'neutron::plugins::ovs::opendaylight':
790 +      odl_controller_ip => $opendaylight_controller_ip,
791 +      tunnel_ip         => hiera('neutron::agents::ml2::ovs::local_ip'),
792 +      odl_port          => hiera('opendaylight_port'),
793 +      odl_username      => hiera('opendaylight_username'),
794 +      odl_password      => hiera('opendaylight_password'),
795 +    }
796 +  }
797 +
798 +} elsif 'onos_ml2' in hiera('neutron_mechanism_drivers') {
799 +  $controller_ips = split(hiera('controller_node_ips'), ',')
800 +  class {'onos::ovs_computer':
801 +    manager_ip => $controller_ips[0]
802 +  }
803 +
804 +} else {
805 +  class { 'neutron::agents::ml2::ovs':
806 +    bridge_mappings => split(hiera('neutron_bridge_mappings'), ','),
807 +    tunnel_types    => split(hiera('neutron_tunnel_types'), ','),
808 +  }
809  }
810  
811  if 'cisco_n1kv' in hiera('neutron_mechanism_drivers') {
812 diff --git a/puppet/manifests/overcloud_controller.pp b/puppet/manifests/overcloud_controller.pp
813 index 1f6c2be..474bb1d 100644
814 --- a/puppet/manifests/overcloud_controller.pp
815 +++ b/puppet/manifests/overcloud_controller.pp
816 @@ -30,6 +30,21 @@ if hiera('step') >= 1 {
817  
818  if hiera('step') >= 2 {
819  
820 +  if str2bool(hiera('opendaylight_install', 'false')) {
821 +    class {"opendaylight":
822 +      extra_features => ['odl-ovsdb-openstack'],
823 +      odl_rest_port  => hiera('opendaylight_port'),
824 +      enable_l3      => hiera('opendaylight_enable_l3', 'no'),
825 +    }
826 +  }
827 +  
828 +  if 'onos_ml2' in hiera('neutron_mechanism_drivers') {
829 +    # install onos and config ovs
830 +    class {"onos":
831 +      controllers_ip => $controller_node_ips
832 +    }
833 +  }
834 +
835    if count(hiera('ntp::servers')) > 0 {
836      include ::ntp
837    }
838 @@ -158,6 +173,9 @@ if hiera('step') >= 2 {
839  
840  if hiera('step') >= 3 {
841  
842 +  # Apache
843 +  include ::apache
844 +
845    include ::keystone
846  
847    #TODO: need a cleanup-keystone-tokens.sh solution here
848 @@ -223,9 +241,7 @@ if hiera('step') >= 3 {
849    include ::nova::scheduler
850    include ::nova::scheduler::filter
851  
852 -  include ::neutron
853    include ::neutron::server
854 -  include ::neutron::agents::l3
855    include ::neutron::agents::dhcp
856    include ::neutron::agents::metadata
857  
858 @@ -237,15 +253,77 @@ if hiera('step') >= 3 {
859      require => Package['neutron'],
860    }
861  
862 +  if 'onos_ml2' in hiera('neutron_mechanism_drivers') {
863 +    # config neutron service_plugins to onos driver
864 +    class { '::neutron':
865 +      service_plugins  => [hiera('neutron_service_plugins')]
866 +    }
867 +  } else {
868 +    include ::neutron
869 +    if 'opendaylight' in hiera('neutron_mechanism_drivers') {
870 +      if ! str2bool(hiera('opendaylight_enable_l3', 'no')) {
871 +        include ::neutron::agents::l3
872 +      }
873 +    }
874 +  }
875 +  
876    class { '::neutron::plugins::ml2':
877      flat_networks        => split(hiera('neutron_flat_networks'), ','),
878      tenant_network_types => [hiera('neutron_tenant_network_type')],
879      mechanism_drivers    => [hiera('neutron_mechanism_drivers')],
880    }
881 -  class { '::neutron::agents::ml2::ovs':
882 -    bridge_mappings => split(hiera('neutron_bridge_mappings'), ','),
883 -    tunnel_types    => split(hiera('neutron_tunnel_types'), ','),
884 +
885 +  if 'opendaylight' in hiera('neutron_mechanism_drivers') {
886 +    if ! str2bool(hiera('opendaylight_enable_l3', 'no')) {
887 +      Service['neutron-server'] -> Service['neutron-l3']
888 +    }
889 +
890 +    if str2bool(hiera('opendaylight_install', 'false')) {
891 +      $controller_ips = split(hiera('controller_node_ips'), ',')
892 +      $opendaylight_controller_ip = $controller_ips[0]
893 +    } else {
894 +      $opendaylight_controller_ip = hiera('opendaylight_controller_ip')
895 +    }
896 +
897 +    class { 'neutron::plugins::ml2::opendaylight':
898 +      odl_controller_ip => $opendaylight_controller_ip,
899 +      odl_username      => hiera('opendaylight_username'),
900 +      odl_password      => hiera('opendaylight_password'),
901 +      odl_port          => hiera('opendaylight_port'),
902 +    }
903 +
904 +    if str2bool(hiera('opendaylight_install', 'false')) {
905 +      class { 'neutron::plugins::ovs::opendaylight':
906 +        odl_controller_ip => $opendaylight_controller_ip,
907 +        tunnel_ip         => hiera('neutron::agents::ml2::ovs::local_ip'),
908 +        odl_port          => hiera('opendaylight_port'),
909 +        odl_username      => hiera('opendaylight_username'),
910 +        odl_password      => hiera('opendaylight_password'),
911 +      }
912 +    }
913 +
914 +  } elsif 'onos_ml2' in hiera('neutron_mechanism_drivers') {
915 +    #config ml2_conf.ini with onos url address
916 +    $onos_port = hiera('onos_port')
917 +    $private_ip = hiera('neutron::agents::ml2::ovs::local_ip')
918 +
919 +    neutron_plugin_ml2 {
920 +      'onos/username':         value => 'admin';
921 +      'onos/password':         value => 'admin';
922 +      'onos/url_path':         value => "http://${controller_node_ips[0]}:${onos_port}/onos/vtn";
923 +    }
924 +
925 +  } else {
926 +
927 +    class { 'neutron::agents::ml2::ovs':
928 +      bridge_mappings => split(hiera('neutron_bridge_mappings'), ','),
929 +      tunnel_types => split(hiera('neutron_tunnel_types'), ','),
930 +    }
931 +
932 +    Service['neutron-server'] -> Service['neutron-ovs-agent-service']
933 +    Service['neutron-server'] -> Service['neutron-l3']
934    }
935 +
936    if 'cisco_n1kv' in hiera('neutron_mechanism_drivers') {
937      include ::neutron::plugins::ml2::cisco::nexus1000v
938  
939 @@ -280,8 +358,6 @@ if hiera('step') >= 3 {
940    }
941  
942    Service['neutron-server'] -> Service['neutron-dhcp-service']
943 -  Service['neutron-server'] -> Service['neutron-l3']
944 -  Service['neutron-server'] -> Service['neutron-ovs-agent-service']
945    Service['neutron-server'] -> Service['neutron-metadata']
946  
947    include ::cinder
948 @@ -447,6 +523,20 @@ if hiera('step') >= 3 {
949  
950    Cron <| title == 'ceilometer-expirer' |> { command => "sleep $((\$(od -A n -t d -N 3 /dev/urandom) % 86400)) && ${::ceilometer::params::expirer_command}" }
951  
952 +  # Aodh
953 +  include ::aodh::auth
954 +  include ::aodh::api
955 +  include ::aodh::evaluator
956 +  include ::aodh::notifier
957 +  include ::aodh::listener
958 +  include ::aodh::client
959 +  include ::aodh::db::sync
960 +  class { '::aodh' :
961 +    database_connection => $ceilometer_database_connection,
962 +  }
963 +  # To manage the upgrade:
964 +  Exec['ceilometer-dbsync'] -> Exec['aodh-db-sync']
965 +
966    # Heat
967    include ::heat
968    include ::heat::api
969 diff --git a/puppet/manifests/overcloud_controller_pacemaker.pp b/puppet/manifests/overcloud_controller_pacemaker.pp
970 index 3fb92f3..4dc4f7f 100644
971 --- a/puppet/manifests/overcloud_controller_pacemaker.pp
972 +++ b/puppet/manifests/overcloud_controller_pacemaker.pp
973 @@ -380,6 +380,21 @@ if hiera('step') >= 2 {
974  
975    }
976  
977 +  if str2bool(hiera('opendaylight_install', 'false')) {
978 +    class {"opendaylight":
979 +      extra_features => ['odl-ovsdb-openstack'],
980 +      odl_rest_port  => hiera('opendaylight_port'),
981 +      enable_l3      => hiera('opendaylight_enable_l3', 'no'),
982 +    }
983 +  }
984 +
985 +  if 'onos_ml2' in hiera('neutron_mechanism_drivers') {
986 +    # install onos and config ovs
987 +    class {"onos":
988 +      controllers_ip => $controller_node_ips
989 +    }
990 +  }
991 +  
992    exec { 'galera-ready' :
993      command     => '/usr/bin/clustercheck >/dev/null',
994      timeout     => 30,
995 @@ -584,7 +599,14 @@ if hiera('step') >= 3 {
996    include ::nova::network::neutron
997  
998    # Neutron class definitions
999 -  include ::neutron
1000 +  if 'onos_ml2' in hiera('neutron_mechanism_drivers') {
1001 +    # config neutron service_plugins to onos driver
1002 +    class { '::neutron':
1003 +      service_plugins  => [hiera('neutron_service_plugins')]
1004 +    }
1005 +  } else {
1006 +    include ::neutron
1007 +  }
1008    class { '::neutron::server' :
1009      sync_db        => $sync_db,
1010      manage_service => false,
1011 @@ -594,10 +616,6 @@ if hiera('step') >= 3 {
1012      manage_service => false,
1013      enabled        => false,
1014    }
1015 -  class { '::neutron::agents::l3' :
1016 -    manage_service => false,
1017 -    enabled        => false,
1018 -  }
1019    class { '::neutron::agents::metadata':
1020      manage_service => false,
1021      enabled        => false,
1022 @@ -609,18 +627,68 @@ if hiera('step') >= 3 {
1023      notify  => Service['neutron-dhcp-service'],
1024      require => Package['neutron'],
1025    }
1026 +
1027    class { '::neutron::plugins::ml2':
1028      flat_networks        => split(hiera('neutron_flat_networks'), ','),
1029      tenant_network_types => [hiera('neutron_tenant_network_type')],
1030      mechanism_drivers    => [hiera('neutron_mechanism_drivers')],
1031    }
1032 -  class { '::neutron::agents::ml2::ovs':
1033 -    manage_service  => false,
1034 -    enabled         => false,
1035 -    bridge_mappings => split(hiera('neutron_bridge_mappings'), ','),
1036 -    tunnel_types    => split(hiera('neutron_tunnel_types'), ','),
1037 -  }
1038 +  if 'opendaylight' in hiera('neutron_mechanism_drivers') {
1039 +    if str2bool(hiera('opendaylight_install', 'false')) {
1040 +      $controller_ips = split(hiera('controller_node_ips'), ',')
1041 +      $opendaylight_controller_ip = $controller_ips[0]
1042 +    } else {
1043 +      $opendaylight_controller_ip = hiera('opendaylight_controller_ip')
1044 +    }
1045  
1046 +    $opendaylight_port = hiera('opendaylight_port')
1047 +    $private_ip = hiera('neutron::agents::ml2::ovs::local_ip')
1048 +
1049 +    class { 'neutron::plugins::ml2::opendaylight':
1050 +      odl_controller_ip => $opendaylight_controller_ip,
1051 +      odl_username      => hiera('opendaylight_username'),
1052 +      odl_password      => hiera('opendaylight_password'),
1053 +      odl_port          => hiera('opendaylight_port'),
1054 +    }
1055 +
1056 +    if str2bool(hiera('opendaylight_install', 'false')) {
1057 +      class { 'neutron::plugins::ovs::opendaylight':
1058 +        odl_controller_ip => $opendaylight_controller_ip,
1059 +        tunnel_ip         => hiera('neutron::agents::ml2::ovs::local_ip'),
1060 +        odl_port          => hiera('opendaylight_port'),
1061 +        odl_username      => hiera('opendaylight_username'),
1062 +        odl_password      => hiera('opendaylight_password'),
1063 +      }
1064 +    }
1065 +    if ! str2bool(hiera('opendaylight_enable_l3', 'no')) {
1066 +      class { '::neutron::agents::l3' :
1067 +        manage_service => false,
1068 +        enabled        => false,
1069 +      }
1070 +    }
1071 +  } elsif 'onos_ml2' in hiera('neutron_mechanism_drivers') {
1072 +    #config ml2_conf.ini with onos url address
1073 +    $onos_port = hiera('onos_port')
1074 +    $private_ip = hiera('neutron::agents::ml2::ovs::local_ip')
1075 +
1076 +    neutron_plugin_ml2 {
1077 +      'onos/username':         value => 'admin';
1078 +      'onos/password':         value => 'admin';
1079 +      'onos/url_path':         value => "http://${controller_node_ips[0]}:${onos_port}/onos/vtn";
1080 +    }
1081 +
1082 +  } else {
1083 +    class { '::neutron::agents::l3' :
1084 +      manage_service => false,
1085 +      enabled        => false,
1086 +    }
1087 +    class { 'neutron::agents::ml2::ovs':
1088 +      manage_service   => false,
1089 +      enabled          => false,
1090 +      bridge_mappings  => split(hiera('neutron_bridge_mappings'), ','),
1091 +      tunnel_types     => split(hiera('neutron_tunnel_types'), ','),
1092 +    }
1093 +  }
1094    if 'cisco_ucsm' in hiera('neutron_mechanism_drivers') {
1095      include ::neutron::plugins::ml2::cisco::ucsm
1096    }
1097 @@ -645,8 +713,10 @@ if hiera('step') >= 3 {
1098    if hiera('neutron_enable_bigswitch_ml2', false) {
1099      include ::neutron::plugins::ml2::bigswitch::restproxy
1100    }
1101 -  neutron_l3_agent_config {
1102 -    'DEFAULT/ovs_use_veth': value => hiera('neutron_ovs_use_veth', false);
1103 +  if !('onos_ml2' in hiera('neutron_mechanism_drivers') or str2bool(hiera('opendaylight_enable_l3', 'no'))) {
1104 +    neutron_l3_agent_config {
1105 +      'DEFAULT/ovs_use_veth': value => hiera('neutron_ovs_use_veth', false);
1106 +    }
1107    }
1108    neutron_dhcp_agent_config {
1109      'DEFAULT/ovs_use_veth': value => hiera('neutron_ovs_use_veth', false);
1110 @@ -879,6 +949,28 @@ if hiera('step') >= 3 {
1111      enabled        => false,
1112    }
1113  
1114 +  # Aodh
1115 +  include ::aodh
1116 +  include ::aodh::config
1117 +  include ::aodh::auth
1118 +  include ::aodh::client
1119 +  class { '::aodh::api':
1120 +    manage_service => false,
1121 +    enabled        => false,
1122 +  }
1123 +  class { '::aodh::evaluator':
1124 +    manage_service => false,
1125 +    enabled        => false,
1126 +  }
1127 +  class { '::aodh::notifier':
1128 +    manage_service => false,
1129 +    enabled        => false,
1130 +  }
1131 +  class { '::aodh::listener':
1132 +    manage_service => false,
1133 +    enabled        => false,
1134 +  }
1135 +
1136    # httpd/apache and horizon
1137    # NOTE(gfidente): server-status can be consumed by the pacemaker resource agent
1138    class { '::apache' :
1139 @@ -1055,62 +1147,21 @@ if hiera('step') >= 4 {
1140        clone_params => 'interleave=true',
1141        require      => Pacemaker::Resource::Service[$::keystone::params::service_name],
1142      }
1143 -    pacemaker::resource::service { $::neutron::params::l3_agent_service:
1144 -      clone_params => 'interleave=true',
1145 +    if !('onos_ml2' in hiera('neutron_mechanism_drivers')) {
1146 +      pacemaker::resource::service { $::neutron::params::l3_agent_service:
1147 +        clone_params => 'interleave=true',
1148 +      }
1149      }
1150      pacemaker::resource::service { $::neutron::params::dhcp_agent_service:
1151        clone_params => 'interleave=true',
1152      }
1153 -    pacemaker::resource::service { $::neutron::params::ovs_agent_service:
1154 -      clone_params => 'interleave=true',
1155 -    }
1156      pacemaker::resource::service { $::neutron::params::metadata_agent_service:
1157        clone_params => 'interleave=true',
1158      }
1159 -    pacemaker::resource::ocf { $::neutron::params::ovs_cleanup_service:
1160 -      ocf_agent_name => 'neutron:OVSCleanup',
1161 -      clone_params   => 'interleave=true',
1162 -    }
1163      pacemaker::resource::ocf { 'neutron-netns-cleanup':
1164        ocf_agent_name => 'neutron:NetnsCleanup',
1165        clone_params   => 'interleave=true',
1166      }
1167 -
1168 -    # neutron - one chain ovs-cleanup-->netns-cleanup-->ovs-agent
1169 -    pacemaker::constraint::base { 'neutron-ovs-cleanup-to-netns-cleanup-constraint':
1170 -      constraint_type => 'order',
1171 -      first_resource  => "${::neutron::params::ovs_cleanup_service}-clone",
1172 -      second_resource => 'neutron-netns-cleanup-clone',
1173 -      first_action    => 'start',
1174 -      second_action   => 'start',
1175 -      require         => [Pacemaker::Resource::Ocf[$::neutron::params::ovs_cleanup_service],
1176 -                          Pacemaker::Resource::Ocf['neutron-netns-cleanup']],
1177 -    }
1178 -    pacemaker::constraint::colocation { 'neutron-ovs-cleanup-to-netns-cleanup-colocation':
1179 -      source  => 'neutron-netns-cleanup-clone',
1180 -      target  => "${::neutron::params::ovs_cleanup_service}-clone",
1181 -      score   => 'INFINITY',
1182 -      require => [Pacemaker::Resource::Ocf[$::neutron::params::ovs_cleanup_service],
1183 -                  Pacemaker::Resource::Ocf['neutron-netns-cleanup']],
1184 -    }
1185 -    pacemaker::constraint::base { 'neutron-netns-cleanup-to-openvswitch-agent-constraint':
1186 -      constraint_type => 'order',
1187 -      first_resource  => 'neutron-netns-cleanup-clone',
1188 -      second_resource => "${::neutron::params::ovs_agent_service}-clone",
1189 -      first_action    => 'start',
1190 -      second_action   => 'start',
1191 -      require         => [Pacemaker::Resource::Ocf['neutron-netns-cleanup'],
1192 -                          Pacemaker::Resource::Service[$::neutron::params::ovs_agent_service]],
1193 -    }
1194 -    pacemaker::constraint::colocation { 'neutron-netns-cleanup-to-openvswitch-agent-colocation':
1195 -      source  => "${::neutron::params::ovs_agent_service}-clone",
1196 -      target  => 'neutron-netns-cleanup-clone',
1197 -      score   => 'INFINITY',
1198 -      require => [Pacemaker::Resource::Ocf['neutron-netns-cleanup'],
1199 -                  Pacemaker::Resource::Service[$::neutron::params::ovs_agent_service]],
1200 -    }
1201 -
1202 -    #another chain keystone-->neutron-server-->ovs-agent-->dhcp-->l3
1203      pacemaker::constraint::base { 'keystone-to-neutron-server-constraint':
1204        constraint_type => 'order',
1205        first_resource  => "${::keystone::params::service_name}-clone",
1206 @@ -1120,65 +1171,110 @@ if hiera('step') >= 4 {
1207        require         => [Pacemaker::Resource::Service[$::keystone::params::service_name],
1208                            Pacemaker::Resource::Service[$::neutron::params::server_service]],
1209      }
1210 -    pacemaker::constraint::base { 'neutron-server-to-openvswitch-agent-constraint':
1211 -      constraint_type => 'order',
1212 -      first_resource  => "${::neutron::params::server_service}-clone",
1213 -      second_resource => "${::neutron::params::ovs_agent_service}-clone",
1214 -      first_action    => 'start',
1215 -      second_action   => 'start',
1216 -      require         => [Pacemaker::Resource::Service[$::neutron::params::server_service],
1217 -                          Pacemaker::Resource::Service[$::neutron::params::ovs_agent_service]],
1218 -    }
1219 -    pacemaker::constraint::base { 'neutron-openvswitch-agent-to-dhcp-agent-constraint':
1220 -      constraint_type => 'order',
1221 -      first_resource  => "${::neutron::params::ovs_agent_service}-clone",
1222 -      second_resource => "${::neutron::params::dhcp_agent_service}-clone",
1223 -      first_action    => 'start',
1224 -      second_action   => 'start',
1225 -      require         => [Pacemaker::Resource::Service[$::neutron::params::ovs_agent_service],
1226 -                          Pacemaker::Resource::Service[$::neutron::params::dhcp_agent_service]],
1227 +    if 'openvswitch' in hiera('neutron_mechanism_drivers') {
1228 +      pacemaker::resource::service { $::neutron::params::ovs_agent_service:
1229 +        clone_params => "interleave=true",
1230 +      }
1231 +      pacemaker::resource::ocf { $::neutron::params::ovs_cleanup_service:
1232 +        ocf_agent_name => "neutron:OVSCleanup",
1233 +        clone_params => "interleave=true",
1234 +      }
1235 +      # neutron - one chain ovs-cleanup-->netns-cleanup-->ovs-agent
1236 +      pacemaker::constraint::base { 'neutron-ovs-cleanup-to-netns-cleanup-constraint':
1237 +        constraint_type => "order",
1238 +        first_resource => "${::neutron::params::ovs_cleanup_service}-clone",
1239 +        second_resource => "neutron-netns-cleanup-clone",
1240 +        first_action => "start",
1241 +        second_action => "start",
1242 +        require => [Pacemaker::Resource::Ocf["${::neutron::params::ovs_cleanup_service}"],
1243 +                    Pacemaker::Resource::Ocf['neutron-netns-cleanup']],
1244 +      }
1245 +      pacemaker::constraint::colocation { 'neutron-ovs-cleanup-to-netns-cleanup-colocation':
1246 +        source => "neutron-netns-cleanup-clone",
1247 +        target => "${::neutron::params::ovs_cleanup_service}-clone",
1248 +        score => "INFINITY",
1249 +        require => [Pacemaker::Resource::Ocf["${::neutron::params::ovs_cleanup_service}"],
1250 +                    Pacemaker::Resource::Ocf['neutron-netns-cleanup']],
1251 +      }
1252 +      pacemaker::constraint::base { 'neutron-netns-cleanup-to-openvswitch-agent-constraint':
1253 +        constraint_type => "order",
1254 +        first_resource => "neutron-netns-cleanup-clone",
1255 +        second_resource => "${::neutron::params::ovs_agent_service}-clone",
1256 +        first_action => "start",
1257 +        second_action => "start",
1258 +        require => [Pacemaker::Resource::Ocf["neutron-netns-cleanup"],
1259 +                    Pacemaker::Resource::Service["${::neutron::params::ovs_agent_service}"]],
1260 +      }
1261 +      pacemaker::constraint::colocation { 'neutron-netns-cleanup-to-openvswitch-agent-colocation':
1262 +        source => "${::neutron::params::ovs_agent_service}-clone",
1263 +        target => "neutron-netns-cleanup-clone",
1264 +        score => "INFINITY",
1265 +        require => [Pacemaker::Resource::Ocf["neutron-netns-cleanup"],
1266 +                    Pacemaker::Resource::Service["${::neutron::params::ovs_agent_service}"]],
1267 +      }
1268  
1269 +      #another chain keystone-->neutron-server-->ovs-agent-->dhcp-->l3
1270 +      pacemaker::constraint::base { 'neutron-server-to-openvswitch-agent-constraint':
1271 +        constraint_type => "order",
1272 +        first_resource => "${::neutron::params::server_service}-clone",
1273 +        second_resource => "${::neutron::params::ovs_agent_service}-clone",
1274 +        first_action => "start",
1275 +        second_action => "start",
1276 +        require => [Pacemaker::Resource::Service[$::neutron::params::server_service],
1277 +                    Pacemaker::Resource::Service[$::neutron::params::ovs_agent_service]],
1278 +      }
1279 +      pacemaker::constraint::base { 'neutron-openvswitch-agent-to-dhcp-agent-constraint':
1280 +        constraint_type => "order",
1281 +        first_resource => "${::neutron::params::ovs_agent_service}-clone",
1282 +        second_resource => "${::neutron::params::dhcp_agent_service}-clone",
1283 +        first_action => "start",
1284 +        second_action => "start",
1285 +        require => [Pacemaker::Resource::Service["${::neutron::params::ovs_agent_service}"],
1286 +                    Pacemaker::Resource::Service["${::neutron::params::dhcp_agent_service}"]],
1287 +
1288 +      }
1289 +      pacemaker::constraint::colocation { 'neutron-openvswitch-agent-to-dhcp-agent-colocation':
1290 +        source => "${::neutron::params::dhcp_agent_service}-clone",
1291 +        target => "${::neutron::params::ovs_agent_service}-clone",
1292 +        score => "INFINITY",
1293 +        require => [Pacemaker::Resource::Service["${::neutron::params::ovs_agent_service}"],
1294 +                    Pacemaker::Resource::Service["${::neutron::params::dhcp_agent_service}"]],
1295 +      }
1296      }
1297 -    pacemaker::constraint::colocation { 'neutron-openvswitch-agent-to-dhcp-agent-colocation':
1298 -      source  => "${::neutron::params::dhcp_agent_service}-clone",
1299 -      target  => "${::neutron::params::ovs_agent_service}-clone",
1300 -      score   => 'INFINITY',
1301 -      require => [Pacemaker::Resource::Service[$::neutron::params::ovs_agent_service],
1302 -                  Pacemaker::Resource::Service[$::neutron::params::dhcp_agent_service]],
1303 -    }
1304 -    pacemaker::constraint::base { 'neutron-dhcp-agent-to-l3-agent-constraint':
1305 -      constraint_type => 'order',
1306 -      first_resource  => "${::neutron::params::dhcp_agent_service}-clone",
1307 -      second_resource => "${::neutron::params::l3_agent_service}-clone",
1308 -      first_action    => 'start',
1309 -      second_action   => 'start',
1310 -      require         => [Pacemaker::Resource::Service[$::neutron::params::dhcp_agent_service],
1311 -                          Pacemaker::Resource::Service[$::neutron::params::l3_agent_service]],
1312 -    }
1313 -    pacemaker::constraint::colocation { 'neutron-dhcp-agent-to-l3-agent-colocation':
1314 -      source  => "${::neutron::params::l3_agent_service}-clone",
1315 -      target  => "${::neutron::params::dhcp_agent_service}-clone",
1316 -      score   => 'INFINITY',
1317 -      require => [Pacemaker::Resource::Service[$::neutron::params::dhcp_agent_service],
1318 -                  Pacemaker::Resource::Service[$::neutron::params::l3_agent_service]],
1319 -    }
1320 -    pacemaker::constraint::base { 'neutron-l3-agent-to-metadata-agent-constraint':
1321 -      constraint_type => 'order',
1322 -      first_resource  => "${::neutron::params::l3_agent_service}-clone",
1323 -      second_resource => "${::neutron::params::metadata_agent_service}-clone",
1324 -      first_action    => 'start',
1325 -      second_action   => 'start',
1326 -      require         => [Pacemaker::Resource::Service[$::neutron::params::l3_agent_service],
1327 -                          Pacemaker::Resource::Service[$::neutron::params::metadata_agent_service]],
1328 -    }
1329 -    pacemaker::constraint::colocation { 'neutron-l3-agent-to-metadata-agent-colocation':
1330 -      source  => "${::neutron::params::metadata_agent_service}-clone",
1331 -      target  => "${::neutron::params::l3_agent_service}-clone",
1332 -      score   => 'INFINITY',
1333 -      require => [Pacemaker::Resource::Service[$::neutron::params::l3_agent_service],
1334 -                  Pacemaker::Resource::Service[$::neutron::params::metadata_agent_service]],
1335 +    if !('onos_ml2' in hiera('neutron_mechanism_drivers') or str2bool(hiera('opendaylight_enable_l3', 'no'))) {
1336 +      pacemaker::constraint::base { 'neutron-dhcp-agent-to-l3-agent-constraint':
1337 +        constraint_type => 'order',
1338 +        first_resource  => "${::neutron::params::dhcp_agent_service}-clone",
1339 +        second_resource => "${::neutron::params::l3_agent_service}-clone",
1340 +        first_action    => 'start',
1341 +        second_action   => 'start',
1342 +        require         => [Pacemaker::Resource::Service[$::neutron::params::dhcp_agent_service],
1343 +                            Pacemaker::Resource::Service[$::neutron::params::l3_agent_service]],
1344 +      }
1345 +      pacemaker::constraint::colocation { 'neutron-dhcp-agent-to-l3-agent-colocation':
1346 +        source  => "${::neutron::params::l3_agent_service}-clone",
1347 +        target  => "${::neutron::params::dhcp_agent_service}-clone",
1348 +        score   => 'INFINITY',
1349 +        require => [Pacemaker::Resource::Service[$::neutron::params::dhcp_agent_service],
1350 +                    Pacemaker::Resource::Service[$::neutron::params::l3_agent_service]],
1351 +      }
1352 +      pacemaker::constraint::base { 'neutron-l3-agent-to-metadata-agent-constraint':
1353 +        constraint_type => 'order',
1354 +        first_resource  => "${::neutron::params::l3_agent_service}-clone",
1355 +        second_resource => "${::neutron::params::metadata_agent_service}-clone",
1356 +        first_action    => 'start',
1357 +        second_action   => 'start',
1358 +        require         => [Pacemaker::Resource::Service[$::neutron::params::l3_agent_service],
1359 +                            Pacemaker::Resource::Service[$::neutron::params::metadata_agent_service]],
1360 +      }
1361 +      pacemaker::constraint::colocation { 'neutron-l3-agent-to-metadata-agent-colocation':
1362 +        source  => "${::neutron::params::metadata_agent_service}-clone",
1363 +        target  => "${::neutron::params::l3_agent_service}-clone",
1364 +        score   => 'INFINITY',
1365 +        require => [Pacemaker::Resource::Service[$::neutron::params::l3_agent_service],
1366 +                    Pacemaker::Resource::Service[$::neutron::params::metadata_agent_service]],
1367 +      }
1368      }
1369 -
1370      # Nova
1371      pacemaker::resource::service { $::nova::params::api_service_name :
1372        clone_params => 'interleave=true',
1373 @@ -1276,7 +1372,7 @@ if hiera('step') >= 4 {
1374                    Pacemaker::Resource::Service[$::nova::params::conductor_service_name]],
1375      }
1376  
1377 -    # Ceilometer
1378 +    # Ceilometer and Aodh
1379      case downcase(hiera('ceilometer_backend')) {
1380        /mysql/: {
1381          pacemaker::resource::service { $::ceilometer::params::agent_central_service_name :
1382 @@ -1304,6 +1400,21 @@ if hiera('step') >= 4 {
1383      pacemaker::resource::service { $::ceilometer::params::alarm_notifier_service_name :
1384        clone_params => 'interleave=true',
1385      }
1386 +    pacemaker::resource::service { $::aodh::params::notifier_service_name :
1387 +      clone_params => 'interleave=true',
1388 +    }
1389 +    pacemaker::resource::service { $::aodh::params::expirer_package_serice :
1390 +      clone_params => 'interleave=true',
1391 +    }
1392 +    pacemaker::resource::service { $::aodh::params::listener_service_name :
1393 +      clone_params => 'interleave=true',
1394 +    }
1395 +    pacemaker::resource::service { $::aodh::params::api_service_name :
1396 +      clone_params => 'interleave=true',
1397 +    }
1398 +    pacemaker::resource::service { $::aodh::params::evaluator_service_name :
1399 +      clone_params => 'interleave=true',
1400 +    }
1401      pacemaker::resource::service { $::ceilometer::params::agent_notification_service_name :
1402        clone_params => 'interleave=true',
1403      }
1404 @@ -1315,8 +1426,19 @@ if hiera('step') >= 4 {
1405      # Fedora doesn't know `require-all` parameter for constraints yet
1406      if $::operatingsystem == 'Fedora' {
1407        $redis_ceilometer_constraint_params = undef
1408 +      $redis_aodh_constraint_params = undef
1409      } else {
1410        $redis_ceilometer_constraint_params = 'require-all=false'
1411 +      $redis_aodh_constraint_params = 'require-all=false'
1412 +    }
1413 +    pacemaker::constraint::base { 'keystone-then-aodh-api-constraint':
1414 +      constraint_type => 'order',
1415 +      first_resource  => "${::keystone::params::service_name}-clone",
1416 +      second_resource => "${::aodh::params::api_service_name}-clone",
1417 +      first_action    => 'start',
1418 +      second_action   => 'start',
1419 +      require         => [Pacemaker::Resource::Service[$::aodh::params::api_service_name],
1420 +                          Pacemaker::Resource::Service[$::keystone::params::service_name]],
1421      }
1422      pacemaker::constraint::base { 'redis-then-ceilometer-central-constraint':
1423        constraint_type   => 'order',
1424 @@ -1328,6 +1450,16 @@ if hiera('step') >= 4 {
1425        require           => [Pacemaker::Resource::Ocf['redis'],
1426                              Pacemaker::Resource::Service[$::ceilometer::params::agent_central_service_name]],
1427      }
1428 +    pacemaker::constraint::base { 'redis-then-aodh-evaluator-constraint':
1429 +      constraint_type   => 'order',
1430 +      first_resource    => 'redis-master',
1431 +      second_resource   => "${::aodh::params::evaluator_service_name}-clone",
1432 +      first_action      => 'promote',
1433 +      second_action     => 'start',
1434 +      constraint_params => $redis_aodh_constraint_params,
1435 +      require           => [Pacemaker::Resource::Ocf['redis'],
1436 +                            Pacemaker::Resource::Service[$::aodh::params::evaluator_service_name]],
1437 +    }
1438      pacemaker::constraint::base { 'keystone-then-ceilometer-central-constraint':
1439        constraint_type => 'order',
1440        first_resource  => "${::keystone::params::service_name}-clone",
1441 @@ -1426,6 +1558,38 @@ if hiera('step') >= 4 {
1442        require => [Pacemaker::Resource::Service[$::ceilometer::params::agent_notification_service_name],
1443                    Pacemaker::Resource::Service[$::ceilometer::params::alarm_notifier_service_name]],
1444      }
1445 +    pacemaker::constraint::base { 'aodh-delay-then-aodh-evaluator-constraint':
1446 +      constraint_type => 'order',
1447 +      first_resource  => 'delay-clone',
1448 +      second_resource => "${::aodh::params::evaluator_service_name}-clone",
1449 +      first_action    => 'start',
1450 +      second_action   => 'start',
1451 +      require         => [Pacemaker::Resource::Service[$::aodh::params::evaluator_service_name],
1452 +                          Pacemaker::Resource::Ocf['delay']],
1453 +    }
1454 +    pacemaker::constraint::colocation { 'aodh-evaluator-with-aodh-delay-colocation':
1455 +      source  => "${::aodh::params::evaluator_service_name}-clone",
1456 +      target  => 'delay-clone',
1457 +      score   => 'INFINITY',
1458 +      require => [Pacemaker::Resource::Service[$::horizon::params::http_service],
1459 +                  Pacemaker::Resource::Ocf['delay']],
1460 +    }
1461 +    pacemaker::constraint::base { 'aodh-evaluator-then-aodh-notifier-constraint':
1462 +      constraint_type => 'order',
1463 +      first_resource  => "${::aodh::params::evaluator_service_name}-clone",
1464 +      second_resource => "${::aodh::params::notifier_service_name}-clone",
1465 +      first_action    => 'start',
1466 +      second_action   => 'start',
1467 +      require         => [Pacemaker::Resource::Service[$::aodh::params::evaluator_service_name],
1468 +                          Pacemaker::Resource::Service[$::aodh::params::notifier_service_name]],
1469 +    }
1470 +    pacemaker::constraint::colocation { 'aodh-notifier-with-aodh-evaluator-colocation':
1471 +      source  => "${::aodh::params::notifier_service_name}-clone",
1472 +      target  => "${::aodh::params::evaluator_service_name}-clone",
1473 +      score   => 'INFINITY',
1474 +      require => [Pacemaker::Resource::Service[$::aodh::params::evaluator_service_name],
1475 +                  Pacemaker::Resource::Service[$::aodh::params::notifier_service_name]],
1476 +    }
1477      if downcase(hiera('ceilometer_backend')) == 'mongodb' {
1478        pacemaker::constraint::base { 'mongodb-then-ceilometer-central-constraint':
1479          constraint_type => 'order',
1480 diff --git a/puppet/manifests/overcloud_opendaylight.pp b/puppet/manifests/overcloud_opendaylight.pp
1481 new file mode 100644
1482 index 0000000..33f609a
1483 --- /dev/null
1484 +++ b/puppet/manifests/overcloud_opendaylight.pp
1485 @@ -0,0 +1,27 @@
1486 +# Copyright 2015 Red Hat, Inc.
1487 +# All Rights Reserved.
1488 +#
1489 +# Licensed under the Apache License, Version 2.0 (the "License"); you may
1490 +# not use this file except in compliance with the License. You may obtain
1491 +# a copy of the License at
1492 +#
1493 +#     http://www.apache.org/licenses/LICENSE-2.0
1494 +#
1495 +# Unless required by applicable law or agreed to in writing, software
1496 +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
1497 +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
1498 +# License for the specific language governing permissions and limitations
1499 +# under the License.
1500 +
1501 +include ::tripleo::packages
1502 +
1503 +if count(hiera('ntp::servers')) > 0 {
1504 +  include ::ntp
1505 +}
1506 +
1507 +class {"opendaylight":
1508 +  extra_features => ['odl-ovsdb-openstack'],
1509 +  odl_rest_port  => hiera('opendaylight_port'),
1510 +  enable_l3      => hiera('opendaylight_enable_l3', 'no'),
1511 +}
1512 +
1513 diff --git a/puppet/opendaylight-puppet.yaml b/puppet/opendaylight-puppet.yaml
1514 new file mode 100644
1515 index 0000000..b876dc7
1516 --- /dev/null
1517 +++ b/puppet/opendaylight-puppet.yaml
1518 @@ -0,0 +1,217 @@
1519 +heat_template_version: 2015-04-30
1520 +
1521 +description: >
1522 +  OpenDaylight node configured by Puppet.
1523 +
1524 +parameters:
1525 +  OpenDaylightFlavor:
1526 +    default: baremetal
1527 +    description: The flavor to use for the OpenDaylight node
1528 +    type: string
1529 +  OpenDaylightImage:
1530 +    default: overcloud-full
1531 +    description: The image to use for the OpenDaylight node
1532 +    type: string
1533 +  OpenDaylightHostname:
1534 +    default: opendaylight-server
1535 +    description: The hostname to use for the OpenDaylight node
1536 +    type: string
1537 +  OpenDaylightUsername:
1538 +    default: admin
1539 +    description: The admin user for the OpenDaylight node
1540 +    type: string
1541 +  OpenDaylightPassword:
1542 +    default: ''
1543 +    description: The admin password for the OpenDaylight node
1544 +    type: string
1545 +    hidden: true
1546 +  OpenDaylightEnableL3:
1547 +    description: Knob to enable/disable ODL L3
1548 +    type: string
1549 +    default: 'no'
1550 +  OpenDaylightPort:
1551 +    default: 8081
1552 +    description: Set OpenDaylight service port
1553 +    type: number
1554 +  KeyName:
1555 +    description: The keypair to use for SSH access to the node (via heat-admin user)
1556 +    type: string
1557 +    default: default
1558 +    constraints:
1559 +      - custom_constraint: nova.keypair
1560 +  ImageUpdatePolicy:
1561 +    default: 'REBUILD_PRESERVE_EPHEMERAL'
1562 +    description: What policy to use when reconstructing instances. REBUILD for rebuilds, REBUILD_PRESERVE_EPHEMERAL to preserve /mnt.
1563 +    type: string
1564 +  UpdateIdentifier:
1565 +    default: ''
1566 +    type: string
1567 +    description: >
1568 +      Setting to a previously unused value during stack-update will trigger
1569 +      package update on all nodes
1570 +  NtpServer:
1571 +    type: string
1572 +    default: ''
1573 +  PublicInterface:
1574 +    default: nic1
1575 +    description: What interface to bridge onto br-ex for network nodes.
1576 +    type: string
1577 +
1578 +resources:
1579 +  OpenDaylightNode:
1580 +    type: OS::Nova::Server
1581 +    properties:
1582 +      image: {get_param: OpenDaylightImage}
1583 +      image_update_policy: {get_param: ImageUpdatePolicy}
1584 +      flavor: {get_param: OpenDaylightFlavor}
1585 +      key_name: {get_param: KeyName}
1586 +      networks:
1587 +        - network: ctlplane
1588 +      user_data_format: SOFTWARE_CONFIG
1589 +      user_data: {get_resource: NodeUserData}
1590 +      name: {get_param: OpenDaylightHostname}
1591 +
1592 +  NodeUserData:
1593 +    type: OS::TripleO::NodeUserData
1594 +
1595 +  ExternalPort:
1596 +    type: OS::TripleO::Controller::Ports::ExternalPort
1597 +    properties:
1598 +      ControlPlaneIP: {get_attr: [OpenDaylightNode, networks, ctlplane, 0]}
1599 +
1600 +  InternalApiPort:
1601 +    type: OS::TripleO::Controller::Ports::InternalApiPort
1602 +    properties:
1603 +      ControlPlaneIP: {get_attr: [OpenDaylightNode, networks, ctlplane, 0]}
1604 +
1605 +  NetIpMap:
1606 +    type: OS::TripleO::Network::Ports::NetIpMap
1607 +    properties:
1608 +      ControlPlaneIp: {get_attr: [OpenDaylightNode, networks, ctlplane, 0]}
1609 +      ExternalIp: {get_attr: [ExternalPort, ip_address]}
1610 +      InternalApiIp: {get_attr: [InternalApiPort, ip_address]}
1611 +
1612 +  NetIpSubnetMap:
1613 +    type: OS::TripleO::Network::Ports::NetIpSubnetMap
1614 +    properties:
1615 +      ControlPlaneIp: {get_attr: [OpenDaylightNode, networks, ctlplane, 0]}
1616 +      ExternalIpSubnet: {get_attr: [ExternalPort, ip_subnet]}
1617 +      InternalApiIpSubnet: {get_attr: [InternalApiPort, ip_subnet]}
1618 +
1619 +  NetworkConfig:
1620 +    type: OS::TripleO::Controller::Net::SoftwareConfig
1621 +    properties:
1622 +      ControlPlaneIp: {get_attr: [OpenDaylightNode, networks, ctlplane, 0]}
1623 +      ExternalIpSubnet: {get_attr: [ExternalPort, ip_subnet]}
1624 +      InternalApiIpSubnet: {get_attr: [InternalApiPort, ip_subnet]}
1625 +
1626 +  NetworkDeployment:
1627 +    type: OS::TripleO::SoftwareDeployment
1628 +    properties:
1629 +      config: {get_resource: NetworkConfig}
1630 +      server: {get_resource: OpenDaylightNode}
1631 +      input_values:
1632 +        bridge_name: br-ex
1633 +        interface_name: {get_param: PublicInterface}
1634 +
1635 +  OpenDaylightDeployment:
1636 +    type: OS::TripleO::SoftwareDeployment
1637 +    depends_on: NetworkDeployment
1638 +    properties:
1639 +      config: {get_resource: OpenDaylightConfig}
1640 +      server: {get_resource: OpenDaylightNode}
1641 +      input_values:
1642 +        ntp_servers:
1643 +          str_replace:
1644 +            template: '["server"]'
1645 +            params:
1646 +              server: {get_param: NtpServer}
1647 +        opendaylight_port: {get_param: OpenDaylightPort}
1648 +        opendaylight_enable_l3: {get_param: OpenDaylightEnableL3}
1649 +        opendaylight_username: {get_param: OpenDaylightUsername}
1650 +        opendaylight_password: {get_param: OpenDaylightPassword}
1651 +
1652 +  OpenDaylightConfig:
1653 +    type: OS::Heat::StructuredConfig
1654 +    properties:
1655 +      group: os-apply-config
1656 +      config:
1657 +        hiera:
1658 +          hierarchy:
1659 +            - '"%{::uuid}"'
1660 +            - heat_config_%{::deploy_config_name}
1661 +            - extraconfig
1662 +            - bootstrap_node # provided by BootstrapNodeConfig
1663 +            - all_nodes # provided by allNodesConfig
1664 +            - vip_data # provided by vip-config
1665 +            - RedHat # Workaround for https://bugzilla.redhat.com/show_bug.cgi?id=1236143
1666 +            - common
1667 +          datafiles:
1668 +            common:
1669 +              raw_data: {get_file: hieradata/common.yaml}
1670 +              mapped_data:
1671 +                ntp::servers: {get_input: ntp_servers}
1672 +                opendaylight::admin_username: {get_param: OpenDaylightUsername}
1673 +                opendaylight::admin_password: {get_param: OpenDaylightPassword}
1674 +                opendaylight_port: {get_input: opendaylight_port}
1675 +                opendaylight_enable_l3: {get_input: opendaylight_enable_l3}
1676 +            ceph:
1677 +              raw_data: {get_file: hieradata/ceph.yaml}
1678 +
1679 +  UpdateConfig:
1680 +    type: OS::TripleO::Tasks::PackageUpdate
1681 +
1682 +  UpdateDeployment:
1683 +    type: OS::Heat::SoftwareDeployment
1684 +    properties:
1685 +      config: {get_resource: UpdateConfig}
1686 +      server: {get_resource: OpenDaylightNode}
1687 +      input_values:
1688 +        update_identifier:
1689 +          get_param: UpdateIdentifier
1690 +
1691 +  OpenDaylightHostsConfig:
1692 +    type: OS::Heat::SoftwareConfig
1693 +    properties:
1694 +      group: script
1695 +      config: |
1696 +        #!/usr/bin/env bash
1697 +        echo -e "$(facter ipaddress)\t\t$(hostname -f)\t$(hostname -s)" >> /etc/hosts
1698 +
1699 +  OpenDaylightHostsDeployment:
1700 +    type: OS::Heat::StructuredDeployment
1701 +    depends_on: OpenDaylightDeployment
1702 +    properties:
1703 +      server: {get_resource: OpenDaylightNode}
1704 +      config: {get_resource: OpenDaylightHostsConfig}
1705 +
1706 +  OpenDaylightPuppetConfig:
1707 +    type: OS::Heat::SoftwareConfig
1708 +    properties:
1709 +      group: puppet
1710 +      config:
1711 +        get_file: manifests/overcloud_opendaylight.pp
1712 +
1713 +  OpenDaylightPuppetDeployment:
1714 +    depends_on: OpenDaylightHostsDeployment
1715 +    type: OS::Heat::StructuredDeployment
1716 +    properties:
1717 +      server: {get_resource: OpenDaylightNode}
1718 +      config: {get_resource: OpenDaylightPuppetConfig}
1719 +      input_values:
1720 +        update_identifier: {get_param: UpdateIdentifier}
1721 +
1722 +outputs:
1723 +  ip_address:
1724 +    description: IP address of the server in the ctlplane network
1725 +    value: {get_attr: [OpenDaylightNode, networks, ctlplane, 0]}
1726 +  opendaylight_controller_ip:
1727 +    description: IP address of the server on the internal network
1728 +    value: {get_attr: [InternalApiPort, ip_address]}
1729 +  config_identifier:
1730 +    description: identifier which changes if the node configuration may need re-applying
1731 +    value:
1732 +      list_join:
1733 +      - ','
1734 +      - - {get_attr: [OpenDaylightDeployment, deploy_stdout]}
1735 +        - {get_param: UpdateIdentifier}
1736 -- 
1737 2.5.0
1738