aboutsummaryrefslogtreecommitdiffstats
path: root/ci
diff options
context:
space:
mode:
authorAlexandru Avadanii <Alexandru.Avadanii@enea.com>2019-05-16 17:49:04 +0200
committerAlexandru Avadanii <Alexandru.Avadanii@enea.com>2019-06-05 13:27:37 +0000
commit559a47f31475bb660c21a7efba0fa4207adb378a (patch)
treeef1c216a86a3eb51964be2f1ed85e2c04f4652df /ci
parentfa2a3e158fa22058e2a8e9c71febcc3b11219d8f (diff)
[lib] Add uninstall/cleanup option
When multiple installers are used on the same jumpserver, it is useful to have the ability of automatic cleanup after a previous deploy. Change-Id: Ib3249f53ee9d6b1ba2409dd71bd13480536faedc Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com> (cherry picked from commit 4a9051284f69ded7bfadfb3a113513b6301c6a45)
Diffstat (limited to 'ci')
-rwxr-xr-xci/deploy.sh7
1 files changed, 7 insertions, 0 deletions
diff --git a/ci/deploy.sh b/ci/deploy.sh
index 75a1a8864..a657f7610 100755
--- a/ci/deploy.sh
+++ b/ci/deploy.sh
@@ -83,6 +83,9 @@ $(notify_i "Input parameters to the build script are:" 2)
currently defined on cluster KVM nodes. If specified twice (e.g. -E -E),
baremetal nodes (VCP too, implicitly) will be removed, then reprovisioned.
Only applicable for baremetal deploys.
+ If specified 3 times, a complete uninstallation (cleanup) will be performed
+ on the jumpserver (even for virtual deploys): VMs, virsh networks,
+ containers, networks, services etc.
-f Deploy on existing Salt master. It will skip infrastructure VM creation,
but it will still sync reclass configuration from current repo to Salt
Master node.
@@ -302,6 +305,10 @@ jumpserver_check_requirements "${cluster_states[*]}" "${virtual_nodes[*]}" \
if [ ${DRY_RUN} -eq 1 ]; then
notify "[NOTE] Dry run, skipping all deployment tasks" 2
exit 0
+elif [ ${ERASE_ENV} -gt 2 ]; then
+ notify "[NOTE] Uninstall / cleanup all jumpserver Fuel resources" 2
+ cleanup_all "${MCP_STORAGE_DIR}" "${OPNFV_BRIDGES[@]}"
+ exit 0
elif [ ${USE_EXISTING_INFRA} -gt 0 ]; then
notify "[NOTE] Use existing infra: skip first ${USE_EXISTING_INFRA} states" 2
notify "[STATE] Skipping: ${cluster_states[*]::${USE_EXISTING_INFRA}}" 2