X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=blobdiff_plain;f=lib%2Fovercloud-deploy-functions.sh;h=8f5b1a2182488be01b147b85f6f98eb45414311c;hb=refs%2Fchanges%2F09%2F31909%2F1;hp=f05e611ff363396c22d3066e075cf75728875289;hpb=703748a7e86c32c76bcf3fe25b6ed6750b783701;p=apex.git diff --git a/lib/overcloud-deploy-functions.sh b/lib/overcloud-deploy-functions.sh index f05e611f..8f5b1a21 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." @@ -76,6 +98,16 @@ function overcloud_deploy { ssh -T ${SSH_OPTIONS[@]} "stack@$UNDERCLOUD" "rm -f overcloud-full.qcow2" scp ${SSH_OPTIONS[@]} $IMAGES/overcloud-full-${SDN_IMAGE}.qcow2 "stack@$UNDERCLOUD":overcloud-full.qcow2 + # disable neutron openvswitch agent from starting + if [[ -n "${deploy_options_array['sdn_controller']}" && "${deploy_options_array['sdn_controller']}" != 'False' ]]; then + echo -e "${blue}INFO: Disabling neutron-openvswitch-agent from systemd${reset}" + ssh -T ${SSH_OPTIONS[@]} "stack@$UNDERCLOUD" <> /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 +163,62 @@ EOI EOI fi + # Patch neutron with using OVS external interface for router and add generic linux NS interface driver + if [[ "${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" <