From 45b2786f0ec445d8a6c3ec7602cd215383b0e9c5 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Evrard Date: Tue, 23 May 2017 10:18:44 +0000 Subject: [PATCH] Improve leapfrog pluggability The leapfrog is quite static, and a deployer can only run scripts before and after the process. By adding this, a deployer can alter the re-deploy behavior. It can now run playbooks or shell scripts after the migrations, and modify the re-deploy behavior (by adding more playbooks for example). Change-Id: Idde1e94d014fe4ca527568641a04c847a710d801 --- leap-upgrades/re-deploy.sh | 5 +++++ leap-upgrades/run-stages.sh | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/leap-upgrades/re-deploy.sh b/leap-upgrades/re-deploy.sh index 9593b5f8..cd0b84cd 100755 --- a/leap-upgrades/re-deploy.sh +++ b/leap-upgrades/re-deploy.sh @@ -89,5 +89,10 @@ RUN_TASKS+=("os-magnum-install.yml") RUN_TASKS+=("os-sahara-install.yml") RUN_TASKS+=("${UPGRADE_UTILS}/post-redeploy-cleanup.yml") +# Loads a shell script that can be used to modify +# the RUN_TASKS behavior. +if [ ! -z ${REDEPLOY_EXTRA_SCRIPT} ]; then + source ${REDEPLOY_EXTRA_SCRIPT} +fi run_items "/opt/openstack-ansible" ### Run the redeploy tasks diff --git a/leap-upgrades/run-stages.sh b/leap-upgrades/run-stages.sh index c3679113..834f3656 100755 --- a/leap-upgrades/run-stages.sh +++ b/leap-upgrades/run-stages.sh @@ -31,6 +31,6 @@ source migrations.sh source re-deploy.sh echo -e "\n=====================================================" -notice "All Leaps successful." +notice "All OpenStack-Ansible Leaps successful." echo -e "=====================================================\n" exit 0