Aodh fixes
[apex.git] / build / opnfv-tripleo-heat-templates.patch
1 From b4edc1dff23217add43d92cac3c2906dcd1c74d1 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                       |  17 +
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 | 434 ++++++++++++++-------
22  puppet/manifests/overcloud_opendaylight.pp         |  27 ++
23  puppet/opendaylight-puppet.yaml                    | 217 +++++++++++
24  17 files changed, 986 insertions(+), 160 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..d649ba0 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 @@ -239,6 +255,7 @@ resources:
459                  neutron::rabbit_hosts: *rabbit_nodes_array
460                  nova::rabbit_hosts: *rabbit_nodes_array
461                  keystone::rabbit_hosts: *rabbit_nodes_array
462 +                aodh::rabbit_hosts: *rabbit_nodes_array
463  
464  outputs:
465    config_id:
466 diff --git a/puppet/compute.yaml b/puppet/compute.yaml
467 index 70c7403..13fd4f6 100644
468 --- a/puppet/compute.yaml
469 +++ b/puppet/compute.yaml
470 @@ -213,6 +213,23 @@ parameters:
471    NtpServer:
472      type: string
473      default: ''
474 +  OpenDaylightPort:
475 +    default: 8081
476 +    description: Set opendaylight service port
477 +    type: number
478 +  OpenDaylightUsername:
479 +    default: 'admin'
480 +    description: The username for the opendaylight server.
481 +    type: string
482 +  OpenDaylightPassword:
483 +    default: 'admin'
484 +    type: string
485 +    description: The password for the opendaylight server.
486 +    hidden: true
487 +  ONOSPort:
488 +    default: 8181
489 +    description: Set onos service port
490 +    type: number
491    RabbitHost:
492      type: string
493      default: ''  # Has to be here because of the ignored empty value bug
494 @@ -320,6 +337,11 @@ resources:
495      properties:
496        ControlPlaneIP: {get_attr: [NovaCompute, networks, ctlplane, 0]}
497  
498 +  ExternalPort:
499 +    type: OS::TripleO::Controller::Ports::ExternalPort
500 +    properties:
501 +      ControlPlaneIP: {get_attr: [NovaCompute, networks, ctlplane, 0]}
502 +
503    NetIpMap:
504      type: OS::TripleO::Network::Ports::NetIpMap
505      properties:
506 @@ -327,6 +349,7 @@ resources:
507        InternalApiIp: {get_attr: [InternalApiPort, ip_address]}
508        StorageIp: {get_attr: [StoragePort, ip_address]}
509        TenantIp: {get_attr: [TenantPort, ip_address]}
510 +      ExternalIp: {get_attr: [ExternalPort, ip_address]}
511  
512    NetworkConfig:
513      type: OS::TripleO::Compute::Net::SoftwareConfig
514 @@ -335,6 +358,7 @@ resources:
515        InternalApiIpSubnet: {get_attr: [InternalApiPort, ip_subnet]}
516        StorageIpSubnet: {get_attr: [StoragePort, ip_subnet]}
517        TenantIpSubnet: {get_attr: [TenantPort, ip_subnet]}
518 +      ExternalIpSubnet: {get_attr: [ExternalPort, ip_subnet]}
519  
520    NetworkDeployment:
521      type: OS::TripleO::SoftwareDeployment
522 @@ -406,6 +430,10 @@ resources:
523                  neutron::rabbit_user: {get_input: rabbit_user}
524                  neutron::rabbit_use_ssl: {get_input: rabbit_client_use_ssl}
525                  neutron::rabbit_port: {get_input: rabbit_client_port}
526 +                opendaylight_port: {get_input: opendaylight_port}
527 +                opendaylight_username: {get_input: opendaylight_username}
528 +                opendaylight_password: {get_input: opendaylight_password}
529 +                onos_port: {get_input: onos_port}
530                  neutron_flat_networks: {get_input: neutron_flat_networks}
531                  neutron_host: {get_input: neutron_host}
532                  neutron::agents::ml2::ovs::local_ip: {get_input: neutron_local_ip}
533 @@ -459,6 +487,10 @@ resources:
534          snmpd_readonly_user_name: {get_param: SnmpdReadonlyUserName}
535          snmpd_readonly_user_password: {get_param: SnmpdReadonlyUserPassword}
536          glance_api_servers: {get_param: [EndpointMap, GlanceInternal, uri]}
537 +        opendaylight_port: {get_param: OpenDaylightPort}
538 +        opendaylight_username: {get_param: OpenDaylightUsername}
539 +        opendaylight_password: {get_param: OpenDaylightPassword}
540 +        onos_port: {get_param: ONOSPort}
541          neutron_flat_networks: {get_param: NeutronFlatNetworks}
542          neutron_host: {get_param: NeutronHost}
543          neutron_local_ip: {get_attr: [NetIpMap, net_ip_map, {get_param: [ServiceNetMap, NeutronTenantNetwork]}]}
544 @@ -570,6 +602,9 @@ outputs:
545    tenant_ip_address:
546      description: IP address of the server in the tenant network
547      value: {get_attr: [TenantPort, ip_address]}
548 +  external_ip_address:
549 +    description: IP address of the server in the external network
550 +    value: {get_attr: [ExternalPort, ip_address]}
551    hostname:
552      description: Hostname of the server
553      value: {get_attr: [NovaCompute, name]}
554 diff --git a/puppet/controller.yaml b/puppet/controller.yaml
555 index ea0b3af..1e6539b 100644
556 --- a/puppet/controller.yaml
557 +++ b/puppet/controller.yaml
558 @@ -14,6 +14,14 @@ parameters:
559      description: The keystone auth secret and db password.
560      type: string
561      hidden: true
562 +  AodhApiVirtualIP:
563 +    type: string
564 +    default: ''
565 +  AodhPassword:
566 +    default: unset
567 +    description: The password for the aodh services.
568 +    type: string
569 +    hidden: true
570    CeilometerApiVirtualIP:
571      type: string
572      default: ''
573 @@ -357,6 +365,10 @@ parameters:
574      default: 'True'
575      description: Allow automatic l3-agent failover
576      type: string
577 +  NeutronEnableForceMetadata:
578 +    default: 'False'
579 +    description: If True, DHCP always provides metadata route to VM.
580 +    type: string
581    NeutronEnableTunnelling:
582      type: string
583      default: "True"
584 @@ -443,6 +455,31 @@ parameters:
585    NtpServer:
586      type: string
587      default: ''
588 +  OpenDaylightPort:
589 +    default: 8081
590 +    description: Set opendaylight service port
591 +    type: number
592 +  OpenDaylightInstall:
593 +    default: false
594 +    description: Whether to install OpenDaylight on the control nodes.
595 +    type: boolean
596 +  OpenDaylightUsername:
597 +    default: 'admin'
598 +    description: The username for the opendaylight server.
599 +    type: string
600 +  OpenDaylightPassword:
601 +    default: 'admin'
602 +    type: string
603 +    description: The password for the opendaylight server.
604 +    hidden: true
605 +  OpenDaylightEnableL3:
606 +    description: Knob to enable/disable ODL L3
607 +    type: string
608 +    default: 'no'
609 +  ONOSPort:
610 +    default: 8181
611 +    description: Set onos service port
612 +    type: number
613    PcsdPassword:
614      type: string
615      description: The password for the 'pcsd' user.
616 @@ -696,6 +733,7 @@ resources:
617        input_values:
618          bootstack_nodeid: {get_attr: [Controller, name]}
619          neutron_enable_tunneling: {get_param: NeutronEnableTunnelling}
620 +        neutron_enable_force_metadata: {get_param: NeutronEnableForceMetadata}
621          haproxy_log_address: {get_param: HAProxySyslogAddress}
622          heat.watch_server_url:
623            list_join:
624 @@ -774,6 +812,7 @@ resources:
625                - {get_param: MysqlVirtualIP}
626                - '/heat'
627          keystone_ca_certificate: {get_param: KeystoneCACertificate}
628 +        keystone_admin_vip: {get_param: KeystoneAdminApiVirtualIP}
629          keystone_signing_key: {get_param: KeystoneSigningKey}
630          keystone_signing_certificate: {get_param: KeystoneSigningCertificate}
631          keystone_ssl_certificate: {get_param: KeystoneSSLCertificate}
632 @@ -805,6 +844,12 @@ resources:
633              template: tripleo-CLUSTER
634              params:
635                CLUSTER: {get_param: MysqlClusterUniquePart}
636 +        opendaylight_port: {get_param: OpenDaylightPort}
637 +        opendaylight_install: {get_param: OpenDaylightInstall}
638 +        opendaylight_username: {get_param: OpenDaylightUsername}
639 +        opendaylight_password: {get_param: OpenDaylightPassword}
640 +        opendaylight_enable_l3: {get_param: OpenDaylightEnableL3}
641 +        onos_port: {get_param: ONOSPort}
642          neutron_flat_networks: {get_param: NeutronFlatNetworks}
643          neutron_metadata_proxy_shared_secret: {get_param: NeutronMetadataProxySharedSecret}
644          neutron_agent_mode: {get_param: NeutronAgentMode}
645 @@ -879,6 +924,7 @@ resources:
646          ceilometer_backend: {get_param: CeilometerBackend}
647          ceilometer_metering_secret: {get_param: CeilometerMeteringSecret}
648          ceilometer_password: {get_param: CeilometerPassword}
649 +        aodh_password: {get_param: AodhPassword}
650          ceilometer_coordination_url:
651            list_join:
652              - ''
653 @@ -891,6 +937,12 @@ resources:
654              - - 'mysql://ceilometer:unset@'
655                - {get_param: MysqlVirtualIP}
656                - '/ceilometer'
657 +        ceilometer_public_url: {get_param: [EndpointMap, CeilometerPublic, uri]}
658 +        ceilometer_internal_url: {get_param: [EndpointMap, CeilometerInternal, uri]}
659 +        ceilometer_admin_url: {get_param: [EndpointMap, CeilometerAdmin, uri]}
660 +        aodh_public_url: {get_param: [EndpointMap, AodhPublic, uri]}
661 +        aodh_internal_url: {get_param: [EndpointMap, AodhInternal, uri]}
662 +        aodh_admin_url: {get_param: [EndpointMap, AodhAdmin, uri]}
663          snmpd_readonly_user_name: {get_param: SnmpdReadonlyUserName}
664          snmpd_readonly_user_password: {get_param: SnmpdReadonlyUserPassword}
665          nova_password: {get_param: NovaPassword}
666 @@ -948,6 +1000,7 @@ resources:
667          neutron_api_network: {get_attr: [NetIpMap, net_ip_map, {get_param: [ServiceNetMap, NeutronApiNetwork]}]}
668          neutron_local_ip: {get_attr: [NetIpMap, net_ip_map, {get_param: [ServiceNetMap, NeutronTenantNetwork]}]}
669          ceilometer_api_network: {get_attr: [NetIpMap, net_ip_map, {get_param: [ServiceNetMap, CeilometerApiNetwork]}]}
670 +        aodh_api_network: {get_attr: [NetIpMap, net_ip_map, {get_param: [ServiceNetMap, AodhApiNetwork]}]}
671          nova_api_network: {get_attr: [NetIpMap, net_ip_map, {get_param: [ServiceNetMap, NovaApiNetwork]}]}
672          nova_metadata_network: {get_attr: [NetIpMap, net_ip_map, {get_param: [ServiceNetMap, NovaMetadataNetwork]}]}
673          horizon_network: {get_attr: [NetIpMap, net_ip_map, {get_param: [ServiceNetMap, HorizonNetwork]}]}
674 @@ -1041,7 +1094,7 @@ resources:
675                  cinder_iscsi_ip_address: {get_input: cinder_iscsi_network}
676                  cinder::database_connection: {get_input: cinder_dsn}
677                  cinder::api::keystone_password: {get_input: cinder_password}
678 -                cinder::api::auth_uri: {get_input: keystone_auth_uri}
679 +                cinder::api::keystone_auth_host: {get_input: keystone_admin_vip}
680                  cinder::api::identity_uri: {get_input: keystone_identity_uri}
681                  cinder::api::bind_host: {get_input: cinder_api_network}
682                  cinder::rabbit_userid: {get_input: rabbit_username}
683 @@ -1136,6 +1189,16 @@ resources:
684                  mysql_bind_host: {get_input: mysql_network}
685                  mysql_virtual_ip: {get_input: mysql_virtual_ip}
686  
687 +                # OpenDaylight
688 +                opendaylight_port: {get_input: opendaylight_port}
689 +                opendaylight_install: {get_input: opendaylight_install}
690 +                opendaylight_username: {get_input: opendaylight_username}
691 +                opendaylight_password: {get_input: opendaylight_password}
692 +                opendaylight_enable_l3: {get_input: opendaylight_enable_l3}
693 +
694 +                # ONOS
695 +                onos_port: {get_input: onos_port}
696 +
697                  # Neutron
698                  neutron::bind_host: {get_input: neutron_api_network}
699                  neutron::rabbit_password: {get_input: rabbit_password}
700 @@ -1152,6 +1215,7 @@ resources:
701                  neutron_flat_networks: {get_input: neutron_flat_networks}
702                  neutron::agents::metadata::shared_secret: {get_input: neutron_metadata_proxy_shared_secret}
703                  neutron::agents::metadata::metadata_ip: {get_input: neutron_api_network}
704 +                neutron::agents::dhcp::enable_force_metadata: {get_input: neutron_enable_force_metadata}
705                  neutron_agent_mode: {get_input: neutron_agent_mode}
706                  neutron_router_distributed: {get_input: neutron_router_distributed}
707                  neutron::core_plugin: {get_input: neutron_core_plugin}
708 @@ -1198,6 +1262,27 @@ resources:
709                  snmpd_readonly_user_name: {get_input: snmpd_readonly_user_name}
710                  snmpd_readonly_user_password: {get_input: snmpd_readonly_user_password}
711  
712 +                # Aodh
713 +                aodh::rabbit_userid: {get_input: rabbit_username}
714 +                aodh::rabbit_password: {get_input: rabbit_password}
715 +                aodh::rabbit_use_ssl: {get_input: rabbit_client_use_ssl}
716 +                aodh::rabbit_port: {get_input: rabbit_client_port}
717 +                aodh::debug: {get_input: debug}
718 +                aodh::wsgi::apache::ssl: false
719 +                aodh::api::service_name: 'httpd'
720 +                aodh::api::host: {get_input: aodh_api_network}
721 +                aodh::api::keystone_password: {get_input: aodh_password}
722 +                aodh::api::keystone_auth_uri: {get_input: keystone_auth_uri}
723 +                aodh::api::keystone_identity_uri: {get_input: keystone_identity_uri}
724 +                aodh::auth::auth_password: {get_input: aodh_password}
725 +                aodh::keystone::auth::public_url: {get_input: aodh_public_url }
726 +                aodh::keystone::auth::internal_url: {get_input: aodh_internal_url }
727 +                aodh::keystone::auth::admin_url: {get_input: aodh_admin_url }
728 +                aodh::keystone::auth::password: {get_input: aodh_password }
729 +                aodh::keystone::auth::region: {get_input: keystone_region}
730 +                # for a migration path from ceilometer-alarm to aodh, we use the same database & coordination
731 +                aodh::evaluator::coordination_url: {get_input: ceilometer_coordination_url}
732 +
733                  # Nova
734                  nova::rabbit_userid: {get_input: rabbit_username}
735                  nova::rabbit_password: {get_input: rabbit_password}
736 diff --git a/puppet/hieradata/common.yaml b/puppet/hieradata/common.yaml
737 index 030f661..5840016 100644
738 --- a/puppet/hieradata/common.yaml
739 +++ b/puppet/hieradata/common.yaml
740 @@ -6,6 +6,7 @@ ceilometer::agent::auth::auth_region: 'regionOne'
741  # FIXME: Might be better to use 'service' tenant here but this requires
742  # changes in the tripleo-incubator keystone role setup
743  ceilometer::agent::auth::auth_tenant_name: 'admin'
744 +aodh::auth::auth_tenant_name: 'admin'
745  
746  nova::network::neutron::neutron_admin_tenant_name: 'service'
747  nova::network::neutron::neutron_admin_username: 'neutron'
748 diff --git a/puppet/hieradata/controller.yaml b/puppet/hieradata/controller.yaml
749 index 4b7fd81..4f1fef6 100644
750 --- a/puppet/hieradata/controller.yaml
751 +++ b/puppet/hieradata/controller.yaml
752 @@ -32,6 +32,7 @@ redis::sentinel::notification_script: '/usr/local/bin/redis-notifications.sh'
753  # service tenant
754  nova::api::admin_tenant_name: 'service'
755  glance::api::keystone_tenant: 'service'
756 +aodh::api::keystone_tenant: 'service'
757  glance::registry::keystone_tenant: 'service'
758  neutron::server::auth_tenant: 'service'
759  neutron::agents::metadata::auth_tenant: 'service'
760 @@ -39,6 +40,7 @@ cinder::api::keystone_tenant: 'service'
761  swift::proxy::authtoken::admin_tenant_name: 'service'
762  ceilometer::api::keystone_tenant: 'service'
763  heat::keystone_tenant: 'service'
764 +aodh::keystone::auth::tenant: 'service'
765  
766  # keystone
767  keystone::cron::token_flush::maxdelay: 3600
768 @@ -115,6 +117,7 @@ tripleo::loadbalancer::mysql: true
769  tripleo::loadbalancer::redis: true
770  tripleo::loadbalancer::swift_proxy_server: true
771  tripleo::loadbalancer::ceilometer: true
772 +tripleo::loadbalancer::aodh: true
773  tripleo::loadbalancer::heat_api: true
774  tripleo::loadbalancer::heat_cloudwatch: true
775  tripleo::loadbalancer::heat_cfn: true
776 diff --git a/puppet/manifests/overcloud_compute.pp b/puppet/manifests/overcloud_compute.pp
777 index cd41cc7..b8336ee 100644
778 --- a/puppet/manifests/overcloud_compute.pp
779 +++ b/puppet/manifests/overcloud_compute.pp
780 @@ -75,9 +75,36 @@ class { '::neutron::plugins::ml2':
781    tenant_network_types => [hiera('neutron_tenant_network_type')],
782  }
783  
784 -class { '::neutron::agents::ml2::ovs':
785 -  bridge_mappings => split(hiera('neutron_bridge_mappings'), ','),
786 -  tunnel_types    => split(hiera('neutron_tunnel_types'), ','),
787 +if 'opendaylight' in hiera('neutron_mechanism_drivers') {
788 +
789 +  if str2bool(hiera('opendaylight_install', 'false')) {
790 +    $controller_ips = split(hiera('controller_node_ips'), ',')
791 +    $opendaylight_controller_ip = $controller_ips[0]
792 +  } else {
793 +    $opendaylight_controller_ip = hiera('opendaylight_controller_ip')
794 +  }
795 +
796 +  if str2bool(hiera('opendaylight_install', 'false')) {
797 +    class { 'neutron::plugins::ovs::opendaylight':
798 +      odl_controller_ip => $opendaylight_controller_ip,
799 +      tunnel_ip         => hiera('neutron::agents::ml2::ovs::local_ip'),
800 +      odl_port          => hiera('opendaylight_port'),
801 +      odl_username      => hiera('opendaylight_username'),
802 +      odl_password      => hiera('opendaylight_password'),
803 +    }
804 +  }
805 +
806 +} elsif 'onos_ml2' in hiera('neutron_mechanism_drivers') {
807 +  $controller_ips = split(hiera('controller_node_ips'), ',')
808 +  class {'onos::ovs_computer':
809 +    manager_ip => $controller_ips[0]
810 +  }
811 +
812 +} else {
813 +  class { 'neutron::agents::ml2::ovs':
814 +    bridge_mappings => split(hiera('neutron_bridge_mappings'), ','),
815 +    tunnel_types    => split(hiera('neutron_tunnel_types'), ','),
816 +  }
817  }
818  
819  if 'cisco_n1kv' in hiera('neutron_mechanism_drivers') {
820 diff --git a/puppet/manifests/overcloud_controller.pp b/puppet/manifests/overcloud_controller.pp
821 index 1f6c2be..474bb1d 100644
822 --- a/puppet/manifests/overcloud_controller.pp
823 +++ b/puppet/manifests/overcloud_controller.pp
824 @@ -30,6 +30,21 @@ if hiera('step') >= 1 {
825  
826  if hiera('step') >= 2 {
827  
828 +  if str2bool(hiera('opendaylight_install', 'false')) {
829 +    class {"opendaylight":
830 +      extra_features => ['odl-ovsdb-openstack'],
831 +      odl_rest_port  => hiera('opendaylight_port'),
832 +      enable_l3      => hiera('opendaylight_enable_l3', 'no'),
833 +    }
834 +  }
835 +  
836 +  if 'onos_ml2' in hiera('neutron_mechanism_drivers') {
837 +    # install onos and config ovs
838 +    class {"onos":
839 +      controllers_ip => $controller_node_ips
840 +    }
841 +  }
842 +
843    if count(hiera('ntp::servers')) > 0 {
844      include ::ntp
845    }
846 @@ -158,6 +173,9 @@ if hiera('step') >= 2 {
847  
848  if hiera('step') >= 3 {
849  
850 +  # Apache
851 +  include ::apache
852 +
853    include ::keystone
854  
855    #TODO: need a cleanup-keystone-tokens.sh solution here
856 @@ -223,9 +241,7 @@ if hiera('step') >= 3 {
857    include ::nova::scheduler
858    include ::nova::scheduler::filter
859  
860 -  include ::neutron
861    include ::neutron::server
862 -  include ::neutron::agents::l3
863    include ::neutron::agents::dhcp
864    include ::neutron::agents::metadata
865  
866 @@ -237,15 +253,77 @@ if hiera('step') >= 3 {
867      require => Package['neutron'],
868    }
869  
870 +  if 'onos_ml2' in hiera('neutron_mechanism_drivers') {
871 +    # config neutron service_plugins to onos driver
872 +    class { '::neutron':
873 +      service_plugins  => [hiera('neutron_service_plugins')]
874 +    }
875 +  } else {
876 +    include ::neutron
877 +    if 'opendaylight' in hiera('neutron_mechanism_drivers') {
878 +      if ! str2bool(hiera('opendaylight_enable_l3', 'no')) {
879 +        include ::neutron::agents::l3
880 +      }
881 +    }
882 +  }
883 +  
884    class { '::neutron::plugins::ml2':
885      flat_networks        => split(hiera('neutron_flat_networks'), ','),
886      tenant_network_types => [hiera('neutron_tenant_network_type')],
887      mechanism_drivers    => [hiera('neutron_mechanism_drivers')],
888    }
889 -  class { '::neutron::agents::ml2::ovs':
890 -    bridge_mappings => split(hiera('neutron_bridge_mappings'), ','),
891 -    tunnel_types    => split(hiera('neutron_tunnel_types'), ','),
892 +
893 +  if 'opendaylight' in hiera('neutron_mechanism_drivers') {
894 +    if ! str2bool(hiera('opendaylight_enable_l3', 'no')) {
895 +      Service['neutron-server'] -> Service['neutron-l3']
896 +    }
897 +
898 +    if str2bool(hiera('opendaylight_install', 'false')) {
899 +      $controller_ips = split(hiera('controller_node_ips'), ',')
900 +      $opendaylight_controller_ip = $controller_ips[0]
901 +    } else {
902 +      $opendaylight_controller_ip = hiera('opendaylight_controller_ip')
903 +    }
904 +
905 +    class { 'neutron::plugins::ml2::opendaylight':
906 +      odl_controller_ip => $opendaylight_controller_ip,
907 +      odl_username      => hiera('opendaylight_username'),
908 +      odl_password      => hiera('opendaylight_password'),
909 +      odl_port          => hiera('opendaylight_port'),
910 +    }
911 +
912 +    if str2bool(hiera('opendaylight_install', 'false')) {
913 +      class { 'neutron::plugins::ovs::opendaylight':
914 +        odl_controller_ip => $opendaylight_controller_ip,
915 +        tunnel_ip         => hiera('neutron::agents::ml2::ovs::local_ip'),
916 +        odl_port          => hiera('opendaylight_port'),
917 +        odl_username      => hiera('opendaylight_username'),
918 +        odl_password      => hiera('opendaylight_password'),
919 +      }
920 +    }
921 +
922 +  } elsif 'onos_ml2' in hiera('neutron_mechanism_drivers') {
923 +    #config ml2_conf.ini with onos url address
924 +    $onos_port = hiera('onos_port')
925 +    $private_ip = hiera('neutron::agents::ml2::ovs::local_ip')
926 +
927 +    neutron_plugin_ml2 {
928 +      'onos/username':         value => 'admin';
929 +      'onos/password':         value => 'admin';
930 +      'onos/url_path':         value => "http://${controller_node_ips[0]}:${onos_port}/onos/vtn";
931 +    }
932 +
933 +  } else {
934 +
935 +    class { 'neutron::agents::ml2::ovs':
936 +      bridge_mappings => split(hiera('neutron_bridge_mappings'), ','),
937 +      tunnel_types => split(hiera('neutron_tunnel_types'), ','),
938 +    }
939 +
940 +    Service['neutron-server'] -> Service['neutron-ovs-agent-service']
941 +    Service['neutron-server'] -> Service['neutron-l3']
942    }
943 +
944    if 'cisco_n1kv' in hiera('neutron_mechanism_drivers') {
945      include ::neutron::plugins::ml2::cisco::nexus1000v
946  
947 @@ -280,8 +358,6 @@ if hiera('step') >= 3 {
948    }
949  
950    Service['neutron-server'] -> Service['neutron-dhcp-service']
951 -  Service['neutron-server'] -> Service['neutron-l3']
952 -  Service['neutron-server'] -> Service['neutron-ovs-agent-service']
953    Service['neutron-server'] -> Service['neutron-metadata']
954  
955    include ::cinder
956 @@ -447,6 +523,20 @@ if hiera('step') >= 3 {
957  
958    Cron <| title == 'ceilometer-expirer' |> { command => "sleep $((\$(od -A n -t d -N 3 /dev/urandom) % 86400)) && ${::ceilometer::params::expirer_command}" }
959  
960 +  # Aodh
961 +  include ::aodh::auth
962 +  include ::aodh::api
963 +  include ::aodh::evaluator
964 +  include ::aodh::notifier
965 +  include ::aodh::listener
966 +  include ::aodh::client
967 +  include ::aodh::db::sync
968 +  class { '::aodh' :
969 +    database_connection => $ceilometer_database_connection,
970 +  }
971 +  # To manage the upgrade:
972 +  Exec['ceilometer-dbsync'] -> Exec['aodh-db-sync']
973 +
974    # Heat
975    include ::heat
976    include ::heat::api
977 diff --git a/puppet/manifests/overcloud_controller_pacemaker.pp b/puppet/manifests/overcloud_controller_pacemaker.pp
978 index 3fb92f3..5992602 100644
979 --- a/puppet/manifests/overcloud_controller_pacemaker.pp
980 +++ b/puppet/manifests/overcloud_controller_pacemaker.pp
981 @@ -380,6 +380,21 @@ if hiera('step') >= 2 {
982  
983    }
984  
985 +  if str2bool(hiera('opendaylight_install', 'false')) {
986 +    class {"opendaylight":
987 +      extra_features => ['odl-ovsdb-openstack'],
988 +      odl_rest_port  => hiera('opendaylight_port'),
989 +      enable_l3      => hiera('opendaylight_enable_l3', 'no'),
990 +    }
991 +  }
992 +
993 +  if 'onos_ml2' in hiera('neutron_mechanism_drivers') {
994 +    # install onos and config ovs
995 +    class {"onos":
996 +      controllers_ip => $controller_node_ips
997 +    }
998 +  }
999 +  
1000    exec { 'galera-ready' :
1001      command     => '/usr/bin/clustercheck >/dev/null',
1002      timeout     => 30,
1003 @@ -584,7 +599,14 @@ if hiera('step') >= 3 {
1004    include ::nova::network::neutron
1005  
1006    # Neutron class definitions
1007 -  include ::neutron
1008 +  if 'onos_ml2' in hiera('neutron_mechanism_drivers') {
1009 +    # config neutron service_plugins to onos driver
1010 +    class { '::neutron':
1011 +      service_plugins  => [hiera('neutron_service_plugins')]
1012 +    }
1013 +  } else {
1014 +    include ::neutron
1015 +  }
1016    class { '::neutron::server' :
1017      sync_db        => $sync_db,
1018      manage_service => false,
1019 @@ -594,10 +616,6 @@ if hiera('step') >= 3 {
1020      manage_service => false,
1021      enabled        => false,
1022    }
1023 -  class { '::neutron::agents::l3' :
1024 -    manage_service => false,
1025 -    enabled        => false,
1026 -  }
1027    class { '::neutron::agents::metadata':
1028      manage_service => false,
1029      enabled        => false,
1030 @@ -609,18 +627,68 @@ if hiera('step') >= 3 {
1031      notify  => Service['neutron-dhcp-service'],
1032      require => Package['neutron'],
1033    }
1034 +
1035    class { '::neutron::plugins::ml2':
1036      flat_networks        => split(hiera('neutron_flat_networks'), ','),
1037      tenant_network_types => [hiera('neutron_tenant_network_type')],
1038      mechanism_drivers    => [hiera('neutron_mechanism_drivers')],
1039    }
1040 -  class { '::neutron::agents::ml2::ovs':
1041 -    manage_service  => false,
1042 -    enabled         => false,
1043 -    bridge_mappings => split(hiera('neutron_bridge_mappings'), ','),
1044 -    tunnel_types    => split(hiera('neutron_tunnel_types'), ','),
1045 -  }
1046 +  if 'opendaylight' in hiera('neutron_mechanism_drivers') {
1047 +    if str2bool(hiera('opendaylight_install', 'false')) {
1048 +      $controller_ips = split(hiera('controller_node_ips'), ',')
1049 +      $opendaylight_controller_ip = $controller_ips[0]
1050 +    } else {
1051 +      $opendaylight_controller_ip = hiera('opendaylight_controller_ip')
1052 +    }
1053 +
1054 +    $opendaylight_port = hiera('opendaylight_port')
1055 +    $private_ip = hiera('neutron::agents::ml2::ovs::local_ip')
1056 +
1057 +    class { 'neutron::plugins::ml2::opendaylight':
1058 +      odl_controller_ip => $opendaylight_controller_ip,
1059 +      odl_username      => hiera('opendaylight_username'),
1060 +      odl_password      => hiera('opendaylight_password'),
1061 +      odl_port          => hiera('opendaylight_port'),
1062 +    }
1063  
1064 +    if str2bool(hiera('opendaylight_install', 'false')) {
1065 +      class { 'neutron::plugins::ovs::opendaylight':
1066 +        odl_controller_ip => $opendaylight_controller_ip,
1067 +        tunnel_ip         => hiera('neutron::agents::ml2::ovs::local_ip'),
1068 +        odl_port          => hiera('opendaylight_port'),
1069 +        odl_username      => hiera('opendaylight_username'),
1070 +        odl_password      => hiera('opendaylight_password'),
1071 +      }
1072 +    }
1073 +    if ! str2bool(hiera('opendaylight_enable_l3', 'no')) {
1074 +      class { '::neutron::agents::l3' :
1075 +        manage_service => false,
1076 +        enabled        => false,
1077 +      }
1078 +    }
1079 +  } elsif 'onos_ml2' in hiera('neutron_mechanism_drivers') {
1080 +    #config ml2_conf.ini with onos url address
1081 +    $onos_port = hiera('onos_port')
1082 +    $private_ip = hiera('neutron::agents::ml2::ovs::local_ip')
1083 +
1084 +    neutron_plugin_ml2 {
1085 +      'onos/username':         value => 'admin';
1086 +      'onos/password':         value => 'admin';
1087 +      'onos/url_path':         value => "http://${controller_node_ips[0]}:${onos_port}/onos/vtn";
1088 +    }
1089 +
1090 +  } else {
1091 +    class { '::neutron::agents::l3' :
1092 +      manage_service => false,
1093 +      enabled        => false,
1094 +    }
1095 +    class { 'neutron::agents::ml2::ovs':
1096 +      manage_service   => false,
1097 +      enabled          => false,
1098 +      bridge_mappings  => split(hiera('neutron_bridge_mappings'), ','),
1099 +      tunnel_types     => split(hiera('neutron_tunnel_types'), ','),
1100 +    }
1101 +  }
1102    if 'cisco_ucsm' in hiera('neutron_mechanism_drivers') {
1103      include ::neutron::plugins::ml2::cisco::ucsm
1104    }
1105 @@ -645,8 +713,10 @@ if hiera('step') >= 3 {
1106    if hiera('neutron_enable_bigswitch_ml2', false) {
1107      include ::neutron::plugins::ml2::bigswitch::restproxy
1108    }
1109 -  neutron_l3_agent_config {
1110 -    'DEFAULT/ovs_use_veth': value => hiera('neutron_ovs_use_veth', false);
1111 +  if !('onos_ml2' in hiera('neutron_mechanism_drivers') or str2bool(hiera('opendaylight_enable_l3', 'no'))) {
1112 +    neutron_l3_agent_config {
1113 +      'DEFAULT/ovs_use_veth': value => hiera('neutron_ovs_use_veth', false);
1114 +    }
1115    }
1116    neutron_dhcp_agent_config {
1117      'DEFAULT/ovs_use_veth': value => hiera('neutron_ovs_use_veth', false);
1118 @@ -879,6 +949,28 @@ if hiera('step') >= 3 {
1119      enabled        => false,
1120    }
1121  
1122 +  # Aodh
1123 +  include ::aodh
1124 +  include ::aodh::config
1125 +  include ::aodh::auth
1126 +  include ::aodh::client
1127 +  class { '::aodh::api':
1128 +    manage_service => false,
1129 +    enabled        => false,
1130 +  }
1131 +  class { '::aodh::evaluator':
1132 +    manage_service => false,
1133 +    enabled        => false,
1134 +  }
1135 +  class { '::aodh::notifier':
1136 +    manage_service => false,
1137 +    enabled        => false,
1138 +  }
1139 +  class { '::aodh::listener':
1140 +    manage_service => false,
1141 +    enabled        => false,
1142 +  }
1143 +
1144    # httpd/apache and horizon
1145    # NOTE(gfidente): server-status can be consumed by the pacemaker resource agent
1146    class { '::apache' :
1147 @@ -914,6 +1006,32 @@ if hiera('step') >= 3 {
1148  if hiera('step') >= 4 {
1149    include ::keystone::cron::token_flush
1150  
1151 +  $event_pipeline = "---
1152 +sources:
1153 +    - name: event_source
1154 +      events:
1155 +          - \"*\"
1156 +      sinks:
1157 +          - event_sink
1158 +sinks:
1159 +    - name: event_sink
1160 +      transformers:
1161 +      triggers:
1162 +      publishers:
1163 +          - notifier://?topic=alarm.all
1164 +          - notifier://
1165 +"
1166 +
1167 +  # aodh hacks
1168 +  file { '/etc/ceilometer/event_pipeline':
1169 +    ensure  => present,
1170 +    content => $event_pipeline
1171 +  }
1172 +
1173 +  user { 'aodh':
1174 +     groups => 'nobody'
1175 +  }
1176 +
1177    if $pacemaker_master {
1178  
1179      # Keystone
1180 @@ -1055,62 +1173,21 @@ if hiera('step') >= 4 {
1181        clone_params => 'interleave=true',
1182        require      => Pacemaker::Resource::Service[$::keystone::params::service_name],
1183      }
1184 -    pacemaker::resource::service { $::neutron::params::l3_agent_service:
1185 -      clone_params => 'interleave=true',
1186 +    if !('onos_ml2' in hiera('neutron_mechanism_drivers')) {
1187 +      pacemaker::resource::service { $::neutron::params::l3_agent_service:
1188 +        clone_params => 'interleave=true',
1189 +      }
1190      }
1191      pacemaker::resource::service { $::neutron::params::dhcp_agent_service:
1192        clone_params => 'interleave=true',
1193      }
1194 -    pacemaker::resource::service { $::neutron::params::ovs_agent_service:
1195 -      clone_params => 'interleave=true',
1196 -    }
1197      pacemaker::resource::service { $::neutron::params::metadata_agent_service:
1198        clone_params => 'interleave=true',
1199      }
1200 -    pacemaker::resource::ocf { $::neutron::params::ovs_cleanup_service:
1201 -      ocf_agent_name => 'neutron:OVSCleanup',
1202 -      clone_params   => 'interleave=true',
1203 -    }
1204      pacemaker::resource::ocf { 'neutron-netns-cleanup':
1205        ocf_agent_name => 'neutron:NetnsCleanup',
1206        clone_params   => 'interleave=true',
1207      }
1208 -
1209 -    # neutron - one chain ovs-cleanup-->netns-cleanup-->ovs-agent
1210 -    pacemaker::constraint::base { 'neutron-ovs-cleanup-to-netns-cleanup-constraint':
1211 -      constraint_type => 'order',
1212 -      first_resource  => "${::neutron::params::ovs_cleanup_service}-clone",
1213 -      second_resource => 'neutron-netns-cleanup-clone',
1214 -      first_action    => 'start',
1215 -      second_action   => 'start',
1216 -      require         => [Pacemaker::Resource::Ocf[$::neutron::params::ovs_cleanup_service],
1217 -                          Pacemaker::Resource::Ocf['neutron-netns-cleanup']],
1218 -    }
1219 -    pacemaker::constraint::colocation { 'neutron-ovs-cleanup-to-netns-cleanup-colocation':
1220 -      source  => 'neutron-netns-cleanup-clone',
1221 -      target  => "${::neutron::params::ovs_cleanup_service}-clone",
1222 -      score   => 'INFINITY',
1223 -      require => [Pacemaker::Resource::Ocf[$::neutron::params::ovs_cleanup_service],
1224 -                  Pacemaker::Resource::Ocf['neutron-netns-cleanup']],
1225 -    }
1226 -    pacemaker::constraint::base { 'neutron-netns-cleanup-to-openvswitch-agent-constraint':
1227 -      constraint_type => 'order',
1228 -      first_resource  => 'neutron-netns-cleanup-clone',
1229 -      second_resource => "${::neutron::params::ovs_agent_service}-clone",
1230 -      first_action    => 'start',
1231 -      second_action   => 'start',
1232 -      require         => [Pacemaker::Resource::Ocf['neutron-netns-cleanup'],
1233 -                          Pacemaker::Resource::Service[$::neutron::params::ovs_agent_service]],
1234 -    }
1235 -    pacemaker::constraint::colocation { 'neutron-netns-cleanup-to-openvswitch-agent-colocation':
1236 -      source  => "${::neutron::params::ovs_agent_service}-clone",
1237 -      target  => 'neutron-netns-cleanup-clone',
1238 -      score   => 'INFINITY',
1239 -      require => [Pacemaker::Resource::Ocf['neutron-netns-cleanup'],
1240 -                  Pacemaker::Resource::Service[$::neutron::params::ovs_agent_service]],
1241 -    }
1242 -
1243 -    #another chain keystone-->neutron-server-->ovs-agent-->dhcp-->l3
1244      pacemaker::constraint::base { 'keystone-to-neutron-server-constraint':
1245        constraint_type => 'order',
1246        first_resource  => "${::keystone::params::service_name}-clone",
1247 @@ -1120,65 +1197,110 @@ if hiera('step') >= 4 {
1248        require         => [Pacemaker::Resource::Service[$::keystone::params::service_name],
1249                            Pacemaker::Resource::Service[$::neutron::params::server_service]],
1250      }
1251 -    pacemaker::constraint::base { 'neutron-server-to-openvswitch-agent-constraint':
1252 -      constraint_type => 'order',
1253 -      first_resource  => "${::neutron::params::server_service}-clone",
1254 -      second_resource => "${::neutron::params::ovs_agent_service}-clone",
1255 -      first_action    => 'start',
1256 -      second_action   => 'start',
1257 -      require         => [Pacemaker::Resource::Service[$::neutron::params::server_service],
1258 -                          Pacemaker::Resource::Service[$::neutron::params::ovs_agent_service]],
1259 -    }
1260 -    pacemaker::constraint::base { 'neutron-openvswitch-agent-to-dhcp-agent-constraint':
1261 -      constraint_type => 'order',
1262 -      first_resource  => "${::neutron::params::ovs_agent_service}-clone",
1263 -      second_resource => "${::neutron::params::dhcp_agent_service}-clone",
1264 -      first_action    => 'start',
1265 -      second_action   => 'start',
1266 -      require         => [Pacemaker::Resource::Service[$::neutron::params::ovs_agent_service],
1267 -                          Pacemaker::Resource::Service[$::neutron::params::dhcp_agent_service]],
1268 +    if 'openvswitch' in hiera('neutron_mechanism_drivers') {
1269 +      pacemaker::resource::service { $::neutron::params::ovs_agent_service:
1270 +        clone_params => "interleave=true",
1271 +      }
1272 +      pacemaker::resource::ocf { $::neutron::params::ovs_cleanup_service:
1273 +        ocf_agent_name => "neutron:OVSCleanup",
1274 +        clone_params => "interleave=true",
1275 +      }
1276 +      # neutron - one chain ovs-cleanup-->netns-cleanup-->ovs-agent
1277 +      pacemaker::constraint::base { 'neutron-ovs-cleanup-to-netns-cleanup-constraint':
1278 +        constraint_type => "order",
1279 +        first_resource => "${::neutron::params::ovs_cleanup_service}-clone",
1280 +        second_resource => "neutron-netns-cleanup-clone",
1281 +        first_action => "start",
1282 +        second_action => "start",
1283 +        require => [Pacemaker::Resource::Ocf["${::neutron::params::ovs_cleanup_service}"],
1284 +                    Pacemaker::Resource::Ocf['neutron-netns-cleanup']],
1285 +      }
1286 +      pacemaker::constraint::colocation { 'neutron-ovs-cleanup-to-netns-cleanup-colocation':
1287 +        source => "neutron-netns-cleanup-clone",
1288 +        target => "${::neutron::params::ovs_cleanup_service}-clone",
1289 +        score => "INFINITY",
1290 +        require => [Pacemaker::Resource::Ocf["${::neutron::params::ovs_cleanup_service}"],
1291 +                    Pacemaker::Resource::Ocf['neutron-netns-cleanup']],
1292 +      }
1293 +      pacemaker::constraint::base { 'neutron-netns-cleanup-to-openvswitch-agent-constraint':
1294 +        constraint_type => "order",
1295 +        first_resource => "neutron-netns-cleanup-clone",
1296 +        second_resource => "${::neutron::params::ovs_agent_service}-clone",
1297 +        first_action => "start",
1298 +        second_action => "start",
1299 +        require => [Pacemaker::Resource::Ocf["neutron-netns-cleanup"],
1300 +                    Pacemaker::Resource::Service["${::neutron::params::ovs_agent_service}"]],
1301 +      }
1302 +      pacemaker::constraint::colocation { 'neutron-netns-cleanup-to-openvswitch-agent-colocation':
1303 +        source => "${::neutron::params::ovs_agent_service}-clone",
1304 +        target => "neutron-netns-cleanup-clone",
1305 +        score => "INFINITY",
1306 +        require => [Pacemaker::Resource::Ocf["neutron-netns-cleanup"],
1307 +                    Pacemaker::Resource::Service["${::neutron::params::ovs_agent_service}"]],
1308 +      }
1309  
1310 +      #another chain keystone-->neutron-server-->ovs-agent-->dhcp-->l3
1311 +      pacemaker::constraint::base { 'neutron-server-to-openvswitch-agent-constraint':
1312 +        constraint_type => "order",
1313 +        first_resource => "${::neutron::params::server_service}-clone",
1314 +        second_resource => "${::neutron::params::ovs_agent_service}-clone",
1315 +        first_action => "start",
1316 +        second_action => "start",
1317 +        require => [Pacemaker::Resource::Service[$::neutron::params::server_service],
1318 +                    Pacemaker::Resource::Service[$::neutron::params::ovs_agent_service]],
1319 +      }
1320 +      pacemaker::constraint::base { 'neutron-openvswitch-agent-to-dhcp-agent-constraint':
1321 +        constraint_type => "order",
1322 +        first_resource => "${::neutron::params::ovs_agent_service}-clone",
1323 +        second_resource => "${::neutron::params::dhcp_agent_service}-clone",
1324 +        first_action => "start",
1325 +        second_action => "start",
1326 +        require => [Pacemaker::Resource::Service["${::neutron::params::ovs_agent_service}"],
1327 +                    Pacemaker::Resource::Service["${::neutron::params::dhcp_agent_service}"]],
1328 +
1329 +      }
1330 +      pacemaker::constraint::colocation { 'neutron-openvswitch-agent-to-dhcp-agent-colocation':
1331 +        source => "${::neutron::params::dhcp_agent_service}-clone",
1332 +        target => "${::neutron::params::ovs_agent_service}-clone",
1333 +        score => "INFINITY",
1334 +        require => [Pacemaker::Resource::Service["${::neutron::params::ovs_agent_service}"],
1335 +                    Pacemaker::Resource::Service["${::neutron::params::dhcp_agent_service}"]],
1336 +      }
1337      }
1338 -    pacemaker::constraint::colocation { 'neutron-openvswitch-agent-to-dhcp-agent-colocation':
1339 -      source  => "${::neutron::params::dhcp_agent_service}-clone",
1340 -      target  => "${::neutron::params::ovs_agent_service}-clone",
1341 -      score   => 'INFINITY',
1342 -      require => [Pacemaker::Resource::Service[$::neutron::params::ovs_agent_service],
1343 -                  Pacemaker::Resource::Service[$::neutron::params::dhcp_agent_service]],
1344 -    }
1345 -    pacemaker::constraint::base { 'neutron-dhcp-agent-to-l3-agent-constraint':
1346 -      constraint_type => 'order',
1347 -      first_resource  => "${::neutron::params::dhcp_agent_service}-clone",
1348 -      second_resource => "${::neutron::params::l3_agent_service}-clone",
1349 -      first_action    => 'start',
1350 -      second_action   => 'start',
1351 -      require         => [Pacemaker::Resource::Service[$::neutron::params::dhcp_agent_service],
1352 -                          Pacemaker::Resource::Service[$::neutron::params::l3_agent_service]],
1353 -    }
1354 -    pacemaker::constraint::colocation { 'neutron-dhcp-agent-to-l3-agent-colocation':
1355 -      source  => "${::neutron::params::l3_agent_service}-clone",
1356 -      target  => "${::neutron::params::dhcp_agent_service}-clone",
1357 -      score   => 'INFINITY',
1358 -      require => [Pacemaker::Resource::Service[$::neutron::params::dhcp_agent_service],
1359 -                  Pacemaker::Resource::Service[$::neutron::params::l3_agent_service]],
1360 -    }
1361 -    pacemaker::constraint::base { 'neutron-l3-agent-to-metadata-agent-constraint':
1362 -      constraint_type => 'order',
1363 -      first_resource  => "${::neutron::params::l3_agent_service}-clone",
1364 -      second_resource => "${::neutron::params::metadata_agent_service}-clone",
1365 -      first_action    => 'start',
1366 -      second_action   => 'start',
1367 -      require         => [Pacemaker::Resource::Service[$::neutron::params::l3_agent_service],
1368 -                          Pacemaker::Resource::Service[$::neutron::params::metadata_agent_service]],
1369 -    }
1370 -    pacemaker::constraint::colocation { 'neutron-l3-agent-to-metadata-agent-colocation':
1371 -      source  => "${::neutron::params::metadata_agent_service}-clone",
1372 -      target  => "${::neutron::params::l3_agent_service}-clone",
1373 -      score   => 'INFINITY',
1374 -      require => [Pacemaker::Resource::Service[$::neutron::params::l3_agent_service],
1375 -                  Pacemaker::Resource::Service[$::neutron::params::metadata_agent_service]],
1376 +    if !('onos_ml2' in hiera('neutron_mechanism_drivers') or str2bool(hiera('opendaylight_enable_l3', 'no'))) {
1377 +      pacemaker::constraint::base { 'neutron-dhcp-agent-to-l3-agent-constraint':
1378 +        constraint_type => 'order',
1379 +        first_resource  => "${::neutron::params::dhcp_agent_service}-clone",
1380 +        second_resource => "${::neutron::params::l3_agent_service}-clone",
1381 +        first_action    => 'start',
1382 +        second_action   => 'start',
1383 +        require         => [Pacemaker::Resource::Service[$::neutron::params::dhcp_agent_service],
1384 +                            Pacemaker::Resource::Service[$::neutron::params::l3_agent_service]],
1385 +      }
1386 +      pacemaker::constraint::colocation { 'neutron-dhcp-agent-to-l3-agent-colocation':
1387 +        source  => "${::neutron::params::l3_agent_service}-clone",
1388 +        target  => "${::neutron::params::dhcp_agent_service}-clone",
1389 +        score   => 'INFINITY',
1390 +        require => [Pacemaker::Resource::Service[$::neutron::params::dhcp_agent_service],
1391 +                    Pacemaker::Resource::Service[$::neutron::params::l3_agent_service]],
1392 +      }
1393 +      pacemaker::constraint::base { 'neutron-l3-agent-to-metadata-agent-constraint':
1394 +        constraint_type => 'order',
1395 +        first_resource  => "${::neutron::params::l3_agent_service}-clone",
1396 +        second_resource => "${::neutron::params::metadata_agent_service}-clone",
1397 +        first_action    => 'start',
1398 +        second_action   => 'start',
1399 +        require         => [Pacemaker::Resource::Service[$::neutron::params::l3_agent_service],
1400 +                            Pacemaker::Resource::Service[$::neutron::params::metadata_agent_service]],
1401 +      }
1402 +      pacemaker::constraint::colocation { 'neutron-l3-agent-to-metadata-agent-colocation':
1403 +        source  => "${::neutron::params::metadata_agent_service}-clone",
1404 +        target  => "${::neutron::params::l3_agent_service}-clone",
1405 +        score   => 'INFINITY',
1406 +        require => [Pacemaker::Resource::Service[$::neutron::params::l3_agent_service],
1407 +                    Pacemaker::Resource::Service[$::neutron::params::metadata_agent_service]],
1408 +      }
1409      }
1410 -
1411      # Nova
1412      pacemaker::resource::service { $::nova::params::api_service_name :
1413        clone_params => 'interleave=true',
1414 @@ -1276,7 +1398,7 @@ if hiera('step') >= 4 {
1415                    Pacemaker::Resource::Service[$::nova::params::conductor_service_name]],
1416      }
1417  
1418 -    # Ceilometer
1419 +    # Ceilometer and Aodh
1420      case downcase(hiera('ceilometer_backend')) {
1421        /mysql/: {
1422          pacemaker::resource::service { $::ceilometer::params::agent_central_service_name :
1423 @@ -1298,10 +1420,19 @@ if hiera('step') >= 4 {
1424      pacemaker::resource::service { $::ceilometer::params::api_service_name :
1425        clone_params => 'interleave=true',
1426      }
1427 -    pacemaker::resource::service { $::ceilometer::params::alarm_evaluator_service_name :
1428 +    pacemaker::resource::service { $::aodh::params::notifier_service_name :
1429        clone_params => 'interleave=true',
1430      }
1431 -    pacemaker::resource::service { $::ceilometer::params::alarm_notifier_service_name :
1432 +    pacemaker::resource::service { $::aodh::params::expirer_package_serice :
1433 +      clone_params => 'interleave=true',
1434 +    }
1435 +    pacemaker::resource::service { $::aodh::params::listener_service_name :
1436 +      clone_params => 'interleave=true',
1437 +    }
1438 +    pacemaker::resource::service { $::aodh::params::api_service_name :
1439 +      clone_params => 'interleave=true',
1440 +    }
1441 +    pacemaker::resource::service { $::aodh::params::evaluator_service_name :
1442        clone_params => 'interleave=true',
1443      }
1444      pacemaker::resource::service { $::ceilometer::params::agent_notification_service_name :
1445 @@ -1315,8 +1446,19 @@ if hiera('step') >= 4 {
1446      # Fedora doesn't know `require-all` parameter for constraints yet
1447      if $::operatingsystem == 'Fedora' {
1448        $redis_ceilometer_constraint_params = undef
1449 +      $redis_aodh_constraint_params = undef
1450      } else {
1451        $redis_ceilometer_constraint_params = 'require-all=false'
1452 +      $redis_aodh_constraint_params = 'require-all=false'
1453 +    }
1454 +    pacemaker::constraint::base { 'keystone-then-aodh-api-constraint':
1455 +      constraint_type => 'order',
1456 +      first_resource  => "${::keystone::params::service_name}-clone",
1457 +      second_resource => "${::aodh::params::api_service_name}-clone",
1458 +      first_action    => 'start',
1459 +      second_action   => 'start',
1460 +      require         => [Pacemaker::Resource::Service[$::aodh::params::api_service_name],
1461 +                          Pacemaker::Resource::Service[$::keystone::params::service_name]],
1462      }
1463      pacemaker::constraint::base { 'redis-then-ceilometer-central-constraint':
1464        constraint_type   => 'order',
1465 @@ -1328,6 +1470,16 @@ if hiera('step') >= 4 {
1466        require           => [Pacemaker::Resource::Ocf['redis'],
1467                              Pacemaker::Resource::Service[$::ceilometer::params::agent_central_service_name]],
1468      }
1469 +    pacemaker::constraint::base { 'redis-then-aodh-evaluator-constraint':
1470 +      constraint_type   => 'order',
1471 +      first_resource    => 'redis-master',
1472 +      second_resource   => "${::aodh::params::evaluator_service_name}-clone",
1473 +      first_action      => 'promote',
1474 +      second_action     => 'start',
1475 +      constraint_params => $redis_aodh_constraint_params,
1476 +      require           => [Pacemaker::Resource::Ocf['redis'],
1477 +                            Pacemaker::Resource::Service[$::aodh::params::evaluator_service_name]],
1478 +    }
1479      pacemaker::constraint::base { 'keystone-then-ceilometer-central-constraint':
1480        constraint_type => 'order',
1481        first_resource  => "${::keystone::params::service_name}-clone",
1482 @@ -1378,53 +1530,37 @@ if hiera('step') >= 4 {
1483        require => [Pacemaker::Resource::Service[$::ceilometer::params::api_service_name],
1484                    Pacemaker::Resource::Ocf['delay']],
1485      }
1486 -    pacemaker::constraint::base { 'ceilometer-delay-then-ceilometer-alarm-evaluator-constraint':
1487 +    pacemaker::constraint::base { 'aodh-delay-then-aodh-evaluator-constraint':
1488        constraint_type => 'order',
1489        first_resource  => 'delay-clone',
1490 -      second_resource => "${::ceilometer::params::alarm_evaluator_service_name}-clone",
1491 +      second_resource => "${::aodh::params::evaluator_service_name}-clone",
1492        first_action    => 'start',
1493        second_action   => 'start',
1494 -      require         => [Pacemaker::Resource::Service[$::ceilometer::params::alarm_evaluator_service_name],
1495 +      require         => [Pacemaker::Resource::Service[$::aodh::params::evaluator_service_name],
1496                            Pacemaker::Resource::Ocf['delay']],
1497      }
1498 -    pacemaker::constraint::colocation { 'ceilometer-alarm-evaluator-with-ceilometer-delay-colocation':
1499 -      source  => "${::ceilometer::params::alarm_evaluator_service_name}-clone",
1500 +    pacemaker::constraint::colocation { 'aodh-evaluator-with-aodh-delay-colocation':
1501 +      source  => "${::aodh::params::evaluator_service_name}-clone",
1502        target  => 'delay-clone',
1503        score   => 'INFINITY',
1504 -      require => [Pacemaker::Resource::Service[$::ceilometer::params::api_service_name],
1505 +      require => [Pacemaker::Resource::Service[$::horizon::params::http_service],
1506                    Pacemaker::Resource::Ocf['delay']],
1507      }
1508 -    pacemaker::constraint::base { 'ceilometer-alarm-evaluator-then-ceilometer-alarm-notifier-constraint':
1509 -      constraint_type => 'order',
1510 -      first_resource  => "${::ceilometer::params::alarm_evaluator_service_name}-clone",
1511 -      second_resource => "${::ceilometer::params::alarm_notifier_service_name}-clone",
1512 -      first_action    => 'start',
1513 -      second_action   => 'start',
1514 -      require         => [Pacemaker::Resource::Service[$::ceilometer::params::alarm_evaluator_service_name],
1515 -                          Pacemaker::Resource::Service[$::ceilometer::params::alarm_notifier_service_name]],
1516 -    }
1517 -    pacemaker::constraint::colocation { 'ceilometer-alarm-notifier-with-ceilometer-alarm-evaluator-colocation':
1518 -      source  => "${::ceilometer::params::alarm_notifier_service_name}-clone",
1519 -      target  => "${::ceilometer::params::alarm_evaluator_service_name}-clone",
1520 -      score   => 'INFINITY',
1521 -      require => [Pacemaker::Resource::Service[$::ceilometer::params::alarm_evaluator_service_name],
1522 -                  Pacemaker::Resource::Service[$::ceilometer::params::alarm_notifier_service_name]],
1523 -    }
1524 -    pacemaker::constraint::base { 'ceilometer-alarm-notifier-then-ceilometer-notification-constraint':
1525 +    pacemaker::constraint::base { 'aodh-evaluator-then-aodh-notifier-constraint':
1526        constraint_type => 'order',
1527 -      first_resource  => "${::ceilometer::params::alarm_notifier_service_name}-clone",
1528 -      second_resource => "${::ceilometer::params::agent_notification_service_name}-clone",
1529 +      first_resource  => "${::aodh::params::evaluator_service_name}-clone",
1530 +      second_resource => "${::aodh::params::notifier_service_name}-clone",
1531        first_action    => 'start',
1532        second_action   => 'start',
1533 -      require         => [Pacemaker::Resource::Service[$::ceilometer::params::agent_notification_service_name],
1534 -                          Pacemaker::Resource::Service[$::ceilometer::params::alarm_notifier_service_name]],
1535 +      require         => [Pacemaker::Resource::Service[$::aodh::params::evaluator_service_name],
1536 +                          Pacemaker::Resource::Service[$::aodh::params::notifier_service_name]],
1537      }
1538 -    pacemaker::constraint::colocation { 'ceilometer-notification-with-ceilometer-alarm-notifier-colocation':
1539 -      source  => "${::ceilometer::params::agent_notification_service_name}-clone",
1540 -      target  => "${::ceilometer::params::alarm_notifier_service_name}-clone",
1541 +    pacemaker::constraint::colocation { 'aodh-notifier-with-aodh-evaluator-colocation':
1542 +      source  => "${::aodh::params::notifier_service_name}-clone",
1543 +      target  => "${::aodh::params::evaluator_service_name}-clone",
1544        score   => 'INFINITY',
1545 -      require => [Pacemaker::Resource::Service[$::ceilometer::params::agent_notification_service_name],
1546 -                  Pacemaker::Resource::Service[$::ceilometer::params::alarm_notifier_service_name]],
1547 +      require => [Pacemaker::Resource::Service[$::aodh::params::evaluator_service_name],
1548 +                  Pacemaker::Resource::Service[$::aodh::params::notifier_service_name]],
1549      }
1550      if downcase(hiera('ceilometer_backend')) == 'mongodb' {
1551        pacemaker::constraint::base { 'mongodb-then-ceilometer-central-constraint':
1552 diff --git a/puppet/manifests/overcloud_opendaylight.pp b/puppet/manifests/overcloud_opendaylight.pp
1553 new file mode 100644
1554 index 0000000..33f609a
1555 --- /dev/null
1556 +++ b/puppet/manifests/overcloud_opendaylight.pp
1557 @@ -0,0 +1,27 @@
1558 +# Copyright 2015 Red Hat, Inc.
1559 +# All Rights Reserved.
1560 +#
1561 +# Licensed under the Apache License, Version 2.0 (the "License"); you may
1562 +# not use this file except in compliance with the License. You may obtain
1563 +# a copy of the License at
1564 +#
1565 +#     http://www.apache.org/licenses/LICENSE-2.0
1566 +#
1567 +# Unless required by applicable law or agreed to in writing, software
1568 +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
1569 +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
1570 +# License for the specific language governing permissions and limitations
1571 +# under the License.
1572 +
1573 +include ::tripleo::packages
1574 +
1575 +if count(hiera('ntp::servers')) > 0 {
1576 +  include ::ntp
1577 +}
1578 +
1579 +class {"opendaylight":
1580 +  extra_features => ['odl-ovsdb-openstack'],
1581 +  odl_rest_port  => hiera('opendaylight_port'),
1582 +  enable_l3      => hiera('opendaylight_enable_l3', 'no'),
1583 +}
1584 +
1585 diff --git a/puppet/opendaylight-puppet.yaml b/puppet/opendaylight-puppet.yaml
1586 new file mode 100644
1587 index 0000000..b876dc7
1588 --- /dev/null
1589 +++ b/puppet/opendaylight-puppet.yaml
1590 @@ -0,0 +1,217 @@
1591 +heat_template_version: 2015-04-30
1592 +
1593 +description: >
1594 +  OpenDaylight node configured by Puppet.
1595 +
1596 +parameters:
1597 +  OpenDaylightFlavor:
1598 +    default: baremetal
1599 +    description: The flavor to use for the OpenDaylight node
1600 +    type: string
1601 +  OpenDaylightImage:
1602 +    default: overcloud-full
1603 +    description: The image to use for the OpenDaylight node
1604 +    type: string
1605 +  OpenDaylightHostname:
1606 +    default: opendaylight-server
1607 +    description: The hostname to use for the OpenDaylight node
1608 +    type: string
1609 +  OpenDaylightUsername:
1610 +    default: admin
1611 +    description: The admin user for the OpenDaylight node
1612 +    type: string
1613 +  OpenDaylightPassword:
1614 +    default: ''
1615 +    description: The admin password for the OpenDaylight node
1616 +    type: string
1617 +    hidden: true
1618 +  OpenDaylightEnableL3:
1619 +    description: Knob to enable/disable ODL L3
1620 +    type: string
1621 +    default: 'no'
1622 +  OpenDaylightPort:
1623 +    default: 8081
1624 +    description: Set OpenDaylight service port
1625 +    type: number
1626 +  KeyName:
1627 +    description: The keypair to use for SSH access to the node (via heat-admin user)
1628 +    type: string
1629 +    default: default
1630 +    constraints:
1631 +      - custom_constraint: nova.keypair
1632 +  ImageUpdatePolicy:
1633 +    default: 'REBUILD_PRESERVE_EPHEMERAL'
1634 +    description: What policy to use when reconstructing instances. REBUILD for rebuilds, REBUILD_PRESERVE_EPHEMERAL to preserve /mnt.
1635 +    type: string
1636 +  UpdateIdentifier:
1637 +    default: ''
1638 +    type: string
1639 +    description: >
1640 +      Setting to a previously unused value during stack-update will trigger
1641 +      package update on all nodes
1642 +  NtpServer:
1643 +    type: string
1644 +    default: ''
1645 +  PublicInterface:
1646 +    default: nic1
1647 +    description: What interface to bridge onto br-ex for network nodes.
1648 +    type: string
1649 +
1650 +resources:
1651 +  OpenDaylightNode:
1652 +    type: OS::Nova::Server
1653 +    properties:
1654 +      image: {get_param: OpenDaylightImage}
1655 +      image_update_policy: {get_param: ImageUpdatePolicy}
1656 +      flavor: {get_param: OpenDaylightFlavor}
1657 +      key_name: {get_param: KeyName}
1658 +      networks:
1659 +        - network: ctlplane
1660 +      user_data_format: SOFTWARE_CONFIG
1661 +      user_data: {get_resource: NodeUserData}
1662 +      name: {get_param: OpenDaylightHostname}
1663 +
1664 +  NodeUserData:
1665 +    type: OS::TripleO::NodeUserData
1666 +
1667 +  ExternalPort:
1668 +    type: OS::TripleO::Controller::Ports::ExternalPort
1669 +    properties:
1670 +      ControlPlaneIP: {get_attr: [OpenDaylightNode, networks, ctlplane, 0]}
1671 +
1672 +  InternalApiPort:
1673 +    type: OS::TripleO::Controller::Ports::InternalApiPort
1674 +    properties:
1675 +      ControlPlaneIP: {get_attr: [OpenDaylightNode, networks, ctlplane, 0]}
1676 +
1677 +  NetIpMap:
1678 +    type: OS::TripleO::Network::Ports::NetIpMap
1679 +    properties:
1680 +      ControlPlaneIp: {get_attr: [OpenDaylightNode, networks, ctlplane, 0]}
1681 +      ExternalIp: {get_attr: [ExternalPort, ip_address]}
1682 +      InternalApiIp: {get_attr: [InternalApiPort, ip_address]}
1683 +
1684 +  NetIpSubnetMap:
1685 +    type: OS::TripleO::Network::Ports::NetIpSubnetMap
1686 +    properties:
1687 +      ControlPlaneIp: {get_attr: [OpenDaylightNode, networks, ctlplane, 0]}
1688 +      ExternalIpSubnet: {get_attr: [ExternalPort, ip_subnet]}
1689 +      InternalApiIpSubnet: {get_attr: [InternalApiPort, ip_subnet]}
1690 +
1691 +  NetworkConfig:
1692 +    type: OS::TripleO::Controller::Net::SoftwareConfig
1693 +    properties:
1694 +      ControlPlaneIp: {get_attr: [OpenDaylightNode, networks, ctlplane, 0]}
1695 +      ExternalIpSubnet: {get_attr: [ExternalPort, ip_subnet]}
1696 +      InternalApiIpSubnet: {get_attr: [InternalApiPort, ip_subnet]}
1697 +
1698 +  NetworkDeployment:
1699 +    type: OS::TripleO::SoftwareDeployment
1700 +    properties:
1701 +      config: {get_resource: NetworkConfig}
1702 +      server: {get_resource: OpenDaylightNode}
1703 +      input_values:
1704 +        bridge_name: br-ex
1705 +        interface_name: {get_param: PublicInterface}
1706 +
1707 +  OpenDaylightDeployment:
1708 +    type: OS::TripleO::SoftwareDeployment
1709 +    depends_on: NetworkDeployment
1710 +    properties:
1711 +      config: {get_resource: OpenDaylightConfig}
1712 +      server: {get_resource: OpenDaylightNode}
1713 +      input_values:
1714 +        ntp_servers:
1715 +          str_replace:
1716 +            template: '["server"]'
1717 +            params:
1718 +              server: {get_param: NtpServer}
1719 +        opendaylight_port: {get_param: OpenDaylightPort}
1720 +        opendaylight_enable_l3: {get_param: OpenDaylightEnableL3}
1721 +        opendaylight_username: {get_param: OpenDaylightUsername}
1722 +        opendaylight_password: {get_param: OpenDaylightPassword}
1723 +
1724 +  OpenDaylightConfig:
1725 +    type: OS::Heat::StructuredConfig
1726 +    properties:
1727 +      group: os-apply-config
1728 +      config:
1729 +        hiera:
1730 +          hierarchy:
1731 +            - '"%{::uuid}"'
1732 +            - heat_config_%{::deploy_config_name}
1733 +            - extraconfig
1734 +            - bootstrap_node # provided by BootstrapNodeConfig
1735 +            - all_nodes # provided by allNodesConfig
1736 +            - vip_data # provided by vip-config
1737 +            - RedHat # Workaround for https://bugzilla.redhat.com/show_bug.cgi?id=1236143
1738 +            - common
1739 +          datafiles:
1740 +            common:
1741 +              raw_data: {get_file: hieradata/common.yaml}
1742 +              mapped_data:
1743 +                ntp::servers: {get_input: ntp_servers}
1744 +                opendaylight::admin_username: {get_param: OpenDaylightUsername}
1745 +                opendaylight::admin_password: {get_param: OpenDaylightPassword}
1746 +                opendaylight_port: {get_input: opendaylight_port}
1747 +                opendaylight_enable_l3: {get_input: opendaylight_enable_l3}
1748 +            ceph:
1749 +              raw_data: {get_file: hieradata/ceph.yaml}
1750 +
1751 +  UpdateConfig:
1752 +    type: OS::TripleO::Tasks::PackageUpdate
1753 +
1754 +  UpdateDeployment:
1755 +    type: OS::Heat::SoftwareDeployment
1756 +    properties:
1757 +      config: {get_resource: UpdateConfig}
1758 +      server: {get_resource: OpenDaylightNode}
1759 +      input_values:
1760 +        update_identifier:
1761 +          get_param: UpdateIdentifier
1762 +
1763 +  OpenDaylightHostsConfig:
1764 +    type: OS::Heat::SoftwareConfig
1765 +    properties:
1766 +      group: script
1767 +      config: |
1768 +        #!/usr/bin/env bash
1769 +        echo -e "$(facter ipaddress)\t\t$(hostname -f)\t$(hostname -s)" >> /etc/hosts
1770 +
1771 +  OpenDaylightHostsDeployment:
1772 +    type: OS::Heat::StructuredDeployment
1773 +    depends_on: OpenDaylightDeployment
1774 +    properties:
1775 +      server: {get_resource: OpenDaylightNode}
1776 +      config: {get_resource: OpenDaylightHostsConfig}
1777 +
1778 +  OpenDaylightPuppetConfig:
1779 +    type: OS::Heat::SoftwareConfig
1780 +    properties:
1781 +      group: puppet
1782 +      config:
1783 +        get_file: manifests/overcloud_opendaylight.pp
1784 +
1785 +  OpenDaylightPuppetDeployment:
1786 +    depends_on: OpenDaylightHostsDeployment
1787 +    type: OS::Heat::StructuredDeployment
1788 +    properties:
1789 +      server: {get_resource: OpenDaylightNode}
1790 +      config: {get_resource: OpenDaylightPuppetConfig}
1791 +      input_values:
1792 +        update_identifier: {get_param: UpdateIdentifier}
1793 +
1794 +outputs:
1795 +  ip_address:
1796 +    description: IP address of the server in the ctlplane network
1797 +    value: {get_attr: [OpenDaylightNode, networks, ctlplane, 0]}
1798 +  opendaylight_controller_ip:
1799 +    description: IP address of the server on the internal network
1800 +    value: {get_attr: [InternalApiPort, ip_address]}
1801 +  config_identifier:
1802 +    description: identifier which changes if the node configuration may need re-applying
1803 +    value:
1804 +      list_join:
1805 +      - ','
1806 +      - - {get_attr: [OpenDaylightDeployment, deploy_stdout]}
1807 +        - {get_param: UpdateIdentifier}
1808 -- 
1809 2.5.4 (Apple Git-61)
1810