X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=blobdiff_plain;f=lib%2Fovercloud-deploy-functions.sh;h=f9b6619193a240c417f810fcbd2c7147b2293607;hb=4cdcfa9d933dba8ffd43e034be00e58a5b9501ab;hp=347bd74911fdd5d87029d9ae6cfbffa51ef9d84d;hpb=3c960945ebb7e25b73194436e67bf65c68acf791;p=apex.git diff --git a/lib/overcloud-deploy-functions.sh b/lib/overcloud-deploy-functions.sh index 347bd749..f9b66191 100755 --- a/lib/overcloud-deploy-functions.sh +++ b/lib/overcloud-deploy-functions.sh @@ -13,14 +13,32 @@ 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" elif [ "${deploy_options_array['vpn']}" == 'True' ]; then DEPLOY_OPTIONS+=" -e /usr/share/openstack-tripleo-heat-templates/environments/neutron-opendaylight-bgpvpn.yaml" + if [ "${deploy_options_array['gluon']}" == 'True' ]; then + 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/opendaylight_fdio.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 @@ -29,19 +47,23 @@ function overcloud_deploy { DEPLOY_OPTIONS+=" -e /usr/share/openstack-tripleo-heat-templates/environments/opendaylight-external.yaml" SDN_IMAGE=opendaylight elif [ "${deploy_options_array['sdn_controller']}" == 'onos' ]; then - if [ "${deploy_options_array['sfc']}" == 'True' ]; then - DEPLOY_OPTIONS+=" -e /usr/share/openstack-tripleo-heat-templates/environments/onos_sfc.yaml" - else - DEPLOY_OPTIONS+=" -e /usr/share/openstack-tripleo-heat-templates/environments/onos.yaml" - fi - SDN_IMAGE=onos + echo -e "${red}ERROR: ONOS is unsupported in Danube...exiting${reset}" + exit 1 + #if [ "${deploy_options_array['sfc']}" == 'True' ]; then + # DEPLOY_OPTIONS+=" -e /usr/share/openstack-tripleo-heat-templates/environments/onos_sfc.yaml" + #else + # DEPLOY_OPTIONS+=" -e /usr/share/openstack-tripleo-heat-templates/environments/onos.yaml" + #fi + #SDN_IMAGE=onos elif [ "${deploy_options_array['sdn_controller']}" == 'opencontrail' ]; then echo -e "${red}ERROR: OpenContrail is currently unsupported...exiting${reset}" exit 1 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 @@ -50,7 +72,20 @@ function overcloud_deploy { exit 1 fi + # Enable Tacker + if [ "${deploy_options_array['tacker']}" == 'True' ]; then + DEPLOY_OPTIONS+=" -e /usr/share/openstack-tripleo-heat-templates/environments/enable_tacker.yaml" + fi + # Enable Congress + if [ "${deploy_options_array['congress']}" == 'True' ]; then + 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 @@ -63,6 +98,15 @@ 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 + if [ "${deploy_options_array['vpn']}" == 'True' ]; then + echo -e "${blue}INFO: Enabling ZRPC and Quagga${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 @@ -114,6 +153,64 @@ 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" < /home/stack/Compute-ironic-python-agent.initramfs -chown stack /home/stack/Compute-ironic-python-agent.initramfs -if [ ! -f /home/stack/Controller-kernel_params.txt ]; then - touch /home/stack/Controller-kernel_params.txt - chown stack /home/stack/Controller-kernel_params.txt -fi -/bin/cp -f /home/stack/Controller-kernel_params.txt tmp/kernel_params.txt -echo "Controller params set: " -cat tmp/kernel_params.txt -find . | cpio -o -H newc | gzip > /home/stack/Controller-ironic-python-agent.initramfs -chown stack /home/stack/Controller-ironic-python-agent.initramfs -popd -/bin/rm -rf ipa/ -EOI - - # set NIC heat params and resource registry - 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" <