X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=blobdiff_plain;f=lib%2Fovercloud-deploy-functions.sh;h=4b592b46039cee0df62725975104d96841e400ad;hb=28861bb2ac641b282ec2fc7648fd52a076f821b8;hp=df17750b5c4aeda4c47971411b7c7e1540e7b079;hpb=92ecd83a55059b938ea92bfe0c351621f0826f2c;p=apex.git diff --git a/lib/overcloud-deploy-functions.sh b/lib/overcloud-deploy-functions.sh index df17750b..4b592b46 100755 --- a/lib/overcloud-deploy-functions.sh +++ b/lib/overcloud-deploy-functions.sh @@ -11,10 +11,11 @@ ##preping it for deployment and launch the deploy ##params: none function overcloud_deploy { + local num_compute_nodes + local num_control_nodes + 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" @@ -23,17 +24,9 @@ function overcloud_deploy { elif [ "${deploy_options_array['vpn']}" == 'true' ]; then DEPLOY_OPTIONS+=" -e /usr/share/openstack-tripleo-heat-templates/environments/opendaylight_sdnvpn.yaml" 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 @@ -49,6 +42,9 @@ function overcloud_deploy { 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" + fi SDN_IMAGE=opendaylight else echo "${red}Invalid sdn_controller: ${deploy_options_array['sdn_controller']}${reset}" @@ -61,7 +57,6 @@ function overcloud_deploy { # 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." - echo "Both ONOS and OpenDaylight are currently deployed from this image." echo "Please install the opnfv-apex package to provide this overcloud image for deployment.${reset}" exit 1 fi @@ -94,6 +89,9 @@ EOF 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" \ @@ -101,9 +99,14 @@ EOF -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 fi + EOI elif [ "${deploy_options_array['dataplane']}" != 'ovs' ]; then @@ -115,6 +118,15 @@ EOI ssh -T ${SSH_OPTIONS[@]} "stack@$UNDERCLOUD" "LIBGUESTFS_BACKEND=direct virt-customize -a overcloud-full.qcow2 --root-password password:opnfvapex" fi + # 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" </dev/null; then +if ! openstack stack list | grep CREATE_COMPLETE 1>/dev/null; then $(typeset -f debug_stack) debug_stack exit 1