summaryrefslogtreecommitdiffstats
path: root/ci/deploy/deploy.sh
diff options
context:
space:
mode:
Diffstat (limited to 'ci/deploy/deploy.sh')
-rwxr-xr-xci/deploy/deploy.sh16
1 files changed, 7 insertions, 9 deletions
diff --git a/ci/deploy/deploy.sh b/ci/deploy/deploy.sh
index e34e4f99..8fbc172f 100755
--- a/ci/deploy/deploy.sh
+++ b/ci/deploy/deploy.sh
@@ -187,11 +187,7 @@ function update_dha_by_pdf()
local pdf_yaml=labs/$LAB_NAME/${POD_NAME}.yaml
local pod_template=config/installers/daisy/pod_config.yaml.j2
local generate_config=config/utils/generate_config.py
- if [[ $DEPLOY_SCENARIO =~ (dpdk) ]]; then
- local network_template=config/installers/daisy/network-dpdk.yaml.j2
- else
- local network_template=config/installers/daisy/network.yaml.j2
- fi
+ local network_template=config/installers/daisy/network.yaml.j2
if [ ! -f ${generate_config} ] || [ ! -f ${pdf_yaml} ] || [ ! -f ${pod_template} ] || [ ! -f ${network_template} ] ; then
echo "Template files donot exist in ${SECURELABDIR}."
return
@@ -212,6 +208,7 @@ function update_dha_by_pdf()
rm $tmpfile
return
fi
+ test -d $(dirname ${DHA_CONF}) || mkdir -p $(dirname ${DHA_CONF})
cp ${tmpfile} ${DHA_CONF}
echo "====== Update deploy.yml from POD Descriptor File ======"
@@ -220,6 +217,7 @@ function update_dha_by_pdf()
echo "Cannot generate network configuration from PDF and IDF!"
return
fi
+ test -d $(dirname ${NETWORK_CONF}) || mkdir -p $(dirname ${NETWORK_CONF})
cp ${tmpfile} ${NETWORK_CONF}
echo "====== Update $(basename ${NETWORK_CONF}) from POD Descriptor File ======"
rm -f $tmpfile
@@ -488,20 +486,20 @@ function get_mac_addresses_for_virtual()
name=${VM_MULTINODE[$i]}
macs=$(virsh dumpxml $name | grep "<mac" | awk -F "'" '{print $2}' | tr "\n" " ")
line=$(awk "BEGIN{}(/name/&&/$name/){print NR}" $tmpfile)
- sed -i "${line}a\ mac_addresses:" $tmpfile
+ sed -i "${line}a\ mac_addresses:" $tmpfile
for mac in $macs; do
line=$[ line + 1 ]
- sed -i "${line}a\ - \'$mac\'" $tmpfile
+ sed -i "${line}a\ - \'$mac\'" $tmpfile
done
done
else
name="all_in_one"
macs=$(virsh dumpxml $name | grep "<mac" | awk -F "'" '{print $2}' | tr "\n" " ")
line=$(awk "BEGIN{}(/name/&&/$name/){print NR}" $tmpfile)
- sed -i "${line}a\ mac_addresses:" $tmpfile
+ sed -i "${line}a\ mac_addresses:" $tmpfile
for mac in $macs; do
line=$[ line + 1 ]
- sed -i "${line}a\ - \'$mac\'" $tmpfile
+ sed -i "${line}a\ - \'$mac\'" $tmpfile
done
fi