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['sdn_l3']}" == 'True' ]; then
- DEPLOY_OPTIONS+=" -e /usr/share/openstack-tripleo-heat-templates/environments/opendaylight_l3.yaml"
- elif [ "${deploy_options_array['sfc']}" == 'True' ]; 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/opendaylight_sdnvpn.yaml"
+ 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"
- elif [ "${deploy_options_array['vpn']}" == 'true' ]; then
- DEPLOY_OPTIONS+=" -e /usr/share/openstack-tripleo-heat-templates/environments/opendaylight_sdnvpn.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/opendaylight.yaml"
+ DEPLOY_OPTIONS+=" -e /usr/share/openstack-tripleo-heat-templates/environments/neutron-opendaylight-l3.yaml"
fi
SDN_IMAGE=opendaylight
- if [ "${deploy_options_array['sfc']}" == 'True' ]; then
- SDN_IMAGE+=-sfc
- if [ ! -f $RESOURCES/overcloud-full-${SDN_IMAGE}.qcow2 ]; then
- echo "${red} $RESOURCES/overcloud-full-${SDN_IMAGE}.qcow2 is required to execute an SFC deployment."
- echo "Please install the opnfv-apex-opendaylight-sfc package to provide this overcloud image for deployment.${reset}"
- exit 1
- fi
- fi
elif [ "${deploy_options_array['sdn_controller']}" == 'opendaylight-external' ]; then
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
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 $RESOURCES/overcloud-full-${SDN_IMAGE}.qcow2 ]; then
- echo "${red} $RESOURCES/overcloud-full-${SDN_IMAGE}.qcow2 is required to execute your deployment."
+ if [ ! -f $IMAGES/overcloud-full-${SDN_IMAGE}.qcow2 ]; then
+ echo "${red} $IMAGES/overcloud-full-${SDN_IMAGE}.qcow2 is required to execute your deployment."
echo "Please install the opnfv-apex package to provide this overcloud image for deployment.${reset}"
exit 1
fi
echo "Copying overcloud image to Undercloud"
ssh -T ${SSH_OPTIONS[@]} "stack@$UNDERCLOUD" "rm -f overcloud-full.qcow2"
- scp ${SSH_OPTIONS[@]} $RESOURCES/overcloud-full-${SDN_IMAGE}.qcow2 "stack@$UNDERCLOUD":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" <<EOI
+ LIBGUESTFS_BACKEND=direct virt-customize --run-command "rm -f /etc/systemd/system/multi-user.target.wants/neutron-openvswitch-agent.service" \
+ --run-command "rm -f /usr/lib/systemd/system/neutron-openvswitch-agent.service" \
+ -a overcloud-full.qcow2
+EOI
+ fi
+
+ if [ "${deploy_options_array['vpn']}" == 'True' ]; then
+ echo -e "${blue}INFO: Enabling ZRPC and Quagga${reset}"
+ ssh -T ${SSH_OPTIONS[@]} "stack@$UNDERCLOUD" <<EOI
+ LIBGUESTFS_BACKEND=direct virt-customize --run-command "yum -y install /root/quagga/*.rpm" \
+ --run-command "systemctl enable zrpcd" \
+ -a overcloud-full.qcow2
+EOI
+ fi
# Install ovs-dpdk inside the overcloud image if it is enabled.
if [[ "${deploy_options_array['dataplane']}" == 'ovs_dpdk' || "${deploy_options_array['dataplane']}" == 'fdio' ]]; then
--run-command "chmod 0755 /etc/sysconfig/modules/uio_pci_generic.modules" \
-a overcloud-full.qcow2
- if [ "${deploy_options_array['dataplane']}" == 'fdio' ]; then
- sudo sed -i '/FdioEnabled:/c\ FdioEnabled: true' /usr/share/openstack-tripleo-heat-templates/environments/numa.yaml
- LIBGUESTFS_BACKEND=direct virt-customize --run-command "cp -f /root/fdio_neutron_l3/namespaces.py /usr/lib/python2.7/site-packages/neutron/agent/l3/" \
- --run-command "cp -f /root/fdio_neutron_l3/router_info.py /usr/lib/python2.7/site-packages/neutron/agent/l3/" \
- -a overcloud-full.qcow2
- if [ "${deploy_options_array['sdn_controller']}" == 'opendaylight' ]; then
- LIBGUESTFS_BACKEND=direct virt-customize --run-command "cd /root/ && tar zxvf networking-odl.tar.gz" \
- --run-command "cd /root/networking-odl && git init && pip install -r requirements.txt" \
- --run-command "cd /root/networking-odl && python setup.py build && python setup.py install" \
- -a overcloud-full.qcow2
- fi
- else
- sudo sed -i '/NeutronOVSDataPathType:/c\ NeutronOVSDataPathType: netdev' /usr/share/openstack-tripleo-heat-templates/environments/numa.yaml
- 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
+ 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
- if [ "${deploy_options_array['sdn_controller']}" == 'onos' && "${deploy_options_array['sfc']}" == 'True' ]; then
- # upgrade ovs into ovs 2.5.90 with NSH function
- LIBGUESTFS_BACKEND=direct virt-customize --run-command "yum install -y /root/ovs/rpm/rpmbuild/RPMS/x86_64/${ovs_kmod_rpm_name}" \
- --run-command "yum upgrade -y /root/ovs/rpm/rpmbuild/RPMS/x86_64/${ovs_rpm_name}" \
- -a overcloud-full.qcow2
- fi
EOI
elif [ "${deploy_options_array['dataplane']}" != 'ovs' ]; then
ssh -T ${SSH_OPTIONS[@]} "stack@$UNDERCLOUD" "LIBGUESTFS_BACKEND=direct virt-customize -a overcloud-full.qcow2 --root-password password:opnfvapex"
fi
- # Set ODL version accordingly
- if [[ "${deploy_options_array['sdn_controller']}" == 'opendaylight' && "${deploy_options_array['odl_version']}" == 'boron' ]]; then
+ # 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
ssh -T ${SSH_OPTIONS[@]} "stack@$UNDERCLOUD" <<EOI
- LIBGUESTFS_BACKEND=direct virt-customize --run-command "yum -y remove opendaylight" \
- --run-command "yum -y install /root/boron/*" \
- -a overcloud-full.qcow2
+ LIBGUESTFS_BACKEND=direct virt-customize --run-command "yum install -y /root/ovs/rpm/rpmbuild/RPMS/x86_64/${ovs_kmod_rpm_name}" \
+ --run-command "yum upgrade -y /root/ovs/rpm/rpmbuild/RPMS/x86_64/${ovs_rpm_name}" \
+ -a overcloud-full.qcow2
EOI
fi
- # Add performance deploy options if they have been set
- if [ ! -z "${deploy_options_array['performance']}" ]; then
-
- # Remove previous kernel args files per role
- ssh -T ${SSH_OPTIONS[@]} "stack@$UNDERCLOUD" "rm -f Compute-kernel_params.txt"
- ssh -T ${SSH_OPTIONS[@]} "stack@$UNDERCLOUD" "rm -f Controller-kernel_params.txt"
+ # 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" <<EOI
+ LIBGUESTFS_BACKEND=direct virt-customize --run-command "cd /usr/lib/python2.7/site-packages/ && patch -p1 < neutron-patch-NSDriver.patch" \
+ -a overcloud-full.qcow2
+EOI
+ # Configure routing node for odl_l3-fdio
+ if [[ "${deploy_options_array['sdn_l3']}" == 'True' ]]; then
+ ssh -T ${SSH_OPTIONS[@]} "stack@$UNDERCLOUD" <<EOI
+ sed -i "/opendaylight::vpp_routing_node:/c\ opendaylight::vpp_routing_node: ${deploy_options_array['odl_vpp_routing_node']}.${domain_name}" ${ENV_FILE}
+EOI
+ fi
+ fi
- # Push performance options to subscript to modify per-role images as needed
+ if [ -n "${deploy_options_array['performance']}" ]; then
+ ovs_dpdk_perf_flag="False"
for option in "${performance_options[@]}" ; do
- echo -e "${blue}Setting performance option $option${reset}"
- ssh -T ${SSH_OPTIONS[@]} "stack@$UNDERCLOUD" "dataplane=${deploy_options_array['dataplane']} bash build_perf_image.sh $option"
+ arr=($option)
+ # use compute's kernel settings for all nodes for now.
+ if [ "${arr[0]}" == "Compute" ] && [ "${arr[1]}" == "kernel" ]; then
+ kernel_args+=" ${arr[2]}=${arr[3]}"
+ fi
+ if [ "${arr[0]}" == "Compute" ] && [ "${arr[1]}" == "ovs" ]; then
+ eval "${arr[2]}=${arr[3]}"
+ ovs_dpdk_perf_flag="True"
+ fi
done
- # Build IPA kernel option ramdisks
- ssh -T ${SSH_OPTIONS[@]} "root@$UNDERCLOUD" <<EOI
-/bin/cp -f /home/stack/ironic-python-agent.initramfs /root/
-mkdir -p ipa/
-pushd ipa
-gunzip -c ../ironic-python-agent.initramfs | cpio -i
-if [ ! -f /home/stack/Compute-kernel_params.txt ]; then
- touch /home/stack/Compute-kernel_params.txt
- chown stack /home/stack/Compute-kernel_params.txt
-fi
-/bin/cp -f /home/stack/Compute-kernel_params.txt tmp/kernel_params.txt
-echo "Compute params set: "
-cat tmp/kernel_params.txt
-/bin/cp -f /root/image.py usr/lib/python2.7/site-packages/ironic_python_agent/extensions/image.py
-/bin/cp -f /root/image.pyc usr/lib/python2.7/site-packages/ironic_python_agent/extensions/image.pyc
-find . | cpio -o -H newc | gzip > /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/
+ ssh -T ${SSH_OPTIONS[@]} "stack@$UNDERCLOUD" <<EOI
+ sed -i "/ComputeKernelArgs:/c\ ComputeKernelArgs: '$kernel_args'" ${ENV_FILE}
+ sed -i "$ a\resource_registry:\n OS::TripleO::NodeUserData: first-boot.yaml" ${ENV_FILE}
+ sed -i "/NovaSchedulerDefaultFilters:/c\ NovaSchedulerDefaultFilters: 'RamFilter,ComputeFilter,AvailabilityZoneFilter,ComputeCapabilitiesFilter,ImagePropertiesFilter,NUMATopologyFilter'" ${ENV_FILE}
EOI
- # set NIC heat params and resource registry
- ssh -T ${SSH_OPTIONS[@]} "stack@$UNDERCLOUD" <<EOI
-if [ -n "${private_network_compute_interface}" ]; then
- sudo sed -i '/ComputeTenantNIC:/c\ ComputeTenantNIC: '${private_network_compute_interface} /usr/share/openstack-tripleo-heat-templates/environments/numa.yaml
-fi
-if [ -n "${private_network_controller_interface}" ]; then
- sudo sed -i '/ControllerTenantNIC:/c\ ControllerTenantNIC: '${private_network_controller_interface} /usr/share/openstack-tripleo-heat-templates/environments/numa.yaml
-fi
-# TODO: PublicNIC is not used today, however, in the future, we'll bind public nic to DPDK as well for certain scenarios. At that time,
-# we'll need to make sure public network is enabled.
-if [ -n "${public_network_compute_interface}" ]; then
- sudo sed -i '/ComputePublicNIC:/c\ ComputePublicNIC: '${public_network_compute_interface} /usr/share/openstack-tripleo-heat-templates/environments/numa.yaml
-fi
-if [ -n "${public_network_controller_interface}" ]; then
- sudo sed -i '/ControllerPublicNIC:/c\ ControllerPublicNIC: '${public_network_controller_interface} /usr/share/openstack-tripleo-heat-templates/environments/numa.yaml
-fi
+ if [[ "${deploy_options_array['dataplane']}" == 'ovs_dpdk' && "$ovs_dpdk_perf_flag" == "True" ]]; then
+ for ovs_option in ${!ovs_option_heat_arr[@]}; do
+ if [ -n "${!ovs_option}" ]; then
+ ssh -T ${SSH_OPTIONS[@]} "stack@$UNDERCLOUD" <<EOI
+ sed -i "/${ovs_option_heat_arr[$ovs_option]}:/c\ ${ovs_option_heat_arr[$ovs_option]}: ${!ovs_option}" ${ENV_FILE}
EOI
+ fi
+ done
+ fi
+ fi
- DEPLOY_OPTIONS+=" -e /usr/share/openstack-tripleo-heat-templates/environments/numa.yaml"
+ if [[ -z "${deploy_options_array['sdn_controller']}" || "${deploy_options_array['sdn_controller']}" == 'False' ]]; then
+ if [ "${deploy_options_array['dataplane']}" == "fdio" ]; then
+ if [ "$tenant_nic_mapping_controller_members" == "$tenant_nic_mapping_compute_members" ]; then
+ ssh -T ${SSH_OPTIONS[@]} "stack@$UNDERCLOUD" <<EOI
+ sed -i "/NeutronVPPAgentPhysnets:/c\ NeutronVPPAgentPhysnets: 'datacentre:${tenant_nic_mapping_controller_members}'" ${ENV_FILE}
+EOI
+ else
+ echo -e "${red}Compute and Controller must use the same tenant nic name, please modify network setting file.${reset}"
+ exit 1
+ fi
+ fi
fi
- # make sure ceph is installed
- DEPLOY_OPTIONS+=" -e /usr/share/openstack-tripleo-heat-templates/environments/storage-environment.yaml"
+ # Set ODL version accordingly
+ if [[ "${deploy_options_array['sdn_controller']}" == 'opendaylight' && -n "${deploy_options_array['odl_version']}" ]]; then
+ case "${deploy_options_array['odl_version']}" in
+ beryllium) odl_version=''
+ ;;
+ boron) odl_version='boron'
+ ;;
+ carbon) odl_version='master'
+ ;;
+ *) echo -e "${red}Invalid ODL version ${deploy_options_array['odl_version']}. Please use 'carbon' or 'boron' values.${reset}"
+ exit 1
+ ;;
+ esac
+
+ ssh -T ${SSH_OPTIONS[@]} "stack@$UNDERCLOUD" <<EOI
+ LIBGUESTFS_BACKEND=direct virt-customize --run-command "yum -y remove opendaylight" \
+ --run-command "yum -y install /root/${odl_version}/*" \
+ -a overcloud-full.qcow2
+EOI
+ fi
- #DEPLOY_OPTIONS+=" -e /usr/share/openstack-tripleo-heat-templates/environments/network-isolation.yaml"
- DEPLOY_OPTIONS+=" -e network-environment.yaml"
+ # Override ODL if FDIO and ODL L2
+ if [[ "${deploy_options_array['vpp']}" == 'True' && "${deploy_options_array['sdn_controller']}" == 'opendaylight' && "${deploy_options_array['sdn_l3']}" == "False" ]]; then
+ ssh -T ${SSH_OPTIONS[@]} "stack@$UNDERCLOUD" <<EOI
+ LIBGUESTFS_BACKEND=direct virt-customize --run-command "yum -y remove opendaylight" \
+ --run-command "yum -y install /root/fdio_l2/opendaylight*.rpm" \
+ -a overcloud-full.qcow2
+EOI
+ fi
+ # check if ceph should be enabled
+ if [ "${deploy_options_array['ceph']}" == 'True' ]; then
+ DEPLOY_OPTIONS+=" -e /usr/share/openstack-tripleo-heat-templates/environments/storage-environment.yaml"
+ fi
# get number of nodes available in inventory
num_control_nodes=$(ssh -T ${SSH_OPTIONS[@]} "root@$UNDERCLOUD" "grep -c profile:control /home/stack/instackenv.json")
DEPLOY_OPTIONS+=" -e virtual-environment.yaml"
fi
- DEPLOY_OPTIONS+=" -e opnfv-environment.yaml"
-
echo -e "${blue}INFO: Deploy options set:\n${DEPLOY_OPTIONS}${reset}"
ssh -T ${SSH_OPTIONS[@]} "stack@$UNDERCLOUD" <<EOI
-if [ "${deploy_options_array['tacker']}" == 'False' ]; then
- sed -i '/EnableTacker:/c\ EnableTacker: false' opnfv-environment.yaml
-fi
-
# Create a key for use by nova for live migration
echo "Creating nova SSH key for nova resize support"
ssh-keygen -f nova_id_rsa -b 1024 -P ""
public_key=\'\$(cat nova_id_rsa.pub | cut -d ' ' -f 2)\'
-sed -i "s#replace_public_key:#key: \$public_key#g" opnfv-environment.yaml
-python -c 'open("opnfv-environment-new.yaml", "w").write((open("opnfv-environment.yaml").read().replace("replace_private_key:", "key: \"" + "".join(open("nova_id_rsa").readlines()).replace("\\n","\\\n") + "\"")))'
-mv -f opnfv-environment-new.yaml opnfv-environment.yaml
+sed -i "s#replace_public_key:#key: \$public_key#g" ${ENV_FILE}
+python -c 'open("opnfv-environment-new.yaml", "w").write((open("${ENV_FILE}").read().replace("replace_private_key:", "key: \"" + "".join(open("nova_id_rsa").readlines()).replace("\\n","\\\n") + "\"")))'
+mv -f opnfv-environment-new.yaml ${ENV_FILE}
source stackrc
set -o errexit
echo "Configuring undercloud and discovering nodes"
openstack baremetal import --json instackenv.json
-openstack baremetal configure boot
-bash -x set_perf_images.sh ${performance_roles[@]}
-#if [[ -z "$virtual" ]]; then
-# openstack baremetal introspection bulk start
-#fi
+
+if [[ -z "$virtual" ]]; then
+ openstack baremetal introspection bulk start
+ if [[ -n "$root_disk_list" ]]; then
+ openstack baremetal configure boot --root-device=${root_disk_list}
+ else
+ openstack baremetal configure boot
+ fi
+else
+ openstack baremetal configure boot
+fi
+
echo "Configuring flavors"
for flavor in baremetal control compute; do
echo -e "${blue}INFO: Updating flavor: \${flavor}${reset}"
dns_server_ext="\${dns_server_ext} --dns-nameserver \${dns_server}"
done
neutron subnet-update \$(neutron subnet-list | grep -Ev "id|tenant|external|storage" | grep -v \\\\-\\\\- | awk {'print \$2'}) \${dns_server_ext}
-sed -i '/CloudDomain:/c\ CloudDomain: '${domain_name} opnfv-environment.yaml
+sed -i '/CloudDomain:/c\ CloudDomain: '${domain_name} ${ENV_FILE}
echo "Executing overcloud deployment, this should run for an extended period without output."
sleep 60 #wait for Hypervisor stats to check-in to nova
# save deploy command so it can be used for debugging
ssh -T ${SSH_OPTIONS[@]} "stack@$UNDERCLOUD" <<EOI
source stackrc
openstack overcloud deploy --templates $DEPLOY_OPTIONS --timeout 90
-if ! heat stack-list | grep CREATE_COMPLETE 1>/dev/null; then
+if ! openstack stack list | grep CREATE_COMPLETE 1>/dev/null; then
$(typeset -f debug_stack)
debug_stack
exit 1
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" <<EOI || (echo "DPDK config failed, exiting..."; exit 1)
source stackrc
set -o errexit
for node in \$(nova list | grep novacompute | grep -Eo "[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+"); do
-echo "Running DPDK test app on \$node"
+echo "Checking DPDK status and bringing up br-phy on \$node"
ssh -T ${SSH_OPTIONS[@]} "heat-admin@\$node" <<EOF
set -o errexit
-sudo dpdk_helloworld --no-pci
-sudo dpdk_nic_bind -s
+sudo dpdk-devbind -s
+sudo ifup br-phy
+if [[ -z "${deploy_options_array['sdn_controller']}" || "${deploy_options_array['sdn_controller']}" == 'False' ]]; then
+ echo "Restarting openvswitch agent to pick up VXLAN tunneling"
+ sudo systemctl restart neutron-openvswitch-agent
+fi
EOF
done
EOI
openstack endpoint list
echo "Keystone Service List"
openstack service list
-cinder quota-show \$(openstack project list | grep admin | awk {'print \$2'})
EOI
fi
}