Merge "Makefile & build.sh updates for RPM Building"
[apex.git] / build / opnfv-tripleo-heat-templates.patch
index ac06ae3..648dba3 100644 (file)
@@ -1,4 +1,4 @@
-From 3bdd51fc8aa137e65422d6b1f5b0ddc4391b3201 Mon Sep 17 00:00:00 2001
+From ca87d09638f46ba49a866832030970bf43ade74e Mon Sep 17 00:00:00 2001
 From: Tim Rozet <tdrozet@gmail.com>
 Date: Tue, 12 Jan 2016 16:49:57 -0500
 Subject: [PATCH] Adds current opnfv patch with ODL and ONOS support
@@ -6,26 +6,31 @@ Subject: [PATCH] Adds current opnfv patch with ODL and ONOS support
 ---
  environments/onos.yaml                             |   8 +
  environments/opendaylight-external.yaml            |  25 ++
- environments/opendaylight.yaml                     |  25 ++
+ environments/opendaylight.yaml                     |  26 ++
  environments/opendaylight_l3.yaml                  |   9 +
+ environments/opendaylight_sdnvpn.yaml              |  29 ++
+ environments/opendaylight_sfc.yaml                 |  28 ++
  network/endpoints/endpoint_map.yaml                |  31 ++
  overcloud-resource-registry-puppet.yaml            |   3 +
- overcloud-without-mergepy.yaml                     |  87 +++++
- puppet/all-nodes-config.yaml                       |  16 +
- puppet/compute.yaml                                |  35 ++
- puppet/controller.yaml                             |  84 +++++
+ overcloud-without-mergepy.yaml                     | 103 +++++
+ puppet/all-nodes-config.yaml                       |  27 ++
+ puppet/compute.yaml                                |  41 ++
+ puppet/controller.yaml                             | 104 ++++-
  puppet/hieradata/common.yaml                       |   1 +
- puppet/hieradata/controller.yaml                   |   3 +
- puppet/manifests/overcloud_compute.pp              |  33 +-
- puppet/manifests/overcloud_controller.pp           | 104 +++++-
- puppet/manifests/overcloud_controller_pacemaker.pp | 385 +++++++++++++++------
+ puppet/hieradata/controller.yaml                   |   5 +-
+ puppet/manifests/overcloud_compute.pp              |  49 ++-
+ puppet/manifests/overcloud_controller.pp           | 128 +++++-
+ puppet/manifests/overcloud_controller_pacemaker.pp | 482 ++++++++++++++-------
  puppet/manifests/overcloud_opendaylight.pp         |  27 ++
- puppet/opendaylight-puppet.yaml                    | 217 ++++++++++++
- 17 files changed, 968 insertions(+), 125 deletions(-)
+ puppet/opendaylight-puppet.yaml                    | 223 ++++++++++
+ puppet/vip-config.yaml                             |   1 +
+ 20 files changed, 1188 insertions(+), 162 deletions(-)
  create mode 100644 environments/onos.yaml
  create mode 100644 environments/opendaylight-external.yaml
  create mode 100644 environments/opendaylight.yaml
  create mode 100644 environments/opendaylight_l3.yaml
+ create mode 100644 environments/opendaylight_sdnvpn.yaml
+ create mode 100644 environments/opendaylight_sfc.yaml
  create mode 100644 puppet/manifests/overcloud_opendaylight.pp
  create mode 100644 puppet/opendaylight-puppet.yaml
 
@@ -76,10 +81,10 @@ index 0000000..411df21
 +      #opendaylight_install: true
 diff --git a/environments/opendaylight.yaml b/environments/opendaylight.yaml
 new file mode 100644
-index 0000000..c8abf75
+index 0000000..cfa4ad3
 --- /dev/null
 +++ b/environments/opendaylight.yaml
-@@ -0,0 +1,25 @@
+@@ -0,0 +1,26 @@
 +# Environment file used to enable OpenDaylight
 +# Currently uses overcloud image that is assumed
 +# to be virt-customized with ODL RPM already on it
@@ -98,6 +103,7 @@ index 0000000..c8abf75
 +    # increase this if you need more ODL nodes
 +    # OpenDaylightCount: 1
 +    NeutronL3HA: false
++    OpenDaylightEnableHA: true
 +    ExtraConfig:
 +      neutron_mechanism_drivers: ['opendaylight']
 +      neutron_tenant_network_type: vxlan
@@ -107,7 +113,7 @@ index 0000000..c8abf75
 +      opendaylight_install: true
 diff --git a/environments/opendaylight_l3.yaml b/environments/opendaylight_l3.yaml
 new file mode 100644
-index 0000000..ffdb017
+index 0000000..05c0aff
 --- /dev/null
 +++ b/environments/opendaylight_l3.yaml
 @@ -0,0 +1,9 @@
@@ -120,6 +126,75 @@ index 0000000..ffdb017
 +      neutron_mechanism_drivers: ['opendaylight']
 +      neutron_tenant_network_type: vxlan
 +      opendaylight_install: true
+diff --git a/environments/opendaylight_sdnvpn.yaml b/environments/opendaylight_sdnvpn.yaml
+new file mode 100644
+index 0000000..3a14975
+--- /dev/null
++++ b/environments/opendaylight_sdnvpn.yaml
+@@ -0,0 +1,29 @@
++# Environment file used to enable OpenDaylight
++# Currently uses overcloud image that is assumed
++# to be virt-customized with ODL RPM already on it
++
++# These parameters customize the OpenDaylight Node
++# The user name and password are for the ODL service
++# Defaults are included here for reference
++#parameter_defaults:
++#  OpenDaylightFlavor: baremetal
++#  OpenDaylightHostname: opendaylight-server
++#  OpenDaylightImage: overcloud-full
++#  OpenDaylightUsername: admin
++#  OpenDaylightPassword: admin
++
++parameters:
++    # increase this if you need more ODL nodes
++    # OpenDaylightCount: 1
++    ControllerEnableSwiftStorage: false
++    OpenDaylightFeatures: "odl-ovsdb-openstack,odl-vpnservice-api,odl-vpnservice-impl,odl-vpnservice-impl-rest,odl-vpnservice-impl-ui,odl-vpnservice-core"
++    NeutronL3HA: false
++    NeutronServicePlugins: "router,qos,networking_bgpvpn.neutron.services.plugin.BGPVPNPlugin"
++    ExtraConfig:
++      tripleo::ringbuilder::build_ring: False
++      neutron_mechanism_drivers: ['opendaylight']
++      neutron_tenant_network_type: vxlan
++      # Enable this if you want OpenDaylight on the contollers
++      # reduce OpenDaylightCount to 0 if you don't want any
++      # OpenDaylight only nodes
++      opendaylight_install: true
+diff --git a/environments/opendaylight_sfc.yaml b/environments/opendaylight_sfc.yaml
+new file mode 100644
+index 0000000..3dd1e13
+--- /dev/null
++++ b/environments/opendaylight_sfc.yaml
+@@ -0,0 +1,28 @@
++# Environment file used to enable OpenDaylight
++# Currently uses overcloud image that is assumed
++# to be virt-customized with ODL RPM already on it
++
++# These parameters customize the OpenDaylight Node
++# The user name and password are for the ODL service
++# Defaults are included here for reference
++#parameter_defaults:
++#  OpenDaylightFlavor: baremetal
++#  OpenDaylightHostname: opendaylight-server
++#  OpenDaylightImage: overcloud-full
++#  OpenDaylightUsername: admin
++#  OpenDaylightPassword: admin
++
++parameters:
++    # increase this if you need more ODL nodes
++    # OpenDaylightCount: 1
++    ControllerEnableSwiftStorage: false
++    OpenDaylightFeatures: "odl-ovsdb-sfc-rest"
++    NeutronL3HA: false
++    ExtraConfig:
++      tripleo::ringbuilder::build_ring: False
++      neutron_mechanism_drivers: ['opendaylight']
++      neutron_tenant_network_type: vxlan
++      # Enable this if you want OpenDaylight on the contollers
++      # reduce OpenDaylightCount to 0 if you don't want any
++      # OpenDaylight only nodes
++      opendaylight_install: true
 diff --git a/network/endpoints/endpoint_map.yaml b/network/endpoints/endpoint_map.yaml
 index 0521401..7caa91b 100644
 --- a/network/endpoints/endpoint_map.yaml
@@ -198,7 +273,7 @@ index 4cfed6b..adecc79 100644
    # NodeUserData == Cloud-init additional user-data, e.g cloud-config
    # ControllerExtraConfigPre == Controller configuration pre service deployment
 diff --git a/overcloud-without-mergepy.yaml b/overcloud-without-mergepy.yaml
-index a532c2f..5206004 100644
+index a532c2f..9c6e3cd 100644
 --- a/overcloud-without-mergepy.yaml
 +++ b/overcloud-without-mergepy.yaml
 @@ -15,6 +15,11 @@ parameters:
@@ -224,7 +299,7 @@ index a532c2f..5206004 100644
    NeutronEnableTunnelling:
      type: string
      default: "True"
-@@ -227,6 +236,27 @@ parameters:
+@@ -227,6 +236,35 @@ parameters:
      default: false
      description: Should MongoDb journaling be disabled
      type: boolean
@@ -236,6 +311,14 @@ index a532c2f..5206004 100644
 +    description: Knob to enable/disable ODL L3
 +    type: string
 +    default: 'no'
++  OpenDaylightEnableHA:
++    description: Knob to enable/disable ODL HA
++    type: boolean
++    default: false
++  OpenDaylightFeatures:
++    description: List of features to install with ODL
++    type: comma_delimited_list
++    default: "odl-ovsdb-openstack"
 +  OpenDaylightInstall:
 +    default: false
 +    description: Whether to install OpenDaylight on the control nodes.
@@ -252,15 +335,16 @@ index a532c2f..5206004 100644
    PublicVirtualFixedIPs:
      default: []
      description: >
-@@ -575,6 +605,7 @@ parameters:
+@@ -575,6 +613,8 @@ parameters:
      default:
        NeutronTenantNetwork: tenant
        CeilometerApiNetwork: internal_api
 +      AodhApiNetwork: internal_api
++      OpenDaylightApiNetwork: internal_api
        MongoDbNetwork: internal_api
        CinderApiNetwork: internal_api
        CinderIscsiNetwork: storage
-@@ -664,6 +695,18 @@ parameters:
+@@ -664,6 +704,18 @@ parameters:
        structure as ExtraConfig.
      type: json
  
@@ -279,7 +363,7 @@ index a532c2f..5206004 100644
    # Hostname format for each role
    # Note %index% is translated into the index of the node, e.g 0/1/2 etc
    # and %stackname% is replaced with OS::stack_name in the template below.
-@@ -688,6 +731,10 @@ parameters:
+@@ -688,6 +740,10 @@ parameters:
      type: string
      description: Format for CephStorage node hostnames
      default: '%stackname%-cephstorage-%index%'
@@ -290,7 +374,7 @@ index a532c2f..5206004 100644
  
    # Identifiers to trigger tasks on nodes
    UpdateIdentifier:
-@@ -758,6 +805,7 @@ resources:
+@@ -758,6 +814,7 @@ resources:
      properties:
        CloudName: {get_param: CloudName}
        CeilometerApiVirtualIP: {get_attr: [VipMap, net_ip_map, {get_param: [ServiceNetMap, CeilometerApiNetwork]}]}
@@ -298,7 +382,7 @@ index a532c2f..5206004 100644
        CinderApiVirtualIP: {get_attr: [VipMap, net_ip_map, {get_param: [ServiceNetMap, CinderApiNetwork]}]}
        GlanceApiVirtualIP: {get_attr: [VipMap, net_ip_map, {get_param: [ServiceNetMap, GlanceApiNetwork]}]}
        GlanceRegistryVirtualIP: {get_attr: [VipMap, net_ip_map, {get_param: [ServiceNetMap, GlanceRegistryNetwork]}]}
-@@ -770,6 +818,28 @@ resources:
+@@ -770,6 +827,29 @@ resources:
        SwiftProxyVirtualIP: {get_attr: [VipMap, net_ip_map, {get_param: [ServiceNetMap, SwiftProxyNetwork]}]}
        PublicVirtualIP: {get_attr: [VipMap, net_ip_map, external]}
  
@@ -316,6 +400,7 @@ index a532c2f..5206004 100644
 +          OpenDaylightImage: {get_param: OpenDaylightImage}
 +          OpenDaylightPort: {get_param: OpenDaylightPort}
 +          OpenDaylightUsername: {get_param: OpenDaylightUsername}
++          OpenDaylightFeatures: {get_param: OpenDaylightFeatures}
 +          OpenDaylightPassword: {get_param: OpenDaylightPassword}
 +          OpenDaylightEnableL3: {get_param: OpenDaylightEnableL3}
 +          OpenDaylightHostname:
@@ -327,7 +412,7 @@ index a532c2f..5206004 100644
    Controller:
      type: OS::Heat::ResourceGroup
      depends_on: Networks
-@@ -781,6 +851,7 @@ resources:
+@@ -781,6 +861,7 @@ resources:
          properties:
            AdminPassword: {get_param: AdminPassword}
            AdminToken: {get_param: AdminToken}
@@ -335,7 +420,7 @@ index a532c2f..5206004 100644
            CeilometerBackend: {get_param: CeilometerBackend}
            CeilometerMeteringSecret: {get_param: CeilometerMeteringSecret}
            CeilometerPassword: {get_param: CeilometerPassword}
-@@ -832,6 +903,7 @@ resources:
+@@ -832,6 +913,7 @@ resources:
            NeutronBridgeMappings: {get_param: NeutronBridgeMappings}
            NeutronExternalNetworkBridge: {get_param: NeutronExternalNetworkBridge}
            NeutronEnableTunnelling: {get_param: NeutronEnableTunnelling}
@@ -343,37 +428,41 @@ index a532c2f..5206004 100644
            NeutronNetworkVLANRanges: {get_param: NeutronNetworkVLANRanges}
            NeutronPublicInterface: {get_param: NeutronPublicInterface}
            NeutronPublicInterfaceDefaultRoute: {get_param: NeutronPublicInterfaceDefaultRoute}
-@@ -853,6 +925,11 @@ resources:
+@@ -853,6 +935,13 @@ resources:
            NovaPassword: {get_param: NovaPassword}
            NtpServer: {get_param: NtpServer}
            MongoDbNoJournal: {get_param: MongoDbNoJournal}
 +          OpenDaylightPort: {get_param: OpenDaylightPort}
 +          OpenDaylightInstall: {get_param: OpenDaylightInstall}
 +          OpenDaylightUsername: {get_param: OpenDaylightUsername}
++          OpenDaylightFeatures: {get_param: OpenDaylightFeatures}
 +          OpenDaylightPassword: {get_param: OpenDaylightPassword}
 +          OpenDaylightEnableL3: {get_param: OpenDaylightEnableL3}
++          OpenDaylightEnableHA: {get_param: OpenDaylightEnableHA}
            PcsdPassword: {get_resource: PcsdPassword}
            PublicVirtualInterface: {get_param: PublicVirtualInterface}
            RabbitPassword: {get_param: RabbitPassword}
-@@ -878,6 +955,7 @@ resources:
+@@ -878,6 +967,8 @@ resources:
            ServiceNetMap: {get_param: ServiceNetMap}
            EndpointMap: {get_attr: [EndpointMap, endpoint_map]}
            CeilometerApiVirtualIP: {get_attr: [VipMap, net_ip_map, {get_param: [ServiceNetMap, CeilometerApiNetwork]}]}
 +          AodhApiVirtualIP: {get_attr: [VipMap, net_ip_map, {get_param: [ServiceNetMap, AodhApiNetwork]}]}
++          OpenDaylightApiVirtualIP: {get_attr: [VipMap, net_ip_map, {get_param: [ServiceNetMap, OpenDaylightApiNetwork]}]}
            CinderApiVirtualIP: {get_attr: [VipMap, net_ip_map, {get_param: [ServiceNetMap, CinderApiNetwork]}]}
            HeatApiVirtualIP: {get_attr: [VipMap, net_ip_map, {get_param: [ServiceNetMap, HeatApiNetwork]}]}
            GlanceApiVirtualIP: {get_attr: [VipMap, net_ip_map, {get_param: [ServiceNetMap, GlanceApiNetwork]}]}
-@@ -948,6 +1026,9 @@ resources:
+@@ -948,6 +1039,10 @@ resources:
            NovaPublicIP: {get_attr: [PublicVirtualIP, ip_address]}
            NovaPassword: {get_param: NovaPassword}
            NtpServer: {get_param: NtpServer}
 +          OpenDaylightPort: {get_param: OpenDaylightPort}
 +          OpenDaylightUsername: {get_param: OpenDaylightUsername}
 +          OpenDaylightPassword: {get_param: OpenDaylightPassword}
++          OpenDaylightEnableHA: {get_param: OpenDaylightEnableHA}
            RabbitHost: {get_attr: [VipMap, net_ip_map, {get_param: [ServiceNetMap, RabbitMqNetwork]}]}
            RabbitPassword: {get_param: RabbitPassword}
            RabbitUserName: {get_param: RabbitUserName}
-@@ -1068,6 +1149,7 @@ resources:
+@@ -1068,6 +1163,7 @@ resources:
        compute_hosts: {get_attr: [Compute, hosts_entry]}
        controller_hosts: {get_attr: [Controller, hosts_entry]}
        controller_ips: {get_attr: [Controller, ip_address]}
@@ -381,23 +470,25 @@ index a532c2f..5206004 100644
        block_storage_hosts: {get_attr: [BlockStorage, hosts_entry]}
        object_storage_hosts: {get_attr: [ObjectStorage, hosts_entry]}
        ceph_storage_hosts: {get_attr: [CephStorage, hosts_entry]}
-@@ -1081,6 +1163,7 @@ resources:
+@@ -1081,6 +1177,8 @@ resources:
        heat_api_node_ips: {get_attr: [ControllerIpListMap, net_ip_map, {get_param: [ServiceNetMap, HeatApiNetwork]}]}
        swift_proxy_node_ips: {get_attr: [ControllerIpListMap, net_ip_map, {get_param: [ServiceNetMap, SwiftProxyNetwork]}]}
        ceilometer_api_node_ips: {get_attr: [ControllerIpListMap, net_ip_map, {get_param: [ServiceNetMap, CeilometerApiNetwork]}]}
 +      aodh_api_node_ips: {get_attr: [ControllerIpListMap, net_ip_map, {get_param: [ServiceNetMap, AodhApiNetwork]}]}
++      opendaylight_api_node_ips: {get_attr: [ControllerIpListMap, net_ip_map, {get_param: [ServiceNetMap, OpenDaylightApiNetwork]}]}
        nova_api_node_ips: {get_attr: [ControllerIpListMap, net_ip_map, {get_param: [ServiceNetMap, NovaApiNetwork]}]}
        nova_metadata_node_ips: {get_attr: [ControllerIpListMap, net_ip_map, {get_param: [ServiceNetMap, NovaMetadataNetwork]}]}
        glance_api_node_ips: {get_attr: [ControllerIpListMap, net_ip_map, {get_param: [ServiceNetMap, GlanceApiNetwork]}]}
-@@ -1189,6 +1272,7 @@ resources:
+@@ -1189,6 +1287,8 @@ resources:
          nova_api_vip: {get_attr: [VipMap, net_ip_map, {get_param: [ServiceNetMap, NovaApiNetwork]}]}
          nova_metadata_vip: {get_attr: [VipMap, net_ip_map, {get_param: [ServiceNetMap, NovaMetadataNetwork]}]}
          ceilometer_api_vip: {get_attr: [VipMap, net_ip_map, {get_param: [ServiceNetMap, CeilometerApiNetwork]}]}
 +        aodh_api_vip: {get_attr: [VipMap, net_ip_map, {get_param: [ServiceNetMap, AodhApiNetwork]}]}
++        opendaylight_api_vip: {get_attr: [VipMap, net_ip_map, {get_param: [ServiceNetMap, OpenDaylightApiNetwork]}]}
          heat_api_vip: {get_attr: [VipMap, net_ip_map, {get_param: [ServiceNetMap, HeatApiNetwork]}]}
          horizon_vip: {get_attr: [VipMap, net_ip_map, {get_param: [ServiceNetMap, HorizonNetwork]}]}
          redis_vip: {get_attr: [RedisVirtualIP, ip_address]}
-@@ -1434,6 +1518,9 @@ outputs:
+@@ -1434,6 +1534,9 @@ outputs:
    PublicVip:
      description: Controller VIP for public API endpoints
      value: {get_attr: [PublicVirtualIP, ip_address]}
@@ -408,7 +499,7 @@ index a532c2f..5206004 100644
      description: VIP for Ceilometer API internal endpoint
      value: {get_attr: [VipMap, net_ip_map, {get_param: [ServiceNetMap, CeilometerApiNetwork]}]}
 diff --git a/puppet/all-nodes-config.yaml b/puppet/all-nodes-config.yaml
-index 2bc519b..6342df3 100644
+index 2bc519b..1ebaff5 100644
 --- a/puppet/all-nodes-config.yaml
 +++ b/puppet/all-nodes-config.yaml
 @@ -8,6 +8,8 @@ parameters:
@@ -420,16 +511,18 @@ index 2bc519b..6342df3 100644
    block_storage_hosts:
      type: comma_delimited_list
    object_storage_hosts:
-@@ -34,6 +36,8 @@ parameters:
+@@ -34,6 +36,10 @@ parameters:
      type: comma_delimited_list
    ceilometer_api_node_ips:
      type: comma_delimited_list
 +  aodh_api_node_ips:
++    type: comma_delimited_list
++  opendaylight_api_node_ips:
 +    type: comma_delimited_list
    nova_api_node_ips:
      type: comma_delimited_list
    nova_metadata_node_ips:
-@@ -82,6 +86,10 @@ resources:
+@@ -82,6 +88,10 @@ resources:
                raw_data: {get_file: hieradata/RedHat.yaml}
              all_nodes:
                mapped_data:
@@ -440,7 +533,7 @@ index 2bc519b..6342df3 100644
                  controller_node_ips:
                    list_join:
                    - ','
-@@ -166,6 +174,14 @@ resources:
+@@ -166,6 +176,22 @@ resources:
                          list_join:
                          - "','"
                          - {get_param: ceilometer_api_node_ips}
@@ -452,14 +545,30 @@ index 2bc519b..6342df3 100644
 +                        list_join:
 +                        - "','"
 +                        - {get_param: aodh_api_node_ips}
++                opendaylight_api_node_ips:
++                  str_replace:
++                    template: "['SERVERS_LIST']"
++                    params:
++                      SERVERS_LIST:
++                        list_join:
++                        - "','"
++                        - {get_param: opendaylight_api_node_ips}
                  nova_api_node_ips:
                    str_replace:
                      template: "['SERVERS_LIST']"
+@@ -239,6 +265,7 @@ resources:
+                 neutron::rabbit_hosts: *rabbit_nodes_array
+                 nova::rabbit_hosts: *rabbit_nodes_array
+                 keystone::rabbit_hosts: *rabbit_nodes_array
++                aodh::rabbit_hosts: *rabbit_nodes_array
+ outputs:
+   config_id:
 diff --git a/puppet/compute.yaml b/puppet/compute.yaml
-index 70c7403..13fd4f6 100644
+index 70c7403..ba7cbfd 100644
 --- a/puppet/compute.yaml
 +++ b/puppet/compute.yaml
-@@ -213,6 +213,23 @@ parameters:
+@@ -213,6 +213,27 @@ parameters:
    NtpServer:
      type: string
      default: ''
@@ -476,6 +585,10 @@ index 70c7403..13fd4f6 100644
 +    type: string
 +    description: The password for the opendaylight server.
 +    hidden: true
++  OpenDaylightEnableHA:
++    description: Knob to enable/disable ODL HA
++    type: boolean
++    default: false
 +  ONOSPort:
 +    default: 8181
 +    description: Set onos service port
@@ -483,7 +596,7 @@ index 70c7403..13fd4f6 100644
    RabbitHost:
      type: string
      default: ''  # Has to be here because of the ignored empty value bug
-@@ -320,6 +337,11 @@ resources:
+@@ -320,6 +341,11 @@ resources:
      properties:
        ControlPlaneIP: {get_attr: [NovaCompute, networks, ctlplane, 0]}
  
@@ -495,7 +608,7 @@ index 70c7403..13fd4f6 100644
    NetIpMap:
      type: OS::TripleO::Network::Ports::NetIpMap
      properties:
-@@ -327,6 +349,7 @@ resources:
+@@ -327,6 +353,7 @@ resources:
        InternalApiIp: {get_attr: [InternalApiPort, ip_address]}
        StorageIp: {get_attr: [StoragePort, ip_address]}
        TenantIp: {get_attr: [TenantPort, ip_address]}
@@ -503,7 +616,7 @@ index 70c7403..13fd4f6 100644
  
    NetworkConfig:
      type: OS::TripleO::Compute::Net::SoftwareConfig
-@@ -335,6 +358,7 @@ resources:
+@@ -335,6 +362,7 @@ resources:
        InternalApiIpSubnet: {get_attr: [InternalApiPort, ip_subnet]}
        StorageIpSubnet: {get_attr: [StoragePort, ip_subnet]}
        TenantIpSubnet: {get_attr: [TenantPort, ip_subnet]}
@@ -511,29 +624,31 @@ index 70c7403..13fd4f6 100644
  
    NetworkDeployment:
      type: OS::TripleO::SoftwareDeployment
-@@ -406,6 +430,10 @@ resources:
+@@ -406,6 +434,11 @@ resources:
                  neutron::rabbit_user: {get_input: rabbit_user}
                  neutron::rabbit_use_ssl: {get_input: rabbit_client_use_ssl}
                  neutron::rabbit_port: {get_input: rabbit_client_port}
 +                opendaylight_port: {get_input: opendaylight_port}
 +                opendaylight_username: {get_input: opendaylight_username}
 +                opendaylight_password: {get_input: opendaylight_password}
++                opendaylight_enable_ha: {get_input: opendaylight_enable_ha}
 +                onos_port: {get_input: onos_port}
                  neutron_flat_networks: {get_input: neutron_flat_networks}
                  neutron_host: {get_input: neutron_host}
                  neutron::agents::ml2::ovs::local_ip: {get_input: neutron_local_ip}
-@@ -459,6 +487,10 @@ resources:
+@@ -459,6 +492,11 @@ resources:
          snmpd_readonly_user_name: {get_param: SnmpdReadonlyUserName}
          snmpd_readonly_user_password: {get_param: SnmpdReadonlyUserPassword}
          glance_api_servers: {get_param: [EndpointMap, GlanceInternal, uri]}
 +        opendaylight_port: {get_param: OpenDaylightPort}
 +        opendaylight_username: {get_param: OpenDaylightUsername}
 +        opendaylight_password: {get_param: OpenDaylightPassword}
++        opendaylight_enable_ha: {get_param: OpenDaylightEnableHA}
 +        onos_port: {get_param: ONOSPort}
          neutron_flat_networks: {get_param: NeutronFlatNetworks}
          neutron_host: {get_param: NeutronHost}
          neutron_local_ip: {get_attr: [NetIpMap, net_ip_map, {get_param: [ServiceNetMap, NeutronTenantNetwork]}]}
-@@ -570,6 +602,9 @@ outputs:
+@@ -570,6 +608,9 @@ outputs:
    tenant_ip_address:
      description: IP address of the server in the tenant network
      value: {get_attr: [TenantPort, ip_address]}
@@ -544,7 +659,7 @@ index 70c7403..13fd4f6 100644
      description: Hostname of the server
      value: {get_attr: [NovaCompute, name]}
 diff --git a/puppet/controller.yaml b/puppet/controller.yaml
-index ea0b3af..489aa57 100644
+index ea0b3af..0a3668e 100644
 --- a/puppet/controller.yaml
 +++ b/puppet/controller.yaml
 @@ -14,6 +14,14 @@ parameters:
@@ -573,7 +688,7 @@ index ea0b3af..489aa57 100644
    NeutronEnableTunnelling:
      type: string
      default: "True"
-@@ -443,6 +455,31 @@ parameters:
+@@ -443,6 +455,42 @@ parameters:
    NtpServer:
      type: string
      default: ''
@@ -598,6 +713,17 @@ index ea0b3af..489aa57 100644
 +    description: Knob to enable/disable ODL L3
 +    type: string
 +    default: 'no'
++  OpenDaylightEnableHA:
++    description: Knob to enable/disable ODL HA
++    type: boolean
++    default: false
++  OpenDaylightFeatures:
++    description: List of features to install with ODL
++    type: comma_delimited_list
++    default: "odl-ovsdb-openstack"
++  OpenDaylightApiVirtualIP:
++    type: string
++    default: ''
 +  ONOSPort:
 +    default: 8181
 +    description: Set onos service port
@@ -605,7 +731,7 @@ index ea0b3af..489aa57 100644
    PcsdPassword:
      type: string
      description: The password for the 'pcsd' user.
-@@ -696,6 +733,7 @@ resources:
+@@ -696,6 +744,7 @@ resources:
        input_values:
          bootstack_nodeid: {get_attr: [Controller, name]}
          neutron_enable_tunneling: {get_param: NeutronEnableTunnelling}
@@ -613,7 +739,15 @@ index ea0b3af..489aa57 100644
          haproxy_log_address: {get_param: HAProxySyslogAddress}
          heat.watch_server_url:
            list_join:
-@@ -805,6 +843,12 @@ resources:
+@@ -774,6 +823,7 @@ resources:
+               - {get_param: MysqlVirtualIP}
+               - '/heat'
+         keystone_ca_certificate: {get_param: KeystoneCACertificate}
++        keystone_admin_vip: {get_param: KeystoneAdminApiVirtualIP}
+         keystone_signing_key: {get_param: KeystoneSigningKey}
+         keystone_signing_certificate: {get_param: KeystoneSigningCertificate}
+         keystone_ssl_certificate: {get_param: KeystoneSSLCertificate}
+@@ -805,6 +855,14 @@ resources:
              template: tripleo-CLUSTER
              params:
                CLUSTER: {get_param: MysqlClusterUniquePart}
@@ -622,11 +756,13 @@ index ea0b3af..489aa57 100644
 +        opendaylight_username: {get_param: OpenDaylightUsername}
 +        opendaylight_password: {get_param: OpenDaylightPassword}
 +        opendaylight_enable_l3: {get_param: OpenDaylightEnableL3}
++        opendaylight_enable_ha: {get_param: OpenDaylightEnableHA}
++        opendaylight_features: {get_param: OpenDaylightFeatures}
 +        onos_port: {get_param: ONOSPort}
          neutron_flat_networks: {get_param: NeutronFlatNetworks}
          neutron_metadata_proxy_shared_secret: {get_param: NeutronMetadataProxySharedSecret}
          neutron_agent_mode: {get_param: NeutronAgentMode}
-@@ -879,6 +923,7 @@ resources:
+@@ -879,6 +937,7 @@ resources:
          ceilometer_backend: {get_param: CeilometerBackend}
          ceilometer_metering_secret: {get_param: CeilometerMeteringSecret}
          ceilometer_password: {get_param: CeilometerPassword}
@@ -634,7 +770,7 @@ index ea0b3af..489aa57 100644
          ceilometer_coordination_url:
            list_join:
              - ''
-@@ -891,6 +936,12 @@ resources:
+@@ -891,6 +950,12 @@ resources:
              - - 'mysql://ceilometer:unset@'
                - {get_param: MysqlVirtualIP}
                - '/ceilometer'
@@ -647,15 +783,25 @@ index ea0b3af..489aa57 100644
          snmpd_readonly_user_name: {get_param: SnmpdReadonlyUserName}
          snmpd_readonly_user_password: {get_param: SnmpdReadonlyUserPassword}
          nova_password: {get_param: NovaPassword}
-@@ -948,6 +999,7 @@ resources:
+@@ -948,6 +1013,8 @@ resources:
          neutron_api_network: {get_attr: [NetIpMap, net_ip_map, {get_param: [ServiceNetMap, NeutronApiNetwork]}]}
          neutron_local_ip: {get_attr: [NetIpMap, net_ip_map, {get_param: [ServiceNetMap, NeutronTenantNetwork]}]}
          ceilometer_api_network: {get_attr: [NetIpMap, net_ip_map, {get_param: [ServiceNetMap, CeilometerApiNetwork]}]}
 +        aodh_api_network: {get_attr: [NetIpMap, net_ip_map, {get_param: [ServiceNetMap, AodhApiNetwork]}]}
++        opendaylight_api_network: {get_attr: [NetIpMap, net_ip_map, {get_param: [ServiceNetMap, OpenDaylightApiNetwork]}]}
          nova_api_network: {get_attr: [NetIpMap, net_ip_map, {get_param: [ServiceNetMap, NovaApiNetwork]}]}
          nova_metadata_network: {get_attr: [NetIpMap, net_ip_map, {get_param: [ServiceNetMap, NovaMetadataNetwork]}]}
          horizon_network: {get_attr: [NetIpMap, net_ip_map, {get_param: [ServiceNetMap, HorizonNetwork]}]}
-@@ -1136,6 +1188,16 @@ resources:
+@@ -1041,7 +1108,7 @@ resources:
+                 cinder_iscsi_ip_address: {get_input: cinder_iscsi_network}
+                 cinder::database_connection: {get_input: cinder_dsn}
+                 cinder::api::keystone_password: {get_input: cinder_password}
+-                cinder::api::auth_uri: {get_input: keystone_auth_uri}
++                cinder::api::keystone_auth_host: {get_input: keystone_admin_vip}
+                 cinder::api::identity_uri: {get_input: keystone_identity_uri}
+                 cinder::api::bind_host: {get_input: cinder_api_network}
+                 cinder::rabbit_userid: {get_input: rabbit_username}
+@@ -1136,6 +1203,18 @@ resources:
                  mysql_bind_host: {get_input: mysql_network}
                  mysql_virtual_ip: {get_input: mysql_virtual_ip}
  
@@ -665,6 +811,8 @@ index ea0b3af..489aa57 100644
 +                opendaylight_username: {get_input: opendaylight_username}
 +                opendaylight_password: {get_input: opendaylight_password}
 +                opendaylight_enable_l3: {get_input: opendaylight_enable_l3}
++                opendaylight_enable_ha: {get_input: opendaylight_enable_ha}
++                opendaylight_features: {get_input: opendaylight_features}
 +
 +                # ONOS
 +                onos_port: {get_input: onos_port}
@@ -672,7 +820,7 @@ index ea0b3af..489aa57 100644
                  # Neutron
                  neutron::bind_host: {get_input: neutron_api_network}
                  neutron::rabbit_password: {get_input: rabbit_password}
-@@ -1152,6 +1214,7 @@ resources:
+@@ -1152,6 +1231,7 @@ resources:
                  neutron_flat_networks: {get_input: neutron_flat_networks}
                  neutron::agents::metadata::shared_secret: {get_input: neutron_metadata_proxy_shared_secret}
                  neutron::agents::metadata::metadata_ip: {get_input: neutron_api_network}
@@ -680,7 +828,7 @@ index ea0b3af..489aa57 100644
                  neutron_agent_mode: {get_input: neutron_agent_mode}
                  neutron_router_distributed: {get_input: neutron_router_distributed}
                  neutron::core_plugin: {get_input: neutron_core_plugin}
-@@ -1198,6 +1261,27 @@ resources:
+@@ -1198,6 +1278,27 @@ resources:
                  snmpd_readonly_user_name: {get_input: snmpd_readonly_user_name}
                  snmpd_readonly_user_password: {get_input: snmpd_readonly_user_password}
  
@@ -708,6 +856,14 @@ index ea0b3af..489aa57 100644
                  # Nova
                  nova::rabbit_userid: {get_input: rabbit_username}
                  nova::rabbit_password: {get_input: rabbit_password}
+@@ -1244,6 +1345,7 @@ resources:
+                 tripleo::loadbalancer::haproxy_log_address: {get_input: haproxy_log_address}
+                 tripleo::packages::enable_install: {get_input: enable_package_install}
+                 tripleo::packages::enable_upgrade: {get_input: enable_package_upgrade}
++                tripleo::loadbalancer::opendaylight: {get_input: opendaylight_enable_ha}
+   # Hook for site-specific additional pre-deployment config, e.g extra hieradata
+   ControllerExtraConfigPre:
 diff --git a/puppet/hieradata/common.yaml b/puppet/hieradata/common.yaml
 index 030f661..5840016 100644
 --- a/puppet/hieradata/common.yaml
@@ -721,7 +877,7 @@ index 030f661..5840016 100644
  nova::network::neutron::neutron_admin_tenant_name: 'service'
  nova::network::neutron::neutron_admin_username: 'neutron'
 diff --git a/puppet/hieradata/controller.yaml b/puppet/hieradata/controller.yaml
-index 4b7fd81..4f1fef6 100644
+index 4b7fd81..7dbc2e9 100644
 --- a/puppet/hieradata/controller.yaml
 +++ b/puppet/hieradata/controller.yaml
 @@ -32,6 +32,7 @@ redis::sentinel::notification_script: '/usr/local/bin/redis-notifications.sh'
@@ -740,6 +896,15 @@ index 4b7fd81..4f1fef6 100644
  
  # keystone
  keystone::cron::token_flush::maxdelay: 3600
+@@ -72,7 +74,7 @@ neutron::agents::dhcp::dnsmasq_config_file: /etc/neutron/dnsmasq-neutron.conf
+ # nova
+ nova::notify_on_state_change: 'vm_and_task_state'
+-nova::api::default_floating_pool: 'public'
++nova::api::default_floating_pool: 'external'
+ nova::api::osapi_v3: true
+ nova::scheduler::filter::ram_allocation_ratio: '1.0'
 @@ -115,6 +117,7 @@ tripleo::loadbalancer::mysql: true
  tripleo::loadbalancer::redis: true
  tripleo::loadbalancer::swift_proxy_server: true
@@ -749,10 +914,10 @@ index 4b7fd81..4f1fef6 100644
  tripleo::loadbalancer::heat_cloudwatch: true
  tripleo::loadbalancer::heat_cfn: true
 diff --git a/puppet/manifests/overcloud_compute.pp b/puppet/manifests/overcloud_compute.pp
-index cd41cc7..b8336ee 100644
+index cd41cc7..474d782 100644
 --- a/puppet/manifests/overcloud_compute.pp
 +++ b/puppet/manifests/overcloud_compute.pp
-@@ -75,9 +75,36 @@ class { '::neutron::plugins::ml2':
+@@ -75,9 +75,52 @@ class { '::neutron::plugins::ml2':
    tenant_network_types => [hiera('neutron_tenant_network_type')],
  }
  
@@ -763,19 +928,35 @@ index cd41cc7..b8336ee 100644
 +
 +  if str2bool(hiera('opendaylight_install', 'false')) {
 +    $controller_ips = split(hiera('controller_node_ips'), ',')
-+    $opendaylight_controller_ip = $controller_ips[0]
++    if hiera('opendaylight_enable_ha', false) {
++      $odl_ovsdb_iface = "tcp:${controller_ips[0]}:6640 tcp:${controller_ips[1]}:6640 tcp:${controller_ips[2]}:6640"
++      # Workaround to work with current puppet-neutron
++      # This isn't the best solution, since the odl check URL ends up being only the first node in HA case
++      $opendaylight_controller_ip = $controller_ips[0]
++      # Bug where netvirt:1 doesn't come up right with HA
++      # Check ovsdb:1 instead
++      $net_virt_url = 'restconf/operational/network-topology:network-topology/topology/ovsdb:1'
++    } else {
++      $opendaylight_controller_ip = $controller_ips[0]
++      $odl_ovsdb_iface = "tcp:${opendaylight_controller_ip}:6640"
++      $net_virt_url = 'restconf/operational/network-topology:network-topology/topology/netvirt:1'
++    }
 +  } else {
 +    $opendaylight_controller_ip = hiera('opendaylight_controller_ip')
++    $odl_ovsdb_iface = "tcp:${opendaylight_controller_ip}:6640"
++    $net_virt_url = 'restconf/operational/network-topology:network-topology/topology/netvirt:1'
 +  }
 +
-+  if str2bool(hiera('opendaylight_install', 'false')) {
-+    class { 'neutron::plugins::ovs::opendaylight':
-+      odl_controller_ip => $opendaylight_controller_ip,
-+      tunnel_ip         => hiera('neutron::agents::ml2::ovs::local_ip'),
-+      odl_port          => hiera('opendaylight_port'),
-+      odl_username      => hiera('opendaylight_username'),
-+      odl_password      => hiera('opendaylight_password'),
-+    }
++  $opendaylight_port = hiera('opendaylight_port')
++  $private_ip = hiera('neutron::agents::ml2::ovs::local_ip')
++  $opendaylight_url = "http://${opendaylight_controller_ip}:${opendaylight_port}/${net_virt_url}"
++
++  class { '::neutron::plugins::ovs::opendaylight':
++    tunnel_ip             => $private_ip,
++    odl_username          => hiera('opendaylight_username'),
++    odl_password          => hiera('opendaylight_password'),
++    odl_check_url         => $opendaylight_url,
++    odl_ovsdb_iface       => $odl_ovsdb_iface,
 +  }
 +
 +} elsif 'onos_ml2' in hiera('neutron_mechanism_drivers') {
@@ -793,7 +974,7 @@ index cd41cc7..b8336ee 100644
  
  if 'cisco_n1kv' in hiera('neutron_mechanism_drivers') {
 diff --git a/puppet/manifests/overcloud_controller.pp b/puppet/manifests/overcloud_controller.pp
-index 1f6c2be..474bb1d 100644
+index 1f6c2be..a3c0479 100644
 --- a/puppet/manifests/overcloud_controller.pp
 +++ b/puppet/manifests/overcloud_controller.pp
 @@ -30,6 +30,21 @@ if hiera('step') >= 1 {
@@ -802,7 +983,7 @@ index 1f6c2be..474bb1d 100644
  
 +  if str2bool(hiera('opendaylight_install', 'false')) {
 +    class {"opendaylight":
-+      extra_features => ['odl-ovsdb-openstack'],
++      extra_features => any2array(hiera('opendaylight_features', 'odl-ovsdb-openstack')),
 +      odl_rest_port  => hiera('opendaylight_port'),
 +      enable_l3      => hiera('opendaylight_enable_l3', 'no'),
 +    }
@@ -838,7 +1019,7 @@ index 1f6c2be..474bb1d 100644
    include ::neutron::agents::dhcp
    include ::neutron::agents::metadata
  
-@@ -237,15 +253,77 @@ if hiera('step') >= 3 {
+@@ -237,15 +253,101 @@ if hiera('step') >= 3 {
      require => Package['neutron'],
    }
  
@@ -849,10 +1030,8 @@ index 1f6c2be..474bb1d 100644
 +    }
 +  } else {
 +    include ::neutron
-+    if 'opendaylight' in hiera('neutron_mechanism_drivers') {
-+      if ! str2bool(hiera('opendaylight_enable_l3', 'no')) {
-+        include ::neutron::agents::l3
-+      }
++    if ! ('opendaylight' in hiera('neutron_mechanism_drivers')) or ! str2bool(hiera('opendaylight_enable_l3', 'no')) {
++      include ::neutron::agents::l3
 +    }
 +  }
 +  
@@ -877,21 +1056,47 @@ index 1f6c2be..474bb1d 100644
 +      $opendaylight_controller_ip = hiera('opendaylight_controller_ip')
 +    }
 +
-+    class { 'neutron::plugins::ml2::opendaylight':
-+      odl_controller_ip => $opendaylight_controller_ip,
-+      odl_username      => hiera('opendaylight_username'),
-+      odl_password      => hiera('opendaylight_password'),
-+      odl_port          => hiera('opendaylight_port'),
++    # co-existence hacks for SFC
++    if hiera('opendaylight_features', 'odl-ovsdb-openstack') =~ /odl-ovsdb-sfc-rest/ {
++      $opendaylight_port = hiera('opendaylight_port')
++      $netvirt_coexist_url = "http://${opendaylight_controller_ip}:${opendaylight_port}/restconf/config/netvirt-providers-config:netvirt-providers-config"
++      $netvirt_post_body = "{'netvirt-providers-config': {'table-offset': 1}}"
++      $sfc_coexist_url = "http://${opendaylight_controller_ip}:${opendaylight_port}/restconf/config/sfc-of-renderer:sfc-of-renderer-config"
++      $sfc_post_body = "{ 'sfc-of-renderer-config' : { 'sfc-of-table-offset' : 150, 'sfc-of-app-egress-table-offset' : 11 }}"
++      $odl_username = hiera('opendaylight_username')
++      $odl_password = hiera('opendaylight_password')
++      exec { 'Coexistence table offsets for netvirt':
++        command   => "curl -o /dev/null --fail --silent -u ${odl_username}:${odl_password} ${netvirt_coexist_url} -i -H 'Content-Type: application/json' --data \'${netvirt_post_body}\' -X PUT",
++        tries     => 5,
++        try_sleep => 30,
++        path      => '/usr/sbin:/usr/bin:/sbin:/bin',
++      } ->
++      # Coexist for SFC
++      exec { 'Coexistence table offsets for sfc':
++        command   => "curl -o /dev/null --fail --silent -u ${odl_username}:${odl_password} ${sfc_coexist_url} -i -H 'Content-Type: application/json' --data \'${sfc_post_body}\' -X PUT",
++        tries     => 5,
++        try_sleep => 30,
++        path      => '/usr/sbin:/usr/bin:/sbin:/bin',
++      }
 +    }
 +
-+    if str2bool(hiera('opendaylight_install', 'false')) {
-+      class { 'neutron::plugins::ovs::opendaylight':
-+        odl_controller_ip => $opendaylight_controller_ip,
-+        tunnel_ip         => hiera('neutron::agents::ml2::ovs::local_ip'),
-+        odl_port          => hiera('opendaylight_port'),
-+        odl_username      => hiera('opendaylight_username'),
-+        odl_password      => hiera('opendaylight_password'),
-+      }
++    $private_ip = hiera('neutron::agents::ml2::ovs::local_ip')
++    $net_virt_url = 'restconf/operational/network-topology:network-topology/topology/netvirt:1'
++    $opendaylight_url = "http://${opendaylight_controller_ip}:${opendaylight_port}/${net_virt_url}"
++    $odl_ovsdb_iface = "tcp:${opendaylight_controller_ip}:6640"
++
++    class { '::neutron::plugins::ml2::opendaylight':
++      odl_username  => hiera('opendaylight_username'),
++      odl_password  => hiera('opendaylight_password'),
++      odl_url => "http://${opendaylight_controller_ip}:${opendaylight_port}/controller/nb/v2/neutron";
++    }
++
++    class { '::neutron::plugins::ovs::opendaylight':
++      tunnel_ip             => $private_ip,
++      odl_username          => hiera('opendaylight_username'),
++      odl_password          => hiera('opendaylight_password'),
++      odl_check_url         => $opendaylight_url,
++      odl_ovsdb_iface       => $odl_ovsdb_iface,
 +    }
 +
 +  } elsif 'onos_ml2' in hiera('neutron_mechanism_drivers') {
@@ -919,7 +1124,7 @@ index 1f6c2be..474bb1d 100644
    if 'cisco_n1kv' in hiera('neutron_mechanism_drivers') {
      include ::neutron::plugins::ml2::cisco::nexus1000v
  
-@@ -280,8 +358,6 @@ if hiera('step') >= 3 {
+@@ -280,8 +382,6 @@ if hiera('step') >= 3 {
    }
  
    Service['neutron-server'] -> Service['neutron-dhcp-service']
@@ -928,7 +1133,7 @@ index 1f6c2be..474bb1d 100644
    Service['neutron-server'] -> Service['neutron-metadata']
  
    include ::cinder
-@@ -447,6 +523,20 @@ if hiera('step') >= 3 {
+@@ -447,6 +547,20 @@ if hiera('step') >= 3 {
  
    Cron <| title == 'ceilometer-expirer' |> { command => "sleep $((\$(od -A n -t d -N 3 /dev/urandom) % 86400)) && ${::ceilometer::params::expirer_command}" }
  
@@ -950,18 +1155,26 @@ index 1f6c2be..474bb1d 100644
    include ::heat
    include ::heat::api
 diff --git a/puppet/manifests/overcloud_controller_pacemaker.pp b/puppet/manifests/overcloud_controller_pacemaker.pp
-index 3fb92f3..770fc77 100644
+index 3fb92f3..29f9c7f 100644
 --- a/puppet/manifests/overcloud_controller_pacemaker.pp
 +++ b/puppet/manifests/overcloud_controller_pacemaker.pp
-@@ -380,6 +380,21 @@ if hiera('step') >= 2 {
+@@ -380,6 +380,29 @@ if hiera('step') >= 2 {
  
    }
  
 +  if str2bool(hiera('opendaylight_install', 'false')) {
++    $node_string = split(hiera('bootstack_nodeid'), '-')
++    $controller_index = $node_string[-1]
++    $ha_node_index = $controller_index + 1
++
 +    class {"opendaylight":
-+      extra_features => ['odl-ovsdb-openstack'],
++      extra_features => any2array(hiera('opendaylight_features', 'odl-ovsdb-openstack')),
 +      odl_rest_port  => hiera('opendaylight_port'),
++      odl_bind_ip    => $controller_node_ips[$controller_index],
 +      enable_l3      => hiera('opendaylight_enable_l3', 'no'),
++      enable_ha      => hiera('opendaylight_enable_ha', false),
++      ha_node_ips    => split(hiera('controller_node_ips'), ','),
++      ha_node_index  => $ha_node_index,
 +    }
 +  }
 +
@@ -971,11 +1184,11 @@ index 3fb92f3..770fc77 100644
 +      controllers_ip => $controller_node_ips
 +    }
 +  }
-+
++  
    exec { 'galera-ready' :
      command     => '/usr/bin/clustercheck >/dev/null',
      timeout     => 30,
-@@ -584,7 +599,14 @@ if hiera('step') >= 3 {
+@@ -584,7 +607,14 @@ if hiera('step') >= 3 {
    include ::nova::network::neutron
  
    # Neutron class definitions
@@ -991,7 +1204,7 @@ index 3fb92f3..770fc77 100644
    class { '::neutron::server' :
      sync_db        => $sync_db,
      manage_service => false,
-@@ -594,10 +616,6 @@ if hiera('step') >= 3 {
+@@ -594,10 +624,6 @@ if hiera('step') >= 3 {
      manage_service => false,
      enabled        => false,
    }
@@ -1002,10 +1215,22 @@ index 3fb92f3..770fc77 100644
    class { '::neutron::agents::metadata':
      manage_service => false,
      enabled        => false,
-@@ -609,18 +627,68 @@ if hiera('step') >= 3 {
+@@ -609,18 +635,98 @@ if hiera('step') >= 3 {
      notify  => Service['neutron-dhcp-service'],
      require => Package['neutron'],
    }
++
++  # SDNVPN Hack
++  if ('networking_bgpvpn.neutron.services.plugin.BGPVPNPlugin' in hiera('neutron::service_plugins'))
++  {
++    class  { 'neutron::config':
++      server_config => {
++        'service_providers/service_provider' => {
++          'value' => 'BGPVPN:Dummy:networking_bgpvpn.neutron.services.service_drivers.driver_api.BGPVPNDriver:default'
++        }
++      }
++    }
++  }
 +
    class { '::neutron::plugins::ml2':
      flat_networks        => split(hiera('neutron_flat_networks'), ','),
@@ -1021,30 +1246,48 @@ index 3fb92f3..770fc77 100644
 +  if 'opendaylight' in hiera('neutron_mechanism_drivers') {
 +    if str2bool(hiera('opendaylight_install', 'false')) {
 +      $controller_ips = split(hiera('controller_node_ips'), ',')
-+      $opendaylight_controller_ip = $controller_ips[0]
++      if hiera('opendaylight_enable_ha', false) {
++        $odl_ovsdb_iface = "tcp:${controller_ips[0]}:6640 tcp:${controller_ips[1]}:6640 tcp:${controller_ips[2]}:6640"
++        # Workaround to work with current puppet-neutron
++        # This isn't the best solution, since the odl check URL ends up being only the first node in HA case
++        $opendaylight_controller_ip = $controller_ips[0]
++        # Bug where netvirt:1 doesn't come up right with HA
++        # Check ovsdb:1 instead
++        $net_virt_url = 'restconf/operational/network-topology:network-topology/topology/ovsdb:1'
++      } else {
++        $opendaylight_controller_ip = $controller_ips[0]
++        $odl_ovsdb_iface = "tcp:${opendaylight_controller_ip}:6640"
++        $net_virt_url = 'restconf/operational/network-topology:network-topology/topology/netvirt:1'
++      }
 +    } else {
 +      $opendaylight_controller_ip = hiera('opendaylight_controller_ip')
++      $odl_ovsdb_iface = "tcp:${opendaylight_controller_ip}:6640"
++      $net_virt_url = 'restconf/operational/network-topology:network-topology/topology/netvirt:1'
 +    }
++
 +    $opendaylight_port = hiera('opendaylight_port')
 +    $private_ip = hiera('neutron::agents::ml2::ovs::local_ip')
++    $opendaylight_url = "http://${opendaylight_controller_ip}:${opendaylight_port}/${net_virt_url}"
++    $odl_vip = hiera('opendaylight_api_vip')
 +
-+    class { 'neutron::plugins::ml2::opendaylight':
-+      odl_controller_ip => $opendaylight_controller_ip,
-+      odl_username      => hiera('opendaylight_username'),
-+      odl_password      => hiera('opendaylight_password'),
-+      odl_port          => hiera('opendaylight_port'),
++    if ! $odl_vip {
++      fail('ODL VIP not set in hiera or empty')
 +    }
 +
-+    if str2bool(hiera('opendaylight_install', 'false')) {
-+      class { 'neutron::plugins::ovs::opendaylight':
-+        odl_controller_ip => $opendaylight_controller_ip,
-+        tunnel_ip         => hiera('neutron::agents::ml2::ovs::local_ip'),
-+        odl_port          => hiera('opendaylight_port'),
-+        odl_username      => hiera('opendaylight_username'),
-+        odl_password      => hiera('opendaylight_password'),
-+      }
++    class { '::neutron::plugins::ml2::opendaylight':
++      odl_username  => hiera('opendaylight_username'),
++      odl_password  => hiera('opendaylight_password'),
++      odl_url => "http://${odl_vip}:${opendaylight_port}/controller/nb/v2/neutron";
++    }
++
++    class { '::neutron::plugins::ovs::opendaylight':
++      tunnel_ip             => $private_ip,
++      odl_username          => hiera('opendaylight_username'),
++      odl_password          => hiera('opendaylight_password'),
++      odl_check_url         => $opendaylight_url,
++      odl_ovsdb_iface       => $odl_ovsdb_iface,
 +    }
 +    if ! str2bool(hiera('opendaylight_enable_l3', 'no')) {
 +      class { '::neutron::agents::l3' :
 +        manage_service => false,
@@ -1077,7 +1320,7 @@ index 3fb92f3..770fc77 100644
    if 'cisco_ucsm' in hiera('neutron_mechanism_drivers') {
      include ::neutron::plugins::ml2::cisco::ucsm
    }
-@@ -645,8 +713,10 @@ if hiera('step') >= 3 {
+@@ -645,8 +751,10 @@ if hiera('step') >= 3 {
    if hiera('neutron_enable_bigswitch_ml2', false) {
      include ::neutron::plugins::ml2::bigswitch::restproxy
    }
@@ -1090,10 +1333,31 @@ index 3fb92f3..770fc77 100644
    }
    neutron_dhcp_agent_config {
      'DEFAULT/ovs_use_veth': value => hiera('neutron_ovs_use_veth', false);
-@@ -879,6 +949,28 @@ if hiera('step') >= 3 {
+@@ -813,13 +921,13 @@ if hiera('step') >= 3 {
+     swift::storage::filter::healthcheck { $swift_components : }
+   }
++  $mongo_node_string = join($mongo_node_ips_with_port, ',')
+   # Ceilometer
+   case downcase(hiera('ceilometer_backend')) {
+     /mysql/: {
+       $ceilometer_database_connection = hiera('ceilometer_mysql_conn_string')
+     }
+     default: {
+-      $mongo_node_string = join($mongo_node_ips_with_port, ',')
+       $ceilometer_database_connection = "mongodb://${mongo_node_string}/ceilometer?replicaSet=${mongodb_replset}"
+     }
+   }
+@@ -879,6 +987,62 @@ if hiera('step') >= 3 {
      enabled        => false,
    }
  
++  $aodh_database_connection = "mongodb://${mongo_node_string}/aodh?replicaSet=${mongodb_replset}"
++
++  class { '::aodh::db':
++    database_connection => $aodh_database_connection
++  }
++
 +  # Aodh
 +  include ::aodh
 +  include ::aodh::config
@@ -1115,17 +1379,45 @@ index 3fb92f3..770fc77 100644
 +    manage_service => false,
 +    enabled        => false,
 +  }
++
++  $event_pipeline = "---
++sources:
++    - name: event_source
++      events:
++          - \"*\"
++      sinks:
++          - event_sink
++sinks:
++    - name: event_sink
++      transformers:
++      triggers:
++      publishers:
++          - notifier://?topic=alarm.all
++          - notifier://
++"
++
++  # aodh hacks
++  file { '/etc/ceilometer/event_pipeline.yaml':
++    ensure  => present,
++    content => $event_pipeline
++  }
++
++  user { 'aodh':
++     groups => 'nobody'
++  }
++
++
 +
    # httpd/apache and horizon
    # NOTE(gfidente): server-status can be consumed by the pacemaker resource agent
    class { '::apache' :
-@@ -1055,62 +1147,21 @@ if hiera('step') >= 4 {
+@@ -1055,62 +1219,21 @@ if hiera('step') >= 4 {
        clone_params => 'interleave=true',
        require      => Pacemaker::Resource::Service[$::keystone::params::service_name],
      }
 -    pacemaker::resource::service { $::neutron::params::l3_agent_service:
 -      clone_params => 'interleave=true',
-+    if !('onos_ml2' in hiera('neutron_mechanism_drivers') or str2bool(hiera('opendaylight_enable_l3', 'no'))) {
++    if !('onos_ml2' in hiera('neutron_mechanism_drivers')) {
 +      pacemaker::resource::service { $::neutron::params::l3_agent_service:
 +        clone_params => 'interleave=true',
 +      }
@@ -1186,7 +1478,7 @@ index 3fb92f3..770fc77 100644
      pacemaker::constraint::base { 'keystone-to-neutron-server-constraint':
        constraint_type => 'order',
        first_resource  => "${::keystone::params::service_name}-clone",
-@@ -1120,65 +1171,110 @@ if hiera('step') >= 4 {
+@@ -1120,65 +1243,110 @@ if hiera('step') >= 4 {
        require         => [Pacemaker::Resource::Service[$::keystone::params::service_name],
                            Pacemaker::Resource::Service[$::neutron::params::server_service]],
      }
@@ -1353,7 +1645,7 @@ index 3fb92f3..770fc77 100644
      # Nova
      pacemaker::resource::service { $::nova::params::api_service_name :
        clone_params => 'interleave=true',
-@@ -1276,7 +1372,7 @@ if hiera('step') >= 4 {
+@@ -1276,7 +1444,7 @@ if hiera('step') >= 4 {
                    Pacemaker::Resource::Service[$::nova::params::conductor_service_name]],
      }
  
@@ -1362,13 +1654,15 @@ index 3fb92f3..770fc77 100644
      case downcase(hiera('ceilometer_backend')) {
        /mysql/: {
          pacemaker::resource::service { $::ceilometer::params::agent_central_service_name :
-@@ -1304,6 +1400,21 @@ if hiera('step') >= 4 {
-     pacemaker::resource::service { $::ceilometer::params::alarm_notifier_service_name :
+@@ -1298,10 +1466,19 @@ if hiera('step') >= 4 {
+     pacemaker::resource::service { $::ceilometer::params::api_service_name :
        clone_params => 'interleave=true',
      }
+-    pacemaker::resource::service { $::ceilometer::params::alarm_evaluator_service_name :
 +    pacemaker::resource::service { $::aodh::params::notifier_service_name :
-+      clone_params => 'interleave=true',
-+    }
+       clone_params => 'interleave=true',
+     }
+-    pacemaker::resource::service { $::ceilometer::params::alarm_notifier_service_name :
 +    pacemaker::resource::service { $::aodh::params::expirer_package_serice :
 +      clone_params => 'interleave=true',
 +    }
@@ -1379,12 +1673,10 @@ index 3fb92f3..770fc77 100644
 +      clone_params => 'interleave=true',
 +    }
 +    pacemaker::resource::service { $::aodh::params::evaluator_service_name :
-+      clone_params => 'interleave=true',
-+    }
-     pacemaker::resource::service { $::ceilometer::params::agent_notification_service_name :
        clone_params => 'interleave=true',
      }
-@@ -1315,8 +1426,10 @@ if hiera('step') >= 4 {
+     pacemaker::resource::service { $::ceilometer::params::agent_notification_service_name :
+@@ -1315,8 +1492,19 @@ if hiera('step') >= 4 {
      # Fedora doesn't know `require-all` parameter for constraints yet
      if $::operatingsystem == 'Fedora' {
        $redis_ceilometer_constraint_params = undef
@@ -1392,10 +1684,19 @@ index 3fb92f3..770fc77 100644
      } else {
        $redis_ceilometer_constraint_params = 'require-all=false'
 +      $redis_aodh_constraint_params = 'require-all=false'
++    }
++    pacemaker::constraint::base { 'keystone-then-aodh-api-constraint':
++      constraint_type => 'order',
++      first_resource  => "${::keystone::params::service_name}-clone",
++      second_resource => "${::aodh::params::api_service_name}-clone",
++      first_action    => 'start',
++      second_action   => 'start',
++      require         => [Pacemaker::Resource::Service[$::aodh::params::api_service_name],
++                          Pacemaker::Resource::Service[$::keystone::params::service_name]],
      }
      pacemaker::constraint::base { 'redis-then-ceilometer-central-constraint':
        constraint_type   => 'order',
-@@ -1328,6 +1441,16 @@ if hiera('step') >= 4 {
+@@ -1328,6 +1516,16 @@ if hiera('step') >= 4 {
        require           => [Pacemaker::Resource::Ocf['redis'],
                              Pacemaker::Resource::Service[$::ceilometer::params::agent_central_service_name]],
      }
@@ -1412,48 +1713,79 @@ index 3fb92f3..770fc77 100644
      pacemaker::constraint::base { 'keystone-then-ceilometer-central-constraint':
        constraint_type => 'order',
        first_resource  => "${::keystone::params::service_name}-clone",
-@@ -1426,6 +1549,38 @@ if hiera('step') >= 4 {
-       require => [Pacemaker::Resource::Service[$::ceilometer::params::agent_notification_service_name],
-                   Pacemaker::Resource::Service[$::ceilometer::params::alarm_notifier_service_name]],
+@@ -1378,53 +1576,37 @@ if hiera('step') >= 4 {
+       require => [Pacemaker::Resource::Service[$::ceilometer::params::api_service_name],
+                   Pacemaker::Resource::Ocf['delay']],
      }
+-    pacemaker::constraint::base { 'ceilometer-delay-then-ceilometer-alarm-evaluator-constraint':
 +    pacemaker::constraint::base { 'aodh-delay-then-aodh-evaluator-constraint':
-+      constraint_type => 'order',
-+      first_resource  => 'delay-clone',
+       constraint_type => 'order',
+       first_resource  => 'delay-clone',
+-      second_resource => "${::ceilometer::params::alarm_evaluator_service_name}-clone",
 +      second_resource => "${::aodh::params::evaluator_service_name}-clone",
-+      first_action    => 'start',
-+      second_action   => 'start',
+       first_action    => 'start',
+       second_action   => 'start',
+-      require         => [Pacemaker::Resource::Service[$::ceilometer::params::alarm_evaluator_service_name],
 +      require         => [Pacemaker::Resource::Service[$::aodh::params::evaluator_service_name],
-+                          Pacemaker::Resource::Ocf['delay']],
-+    }
+                           Pacemaker::Resource::Ocf['delay']],
+     }
+-    pacemaker::constraint::colocation { 'ceilometer-alarm-evaluator-with-ceilometer-delay-colocation':
+-      source  => "${::ceilometer::params::alarm_evaluator_service_name}-clone",
 +    pacemaker::constraint::colocation { 'aodh-evaluator-with-aodh-delay-colocation':
 +      source  => "${::aodh::params::evaluator_service_name}-clone",
-+      target  => 'delay-clone',
-+      score   => 'INFINITY',
+       target  => 'delay-clone',
+       score   => 'INFINITY',
+-      require => [Pacemaker::Resource::Service[$::ceilometer::params::api_service_name],
 +      require => [Pacemaker::Resource::Service[$::horizon::params::http_service],
-+                  Pacemaker::Resource::Ocf['delay']],
-+    }
+                   Pacemaker::Resource::Ocf['delay']],
+     }
+-    pacemaker::constraint::base { 'ceilometer-alarm-evaluator-then-ceilometer-alarm-notifier-constraint':
+-      constraint_type => 'order',
+-      first_resource  => "${::ceilometer::params::alarm_evaluator_service_name}-clone",
+-      second_resource => "${::ceilometer::params::alarm_notifier_service_name}-clone",
+-      first_action    => 'start',
+-      second_action   => 'start',
+-      require         => [Pacemaker::Resource::Service[$::ceilometer::params::alarm_evaluator_service_name],
+-                          Pacemaker::Resource::Service[$::ceilometer::params::alarm_notifier_service_name]],
+-    }
+-    pacemaker::constraint::colocation { 'ceilometer-alarm-notifier-with-ceilometer-alarm-evaluator-colocation':
+-      source  => "${::ceilometer::params::alarm_notifier_service_name}-clone",
+-      target  => "${::ceilometer::params::alarm_evaluator_service_name}-clone",
+-      score   => 'INFINITY',
+-      require => [Pacemaker::Resource::Service[$::ceilometer::params::alarm_evaluator_service_name],
+-                  Pacemaker::Resource::Service[$::ceilometer::params::alarm_notifier_service_name]],
+-    }
+-    pacemaker::constraint::base { 'ceilometer-alarm-notifier-then-ceilometer-notification-constraint':
 +    pacemaker::constraint::base { 'aodh-evaluator-then-aodh-notifier-constraint':
-+      constraint_type => 'order',
+       constraint_type => 'order',
+-      first_resource  => "${::ceilometer::params::alarm_notifier_service_name}-clone",
+-      second_resource => "${::ceilometer::params::agent_notification_service_name}-clone",
 +      first_resource  => "${::aodh::params::evaluator_service_name}-clone",
 +      second_resource => "${::aodh::params::notifier_service_name}-clone",
-+      first_action    => 'start',
-+      second_action   => 'start',
+       first_action    => 'start',
+       second_action   => 'start',
+-      require         => [Pacemaker::Resource::Service[$::ceilometer::params::agent_notification_service_name],
+-                          Pacemaker::Resource::Service[$::ceilometer::params::alarm_notifier_service_name]],
 +      require         => [Pacemaker::Resource::Service[$::aodh::params::evaluator_service_name],
 +                          Pacemaker::Resource::Service[$::aodh::params::notifier_service_name]],
-+    }
+     }
+-    pacemaker::constraint::colocation { 'ceilometer-notification-with-ceilometer-alarm-notifier-colocation':
+-      source  => "${::ceilometer::params::agent_notification_service_name}-clone",
+-      target  => "${::ceilometer::params::alarm_notifier_service_name}-clone",
 +    pacemaker::constraint::colocation { 'aodh-notifier-with-aodh-evaluator-colocation':
 +      source  => "${::aodh::params::notifier_service_name}-clone",
 +      target  => "${::aodh::params::evaluator_service_name}-clone",
-+      score   => 'INFINITY',
+       score   => 'INFINITY',
+-      require => [Pacemaker::Resource::Service[$::ceilometer::params::agent_notification_service_name],
+-                  Pacemaker::Resource::Service[$::ceilometer::params::alarm_notifier_service_name]],
 +      require => [Pacemaker::Resource::Service[$::aodh::params::evaluator_service_name],
 +                  Pacemaker::Resource::Service[$::aodh::params::notifier_service_name]],
-+    }
+     }
      if downcase(hiera('ceilometer_backend')) == 'mongodb' {
        pacemaker::constraint::base { 'mongodb-then-ceilometer-central-constraint':
-         constraint_type => 'order',
 diff --git a/puppet/manifests/overcloud_opendaylight.pp b/puppet/manifests/overcloud_opendaylight.pp
 new file mode 100644
-index 0000000..33f609a
+index 0000000..aeb31be
 --- /dev/null
 +++ b/puppet/manifests/overcloud_opendaylight.pp
 @@ -0,0 +1,27 @@
@@ -1479,17 +1811,17 @@ index 0000000..33f609a
 +}
 +
 +class {"opendaylight":
-+  extra_features => ['odl-ovsdb-openstack'],
++  extra_features => any2array(hiera('opendaylight_features', 'odl-ovsdb-openstack')),
 +  odl_rest_port  => hiera('opendaylight_port'),
 +  enable_l3      => hiera('opendaylight_enable_l3', 'no'),
 +}
 +
 diff --git a/puppet/opendaylight-puppet.yaml b/puppet/opendaylight-puppet.yaml
 new file mode 100644
-index 0000000..b876dc7
+index 0000000..6488e0e
 --- /dev/null
 +++ b/puppet/opendaylight-puppet.yaml
-@@ -0,0 +1,217 @@
+@@ -0,0 +1,223 @@
 +heat_template_version: 2015-04-30
 +
 +description: >
@@ -1521,6 +1853,10 @@ index 0000000..b876dc7
 +    description: Knob to enable/disable ODL L3
 +    type: string
 +    default: 'no'
++  OpenDaylightFeatures:
++    description: List of features to install with ODL
++    type: comma_delimited_list
++    default: "odl-ovsdb-openstack"
 +  OpenDaylightPort:
 +    default: 8081
 +    description: Set OpenDaylight service port
@@ -1622,6 +1958,7 @@ index 0000000..b876dc7
 +        opendaylight_enable_l3: {get_param: OpenDaylightEnableL3}
 +        opendaylight_username: {get_param: OpenDaylightUsername}
 +        opendaylight_password: {get_param: OpenDaylightPassword}
++        opendaylight_features: {get_param: OpenDaylightFeatures}
 +
 +  OpenDaylightConfig:
 +    type: OS::Heat::StructuredConfig
@@ -1647,6 +1984,7 @@ index 0000000..b876dc7
 +                opendaylight::admin_password: {get_param: OpenDaylightPassword}
 +                opendaylight_port: {get_input: opendaylight_port}
 +                opendaylight_enable_l3: {get_input: opendaylight_enable_l3}
++                opendaylight_features: {get_input: opendaylight_features}
 +            ceph:
 +              raw_data: {get_file: hieradata/ceph.yaml}
 +
@@ -1707,6 +2045,18 @@ index 0000000..b876dc7
 +      - ','
 +      - - {get_attr: [OpenDaylightDeployment, deploy_stdout]}
 +        - {get_param: UpdateIdentifier}
+diff --git a/puppet/vip-config.yaml b/puppet/vip-config.yaml
+index 1dec489..727bb79 100644
+--- a/puppet/vip-config.yaml
++++ b/puppet/vip-config.yaml
+@@ -27,6 +27,7 @@ resources:
+                 horizon_vip: {get_input: horizon_vip}
+                 redis_vip: {get_input: redis_vip}
+                 mysql_vip: {get_input: mysql_vip}
++                opendaylight_api_vip: {get_input: opendaylight_api_vip}
+                 tripleo::loadbalancer::public_virtual_ip: {get_input: public_virtual_ip}
+                 tripleo::loadbalancer::controller_virtual_ip: {get_input: control_virtual_ip}
+                 tripleo::loadbalancer::internal_api_virtual_ip: {get_input: internal_api_virtual_ip}
 -- 
-2.5.4 (Apple Git-61)
+2.5.0