From 6bfab6c7e79ed029a9102ff7b7955b0a71f13c6d Mon Sep 17 00:00:00 2001 From: Feng Pan Date: Sun, 6 Aug 2017 21:55:44 -0400 Subject: Add os-odl-fdio-dvr support apex-tripleo-heat-templates: I6a83c9e2deeb0df9a3ab09a707c9c64aa84da55e apex-puppet-tripleo: I2025e3157b97b376b63002003ca17c7206aba546 JIRA: APEX-466 Change-Id: Iedb75994d35b5dc1dd5d5ce1a57277c8f3729dfd Signed-off-by: Feng Pan --- build/nics-template.yaml.jinja2 | 11 +++++++- build/opnfv-environment.yaml | 1 + build/overcloud-full.sh | 8 ++---- build/overcloud-opendaylight.sh | 4 --- build/rpm_specs/opnfv-apex-common.spec | 4 +++ config/deploy/os-odl-fdio-dvr-ha.yaml | 36 ++++++++++++++++++++++++ config/deploy/os-odl-fdio-dvr-noha.yaml | 36 ++++++++++++++++++++++++ config/network/network_settings.yaml | 4 +-- config/network/network_settings_v6.yaml | 4 +-- config/network/network_settings_vlans.yaml | 4 +-- config/network/network_settings_vpp.yaml | 4 +-- lib/overcloud-deploy-functions.sh | 45 +++++++++++++++++++++++++----- lib/python/apex_python_utils.py | 3 ++ 13 files changed, 139 insertions(+), 25 deletions(-) create mode 100644 config/deploy/os-odl-fdio-dvr-ha.yaml create mode 100644 config/deploy/os-odl-fdio-dvr-noha.yaml diff --git a/build/nics-template.yaml.jinja2 b/build/nics-template.yaml.jinja2 index 23016183..93d3dc14 100644 --- a/build/nics-template.yaml.jinja2 +++ b/build/nics-template.yaml.jinja2 @@ -131,8 +131,17 @@ resources: ip_netmask: {get_param: InternalApiIpSubnet} {%- endif %} {%- else %} - type: interface + type: {{ nets['admin']['nic_mapping'][role]['phys_type'] }} + {%- if nets['admin']['nic_mapping'][role]['phys_type'] == 'linux_bridge' %} + name: br-ctlplane + members: + - + type: interface + name: {{ nets['admin']['nic_mapping'][role]['members'][0] }} + primary: true + {%- else %} name: {{ nets['admin']['nic_mapping'][role]['members'][0] }} + {%- endif %} {%- endif %} use_dhcp: false dns_servers: {get_param: DnsServers} diff --git a/build/opnfv-environment.yaml b/build/opnfv-environment.yaml index 8bd1c10b..0f3dd701 100644 --- a/build/opnfv-environment.yaml +++ b/build/opnfv-environment.yaml @@ -11,6 +11,7 @@ parameter_defaults: NeutronEnableForceMetadata: true NeutronEnableDHCPMetadata: true NeutronEnableIsolatedMetadata: true + #NeutronDhcpAgentsPerNetwork: 3 NeutronPluginExtensions: 'qos,port_security,data_plane_status' # TODO: VLAN Ranges should be configurable from network settings NeutronNetworkVLANRanges: 'datacentre:500:525' diff --git a/build/overcloud-full.sh b/build/overcloud-full.sh index 403ab8ee..23d401fb 100755 --- a/build/overcloud-full.sh +++ b/build/overcloud-full.sh @@ -41,8 +41,8 @@ rm -rf vsperf vsperf.tar.gz git clone https://gerrit.opnfv.org/gerrit/vswitchperf vsperf tar czf vsperf.tar.gz vsperf -# Increase disk size by 900MB to accommodate more packages -qemu-img resize overcloud-full_build.qcow2 +900MB +# Increase disk size by 1200MB to accommodate more packages +qemu-img resize overcloud-full_build.qcow2 +1200MB # expand file system to max disk size # installing forked apex-puppet-tripleo @@ -118,9 +118,6 @@ for package in ${fdio_pkgs[@]}; do fdio_pkg_str+=" --upload ${BUILD_DIR}/${package##*/}:/root/fdio/" done -# Increase disk size by 900MB to accommodate more packages -qemu-img resize overcloud-full_build.qcow2 +900MB - # upload dpdk rpms but do not install # install fd.io yum repo and packages # upload puppet fdio @@ -131,6 +128,7 @@ LIBGUESTFS_BACKEND=direct virt-customize \ $dpdk_pkg_str \ --upload ${BUILD_DIR}/puppet-fdio.tar.gz:/etc/puppet/modules \ --run-command "cd /etc/puppet/modules && tar xzf puppet-fdio.tar.gz" \ + --upload ${BUILD_DIR}/fdio.repo:/etc/yum.repos.d/ \ --run-command "mkdir /root/fdio" \ --upload ${BUILD_DIR}/noarch/$netvpp_pkg:/root/fdio \ $fdio_pkg_str \ diff --git a/build/overcloud-opendaylight.sh b/build/overcloud-opendaylight.sh index 82ff8f74..ae5764c2 100755 --- a/build/overcloud-opendaylight.sh +++ b/build/overcloud-opendaylight.sh @@ -49,9 +49,6 @@ popd > /dev/null # Download ODL netvirt for VPP populate_cache http://artifacts.opnfv.org/apex/danube/fdio_netvirt/opendaylight-7.0.0-0.1.20170531snap665.el7.noarch.rpm -# Download ODL for fdio scenarios -populate_cache http://artifacts.opnfv.org/apex/danube/fdio_odls/fdio_odl_carbon.tar.gz - # install ODL packages # Patch in OPNFV custom puppet-tripleO # install Honeycomb @@ -72,7 +69,6 @@ LIBGUESTFS_BACKEND=direct virt-customize \ --install capnproto-libs,capnproto \ --upload ${BUILD_ROOT}/patches/neutron-patch-NSDriver.patch:/usr/lib/python2.7/site-packages/ \ --upload ${CACHE_DIR}/opendaylight-7.0.0-0.1.20170531snap665.el7.noarch.rpm:/root/ \ - --upload ${CACHE_DIR}/fdio_odl_carbon.tar.gz:/root/ \ -a overcloud-full-opendaylight_build.qcow2 # Arch dependent on x86 diff --git a/build/rpm_specs/opnfv-apex-common.spec b/build/rpm_specs/opnfv-apex-common.spec index 15f62c1f..ccb100f3 100644 --- a/build/rpm_specs/opnfv-apex-common.spec +++ b/build/rpm_specs/opnfv-apex-common.spec @@ -57,6 +57,8 @@ install config/deploy/os-odl-sfc-noha.yaml %{buildroot}%{_sysconfdir}/opnfv-apex install config/deploy/os-odl-fdio-noha.yaml %{buildroot}%{_sysconfdir}/opnfv-apex/os-odl-fdio-noha.yaml install config/deploy/os-odl_netvirt-fdio-noha.yaml %{buildroot}%{_sysconfdir}/opnfv-apex/os-odl_netvirt-fdio-noha.yaml install config/deploy/os-odl-fdio-ha.yaml %{buildroot}%{_sysconfdir}/opnfv-apex/os-odl-fdio-ha.yaml +install config/deploy/os-odl-fdio-dvr-ha.yaml %{buildroot}%{_sysconfdir}/opnfv-apex/os-odl-fdio-dvr-ha.yaml +install config/deploy/os-odl-fdio-dvr-noha.yaml %{buildroot}%{_sysconfdir}/opnfv-apex/os-odl-fdio-dvr-noha.yaml install config/deploy/os-odl-nofeature-ha.yaml %{buildroot}%{_sysconfdir}/opnfv-apex/os-odl-nofeature-ha.yaml install config/deploy/os-odl-nofeature-noha.yaml %{buildroot}%{_sysconfdir}/opnfv-apex/os-odl-nofeature-noha.yaml install config/deploy/os-odl-ovs_dpdk-ha.yaml %{buildroot}%{_sysconfdir}/opnfv-apex/os-odl-ovs_dpdk-ha.yaml @@ -146,6 +148,8 @@ install config/inventory/pod_example_settings.yaml %{buildroot}%{_docdir}/opnfv/ %{_sysconfdir}/opnfv-apex/os-odl-fdio-noha.yaml %{_sysconfdir}/opnfv-apex/os-odl_netvirt-fdio-noha.yaml %{_sysconfdir}/opnfv-apex/os-odl-fdio-ha.yaml +%{_sysconfdir}/opnfv-apex/os-odl-fdio-dvr-ha.yaml +%{_sysconfdir}/opnfv-apex/os-odl-fdio-dvr-noha.yaml %{_sysconfdir}/opnfv-apex/os-odl-ovs_dpdk-noha.yaml %{_sysconfdir}/opnfv-apex/os-odl-ovs_dpdk-ha.yaml %{_sysconfdir}/opnfv-apex/os-odl-nofeature-ha.yaml diff --git a/config/deploy/os-odl-fdio-dvr-ha.yaml b/config/deploy/os-odl-fdio-dvr-ha.yaml new file mode 100644 index 00000000..564cf0b6 --- /dev/null +++ b/config/deploy/os-odl-fdio-dvr-ha.yaml @@ -0,0 +1,36 @@ +global_params: + ha_enabled: true + +deploy_options: + sdn_controller: opendaylight + odl_version: carbon + odl_vpp_routing_node: dvr + tacker: true + congress: true + sfc: false + vpn: false + vpp: true + dataplane: fdio + performance: + Controller: + kernel: + hugepages: 1024 + hugepagesz: 2M + intel_iommu: 'on' + iommu: pt + isolcpus: 1,2 + vpp: + main-core: 1 + corelist-workers: 2 + uio-driver: uio_pci_generic + Compute: + kernel: + hugepagesz: 2M + hugepages: 2048 + intel_iommu: 'on' + iommu: pt + isolcpus: 1,2 + vpp: + main-core: 1 + corelist-workers: 2 + uio-driver: uio_pci_generic diff --git a/config/deploy/os-odl-fdio-dvr-noha.yaml b/config/deploy/os-odl-fdio-dvr-noha.yaml new file mode 100644 index 00000000..24c433bd --- /dev/null +++ b/config/deploy/os-odl-fdio-dvr-noha.yaml @@ -0,0 +1,36 @@ +global_params: + ha_enabled: false + +deploy_options: + sdn_controller: opendaylight + odl_version: carbon + odl_vpp_routing_node: dvr + tacker: true + congress: true + sfc: false + vpn: false + vpp: true + dataplane: fdio + performance: + Controller: + kernel: + hugepages: 1024 + hugepagesz: 2M + intel_iommu: 'on' + iommu: pt + isolcpus: 1,2 + vpp: + main-core: 1 + corelist-workers: 2 + uio-driver: uio_pci_generic + Compute: + kernel: + hugepagesz: 2M + hugepages: 2048 + intel_iommu: 'on' + iommu: pt + isolcpus: 1,2 + vpp: + main-core: 1 + corelist-workers: 2 + uio-driver: uio_pci_generic diff --git a/config/network/network_settings.yaml b/config/network/network_settings.yaml index 88753346..fe11a9b5 100644 --- a/config/network/network_settings.yaml +++ b/config/network/network_settings.yaml @@ -78,7 +78,7 @@ networks: # If empty entire range is usable. # Cannot overlap with dhcp_range or introspection_range. overcloud_ip_range: - - 192.0.2.11 + - 192.0.2.51 - 192.0.2.99 # Gateway (only needed when public_network is disabled) gateway: 192.0.2.1 @@ -87,7 +87,7 @@ networks: # DHCP range for the admin network, automatically provisioned if empty dhcp_range: - 192.0.2.2 - - 192.0.2.10 + - 192.0.2.50 # Mapping of network configuration for Overcloud Nodes nic_mapping: # Mapping for compute profile (nodes assigned as Compute nodes) diff --git a/config/network/network_settings_v6.yaml b/config/network/network_settings_v6.yaml index 57257633..25aaee89 100644 --- a/config/network/network_settings_v6.yaml +++ b/config/network/network_settings_v6.yaml @@ -78,7 +78,7 @@ networks: # If empty entire range is usable. # Cannot overlap with dhcp_range or introspection_range. overcloud_ip_range: - - 192.0.2.11 + - 192.0.2.51 - 192.0.2.99 # Gateway (only needed when public_network is disabled) gateway: 192.0.2.1 @@ -87,7 +87,7 @@ networks: # DHCP range for the admin network, automatically provisioned if empty dhcp_range: - 192.0.2.2 - - 192.0.2.10 + - 192.0.2.50 # Mapping of network configuration for Overcloud Nodes nic_mapping: # Mapping for compute profile (nodes assigned as Compute nodes) diff --git a/config/network/network_settings_vlans.yaml b/config/network/network_settings_vlans.yaml index be4dc662..345dbbde 100644 --- a/config/network/network_settings_vlans.yaml +++ b/config/network/network_settings_vlans.yaml @@ -78,7 +78,7 @@ networks: # If empty entire range is usable. # Cannot overlap with dhcp_range or introspection_range. overcloud_ip_range: - - 192.0.2.11 + - 192.0.2.51 - 192.0.2.99 # Gateway (only needed when public_network is disabled) gateway: 192.0.2.1 @@ -87,7 +87,7 @@ networks: # DHCP range for the admin network, automatically provisioned if empty dhcp_range: - 192.0.2.2 - - 192.0.2.10 + - 192.0.2.50 # Mapping of network configuration for Overcloud Nodes nic_mapping: # Mapping for compute profile (nodes assigned as Compute nodes) diff --git a/config/network/network_settings_vpp.yaml b/config/network/network_settings_vpp.yaml index f080af1d..2f6bba5e 100644 --- a/config/network/network_settings_vpp.yaml +++ b/config/network/network_settings_vpp.yaml @@ -78,7 +78,7 @@ networks: # If empty entire range is usable. # Cannot overlap with dhcp_range or introspection_range. overcloud_ip_range: - - 192.0.2.11 + - 192.0.2.51 - 192.0.2.99 # Gateway (only needed when public_network is disabled) gateway: 192.0.2.1 @@ -87,7 +87,7 @@ networks: # DHCP range for the admin network, automatically provisioned if empty dhcp_range: - 192.0.2.2 - - 192.0.2.10 + - 192.0.2.50 # Mapping of network configuration for Overcloud Nodes nic_mapping: # Mapping for compute profile (nodes assigned as Compute nodes) diff --git a/lib/overcloud-deploy-functions.sh b/lib/overcloud-deploy-functions.sh index 1f25a365..0fe838d0 100755 --- a/lib/overcloud-deploy-functions.sh +++ b/lib/overcloud-deploy-functions.sh @@ -25,6 +25,10 @@ function overcloud_deploy { DEPLOY_OPTIONS+=" -e ${ENV_FILE}" DEPLOY_OPTIONS+=" -e network-environment.yaml" + # get number of nodes available in inventory + num_control_nodes=$(ssh -T ${SSH_OPTIONS[@]} "root@$UNDERCLOUD" "grep -c profile:control /home/stack/instackenv.json") + num_compute_nodes=$(ssh -T ${SSH_OPTIONS[@]} "root@$UNDERCLOUD" "grep -c profile:compute /home/stack/instackenv.json") + # Custom Deploy Environment Templates if [[ "${#deploy_options_array[@]}" -eq 0 || "${deploy_options_array['sdn_controller']}" == 'opendaylight' ]]; then if [ "${deploy_options_array['sfc']}" == 'True' ]; then @@ -37,6 +41,8 @@ function overcloud_deploy { elif [ "${deploy_options_array['vpp']}" == 'True' ]; then if [ "${deploy_options_array['odl_vpp_netvirt']}" == "True" ]; then DEPLOY_OPTIONS+=" -e /usr/share/openstack-tripleo-heat-templates/environments/neutron-opendaylight-netvirt-vpp.yaml" + elif [ "${deploy_options_array['odl_vpp_routing_node']}" == "dvr" ]; then + DEPLOY_OPTIONS+=" -e /usr/share/openstack-tripleo-heat-templates/environments/neutron-opendaylight-fdio-dvr.yaml" else DEPLOY_OPTIONS+=" -e /usr/share/openstack-tripleo-heat-templates/environments/neutron-opendaylight-honeycomb.yaml" fi @@ -183,13 +189,29 @@ EOI -a overcloud-full.qcow2 EOI - # Configure routing node and interface role mapping for odl-fdio - if [[ "${deploy_options_array['sdn_controller']}" == 'opendaylight' && "${deploy_options_array['odl_vpp_routing_node']}" != 'dvr' ]]; then + # Configure routing node for odl-fdio + if [[ "${deploy_options_array['sdn_controller']}" == 'opendaylight' ]]; then + if [[ "${deploy_options_array['odl_vpp_routing_node']}" == 'dvr' ]]; then + ssh -T ${SSH_OPTIONS[@]} "stack@$UNDERCLOUD" <