diff options
author | Alexandru Avadanii <Alexandru.Avadanii@enea.com> | 2020-01-26 14:25:05 +0100 |
---|---|---|
committer | Alexandru Avadanii <Alexandru.Avadanii@enea.com> | 2020-01-27 14:10:02 +0000 |
commit | 279195ddeb8e459a5931430f0841724ba6c06db1 (patch) | |
tree | 1b1c33972675b172ed4c6c4758493cb5dd9c5bc8 /mcp/scripts/lib_template.sh | |
parent | e93266360b871183e29ffc0750339e4cff5b92bb (diff) |
docker build, deploy: Switch tooling to python3
Python2.7 is deprecated and packages are starting to enforce py3
usage (e.g. dockermake recently started supporting only 3.6).
Switch pipenv to python3, but allow pyhton3.5 by pinning dockermake
to v0.8 since Ubuntu Xenial does not have python3.6 easily available.
While at it, switch deploy tooling (PDF/IDF configuration parsing)
from python2 to pyhton3 too and fix some jumphost package requirements.
Change-Id: Id66d08d0f51a1bc35c1d78c1956df832a5536bde
Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
(cherry picked from commit fccf558f0c55c0b26448961a97d8edae3dd7db4d)
Diffstat (limited to 'mcp/scripts/lib_template.sh')
-rw-r--r-- | mcp/scripts/lib_template.sh | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/mcp/scripts/lib_template.sh b/mcp/scripts/lib_template.sh index bec8e159e..822d14116 100644 --- a/mcp/scripts/lib_template.sh +++ b/mcp/scripts/lib_template.sh @@ -51,14 +51,14 @@ function do_templates_scenario { awk '/^(SALT|MCP|MAAS).*=/ { gsub(/=/,": "); print }' >> "${LOCAL_PDF}" j2args=$(find "${scenario_dir}" -name '*.j2' -exec echo -j {} \;) # shellcheck disable=SC2086 - if ! "${PHAROS_GEN_CFG}" -y "${LOCAL_PDF}" ${j2args} -b -v \ + if ! python3 "${PHAROS_GEN_CFG}" -y "${LOCAL_PDF}" ${j2args} -b -v \ -i "$(dirname "$(readlink -f "${PHAROS_IA}")")"; then notify_e '[ERROR] Could not convert j2 scenario definitions!' fi for _yaml in "${extra_yaml[@]}"; do awk '/^---$/{f=1;next;}f' "${_yaml}" >> "${LOCAL_PDF}" done - if ! "${PHAROS_GEN_CFG}" -y "${LOCAL_PDF}" \ + if ! python3 "${PHAROS_GEN_CFG}" -y "${LOCAL_PDF}" \ -i "$(dirname "$(readlink -f "${PHAROS_IA}")")" \ -j "${PHAROS_IA}" -v > "${image_dir}/pod_config.yml"; then notify_e "[ERROR] Could not convert PDF+IDF to reclass model input!" @@ -84,7 +84,7 @@ function do_templates_cluster { "$(readlink -f docker-compose)" $(readlink -f ./*j2) \ -name '*.j2' -exec echo -j {} \;) # shellcheck disable=SC2086 - if ! "${PHAROS_GEN_CFG}" -y "${LOCAL_PDF}" ${j2args} -b -v \ + if ! python3 "${PHAROS_GEN_CFG}" -y "${LOCAL_PDF}" ${j2args} -b -v \ -i "$(dirname "$(readlink -f "${PHAROS_IA}")")"; then notify_e '[ERROR] Could not convert PDF to network definitions!' fi |