deploy.sh: Make PDF, IDF mandatory for all deploys 49/51249/7
authorAlexandru Avadanii <Alexandru.Avadanii@enea.com>
Fri, 26 Jan 2018 02:32:16 +0000 (03:32 +0100)
committerAlexandru Avadanii <Alexandru.Avadanii@enea.com>
Mon, 5 Feb 2018 00:12:06 +0000 (01:12 +0100)
- 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>
ci/deploy.sh
docs/release/installation/installation.instruction.rst

index 9d82b73..0dde9bb 100755 (executable)
@@ -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
index 6c0bf4c..5c0d715 100644 (file)
@@ -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