X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=blobdiff_plain;ds=sidebyside;f=lib%2Fovercloud-deploy-functions.sh;h=d2ae027af2bdfcf0c93d1ce9cc38713d6ba107a3;hb=8c86c096ab818f70215ffeb54b571ee04880242e;hp=7c83cc6be63e6bf2b19f2388062d48c354a046b8;hpb=9771e70ec0fb7fce0242f361db9ba2854d50cee6;p=apex.git diff --git a/lib/overcloud-deploy-functions.sh b/lib/overcloud-deploy-functions.sh index 7c83cc6b..d2ae027a 100755 --- a/lib/overcloud-deploy-functions.sh +++ b/lib/overcloud-deploy-functions.sh @@ -13,16 +13,34 @@ 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" + DEPLOY_OPTIONS+=" -e /usr/share/openstack-tripleo-heat-templates/environments/neutron-bgpvpn-opendaylight.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['odl_vpp_netvirt']}" == "True" ]; then + DEPLOY_OPTIONS+=" -e /usr/share/openstack-tripleo-heat-templates/environments/neutron-opendaylight-netvirt-vpp.yaml" + else + DEPLOY_OPTIONS+=" -e /usr/share/openstack-tripleo-heat-templates/environments/neutron-opendaylight-honeycomb.yaml" + fi else - DEPLOY_OPTIONS+=" -e /usr/share/openstack-tripleo-heat-templates/environments/neutron-opendaylight-l3.yaml" + DEPLOY_OPTIONS+=" -e /usr/share/openstack-tripleo-heat-templates/environments/neutron-opendaylight.yaml" fi SDN_IMAGE=opendaylight elif [ "${deploy_options_array['sdn_controller']}" == 'opendaylight-external' ]; then @@ -30,18 +48,29 @@ function overcloud_deploy { 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" + DEPLOY_OPTIONS+=" -e /usr/share/openstack-tripleo-heat-templates/environments/neutron-onos-sfc.yaml" else - DEPLOY_OPTIONS+=" -e /usr/share/openstack-tripleo-heat-templates/environments/onos.yaml" + DEPLOY_OPTIONS+=" -e /usr/share/openstack-tripleo-heat-templates/environments/neutron-onos.yaml" fi SDN_IMAGE=onos + elif [ "${deploy_options_array['sdn_controller']}" == 'ovn' ]; then + if [[ "$ha_enabled" == "True" ]]; then + DEPLOY_OPTIONS+=" -e /usr/share/openstack-tripleo-heat-templates/environments/neutron-ml2-ovn-ha.yaml" + echo "${red}OVN HA support is not not supported... exiting.${reset}" + exit 1 + else + DEPLOY_OPTIONS+=" -e /usr/share/openstack-tripleo-heat-templates/environments/neutron-ml2-ovn.yaml" + fi + SDN_IMAGE=opendaylight 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 +79,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 +105,25 @@ 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 + if [ "${deploy_options_array['dataplane']}" == 'ovs_dpdk' ]; then + sed -i "/OS::TripleO::ComputeExtraConfigPre:/c\ OS::TripleO::ComputeExtraConfigPre: ./ovs-dpdk-preconfig.yaml" network-environment.yaml fi EOI @@ -118,6 +163,8 @@ EOI # upgrade ovs into ovs 2.5.90 with NSH function if SFC is enabled if [[ "${deploy_options_array['sfc']}" == 'True' && "${deploy_options_array['dataplane']}" == 'ovs' ]]; then + echo "ONOS SFC is currently unavailable. JIRA: APEX-417" + exit 1 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/ + # Overwrite puppet-opendaylight with carbon. By default we install boron branch. + if [ "${deploy_options_array['odl_version']}" == 'carbon' ]; then + ssh -T ${SSH_OPTIONS[@]} "stack@$UNDERCLOUD" < deploy_command << EOF @@ -346,17 +417,21 @@ if ! openstack stack list | grep CREATE_COMPLETE 1>/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" <