summaryrefslogtreecommitdiffstats
path: root/functions.sh
diff options
context:
space:
mode:
authorxudan16 <xudan16@huawei.com>2022-03-01 15:21:56 +0800
committerGeorg Kunz <georg.kunz@ericsson.com>2022-03-15 16:23:03 +0000
commit247f31321890180dca6f2300b7b065c70a0b7132 (patch)
tree7970eda734f1892bb385e5550cbfd235cd6fc34f /functions.sh
parent446636ba4edea0d3842d32e6854b3ab16c446410 (diff)
Update deployment guide doc
After trying to deploy with vms, find some errors and additional requirements that need to be added into the deployment guide. Also add some minor updates in function.sh. Signed-off-by: xudan16 <xudan16@huawei.com> Change-Id: I91f1d4efb28178c79d6a68f011da2b165633f345 Reviewed-on: https://gerrit.opnfv.org/gerrit/c/kuberef/+/73233 Tested-by: jenkins-ci <jenkins-opnfv-ci@opnfv.org> Reviewed-by: Rihab Banday <rihab.banday@ericsson.com> Reviewed-by: Kanagaraj Manickam <kanagaraj.manickam@huawei.com> Reviewed-by: Michael Pedersen <michaelx.pedersen@intel.com> Reviewed-by: Georg Kunz <georg.kunz@ericsson.com>
Diffstat (limited to 'functions.sh')
-rwxr-xr-xfunctions.sh35
1 files changed, 23 insertions, 12 deletions
diff --git a/functions.sh b/functions.sh
index 73f3d27..c4690ef 100755
--- a/functions.sh
+++ b/functions.sh
@@ -160,6 +160,12 @@ copy_files_jump() {
# Host Provisioning
provision_hosts_baremetal() {
+ if [ "${DEBUG:-false}" == "true" ]; then
+ DEBUG_FLAG="-v"
+ else
+ DEBUG_FLAG=""
+ fi
+
# shellcheck disable=SC2087
ssh -o StrictHostKeyChecking=no -tT "$USERNAME"@"$(get_vm_ip)" << EOF
# Install and run cloud-infra
@@ -170,24 +176,29 @@ fi
cp "${PROJECT_ROOT}"/"${VENDOR}"/{pdf.yaml,idf.yaml} \
"${PROJECT_ROOT}"/engine/engine
cd "${PROJECT_ROOT}"/engine/engine || return
-./deploy.sh -s ironic -d "${DISTRO}" \
+./deploy.sh -s ironic "${DEBUG_FLAG}" -d "${DISTRO}" \
-p file:///"${PROJECT_ROOT}"/engine/engine/pdf.yaml \
-i file:///"${PROJECT_ROOT}"/engine/engine/idf.yaml
EOF
}
provision_hosts_vms() {
+ if [ "${DEBUG:-false}" == "true" ]; then
+ DEBUG_FLAG="-v"
+ else
+ DEBUG_FLAG=""
+ fi
+
# shellcheck disable=SC2087
-# Install and run cloud-infra
-if [ ! -d "$CURRENTPATH/engine" ]; then
- git clone https://gerrit.nordix.org/infra/engine.git "${CURRENTPATH}"/engine
-fi
-cp "$CURRENTPATH"/hw_config/"$VENDOR"/{pdf.yaml,idf.yaml} \
-"${CURRENTPATH}"/engine/engine
-cd "$CURRENTPATH"/engine/engine || return
-./deploy.sh -s ironic \
--p file:///"${CURRENTPATH}"/engine/engine/pdf.yaml \
--i file:///"${CURRENTPATH}"/engine/engine/idf.yaml
+ # Install and run cloud-infra
+ if [ ! -d "${CURRENTPATH}/engine" ]; then
+ git clone https://gerrit.nordix.org/infra/engine.git "${CURRENTPATH}"/engine
+ fi
+ cp "${CURRENTPATH}"/hw_config/"${VENDOR}"/{pdf.yaml,idf.yaml} "${CURRENTPATH}"/engine/engine
+ cd "${CURRENTPATH}"/engine/engine || return
+ ./deploy.sh -s ironic "${DEBUG_FLAG}" \
+ -p file:///"${CURRENTPATH}"/engine/engine/pdf.yaml \
+ -i file:///"${CURRENTPATH}"/engine/engine/idf.yaml
}
# Setup networking on provisioned hosts (Adapt setup_network.sh according to your network setup)
@@ -328,7 +339,7 @@ EOF
# Creates a python virtual environment
creates_virtualenv() {
if [ ! -d "$CURRENTPATH/.venv" ]; then
- virtualenv .venv
+ virtualenv "$CURRENTPATH/.venv"
fi
# shellcheck disable=SC1090
source "$CURRENTPATH/.venv/bin/activate"