diff options
author | Tim Rozet <trozet@redhat.com> | 2015-07-13 16:28:53 -0400 |
---|---|---|
committer | Tim Rozet <trozet@redhat.com> | 2015-07-14 17:12:10 -0400 |
commit | 0174fdf6cbb16394eb8f57d8b421341b5f39bf36 (patch) | |
tree | 1c19a06e20a668f86d386e4293f3bc22965a236e /foreman/ci/clean.sh | |
parent | 2db881ecbe40d6f2ad3aa37e391daef9d8556435 (diff) |
Migrates from github bgs_vagrant project to genesis
No longer relies on bgs_vagrant github project. Now Foreman VM is
created under /var/opt/opnfv/foreman_vm, instead of /tmp/bgs_vagrant for better
naming convention and file location. Other VM nodes are also placed in
/var/opt/opnfv/.
JIRA: BGS-60
Change-Id: I009d907ad777750168b822ab86cd11515e28cdd7
Signed-off-by: Tim Rozet <trozet@redhat.com>
Diffstat (limited to 'foreman/ci/clean.sh')
-rwxr-xr-x | foreman/ci/clean.sh | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/foreman/ci/clean.sh b/foreman/ci/clean.sh index f61ac93..05c35fc 100755 --- a/foreman/ci/clean.sh +++ b/foreman/ci/clean.sh @@ -5,7 +5,7 @@ # #Uses Vagrant and VirtualBox # -#Destroys Vagrant VM running in /tmp/bgs_vagrant +#Destroys Vagrant VM running in $vm_dir/foreman_vm #Shuts down all nodes found in Khaleesi settings #Removes hypervisor kernel modules (VirtualBox) @@ -14,6 +14,8 @@ reset=`tput sgr0` blue=`tput setaf 4` red=`tput setaf 1` green=`tput setaf 2` + +vm_dir=/var/opt/opnfv ##END VARS ##FUNCTIONS @@ -106,9 +108,17 @@ else skip_vagrant=1 fi +###legacy VM location check +###remove me later +if [ -d /tmp/bgs_vagrant ]; then + cd /tmp/bgs_vagrant + vagrant destroy -f + rm -rf /tmp/bgs_vagrant +fi + ###destroy vagrant if [ $skip_vagrant -eq 0 ]; then - cd /tmp/bgs_vagrant + cd $vm_dir/foreman_vm if vagrant destroy -f; then echo "${blue}Successfully destroyed Foreman VM ${reset}" else @@ -135,6 +145,8 @@ else echo "${blue}Skipping Vagrant destroy + Vbox Removal as VirtualBox package is already removed ${reset}" fi +###remove working vm directory +rm -rf $vm_dir ###remove kernel modules echo "${blue}Removing kernel modules ${reset}" |