Merge "Restructured the installation-instruction file into indexed sub files"
authorDan Radez <dradez@redhat.com>
Tue, 19 Jan 2016 14:36:31 +0000 (14:36 +0000)
committerGerrit Code Review <gerrit@172.30.200.206>
Tue, 19 Jan 2016 14:36:31 +0000 (14:36 +0000)
18 files changed:
build/Makefile
build/instack.sh
build/network-environment.yaml
build/nics/compute.yaml
build/nics/compute_br-ex.yaml [new file with mode: 0644]
build/nics/compute_private.yaml
build/nics/compute_private_br-ex.yaml [new file with mode: 0644]
build/nics/compute_private_storage.yaml
build/nics/compute_private_storage_br-ex.yaml [new file with mode: 0644]
build/nics/compute_storage.yaml
build/nics/compute_storage_br-ex.yaml [new file with mode: 0644]
build/opnfv-apex-common.spec
build/opnfv-apex-undercloud.spec
build/opnfv-tripleo-heat-templates.patch
build/puppet-neutron-force-metadata.patch [new file with mode: 0644]
ci/deploy.sh
lib/common-functions.sh
lib/installer/onos/onos_gw_mac_update.sh [new file with mode: 0644]

index f55d3e7..b0b895a 100644 (file)
@@ -128,12 +128,17 @@ rpm:
               --xform="s:nics/compute_storage.yaml:opnfv-apex-undercloud-$(RPMVERS)/build/nics/compute_storage.yaml:" \
               --xform="s:nics/controller_private_storage.yaml:opnfv-apex-undercloud-$(RPMVERS)/build/nics/controller_private_storage.yaml:" \
               --xform="s:nics/compute_private_storage.yaml:opnfv-apex-undercloud-$(RPMVERS)/build/nics/compute_private_storage.yaml:" \
+              --xform="s:nics/compute_br-ex.yaml:opnfv-apex-undercloud-$(RPMVERS)/build/nics/compute_br-ex.yaml:" \
+              --xform="s:nics/compute_private_br-ex.yaml:opnfv-apex-undercloud-$(RPMVERS)/build/nics/compute_private_br-ex.yaml:" \
+              --xform="s:nics/compute_storage_br-ex.yaml:opnfv-apex-undercloud-$(RPMVERS)/build/nics/compute_storage_br-ex.yaml:" \
+              --xform="s:nics/compute_private_storage_br-ex.yaml:opnfv-apex-undercloud-$(RPMVERS)/build/nics/compute_private_storage_br-ex.yaml:" \
               --xform="s:instackenv-virt.json:opnfv-apex-undercloud-$(RPMVERS)/build/instackenv-virt.json:" \
               --xform="s:instackenv.json.example:opnfv-apex-undercloud-$(RPMVERS)/build/instackenv.json.example:" \
               stack/instack.qcow2 instack.xml baremetalbrbm_brbm1_brbm2_brbm3_0.xml baremetalbrbm_brbm1_brbm2_brbm3_1.xml \
               baremetalbrbm_brbm1_brbm2_brbm3_2.xml baremetalbrbm_brbm1_brbm2_brbm3_3.xml baremetalbrbm_brbm1_brbm2_brbm3_4.xml \
               brbm-net.xml brbm1-net.xml brbm2-net.xml brbm3-net.xml default-pool.xml instackenv-virt.json network-environment.yaml \
               nics/controller.yaml nics/compute.yaml nics/controller_private.yaml nics/compute_private.yaml  \
+              nics/compute_br-ex.yaml nics/compute_private_br-ex.yaml nics/compute_storage_br-ex.yaml nics/compute_private_storage_br-ex.yaml \
            nics/controller_storage.yaml nics/compute_storage.yaml nics/controller_private_storage.yaml    \
            nics/compute_private_storage.yaml instackenv-virt.json instackenv.json.example
        rpmbuild -ba opnfv-apex-undercloud.spec -D '_topdir %(echo `pwd`)' -D '_builddir %(echo `pwd`)' -D '_sourcedir %(echo `pwd`)' -D '_rpmdir %(echo `pwd`)' -D '_specdir %(echo `pwd`)' -D '_srcrpmdir %(echo `pwd`)' -D "release $(shell echo $(REVSTATE) | tr -d '_-')"
index 10a4e37..eb017c2 100755 (executable)
@@ -268,6 +268,10 @@ LIBGUESTFS_BACKEND=direct virt-customize --upload ../opnfv-tripleo-heat-template
 LIBGUESTFS_BACKEND=direct virt-customize --upload ../opendaylight-puppet-neutron.patch:/tmp \
                                          --run-command "cd /etc/puppet/modules/neutron && patch -Np1 < /tmp/opendaylight-puppet-neutron.patch" \
                                          -a overcloud-full-odl.qcow2
+# REMOVE ME AFTER Brahmaputra
+LIBGUESTFS_BACKEND=direct virt-customize --upload ../puppet-neutron-force-metadata.patch:/tmp \
+                                         --run-command "cd /etc/puppet/modules/neutron && patch -Np1 < /tmp/puppet-neutron-force-metadata.patch" \
+                                         -a overcloud-full-odl.qcow2
 ## END WORK AROUND
 popd
 
@@ -287,7 +291,8 @@ curl ${onos_artifacts_uri}/onos-1.3.0.tar.gz -o ./onos-1.3.0.tar.gz
 curl ${onos_artifacts_uri}/repository.tar -o ./repository.tar
 popd
 popd
-tar -czf puppet-onos.tar.gz puppet-onos
+mv puppet-onos onos
+tar -czf puppet-onos.tar.gz onos
 LIBGUESTFS_BACKEND=direct virt-customize --upload puppet-onos.tar.gz:/etc/puppet/modules/ \
                                          --run-command "cd /etc/puppet/modules/ && tar xzf puppet-onos.tar.gz" -a overcloud-full-odl.qcow2
 
index 01eb50e..ffe39c9 100644 (file)
@@ -19,6 +19,7 @@ resource_registry:
   OS::TripleO::Compute::Ports::InternalApiPort: /usr/share/openstack-tripleo-heat-templates/network/ports/noop.yaml
   OS::TripleO::Compute::Ports::StoragePort: /usr/share/openstack-tripleo-heat-templates/network/ports/noop.yaml
   OS::TripleO::Compute::Ports::TenantPort: /usr/share/openstack-tripleo-heat-templates/network/ports/noop.yaml
+  OS::TripleO::Compute::Ports::Ports::ExternalPort: /usr/share/openstack-tripleo-heat-templates/network/ports/external.yaml
 
   # Port assignments for service virtual IPs for the controller role
   OS::TripleO::Controller::Ports::RedisVipPort: /usr/share/openstack-tripleo-heat-templates/network/ports/noop.yaml
index 674b250..6978e9e 100644 (file)
@@ -48,6 +48,10 @@ parameters:
   ControlPlaneDefaultRoute: # Override this via parameter_defaults
     description: The subnet CIDR of the control plane network.
     type: string
+  ExternalInterfaceDefaultRoute:
+    default: '10.0.0.1'
+    description: default route for the external network
+    type: string
   DnsServers: # Override this via parameter_defaults
     default: []
     description: A list of DNS servers (2 max for some implementations) that will be added to resolv.conf.
@@ -80,6 +84,17 @@ resources:
                 -
                   ip_netmask: 169.254.169.254/32
                   next_hop: {get_param: EC2MetadataIp}
+            -
+              type: interface
+              name: nic3
+              use_dhcp: false
+              addresses:
+                -
+                  ip_netmask: {get_param: ExternalIpSubnet}
+              routes:
+                -
+                  ip_netmask: 0.0.0.0/0
+                  next_hop: {get_param: ExternalInterfaceDefaultRoute}
 
 outputs:
   OS::stack_id:
diff --git a/build/nics/compute_br-ex.yaml b/build/nics/compute_br-ex.yaml
new file mode 100644 (file)
index 0000000..d187a96
--- /dev/null
@@ -0,0 +1,108 @@
+heat_template_version: 2015-04-30
+
+description: >
+  Software Config to drive os-net-config to configure multiple interfaces
+  for the compute role.
+
+parameters:
+  ControlPlaneIp:
+    default: ''
+    description: IP address/subnet on the ctlplane network
+    type: string
+  ExternalIpSubnet:
+    default: ''
+    description: IP address/subnet on the external network
+    type: string
+  InternalApiIpSubnet:
+    default: ''
+    description: IP address/subnet on the internal API network
+    type: string
+  StorageIpSubnet:
+    default: ''
+    description: IP address/subnet on the storage network
+    type: string
+  StorageMgmtIpSubnet:
+    default: ''
+    description: IP address/subnet on the storage mgmt network
+    type: string
+  TenantIpSubnet:
+    default: ''
+    description: IP address/subnet on the tenant network
+    type: string
+  InternalApiNetworkVlanID:
+    default: 20
+    description: Vlan ID for the internal_api network traffic.
+    type: number
+  StorageNetworkVlanID:
+    default: 30
+    description: Vlan ID for the storage network traffic.
+    type: number
+  TenantNetworkVlanID:
+    default: 50
+    description: Vlan ID for the tenant network traffic.
+    type: number
+  ControlPlaneSubnetCidr: # Override this via parameter_defaults
+    default: '24'
+    description: The subnet CIDR of the control plane network.
+    type: string
+  ControlPlaneDefaultRoute: # Override this via parameter_defaults
+    description: The subnet CIDR of the control plane network.
+    type: string
+  ExternalInterfaceDefaultRoute:
+    default: '10.0.0.1'
+    description: default route for the external network
+    type: string
+  DnsServers: # Override this via parameter_defaults
+    default: []
+    description: A list of DNS servers (2 max for some implementations) that will be added to resolv.conf.
+    type: json
+  EC2MetadataIp: # Override this via parameter_defaults
+    description: The IP address of the EC2 metadata server.
+    type: string
+
+resources:
+  OsNetConfigImpl:
+    type: OS::Heat::StructuredConfig
+    properties:
+      group: os-apply-config
+      config:
+        os_net_config:
+          network_config:
+            -
+              type: interface
+              name: nic1
+              use_dhcp: false
+              dns_servers: {get_param: DnsServers}
+              addresses:
+                -
+                  ip_netmask:
+                    list_join:
+                      - '/'
+                      - - {get_param: ControlPlaneIp}
+                        - {get_param: ControlPlaneSubnetCidr}
+              routes:
+                -
+                  ip_netmask: 169.254.169.254/32
+                  next_hop: {get_param: EC2MetadataIp}
+            -
+              type: ovs_bridge
+              name: {get_input: bridge_name}
+              use_dhcp: false
+              addresses:
+                -
+                  ip_netmask: {get_param: ExternalIpSubnet}
+              routes:
+                -
+                  ip_netmask: 0.0.0.0/0
+                  next_hop: {get_param: ExternalInterfaceDefaultRoute}
+              members:
+                -
+                  type: interface
+                  name: nic3
+                  # force the MAC address of the bridge to this interface
+                  primary: true
+
+outputs:
+  OS::stack_id:
+    description: The OsNetConfigImpl resource.
+    value: {get_resource: OsNetConfigImpl}
index 746831f..9bc1b69 100644 (file)
@@ -48,6 +48,10 @@ parameters:
   ControlPlaneDefaultRoute: # Override this via parameter_defaults
     description: The subnet CIDR of the control plane network.
     type: string
+  ExternalInterfaceDefaultRoute:
+    default: '10.0.0.1'
+    description: default route for the external network
+    type: string
   DnsServers: # Override this via parameter_defaults
     default: []
     description: A list of DNS servers (2 max for some implementations) that will be added to resolv.conf.
@@ -87,6 +91,17 @@ resources:
               addresses:
                 -
                   ip_netmask: {get_param: TenantIpSubnet}
+            -
+              type: interface
+              name: nic3
+              use_dhcp: false
+              addresses:
+                -
+                  ip_netmask: {get_param: ExternalIpSubnet}
+              routes:
+                -
+                  ip_netmask: 0.0.0.0/0
+                  next_hop: {get_param: ExternalInterfaceDefaultRoute}
 outputs:
   OS::stack_id:
     description: The OsNetConfigImpl resource.
diff --git a/build/nics/compute_private_br-ex.yaml b/build/nics/compute_private_br-ex.yaml
new file mode 100644 (file)
index 0000000..94a39bf
--- /dev/null
@@ -0,0 +1,114 @@
+heat_template_version: 2015-04-30
+
+description: >
+  Software Config to drive os-net-config to configure multiple interfaces
+  for the compute role.
+
+parameters:
+  ControlPlaneIp:
+    default: ''
+    description: IP address/subnet on the ctlplane network
+    type: string
+  ExternalIpSubnet:
+    default: ''
+    description: IP address/subnet on the external network
+    type: string
+  InternalApiIpSubnet:
+    default: ''
+    description: IP address/subnet on the internal API network
+    type: string
+  StorageIpSubnet:
+    default: ''
+    description: IP address/subnet on the storage network
+    type: string
+  StorageMgmtIpSubnet:
+    default: ''
+    description: IP address/subnet on the storage mgmt network
+    type: string
+  TenantIpSubnet:
+    default: ''
+    description: IP address/subnet on the tenant network
+    type: string
+  InternalApiNetworkVlanID:
+    default: 20
+    description: Vlan ID for the internal_api network traffic.
+    type: number
+  StorageNetworkVlanID:
+    default: 30
+    description: Vlan ID for the storage network traffic.
+    type: number
+  TenantNetworkVlanID:
+    default: 50
+    description: Vlan ID for the tenant network traffic.
+    type: number
+  ControlPlaneSubnetCidr: # Override this via parameter_defaults
+    default: '24'
+    description: The subnet CIDR of the control plane network.
+    type: string
+  ControlPlaneDefaultRoute: # Override this via parameter_defaults
+    description: The subnet CIDR of the control plane network.
+    type: string
+  ExternalInterfaceDefaultRoute:
+    default: '10.0.0.1'
+    description: default route for the external network
+    type: string
+  DnsServers: # Override this via parameter_defaults
+    default: []
+    description: A list of DNS servers (2 max for some implementations) that will be added to resolv.conf.
+    type: json
+  EC2MetadataIp: # Override this via parameter_defaults
+    description: The IP address of the EC2 metadata server.
+    type: string
+
+resources:
+  OsNetConfigImpl:
+    type: OS::Heat::StructuredConfig
+    properties:
+      group: os-apply-config
+      config:
+        os_net_config:
+          network_config:
+            -
+              type: interface
+              name: nic1
+              use_dhcp: false
+              dns_servers: {get_param: DnsServers}
+              addresses:
+                -
+                  ip_netmask:
+                    list_join:
+                      - '/'
+                      - - {get_param: ControlPlaneIp}
+                        - {get_param: ControlPlaneSubnetCidr}
+              routes:
+                -
+                  ip_netmask: 169.254.169.254/32
+                  next_hop: {get_param: EC2MetadataIp}
+            -
+              type: interface
+              name: nic2
+              use_dhcp: false
+              addresses:
+                -
+                  ip_netmask: {get_param: TenantIpSubnet}
+            -
+              type: ovs_bridge
+              name: {get_input: bridge_name}
+              use_dhcp: false
+              addresses:
+                -
+                  ip_netmask: {get_param: ExternalIpSubnet}
+              routes:
+                -
+                  ip_netmask: 0.0.0.0/0
+                  next_hop: {get_param: ExternalInterfaceDefaultRoute}
+              members:
+                -
+                  type: interface
+                  name: nic3
+                  # force the MAC address of the bridge to this interface
+                  primary: true
+outputs:
+  OS::stack_id:
+    description: The OsNetConfigImpl resource.
+    value: {get_resource: OsNetConfigImpl}
index d140871..fc51cfd 100644 (file)
@@ -48,6 +48,10 @@ parameters:
   ControlPlaneDefaultRoute: # Override this via parameter_defaults
     description: The subnet CIDR of the control plane network.
     type: string
+  ExternalInterfaceDefaultRoute:
+    default: '10.0.0.1'
+    description: default route for the external network
+    type: string
   DnsServers: # Override this via parameter_defaults
     default: []
     description: A list of DNS servers (2 max for some implementations) that will be added to resolv.conf.
@@ -87,6 +91,17 @@ resources:
               addresses:
                 -
                   ip_netmask: {get_param: TenantIpSubnet}
+            -
+              type: interface
+              name: nic3
+              use_dhcp: false
+              addresses:
+                -
+                  ip_netmask: {get_param: ExternalIpSubnet}
+              routes:
+                -
+                  ip_netmask: 0.0.0.0/0
+                  next_hop: {get_param: ExternalInterfaceDefaultRoute}
             -
               type: interface
               name: nic4
diff --git a/build/nics/compute_private_storage_br-ex.yaml b/build/nics/compute_private_storage_br-ex.yaml
new file mode 100644 (file)
index 0000000..1094bb2
--- /dev/null
@@ -0,0 +1,121 @@
+heat_template_version: 2015-04-30
+
+description: >
+  Software Config to drive os-net-config to configure multiple interfaces
+  for the compute role.
+
+parameters:
+  ControlPlaneIp:
+    default: ''
+    description: IP address/subnet on the ctlplane network
+    type: string
+  ExternalIpSubnet:
+    default: ''
+    description: IP address/subnet on the external network
+    type: string
+  InternalApiIpSubnet:
+    default: ''
+    description: IP address/subnet on the internal API network
+    type: string
+  StorageIpSubnet:
+    default: ''
+    description: IP address/subnet on the storage network
+    type: string
+  StorageMgmtIpSubnet:
+    default: ''
+    description: IP address/subnet on the storage mgmt network
+    type: string
+  TenantIpSubnet:
+    default: ''
+    description: IP address/subnet on the tenant network
+    type: string
+  InternalApiNetworkVlanID:
+    default: 20
+    description: Vlan ID for the internal_api network traffic.
+    type: number
+  StorageNetworkVlanID:
+    default: 30
+    description: Vlan ID for the storage network traffic.
+    type: number
+  TenantNetworkVlanID:
+    default: 50
+    description: Vlan ID for the tenant network traffic.
+    type: number
+  ControlPlaneSubnetCidr: # Override this via parameter_defaults
+    default: '24'
+    description: The subnet CIDR of the control plane network.
+    type: string
+  ControlPlaneDefaultRoute: # Override this via parameter_defaults
+    description: The subnet CIDR of the control plane network.
+    type: string
+  ExternalInterfaceDefaultRoute:
+    default: '10.0.0.1'
+    description: default route for the external network
+    type: string
+  DnsServers: # Override this via parameter_defaults
+    default: []
+    description: A list of DNS servers (2 max for some implementations) that will be added to resolv.conf.
+    type: json
+  EC2MetadataIp: # Override this via parameter_defaults
+    description: The IP address of the EC2 metadata server.
+    type: string
+
+resources:
+  OsNetConfigImpl:
+    type: OS::Heat::StructuredConfig
+    properties:
+      group: os-apply-config
+      config:
+        os_net_config:
+          network_config:
+            -
+              type: interface
+              name: nic1
+              use_dhcp: false
+              dns_servers: {get_param: DnsServers}
+              addresses:
+                -
+                  ip_netmask:
+                    list_join:
+                      - '/'
+                      - - {get_param: ControlPlaneIp}
+                        - {get_param: ControlPlaneSubnetCidr}
+              routes:
+                -
+                  ip_netmask: 169.254.169.254/32
+                  next_hop: {get_param: EC2MetadataIp}
+            -
+              type: interface
+              name: nic2
+              use_dhcp: false
+              addresses:
+                -
+                  ip_netmask: {get_param: TenantIpSubnet}
+            -
+              type: ovs_bridge
+              name: {get_input: bridge_name}
+              use_dhcp: false
+              addresses:
+                -
+                  ip_netmask: {get_param: ExternalIpSubnet}
+              routes:
+                -
+                  ip_netmask: 0.0.0.0/0
+                  next_hop: {get_param: ExternalInterfaceDefaultRoute}
+              members:
+                -
+                  type: interface
+                  name: nic3
+                  # force the MAC address of the bridge to this interface
+                  primary: true
+            -
+              type: interface
+              name: nic4
+              use_dhcp: false
+              addresses:
+                -
+                  ip_netmask: {get_param: StorageIpSubnet}
+outputs:
+  OS::stack_id:
+    description: The OsNetConfigImpl resource.
+    value: {get_resource: OsNetConfigImpl}
index 6d04860..a1f22a3 100644 (file)
@@ -48,6 +48,10 @@ parameters:
   ControlPlaneDefaultRoute: # Override this via parameter_defaults
     description: The subnet CIDR of the control plane network.
     type: string
+  ExternalInterfaceDefaultRoute:
+    default: '10.0.0.1'
+    description: default route for the external network
+    type: string
   DnsServers: # Override this via parameter_defaults
     default: []
     description: A list of DNS servers (2 max for some implementations) that will be added to resolv.conf.
@@ -80,6 +84,17 @@ resources:
                 -
                   ip_netmask: 169.254.169.254/32
                   next_hop: {get_param: EC2MetadataIp}
+            -
+              type: interface
+              name: nic3
+              use_dhcp: false
+              addresses:
+                -
+                  ip_netmask: {get_param: ExternalIpSubnet}
+              routes:
+                -
+                  ip_netmask: 0.0.0.0/0
+                  next_hop: {get_param: ExternalInterfaceDefaultRoute}
             -
               type: interface
               name: nic4
diff --git a/build/nics/compute_storage_br-ex.yaml b/build/nics/compute_storage_br-ex.yaml
new file mode 100644 (file)
index 0000000..47412a5
--- /dev/null
@@ -0,0 +1,114 @@
+heat_template_version: 2015-04-30
+
+description: >
+  Software Config to drive os-net-config to configure multiple interfaces
+  for the compute role.
+
+parameters:
+  ControlPlaneIp:
+    default: ''
+    description: IP address/subnet on the ctlplane network
+    type: string
+  ExternalIpSubnet:
+    default: ''
+    description: IP address/subnet on the external network
+    type: string
+  InternalApiIpSubnet:
+    default: ''
+    description: IP address/subnet on the internal API network
+    type: string
+  StorageIpSubnet:
+    default: ''
+    description: IP address/subnet on the storage network
+    type: string
+  StorageMgmtIpSubnet:
+    default: ''
+    description: IP address/subnet on the storage mgmt network
+    type: string
+  TenantIpSubnet:
+    default: ''
+    description: IP address/subnet on the tenant network
+    type: string
+  InternalApiNetworkVlanID:
+    default: 20
+    description: Vlan ID for the internal_api network traffic.
+    type: number
+  StorageNetworkVlanID:
+    default: 30
+    description: Vlan ID for the storage network traffic.
+    type: number
+  TenantNetworkVlanID:
+    default: 50
+    description: Vlan ID for the tenant network traffic.
+    type: number
+  ControlPlaneSubnetCidr: # Override this via parameter_defaults
+    default: '24'
+    description: The subnet CIDR of the control plane network.
+    type: string
+  ControlPlaneDefaultRoute: # Override this via parameter_defaults
+    description: The subnet CIDR of the control plane network.
+    type: string
+  ExternalInterfaceDefaultRoute:
+    default: '10.0.0.1'
+    description: default route for the external network
+    type: string
+  DnsServers: # Override this via parameter_defaults
+    default: []
+    description: A list of DNS servers (2 max for some implementations) that will be added to resolv.conf.
+    type: json
+  EC2MetadataIp: # Override this via parameter_defaults
+    description: The IP address of the EC2 metadata server.
+    type: string
+
+resources:
+  OsNetConfigImpl:
+    type: OS::Heat::StructuredConfig
+    properties:
+      group: os-apply-config
+      config:
+        os_net_config:
+          network_config:
+            -
+              type: interface
+              name: nic1
+              use_dhcp: false
+              dns_servers: {get_param: DnsServers}
+              addresses:
+                -
+                  ip_netmask:
+                    list_join:
+                      - '/'
+                      - - {get_param: ControlPlaneIp}
+                        - {get_param: ControlPlaneSubnetCidr}
+              routes:
+                -
+                  ip_netmask: 169.254.169.254/32
+                  next_hop: {get_param: EC2MetadataIp}
+            -
+              type: ovs_bridge
+              name: {get_input: bridge_name}
+              use_dhcp: false
+              addresses:
+                -
+                  ip_netmask: {get_param: ExternalIpSubnet}
+              routes:
+                -
+                  ip_netmask: 0.0.0.0/0
+                  next_hop: {get_param: ExternalInterfaceDefaultRoute}
+              members:
+                -
+                  type: interface
+                  name: nic3
+                  # force the MAC address of the bridge to this interface
+                  primary: true
+            -
+              type: interface
+              name: nic4
+              use_dhcp: false
+              addresses:
+                -
+                  ip_netmask: {get_param: StorageIpSubnet}
+outputs:
+  OS::stack_id:
+    description: The OsNetConfigImpl resource.
+    value: {get_resource: OsNetConfigImpl}
index 9aaf088..4d3c450 100644 (file)
@@ -38,6 +38,8 @@ install config/deploy/network/network_settings.yaml %{buildroot}%{_sysconfdir}/o
 
 mkdir -p %{buildroot}%{_var}/opt/opnfv/lib/
 install lib/common-functions.sh %{buildroot}%{_var}/opt/opnfv/lib/
+mkdir -p %{buildroot}%{_var}/opt/opnfv/lib/installer/onos/
+install lib/installer/onos/onos_gw_mac_update.sh %{buildroot}%{_var}/opt/opnfv/lib/installer/onos/
 
 mkdir -p %{buildroot}%{_docdir}/opnfv/
 install LICENSE.rst %{buildroot}%{_docdir}/opnfv/
@@ -53,6 +55,7 @@ install config/deploy/network/network_settings.yaml %{buildroot}%{_docdir}/opnfv
 %attr(755,root,root) %{_bindir}/opnfv-deploy
 %attr(755,root,root) %{_bindir}/opnfv-clean
 %{_var}/opt/opnfv/lib/common-functions.sh
+%{_var}/opt/opnfv/lib/installer/onos/onos_gw_mac_update.sh
 %{_sysconfdir}/opnfv-apex/os-odl_l2-nofeature-ha.yaml
 %{_sysconfdir}/opnfv-apex/os-odl_l2-sfc-ha.yaml
 %{_sysconfdir}/opnfv-apex/os-odl_l3-nofeature-ha.yaml
index e18ea8f..298ad28 100644 (file)
@@ -39,7 +39,11 @@ install build/nics/compute_private.yaml %{buildroot}%{_var}/opt/opnfv/nics/
 install build/nics/controller_storage.yaml %{buildroot}%{_var}/opt/opnfv/nics/
 install build/nics/compute_storage.yaml %{buildroot}%{_var}/opt/opnfv/nics/
 install build/nics/controller_private_storage.yaml %{buildroot}%{_var}/opt/opnfv/nics/
-install build/nics/compute_private_storage.yaml %{buildroot}%{_var}/opt/opnfv/nics
+install build/nics/compute_private_storage.yaml %{buildroot}%{_var}/opt/opnfv/nics/
+install build/nics/compute_br-ex.yaml %{buildroot}%{_var}/opt/opnfv/nics/
+install build/nics/compute_private_br-ex.yaml %{buildroot}%{_var}/opt/opnfv/nics/
+install build/nics/compute_storage_br-ex.yaml %{buildroot}%{_var}/opt/opnfv/nics/
+install build/nics/compute_private_storage_br-ex.yaml %{buildroot}%{_var}/opt/opnfv/nics/
 install build/instackenv-virt.json %{buildroot}%{_var}/opt/opnfv/
 install build/instackenv.json.example %{buildroot}%{_var}/opt/opnfv/
 
@@ -62,6 +66,10 @@ install build/instackenv.json.example %{buildroot}%{_var}/opt/opnfv/
 %{_var}/opt/opnfv/nics/compute_storage.yaml
 %{_var}/opt/opnfv/nics/controller_private_storage.yaml
 %{_var}/opt/opnfv/nics/compute_private_storage.yaml
+%{_var}/opt/opnfv/nics/compute_br-ex.yaml
+%{_var}/opt/opnfv/nics/compute_private_br-ex.yaml
+%{_var}/opt/opnfv/nics/compute_storage_br-ex.yaml
+%{_var}/opt/opnfv/nics/compute_private_storage_br-ex.yaml
 %{_var}/opt/opnfv/instackenv-virt.json
 %{_var}/opt/opnfv/instackenv.json.example
 
index be40742..fd1cd0e 100644 (file)
@@ -1,31 +1,28 @@
-From 63f8b6412f526ba245d86f40eb6b1ae1ee06485d Mon Sep 17 00:00:00 2001
-From: Dan Radez <dradez@redhat.com>
-Date: Sun, 13 Dec 2015 21:20:40 -0500
-Subject: [PATCH] Adds OpenDaylight support
+From f9cd66d8c353411b8c3b32a45ab765eaaee02fec 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 L2/L3 and ONOS support
 
-To enable OpenDaylight on controllers use environments/opendaylight.yaml
-To enable OpenDaylight on external node use
-environments/opendaylight-external.yaml
-
-Adds onos support
 ---
  environments/onos.yaml                             |   8 +
  environments/opendaylight-external.yaml            |  25 ++
  environments/opendaylight.yaml                     |  25 ++
+ environments/opendaylight_l3.yaml                  |   8 +
  overcloud-resource-registry-puppet.yaml            |   3 +
- overcloud-without-mergepy.yaml                     |  62 +++++
+ overcloud-without-mergepy.yaml                     |  73 +++++
  puppet/all-nodes-config.yaml                       |   6 +
- puppet/compute.yaml                                |  25 ++
- puppet/controller.yaml                             |  35 +++
+ puppet/compute.yaml                                |  35 +++
+ puppet/controller.yaml                             |  47 ++++
  puppet/manifests/overcloud_compute.pp              |  33 ++-
- puppet/manifests/overcloud_controller.pp           |  80 +++++-
- puppet/manifests/overcloud_controller_pacemaker.pp | 299 +++++++++++++--------
- puppet/manifests/overcloud_opendaylight.pp         |  26 ++
- puppet/opendaylight-puppet.yaml                    | 209 ++++++++++++++
- 13 files changed, 712 insertions(+), 124 deletions(-)
+ puppet/manifests/overcloud_controller.pp           |  86 +++++-
+ puppet/manifests/overcloud_controller_pacemaker.pp | 302 +++++++++++++--------
+ puppet/manifests/overcloud_opendaylight.pp         |  27 ++
+ puppet/opendaylight-puppet.yaml                    | 217 +++++++++++++++
+ 14 files changed, 771 insertions(+), 124 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 puppet/manifests/overcloud_opendaylight.pp
  create mode 100644 puppet/opendaylight-puppet.yaml
 
@@ -105,8 +102,22 @@ index 0000000..c8abf75
 +      # reduce OpenDaylightCount to 0 if you don't want any
 +      # OpenDaylight only nodes
 +      opendaylight_install: true
+diff --git a/environments/opendaylight_l3.yaml b/environments/opendaylight_l3.yaml
+new file mode 100644
+index 0000000..be7c2a8
+--- /dev/null
++++ b/environments/opendaylight_l3.yaml
+@@ -0,0 +1,8 @@
++parameters:
++    #NeutronEnableL3Agent: false
++    NeutronEnableForceMetadata: true
++    OpenDaylightEnableL3: true
++    NeutronServicePlugins: "networking_odl.l3.l3_odl.OpenDaylightL3RouterPlugin"
++    ExtraConfig:
++      neutron_mechanism_drivers: ['opendaylight']
++      neutron_tenant_network_type: vxlan
 diff --git a/overcloud-resource-registry-puppet.yaml b/overcloud-resource-registry-puppet.yaml
-index c072c29..2413450 100644
+index 4cfed6b..adecc79 100644
 --- a/overcloud-resource-registry-puppet.yaml
 +++ b/overcloud-resource-registry-puppet.yaml
 @@ -27,6 +27,9 @@ resource_registry:
@@ -120,10 +131,21 @@ index c072c29..2413450 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 01c0079..210ec11 100644
+index a532c2f..1aa87ae 100644
 --- a/overcloud-without-mergepy.yaml
 +++ b/overcloud-without-mergepy.yaml
-@@ -227,6 +227,23 @@ parameters:
+@@ -113,6 +113,10 @@ parameters:
+     default: ''
+     type: string
+     description: Neutron ID for ctlplane network.
++  NeutronEnableForceMetadata:
++    default: 'False'
++    description: If True, DHCP always provides metadata route to VM.
++    type: string
+   NeutronEnableTunnelling:
+     type: string
+     default: "True"
+@@ -227,6 +231,27 @@ parameters:
      default: false
      description: Should MongoDb journaling be disabled
      type: boolean
@@ -131,6 +153,10 @@ index 01c0079..210ec11 100644
 +    default: 8081
 +    description: Set opendaylight service port
 +    type: number
++  OpenDaylightEnableL3:
++    description: Knob to enable/disable ODL L3
++    type: string
++    default: 'no'
 +  OpenDaylightInstall:
 +    default: false
 +    description: Whether to install OpenDaylight on the control nodes.
@@ -147,7 +173,7 @@ index 01c0079..210ec11 100644
    PublicVirtualFixedIPs:
      default: []
      description: >
-@@ -650,6 +667,18 @@ parameters:
+@@ -664,6 +689,18 @@ parameters:
        structure as ExtraConfig.
      type: json
  
@@ -166,7 +192,7 @@ index 01c0079..210ec11 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.
-@@ -674,6 +703,10 @@ parameters:
+@@ -688,6 +725,10 @@ parameters:
      type: string
      description: Format for CephStorage node hostnames
      default: '%stackname%-cephstorage-%index%'
@@ -177,7 +203,7 @@ index 01c0079..210ec11 100644
  
    # Identifiers to trigger tasks on nodes
    UpdateIdentifier:
-@@ -756,6 +789,27 @@ resources:
+@@ -770,6 +811,28 @@ resources:
        SwiftProxyVirtualIP: {get_attr: [VipMap, net_ip_map, {get_param: [ServiceNetMap, SwiftProxyNetwork]}]}
        PublicVirtualIP: {get_attr: [VipMap, net_ip_map, external]}
  
@@ -196,6 +222,7 @@ index 01c0079..210ec11 100644
 +          OpenDaylightPort: {get_param: OpenDaylightPort}
 +          OpenDaylightUsername: {get_param: OpenDaylightUsername}
 +          OpenDaylightPassword: {get_param: OpenDaylightPassword}
++          OpenDaylightEnableL3: {get_param: OpenDaylightEnableL3}
 +          OpenDaylightHostname:
 +            str_replace:
 +              template: {get_param: OpenDaylightHostnameFormat}
@@ -205,7 +232,15 @@ index 01c0079..210ec11 100644
    Controller:
      type: OS::Heat::ResourceGroup
      depends_on: Networks
-@@ -839,6 +893,10 @@ resources:
+@@ -832,6 +895,7 @@ resources:
+           NeutronBridgeMappings: {get_param: NeutronBridgeMappings}
+           NeutronExternalNetworkBridge: {get_param: NeutronExternalNetworkBridge}
+           NeutronEnableTunnelling: {get_param: NeutronEnableTunnelling}
++          NeutronEnableForceMetadata: {get_param: NeutronEnableForceMetadata}
+           NeutronNetworkVLANRanges: {get_param: NeutronNetworkVLANRanges}
+           NeutronPublicInterface: {get_param: NeutronPublicInterface}
+           NeutronPublicInterfaceDefaultRoute: {get_param: NeutronPublicInterfaceDefaultRoute}
+@@ -853,6 +917,11 @@ resources:
            NovaPassword: {get_param: NovaPassword}
            NtpServer: {get_param: NtpServer}
            MongoDbNoJournal: {get_param: MongoDbNoJournal}
@@ -213,11 +248,12 @@ index 01c0079..210ec11 100644
 +          OpenDaylightInstall: {get_param: OpenDaylightInstall}
 +          OpenDaylightUsername: {get_param: OpenDaylightUsername}
 +          OpenDaylightPassword: {get_param: OpenDaylightPassword}
++          OpenDaylightEnableL3: {get_param: OpenDaylightEnableL3}
            PcsdPassword: {get_resource: PcsdPassword}
            PublicVirtualInterface: {get_param: PublicVirtualInterface}
            RabbitPassword: {get_param: RabbitPassword}
-@@ -933,6 +991,9 @@ resources:
-           NovaPublicIP: {get_attr: [VipMap, net_ip_map, external]}
+@@ -948,6 +1017,9 @@ resources:
+           NovaPublicIP: {get_attr: [PublicVirtualIP, ip_address]}
            NovaPassword: {get_param: NovaPassword}
            NtpServer: {get_param: NtpServer}
 +          OpenDaylightPort: {get_param: OpenDaylightPort}
@@ -226,7 +262,7 @@ index 01c0079..210ec11 100644
            RabbitHost: {get_attr: [VipMap, net_ip_map, {get_param: [ServiceNetMap, RabbitMqNetwork]}]}
            RabbitPassword: {get_param: RabbitPassword}
            RabbitUserName: {get_param: RabbitUserName}
-@@ -1053,6 +1114,7 @@ resources:
+@@ -1068,6 +1140,7 @@ resources:
        compute_hosts: {get_attr: [Compute, hosts_entry]}
        controller_hosts: {get_attr: [Controller, hosts_entry]}
        controller_ips: {get_attr: [Controller, ip_address]}
@@ -259,7 +295,7 @@ index 2bc519b..98283c2 100644
                    list_join:
                    - ','
 diff --git a/puppet/compute.yaml b/puppet/compute.yaml
-index e259cff..5527669 100644
+index 70c7403..13fd4f6 100644
 --- a/puppet/compute.yaml
 +++ b/puppet/compute.yaml
 @@ -213,6 +213,23 @@ parameters:
@@ -286,8 +322,36 @@ index e259cff..5527669 100644
    RabbitHost:
      type: string
      default: ''  # Has to be here because of the ignored empty value bug
-@@ -415,6 +432,10 @@ resources:
-                 neutron::rabbit_user: {get_input: rabbit_username}
+@@ -320,6 +337,11 @@ resources:
+     properties:
+       ControlPlaneIP: {get_attr: [NovaCompute, networks, ctlplane, 0]}
++  ExternalPort:
++    type: OS::TripleO::Controller::Ports::ExternalPort
++    properties:
++      ControlPlaneIP: {get_attr: [NovaCompute, networks, ctlplane, 0]}
++
+   NetIpMap:
+     type: OS::TripleO::Network::Ports::NetIpMap
+     properties:
+@@ -327,6 +349,7 @@ resources:
+       InternalApiIp: {get_attr: [InternalApiPort, ip_address]}
+       StorageIp: {get_attr: [StoragePort, ip_address]}
+       TenantIp: {get_attr: [TenantPort, ip_address]}
++      ExternalIp: {get_attr: [ExternalPort, ip_address]}
+   NetworkConfig:
+     type: OS::TripleO::Compute::Net::SoftwareConfig
+@@ -335,6 +358,7 @@ resources:
+       InternalApiIpSubnet: {get_attr: [InternalApiPort, ip_subnet]}
+       StorageIpSubnet: {get_attr: [StoragePort, ip_subnet]}
+       TenantIpSubnet: {get_attr: [TenantPort, ip_subnet]}
++      ExternalIpSubnet: {get_attr: [ExternalPort, ip_subnet]}
+   NetworkDeployment:
+     type: OS::TripleO::SoftwareDeployment
+@@ -406,6 +430,10 @@ 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}
@@ -297,7 +361,7 @@ index e259cff..5527669 100644
                  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}
-@@ -468,6 +489,10 @@ resources:
+@@ -459,6 +487,10 @@ resources:
          snmpd_readonly_user_name: {get_param: SnmpdReadonlyUserName}
          snmpd_readonly_user_password: {get_param: SnmpdReadonlyUserPassword}
          glance_api_servers: {get_param: [EndpointMap, GlanceInternal, uri]}
@@ -308,11 +372,32 @@ index e259cff..5527669 100644
          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:
+   tenant_ip_address:
+     description: IP address of the server in the tenant network
+     value: {get_attr: [TenantPort, ip_address]}
++  external_ip_address:
++    description: IP address of the server in the external network
++    value: {get_attr: [ExternalPort, ip_address]}
+   hostname:
+     description: Hostname of the server
+     value: {get_attr: [NovaCompute, name]}
 diff --git a/puppet/controller.yaml b/puppet/controller.yaml
-index fdc1821..865a838 100644
+index ea0b3af..1d52922 100644
 --- a/puppet/controller.yaml
 +++ b/puppet/controller.yaml
-@@ -443,6 +443,27 @@ parameters:
+@@ -357,6 +357,10 @@ parameters:
+     default: 'True'
+     description: Allow automatic l3-agent failover
+     type: string
++  NeutronEnableForceMetadata:
++    default: 'False'
++    description: If True, DHCP always provides metadata route to VM.
++    type: string
+   NeutronEnableTunnelling:
+     type: string
+     default: "True"
+@@ -443,6 +447,31 @@ parameters:
    NtpServer:
      type: string
      default: ''
@@ -333,6 +418,10 @@ index fdc1821..865a838 100644
 +    type: string
 +    description: The password for the opendaylight server.
 +    hidden: true
++  OpenDaylightEnableL3:
++    description: Knob to enable/disable ODL L3
++    type: string
++    default: 'no'
 +  ONOSPort:
 +    default: 8181
 +    description: Set onos service port
@@ -340,7 +429,15 @@ index fdc1821..865a838 100644
    PcsdPassword:
      type: string
      description: The password for the 'pcsd' user.
-@@ -819,6 +840,11 @@ resources:
+@@ -696,6 +725,7 @@ resources:
+       input_values:
+         bootstack_nodeid: {get_attr: [Controller, name]}
+         neutron_enable_tunneling: {get_param: NeutronEnableTunnelling}
++        neutron_enable_force_metadata: {get_param: NeutronEnableForceMetadata}
+         haproxy_log_address: {get_param: HAProxySyslogAddress}
+         heat.watch_server_url:
+           list_join:
+@@ -805,6 +835,12 @@ resources:
              template: tripleo-CLUSTER
              params:
                CLUSTER: {get_param: MysqlClusterUniquePart}
@@ -348,11 +445,12 @@ index fdc1821..865a838 100644
 +        opendaylight_install: {get_param: OpenDaylightInstall}
 +        opendaylight_username: {get_param: OpenDaylightUsername}
 +        opendaylight_password: {get_param: OpenDaylightPassword}
++        opendaylight_enable_l3: {get_param: OpenDaylightEnableL3}
 +        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}
-@@ -1151,6 +1177,15 @@ resources:
+@@ -1136,6 +1172,16 @@ resources:
                  mysql_bind_host: {get_input: mysql_network}
                  mysql_virtual_ip: {get_input: mysql_virtual_ip}
  
@@ -361,6 +459,7 @@ index fdc1821..865a838 100644
 +                opendaylight_install: {get_input: opendaylight_install}
 +                opendaylight_username: {get_input: opendaylight_username}
 +                opendaylight_password: {get_input: opendaylight_password}
++                opendaylight_enable_l3: {get_input: opendaylight_enable_l3}
 +                
 +                # ONOS
 +                onos_port: {get_input: onos_port}
@@ -368,6 +467,14 @@ index fdc1821..865a838 100644
                  # Neutron
                  neutron::bind_host: {get_input: neutron_api_network}
                  neutron::rabbit_password: {get_input: rabbit_password}
+@@ -1152,6 +1198,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}
++                neutron::agents::dhcp::enable_force_metadata: {get_input: neutron_enable_force_metadata}
+                 neutron_agent_mode: {get_input: neutron_agent_mode}
+                 neutron_router_distributed: {get_input: neutron_router_distributed}
+                 neutron::core_plugin: {get_input: neutron_core_plugin}
 diff --git a/puppet/manifests/overcloud_compute.pp b/puppet/manifests/overcloud_compute.pp
 index cd41cc7..b8336ee 100644
 --- a/puppet/manifests/overcloud_compute.pp
@@ -413,10 +520,10 @@ 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 1b0429b..d3f3d2d 100644
+index 1f6c2be..7851b45 100644
 --- a/puppet/manifests/overcloud_controller.pp
 +++ b/puppet/manifests/overcloud_controller.pp
-@@ -30,6 +30,20 @@ if hiera('step') >= 1 {
+@@ -30,6 +30,21 @@ if hiera('step') >= 1 {
  
  if hiera('step') >= 2 {
  
@@ -424,6 +531,7 @@ index 1b0429b..d3f3d2d 100644
 +    class {"opendaylight":
 +      extra_features => ['odl-ovsdb-openstack'],
 +      odl_rest_port  => hiera('opendaylight_port'),
++      enable_l3      => hiera('opendaylight_enable_l3', 'no'),
 +    }
 +  }
 +  
@@ -437,7 +545,7 @@ index 1b0429b..d3f3d2d 100644
    if count(hiera('ntp::servers')) > 0 {
      include ::ntp
    }
-@@ -223,9 +237,7 @@
+@@ -223,9 +238,7 @@ if hiera('step') >= 3 {
    include ::nova::scheduler
    include ::nova::scheduler::filter
  
@@ -447,7 +555,7 @@ index 1b0429b..d3f3d2d 100644
    include ::neutron::agents::dhcp
    include ::neutron::agents::metadata
  
-@@ -238,15 +250,71 @@ if hiera('step') >= 3 {
+@@ -237,15 +250,76 @@ if hiera('step') >= 3 {
      require => Package['neutron'],
    }
  
@@ -458,7 +566,11 @@ index 1b0429b..d3f3d2d 100644
 +    }
 +  } else {
 +    include ::neutron
-+    include ::neutron::agents::l3
++    if 'opendaylight' in hiera('neutron_mechanism_drivers') {
++      if ! str2bool(hiera('opendaylight_enable_l3', 'no')) {
++        include ::neutron::agents::l3
++      }
++    }
 +  }
 +  
    class { '::neutron::plugins::ml2':
@@ -471,7 +583,9 @@ index 1b0429b..d3f3d2d 100644
 -    tunnel_types    => split(hiera('neutron_tunnel_types'), ','),
 +
 +  if 'opendaylight' in hiera('neutron_mechanism_drivers') {
-+
++    if ! str2bool(hiera('opendaylight_enable_l3', 'no')) {
++      Service['neutron-server'] -> Service['neutron-l3']
++    }
 +    if str2bool(hiera('opendaylight_install', 'false')) {
 +      $controller_ips = split(hiera('controller_node_ips'), ',')
 +      $opendaylight_controller_ip = $controller_ips[0]
@@ -495,7 +609,6 @@ index 1b0429b..d3f3d2d 100644
 +        odl_password      => hiera('opendaylight_password'),
 +      }
 +    }
-+    Service['neutron-server'] -> Service['neutron-l3']
 +
 +  } elsif 'onos_ml2' in hiera('neutron_mechanism_drivers') {
 +    #config ml2_conf.ini with onos url address
@@ -522,7 +635,7 @@ index 1b0429b..d3f3d2d 100644
    if 'cisco_n1kv' in hiera('neutron_mechanism_drivers') {
      include ::neutron::plugins::ml2::cisco::nexus1000v
  
-@@ -281,8 +349,6 @@ if hiera('step') >= 3 {
+@@ -280,8 +354,6 @@ if hiera('step') >= 3 {
    }
  
    Service['neutron-server'] -> Service['neutron-dhcp-service']
@@ -532,10 +645,10 @@ index 1b0429b..d3f3d2d 100644
  
    include ::cinder
 diff --git a/puppet/manifests/overcloud_controller_pacemaker.pp b/puppet/manifests/overcloud_controller_pacemaker.pp
-index 863cc5f..5b1c37a 100644
+index 3fb92f3..9568390 100644
 --- a/puppet/manifests/overcloud_controller_pacemaker.pp
 +++ b/puppet/manifests/overcloud_controller_pacemaker.pp
-@@ -380,6 +380,20 @@ if hiera('step') >= 2 {
+@@ -380,6 +380,21 @@ if hiera('step') >= 2 {
  
    }
  
@@ -543,6 +656,7 @@ index 863cc5f..5b1c37a 100644
 +    class {"opendaylight":
 +      extra_features => ['odl-ovsdb-openstack'],
 +      odl_rest_port  => hiera('opendaylight_port'),
++      enable_l3      => hiera('opendaylight_enable_l3', 'no'),
 +    }
 +  }
 +
@@ -556,7 +670,7 @@ index 863cc5f..5b1c37a 100644
    exec { 'galera-ready' :
      command     => '/usr/bin/clustercheck >/dev/null',
      timeout     => 30,
-@@ -584,7 +598,14 @@ if hiera('step') >= 3 {
+@@ -584,7 +599,14 @@ if hiera('step') >= 3 {
    include ::nova::network::neutron
  
    # Neutron class definitions
@@ -572,7 +686,7 @@ index 863cc5f..5b1c37a 100644
    class { '::neutron::server' :
      sync_db        => $sync_db,
      manage_service => false,
-@@ -595,10 +616,6 @@ if hiera('step') >= 3 {
+@@ -594,10 +616,6 @@ if hiera('step') >= 3 {
      manage_service => false,
      enabled        => false,
    }
@@ -583,7 +697,7 @@ index 863cc5f..5b1c37a 100644
    class { '::neutron::agents::metadata':
      manage_service => false,
      enabled        => false,
-@@ -610,18 +627,66 @@ if hiera('step') >= 3 {
+@@ -609,18 +627,68 @@ if hiera('step') >= 3 {
      notify  => Service['neutron-dhcp-service'],
      require => Package['neutron'],
    }
@@ -616,7 +730,7 @@ index 863cc5f..5b1c37a 100644
 +      odl_password      => hiera('opendaylight_password'),
 +      odl_port          => hiera('opendaylight_port'),
 +    }
-+
 +    if str2bool(hiera('opendaylight_install', 'false')) {
 +      class { 'neutron::plugins::ovs::opendaylight':
 +        odl_controller_ip => $opendaylight_controller_ip,
@@ -626,9 +740,11 @@ index 863cc5f..5b1c37a 100644
 +        odl_password      => hiera('opendaylight_password'),
 +      }
 +    }
-+    class { '::neutron::agents::l3' :
-+      manage_service => false,
-+      enabled        => false,
++    if ! str2bool(hiera('opendaylight_enable_l3', 'no')) {
++      class { '::neutron::agents::l3' :
++        manage_service => false,
++        enabled        => false,
++      }
 +    }
 +  } elsif 'onos_ml2' in hiera('neutron_mechanism_drivers') {
 +    #config ml2_conf.ini with onos url address
@@ -640,7 +756,7 @@ index 863cc5f..5b1c37a 100644
 +      'onos/password':         value => 'admin';
 +      'onos/url_path':         value => "http://${controller_node_ips[0]}:${onos_port}/onos/vtn";
 +    }
++
 +  } else {
 +    class { '::neutron::agents::l3' :
 +      manage_service => false,
@@ -656,22 +772,22 @@ index 863cc5f..5b1c37a 100644
    if 'cisco_ucsm' in hiera('neutron_mechanism_drivers') {
      include ::neutron::plugins::ml2::cisco::ucsm
    }
-@@ -646,8 +711,10 @@ if hiera('step') >= 3 {
+@@ -645,8 +713,10 @@ if hiera('step') >= 3 {
    if hiera('neutron_enable_bigswitch_ml2', false) {
      include ::neutron::plugins::ml2::bigswitch::restproxy
    }
 -  neutron_l3_agent_config {
 -    'DEFAULT/ovs_use_veth': value => hiera('neutron_ovs_use_veth', false);
-+  if !('onos_ml2' in hiera('neutron_mechanism_drivers')) {
++  if !('onos_ml2' in hiera('neutron_mechanism_drivers') or str2bool(hiera('opendaylight_enable_l3', 'no'))) {
 +    neutron_l3_agent_config {
 +      'DEFAULT/ovs_use_veth': value => hiera('neutron_ovs_use_veth', false);
 +    }
    }
    neutron_dhcp_agent_config {
      'DEFAULT/ovs_use_veth': value => hiera('neutron_ovs_use_veth', false);
-@@ -1073,62 +1140,21 @@ if hiera('step') >= 4 {
-         require      => Pacemaker::Resource::Service[$::keystone::params::service_name]
-       }
+@@ -1055,62 +1125,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',
@@ -736,7 +852,7 @@ index 863cc5f..5b1c37a 100644
      pacemaker::constraint::base { 'keystone-to-neutron-server-constraint':
        constraint_type => 'order',
        first_resource  => "${::keystone::params::service_name}-clone",
-@@ -1138,65 +1164,110 @@ if hiera('step') >= 4 {
+@@ -1120,65 +1149,110 @@ if hiera('step') >= 4 {
        require         => [Pacemaker::Resource::Service[$::keystone::params::service_name],
                            Pacemaker::Resource::Service[$::neutron::params::server_service]],
      }
@@ -865,7 +981,7 @@ index 863cc5f..5b1c37a 100644
 -      score   => 'INFINITY',
 -      require => [Pacemaker::Resource::Service[$::neutron::params::l3_agent_service],
 -                  Pacemaker::Resource::Service[$::neutron::params::metadata_agent_service]],
-+    if !('onos_ml2' in hiera('neutron_mechanism_drivers')) {
++    if !('onos_ml2' in hiera('neutron_mechanism_drivers') or str2bool(hiera('opendaylight_enable_l3', 'no'))) {
 +      pacemaker::constraint::base { 'neutron-dhcp-agent-to-l3-agent-constraint':
 +        constraint_type => 'order',
 +        first_resource  => "${::neutron::params::dhcp_agent_service}-clone",
@@ -897,7 +1013,7 @@ index 863cc5f..5b1c37a 100644
 +        score   => 'INFINITY',
 +        require => [Pacemaker::Resource::Service[$::neutron::params::l3_agent_service],
 +                    Pacemaker::Resource::Service[$::neutron::params::metadata_agent_service]],
-+     }
++      }
      }
 -
      # Nova
@@ -905,10 +1021,10 @@ index 863cc5f..5b1c37a 100644
        clone_params => 'interleave=true',
 diff --git a/puppet/manifests/overcloud_opendaylight.pp b/puppet/manifests/overcloud_opendaylight.pp
 new file mode 100644
-index 0000000..aea6568
+index 0000000..33f609a
 --- /dev/null
 +++ b/puppet/manifests/overcloud_opendaylight.pp
-@@ -0,0 +1,26 @@
+@@ -0,0 +1,27 @@
 +# Copyright 2015 Red Hat, Inc.
 +# All Rights Reserved.
 +#
@@ -933,14 +1049,15 @@ index 0000000..aea6568
 +class {"opendaylight":
 +  extra_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..70f2543
+index 0000000..b876dc7
 --- /dev/null
 +++ b/puppet/opendaylight-puppet.yaml
-@@ -0,0 +1,209 @@
+@@ -0,0 +1,217 @@
 +heat_template_version: 2015-04-30
 +
 +description: >
@@ -968,6 +1085,10 @@ index 0000000..70f2543
 +    description: The admin password for the OpenDaylight node
 +    type: string
 +    hidden: true
++  OpenDaylightEnableL3:
++    description: Knob to enable/disable ODL L3
++    type: string
++    default: 'no'
 +  OpenDaylightPort:
 +    default: 8081
 +    description: Set OpenDaylight service port
@@ -1066,6 +1187,9 @@ index 0000000..70f2543
 +            params:
 +              server: {get_param: NtpServer}
 +        opendaylight_port: {get_param: OpenDaylightPort}
++        opendaylight_enable_l3: {get_param: OpenDaylightEnableL3}
++        opendaylight_username: {get_param: OpenDaylightUsername}
++        opendaylight_password: {get_param: OpenDaylightPassword}
 +
 +  OpenDaylightConfig:
 +    type: OS::Heat::StructuredConfig
@@ -1090,6 +1214,7 @@ index 0000000..70f2543
 +                opendaylight::admin_username: {get_param: OpenDaylightUsername}
 +                opendaylight::admin_password: {get_param: OpenDaylightPassword}
 +                opendaylight_port: {get_input: opendaylight_port}
++                opendaylight_enable_l3: {get_input: opendaylight_enable_l3}
 +            ceph:
 +              raw_data: {get_file: hieradata/ceph.yaml}
 +
diff --git a/build/puppet-neutron-force-metadata.patch b/build/puppet-neutron-force-metadata.patch
new file mode 100644 (file)
index 0000000..df6061b
--- /dev/null
@@ -0,0 +1,50 @@
+From ca931831dbfe876095357acbf39dca17c3d3df71 Mon Sep 17 00:00:00 2001
+From: root <root@overcloud-controller-0.localdomain>
+Date: Sun, 17 Jan 2016 03:07:49 +0000
+Subject: [PATCH] Adds force metadata option
+
+---
+ manifests/agents/dhcp.pp | 10 ++++++++--
+ 1 file changed, 8 insertions(+), 2 deletions(-)
+
+diff --git a/manifests/agents/dhcp.pp b/manifests/agents/dhcp.pp
+index 0c10492..cf772b5 100644
+--- a/manifests/agents/dhcp.pp
++++ b/manifests/agents/dhcp.pp
+@@ -53,6 +53,10 @@
+ #   (optional) enable metadata support on isolated networks.
+ #   Defaults to false.
+ #
++# [*enable_force_metadata*]
++#   (optional) enable metadata support on all networks.
++#   Defaults to false.
++#
+ # [*enable_metadata_network*]
+ #   (optional) Allows for serving metadata requests coming from a dedicated metadata
+ #   access network whose cidr is 169.254.169.254/16 (or larger prefix), and is
+@@ -86,6 +90,7 @@ class neutron::agents::dhcp (
+   $dnsmasq_config_file      = undef,
+   $dhcp_delete_namespaces   = true,
+   $enable_isolated_metadata = false,
++  $enable_force_metadata    = false,
+   $enable_metadata_network  = false,
+   $dhcp_broadcast_reply     = false,
+   # DEPRECATED PARAMETERS
+@@ -110,11 +115,12 @@ class neutron::agents::dhcp (
+     }
+   }
+-  if (! $enable_isolated_metadata) and $enable_metadata_network {
+-    fail('enable_metadata_network to true requires enable_isolated_metadata also enabled.')
++  if (! ($enable_isolated_metadata or $enable_force_metadata)) and $enable_metadata_network {
++    fail('enable_metadata_network to true requires enable_isolated_metadata or enable_force_metadata also enabled.')
+   } else {
+     neutron_dhcp_agent_config {
+       'DEFAULT/enable_isolated_metadata': value => $enable_isolated_metadata;
++      'DEFAULT/force_metadata':           value => $enable_force_metadata;
+       'DEFAULT/enable_metadata_network':  value => $enable_metadata_network;
+     }
+   }
+-- 
+1.8.3.1
+
index 232d825..e99f4b2 100755 (executable)
@@ -47,6 +47,7 @@ NET_MAP['storage_network']="brbm3"
 
 ##LIBRARIES
 source $CONFIG/lib/common-functions.sh
+source $CONFIG/lib/installer/onos/onos_gw_mac_update.sh
 
 ##FUNCTIONS
 ##translates yaml into variables
@@ -650,6 +651,11 @@ function configure_network_environment {
       sed -i 's#^.*Compute::Ports::StoragePort:.*$#  OS::TripleO::Compute::Ports::StoragePort: '${tht_dir}'/ports/noop.yaml#' $1
   fi
 
+  # check for ODL L3
+  if [ ${deploy_options_array['sdn_l3']} == 'true' ]; then
+      nic_ext+=_br-ex
+  fi
+
   # set nics appropriately
   sed -i 's#^.*Compute::Net::SoftwareConfig:.*$#  OS::TripleO::Compute::Net::SoftwareConfig: nics/compute'${nic_ext}'.yaml#' $1
   sed -i 's#^.*Controller::Net::SoftwareConfig:.*$#  OS::TripleO::Controller::Net::SoftwareConfig: nics/controller'${nic_ext}'.yaml#' $1
@@ -763,9 +769,12 @@ sleep 15
 ##preping it for deployment and launch the deploy
 ##params: none
 function undercloud_prep_overcloud_deploy {
-  # TODO ADD ODL L3 logic here
   if [[ ${#deploy_options_array[@]} -eq 0 || ${deploy_options_array['sdn_controller']} == 'opendaylight' ]]; then
-    DEPLOY_OPTIONS+=" -e /usr/share/openstack-tripleo-heat-templates/environments/opendaylight.yaml"
+    if [ ${deploy_options_array['sdn_l3']} == 'true' ]; then
+      DEPLOY_OPTIONS+=" -e /usr/share/openstack-tripleo-heat-templates/environments/opendaylight_l3.yaml"
+    else
+      DEPLOY_OPTIONS+=" -e /usr/share/openstack-tripleo-heat-templates/environments/opendaylight.yaml"
+    fi
   elif [ ${deploy_options_array['sdn_controller']} == 'opendaylight-external' ]; then
     DEPLOY_OPTIONS+=" -e /usr/share/openstack-tripleo-heat-templates/environments/opendaylight-external.yaml"
   elif [ ${deploy_options_array['sdn_controller']} == 'onos' ]; then
@@ -797,6 +806,8 @@ function undercloud_prep_overcloud_deploy {
      DEPLOY_OPTIONS+=" --control-flavor control --compute-flavor compute"
   fi
 
+  echo -e "${blue}INFO: Deploy options set:\n${DEPLOY_OPTIONS}${reset}"
+
   ssh -T ${SSH_OPTIONS[@]} "stack@$UNDERCLOUD" <<EOI
 source stackrc
 set -o errexit
@@ -873,6 +884,16 @@ EOI
       fi
     fi
   done
+
+  # for virtual, we NAT public network through instack
+  if [ "$virtual" == "TRUE" ]; then
+    if ! configure_undercloud_nat ${public_network_cidr}; then
+      echo -e "${red}ERROR: Unable to NAT undercloud with external net: ${public_network_cidr}${reset}"
+      exit 1
+    else
+      echo -e "${blue}INFO: Undercloud (instack VM) has been setup to NAT Overcloud public network${reset}"
+    fi
+  fi
 }
 
 display_usage() {
@@ -1029,6 +1050,14 @@ main() {
       echo -e "${blue}INFO: Post Install Configuration Complete${reset}"
     fi
   fi
+  if [[ ${deploy_options_array['sdn_controller']} == 'onos' ]]; then
+    if ! onos_update_gw_mac ${public_network_cidr} ${public_network_gateway}; then
+      echo -e "${red}ERROR:ONOS Post Install Configuration Failed, Exiting.${reset}"
+      exit 1
+    else
+      echo -e "${blue}INFO: ONOS Post Install Configuration Complete${reset}"
+    fi
+  fi
 }
 
 main "$@"
index edf06cf..1e55aa1 100644 (file)
@@ -504,3 +504,23 @@ PEERDNS=no" > ${net_path}/ifcfg-${line}
 
   sudo systemctl restart network
 }
+
+# Update iptables rule for external network reach internet
+# for virtual deployments
+# params: external_cidr
+function configure_undercloud_nat {
+  local external_cidr
+  if [[ -z "$1" ]]; then
+    return 1
+  else
+    external_cidr=$1
+  fi
+
+  ssh -T ${SSH_OPTIONS[@]} "root@$UNDERCLOUD" <<EOI
+iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
+iptables -t nat -A POSTROUTING -s ${external_cidr} -o eth0 -j MASQUERADE
+iptables -A FORWARD -i eth2 -j ACCEPT
+iptables -A FORWARD -s ${external_cidr} -m state --state ESTABLISHED,RELATED -j ACCEPT
+service iptables save
+EOI
+}
diff --git a/lib/installer/onos/onos_gw_mac_update.sh b/lib/installer/onos/onos_gw_mac_update.sh
new file mode 100644 (file)
index 0000000..d003cc0
--- /dev/null
@@ -0,0 +1,56 @@
+#!/bin/bash
+
+# Update gateway mac to onos for l3 function
+
+# author: Bob zhou
+# author: Tim Rozet
+
+
+# Update gateway mac to onos for l3 function
+# params: external CIDR, external gateway
+function onos_update_gw_mac {
+  local CIDR
+  local GW_IP
+
+  if [[ -z "$1" || -z "$2" ]]; then
+    return 1
+  else
+    CIDR=$1
+    GW_IP=$2
+  fi
+
+  if [ -z "$UNDERCLOUD" ]; then
+    #if not found then dnsmasq may be using leasefile-ro
+    instack_mac=$(virsh domiflist instack | grep default | \
+                  grep -Eo "[0-9a-f\]+:[0-9a-f\]+:[0-9a-f\]+:[0-9a-f\]+:[0-9a-f\]+:[0-9a-f\]+")
+    UNDERCLOUD=$(/usr/sbin/arp -e | grep ${instack_mac} | awk {'print $1'})
+  fi
+  # get controller ip address
+  controller_ip=$(ssh -T ${SSH_OPTIONS[@]} "stack@$UNDERCLOUD" <<EOI
+source stackrc
+openstack server list | grep overcloud-controller-0 | grep -Eo "[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+"
+EOI
+)
+
+  if [ -z "$controller_ip" ]; then
+    echo "ERROR: Failed to find controller_ip for overcloud-controller-0"
+    return 1
+  fi
+
+  # get gateway mac
+  GW_MAC=$(arping ${GW_IP} -c 1 -I brbm2 | grep -Eo '([0-9a-fA-F]{2})(([/\s:-][0-9a-fA-F]{2}){5})')
+
+  if [ -z "$GW_MAC" ]; then
+    echo "ERROR: Failed to find gateway mac for ${GW_IP}"
+    return 1
+  fi
+
+  # update gateway mac to onos
+  ssh -T ${SSH_OPTIONS[@]} "stack@$UNDERCLOUD" <<EOI
+ssh -T ${SSH_OPTIONS[@]} "heat-admin@${controller_ip}" <<EOF
+echo "external gateway mac is ${GW_MAC}"
+/opt/onos/bin/onos "externalgateway-update -m ${GW_MAC}"
+EOF
+EOI
+
+}