X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=blobdiff_plain;f=ci%2Fdeploy.sh;h=a61946e6c06ab8ee9e2bc6c11c1c73fe054d4fc9;hb=aa31e99c06c7c003ed5339ada7b962689d16c030;hp=41ac60237d9add9313862f6792f8c2020e378104;hpb=dae5c2c5e677e4af8e56370c10316219a539321e;p=fuel.git diff --git a/ci/deploy.sh b/ci/deploy.sh index 41ac60237..a61946e6c 100755 --- a/ci/deploy.sh +++ b/ci/deploy.sh @@ -32,7 +32,7 @@ usage () { cat << EOF xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx -$(notify "$(basename "$0"): Deploy the Fuel@OPNFV MCP stack" 3) +$(notify "$(basename "$0"): Deploy the OPNFV Fuel MCP stack" 3) $(notify "USAGE:" 2) $(basename "$0") -l lab-name -p pod-name -s deploy-scenario \\ @@ -59,9 +59,9 @@ $(notify "OPTIONS:" 2) -N Experimental: Do not virtualize control plane (novcp) $(notify_i "Description:" 2) -Deploys the Fuel@OPNFV stack on the indicated lab resource. +Deploys the OPNFV Fuel stack on the indicated lab resource. -This script provides the Fuel@OPNFV deployment abstraction. +This script provides the OPNFV Fuel deployment abstraction. It depends on the OPNFV official configuration directory/file structure and provides a fairly simple mechanism to execute a deployment. @@ -74,8 +74,6 @@ $(notify_i "Input parameters to the build script are:" 2) /labs//idf-.yaml The default is using the git submodule tracking 'OPNFV Pharos' in <./mcp/scripts/pharos>. - An example config is provided inside current repo in - <./mcp/config>, automatically linked as <./mcp/scripts/pharos/labs/local>. -d Dry-run - Produce deploy config files, but do not execute deploy -D Debug logging - Enable extra logging in sh deploy scripts (set -x) -e Do not launch environment deployment @@ -92,10 +90,7 @@ $(notify_i "Input parameters to the build script are:" 2) -h Print this message and exit -L Deployment log path and name, eg. -L /home/jenkins/job.log.tar.gz -l Lab name as defined in the configuration directory, e.g. lf - For the sample configuration in <./mcp/config>, lab name is 'local'. -p POD name as defined in the configuration directory, e.g. pod2 - For the sample configuration in <./mcp/config>, POD name is 'virtual1' - for virtual deployments or 'pod1' for baremetal (based on lf-pod2). -m Use single socket compute nodes. Instead of using default NUMA-enabled topology for virtual compute nodes created via libvirt, configure a single guest CPU socket. @@ -150,6 +145,8 @@ MCP_CMP_SS=${MCP_CMP_SS:-0} source "${DEPLOY_DIR}/globals.sh" source "${DEPLOY_DIR}/lib.sh" source "${DEPLOY_DIR}/lib_template.sh" +source "${DEPLOY_DIR}/lib_jump_common.sh" +source "${DEPLOY_DIR}/lib_jump_deploy.sh" # # END of variables to customize @@ -246,7 +243,7 @@ pushd "${DEPLOY_DIR}" > /dev/null # Install required packages on jump server sudo mkdir -p "${MCP_STORAGE_DIR}" -sudo chown "${USER}:${USER}" "${MCP_STORAGE_DIR}" +sudo chown -R "${USER}:${USER}" "${MCP_STORAGE_DIR}" if [ ${USE_EXISTING_PKGS} -eq 1 ]; then notify "[NOTE] Skipping distro pkg installation" 2 else @@ -256,7 +253,7 @@ else virtinst_install "${MCP_STORAGE_DIR}" fi -if ! virsh list >/dev/null 2>&1; then +if ! ${VIRSH} list >/dev/null 2>&1; then notify_e "[ERROR] This script requires hypervisor access" fi @@ -278,6 +275,7 @@ generate_ssh_key export MAAS_SSH_KEY="$(cat "$(basename "${SSH_KEY}").pub")" # Expand jinja2 templates based on PDF data and env vars +[[ "${DEPLOY_SCENARIO}" =~ -ha$ ]] || MCP_VCP=0 export MCP_REPO_ROOT_PATH MCP_VCP MCP_STORAGE_DIR MCP_DOCKER_TAG MCP_CMP_SS \ MCP_JUMP_ARCH=$(uname -i) MCP_DEPLOY_SCENARIO="${DEPLOY_SCENARIO}" do_templates_scenario "${MCP_STORAGE_DIR}" "${TARGET_LAB}" "${TARGET_POD}" \ @@ -337,9 +335,9 @@ else reset_vms "${virtual_nodes[@]}" fi done -fi -./log.sh "${DEPLOY_LOG}" + ./log.sh "${DEPLOY_LOG}" +fi popd > /dev/null