summaryrefslogtreecommitdiffstats
path: root/ci
diff options
context:
space:
mode:
authorAlexandru Avadanii <Alexandru.Avadanii@enea.com>2018-01-26 03:32:16 +0100
committerAlexandru Avadanii <Alexandru.Avadanii@enea.com>2018-02-05 01:12:06 +0100
commit965310d4c0fee5739b6a6a8ff4a40b2ee6c9c0c5 (patch)
tree8a0470c9727f4ebf857ccf202f55d32525870415 /ci
parent6a4b936669282c88b9842d78b9add1e64864aec6 (diff)
deploy.sh: Make PDF, IDF mandatory for all deploys
- hard requiremenet of PDF/IDF configuration for all deployments; - expand j2 templates for virtual deploys too; Since until now we used the same model for *all* virtual PODs, one of the PDF/IDF sets for existing vPODs (e.g. ericsson-virtual3) can be re-used practically on any host, without defining new vPODs. JIRA: FUEL-322 Change-Id: Iac6aab91b6958d0e5e175ed142da6aafadc6fac6 Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
Diffstat (limited to 'ci')
-rwxr-xr-xci/deploy.sh31
1 files changed, 13 insertions, 18 deletions
diff --git a/ci/deploy.sh b/ci/deploy.sh
index 9d82b73c5..0dde9bbb6 100755
--- a/ci/deploy.sh
+++ b/ci/deploy.sh
@@ -290,17 +290,14 @@ LOCAL_PDF_RECLASS="${STORAGE_DIR}/pod_config.yml"
rm -f "${LOCAL_PDF_RECLASS}"
ln -sf "$(readlink -f "../config/labs/local")" "./pharos/labs/"
if ! curl --create-dirs -o "${LOCAL_PDF}" "${BASE_CONFIG_PDF}"; then
- if [ "${DEPLOY_TYPE}" = 'baremetal' ]; then
- notify "[ERROR] Could not retrieve PDF (Pod Descriptor File)!\n" 1>&2
- exit 1
- else
- notify "[WARN] Could not retrieve PDF (Pod Descriptor File)!\n" 3
- fi
+ notify "[ERROR] Could not retrieve PDF (Pod Descriptor File)!\n" 1>&2
+ exit 1
elif ! curl -o "${LOCAL_IDF}" "${BASE_CONFIG_IDF}"; then
- notify "[WARN] POD has no IDF (Installer Descriptor File)!\n" 3
+ notify "[ERROR] Could not retrieve IDF (Installer Descriptor File)!\n" 1>&2
+ exit 1
elif ! "${PHAROS_GEN_CONFIG_SCRIPT}" -y "${LOCAL_PDF}" \
-j "${PHAROS_INSTALLER_ADAPTER}" > "${LOCAL_PDF_RECLASS}"; then
- notify "[ERROR] Could not convert PDF to reclass model input!\n" 1>&2
+ notify "[ERROR] Could not convert PDF+IDF to reclass model input!\n" 1>&2
exit 1
fi
@@ -362,16 +359,14 @@ for tp in "${RECLASS_CLUSTER_DIR}/all-mcp-arch-common/opnfv/"*.template \
done
# Convert Pharos-compatible PDF to reclass network definitions
-if [ "${DEPLOY_TYPE}" = 'baremetal' ]; then
- find "${RECLASS_CLUSTER_DIR}" -name '*.j2' | while read -r tp
- do
- if ! "${PHAROS_GEN_CONFIG_SCRIPT}" -y "${LOCAL_PDF}" \
- -j "${tp}" > "${tp%.j2}"; then
- notify "[ERROR] Could not convert PDF to reclass network defs!\n"
- exit 1
- fi
- done
-fi
+find "${RECLASS_CLUSTER_DIR}" -name '*.j2' | while read -r tp
+do
+ if ! "${PHAROS_GEN_CONFIG_SCRIPT}" -y "${LOCAL_PDF}" \
+ -j "${tp}" > "${tp%.j2}"; then
+ notify "[ERROR] Could not convert PDF to reclass network defs!\n"
+ exit 1
+ fi
+done
# Determine 'admin', 'mgmt', 'private' and 'public' bridge names based on IDF
for ((i = 0; i < ${#BR_NAMES[@]}; i++)); do