diff options
author | Alexandru Avadanii <Alexandru.Avadanii@enea.com> | 2018-01-26 03:32:16 +0100 |
---|---|---|
committer | Alexandru Avadanii <Alexandru.Avadanii@enea.com> | 2018-02-05 01:12:06 +0100 |
commit | 965310d4c0fee5739b6a6a8ff4a40b2ee6c9c0c5 (patch) | |
tree | 8a0470c9727f4ebf857ccf202f55d32525870415 | |
parent | 6a4b936669282c88b9842d78b9add1e64864aec6 (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>
-rwxr-xr-x | ci/deploy.sh | 31 | ||||
-rw-r--r-- | docs/release/installation/installation.instruction.rst | 2 |
2 files changed, 14 insertions, 19 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 diff --git a/docs/release/installation/installation.instruction.rst b/docs/release/installation/installation.instruction.rst index 6c0bf4cb8..5c0d715a8 100644 --- a/docs/release/installation/installation.instruction.rst +++ b/docs/release/installation/installation.instruction.rst @@ -418,7 +418,7 @@ Examples $ ci/deploy.sh -b file:///home/jenkins/tmpdir/securedlab \ -l ericsson \ - -p virtual_kvm \ + -p virtual3 \ -s os-nosdn-nofeature-noha \ -D \ -S /home/jenkins/tmpdir |& tee deploy.log |