X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=blobdiff_plain;f=lib%2Fovercloud-deploy-functions.sh;h=f9b6619193a240c417f810fcbd2c7147b2293607;hb=4cdcfa9d933dba8ffd43e034be00e58a5b9501ab;hp=f05e611ff363396c22d3066e075cf75728875289;hpb=9dc5314682c1ea5d6e76232f7fdc8ad0d46b2ab9;p=apex.git diff --git a/lib/overcloud-deploy-functions.sh b/lib/overcloud-deploy-functions.sh index f05e611f..f9b66191 100755 --- a/lib/overcloud-deploy-functions.sh +++ b/lib/overcloud-deploy-functions.sh @@ -13,7 +13,18 @@ function overcloud_deploy { local num_compute_nodes local num_control_nodes + local dpdk_cores pmd_cores socket_mem ovs_dpdk_perf_flag ovs_option_heat_arr + declare -A ovs_option_heat_arr + ovs_option_heat_arr['dpdk_cores']=OvsDpdkCoreList + ovs_option_heat_arr['pmd_cores']=PmdCoreList + ovs_option_heat_arr['socket_memory']=OvsDpdkSocketMemory + + # OPNFV Default Environment and Network settings + DEPLOY_OPTIONS+=" -e ${ENV_FILE}" + DEPLOY_OPTIONS+=" -e network-environment.yaml" + + # Custom Deploy Environment Templates if [[ "${#deploy_options_array[@]}" -eq 0 || "${deploy_options_array['sdn_controller']}" == 'opendaylight' ]]; then if [ "${deploy_options_array['sfc']}" == 'True' ]; then DEPLOY_OPTIONS+=" -e /usr/share/openstack-tripleo-heat-templates/environments/opendaylight_sfc.yaml" @@ -23,7 +34,11 @@ function overcloud_deploy { DEPLOY_OPTIONS+=" -e /usr/share/openstack-tripleo-heat-templates/environments/services/gluon.yaml" fi elif [ "${deploy_options_array['vpp']}" == 'True' ]; then - DEPLOY_OPTIONS+=" -e /usr/share/openstack-tripleo-heat-templates/environments/neutron-opendaylight-honeycomb.yaml" + if [ "${deploy_options_array['sdn_l3']}" == "True" ]; then + DEPLOY_OPTIONS+=" -e /usr/share/openstack-tripleo-heat-templates/environments/neutron-opendaylight-honeycomb.yaml" + else + DEPLOY_OPTIONS+=" -e /usr/share/openstack-tripleo-heat-templates/environments/neutron-opendaylight-honeycomb-l2.yaml" + fi else DEPLOY_OPTIONS+=" -e /usr/share/openstack-tripleo-heat-templates/environments/neutron-opendaylight-l3.yaml" fi @@ -46,7 +61,9 @@ function overcloud_deploy { elif [[ -z "${deploy_options_array['sdn_controller']}" || "${deploy_options_array['sdn_controller']}" == 'False' ]]; then echo -e "${blue}INFO: SDN Controller disabled...will deploy nosdn scenario${reset}" if [ "${deploy_options_array['vpp']}" == 'True' ]; then - DEPLOY_OPTIONS+=" -e /usr/share/openstack-tripleo-heat-templates/environments/neutron-ml2-networking-vpp.yaml" + DEPLOY_OPTIONS+=" -e /usr/share/openstack-tripleo-heat-templates/environments/neutron-ml2-vpp.yaml" + elif [ "${deploy_options_array['dataplane']}" == 'ovs_dpdk' ]; then + DEPLOY_OPTIONS+=" -e /usr/share/openstack-tripleo-heat-templates/environments/neutron-ovs-dpdk.yaml" fi SDN_IMAGE=opendaylight else @@ -65,6 +82,11 @@ function overcloud_deploy { DEPLOY_OPTIONS+=" -e /usr/share/openstack-tripleo-heat-templates/environments/enable_congress.yaml" fi + # Enable Real Time Kernel (kvm4nfv) + if [ "${deploy_options_array['rt_kvm']}" == 'True' ]; then + DEPLOY_OPTIONS+=" -e /home/stack/enable_rt_kvm.yaml" + fi + # Make sure the correct overcloud image is available if [ ! -f $IMAGES/overcloud-full-${SDN_IMAGE}.qcow2 ]; then echo "${red} $IMAGES/overcloud-full-${SDN_IMAGE}.qcow2 is required to execute your deployment." @@ -108,11 +130,7 @@ EOF -a overcloud-full.qcow2 if [ "${deploy_options_array['dataplane']}" == 'ovs_dpdk' ]; then - LIBGUESTFS_BACKEND=direct virt-customize --run-command "yum install -y /root/dpdk_rpms/*" \ - --run-command "sed -i '/RuntimeDirectoryMode=.*/d' /usr/lib/systemd/system/openvswitch-nonetwork.service" \ - --run-command "printf \"%s\\n\" RuntimeDirectoryMode=0775 Group=qemu UMask=0002 >> /usr/lib/systemd/system/openvswitch-nonetwork.service" \ - --run-command "sed -i 's/\\(^\\s\\+\\)\\(start_daemon "$OVS_VSWITCHD_PRIORITY"\\)/\\1umask 0002 \\&\\& \\2/' /usr/share/openvswitch/scripts/ovs-ctl" \ - -a overcloud-full.qcow2 + sed -i "/OS::TripleO::ComputeExtraConfigPre:/c\ OS::TripleO::ComputeExtraConfigPre: ./ovs-dpdk-preconfig.yaml" network-environment.yaml fi EOI @@ -135,27 +153,62 @@ EOI EOI fi + # Patch neutron with using OVS external interface for router and add generic linux NS interface driver + if [[ "${deploy_options_array['sdn_controller']}" == 'opendaylight' && "${deploy_options_array['dataplane']}" == 'fdio' ]]; then + ssh -T ${SSH_OPTIONS[@]} "stack@$UNDERCLOUD" </dev/null; then fi EOI - # Configure DPDK + # Configure DPDK and restart ovs agent after bringing up br-phy if [ "${deploy_options_array['dataplane']}" == 'ovs_dpdk' ]; then ssh -T ${SSH_OPTIONS[@]} "stack@$UNDERCLOUD" <