diff --git a/build_all.sh b/tools/build_all.sh similarity index 100% rename from build_all.sh rename to tools/build_all.sh diff --git a/build_remote_ssh_ubuntu.sh b/tools/build_remote_ssh_ubuntu.sh similarity index 68% rename from build_remote_ssh_ubuntu.sh rename to tools/build_remote_ssh_ubuntu.sh index b2e71e1c..ba0e8a39 100755 --- a/build_remote_ssh_ubuntu.sh +++ b/tools/build_remote_ssh_ubuntu.sh @@ -1,12 +1,12 @@ #!/bin/bash -eux -REMOTE_IP="172.16.241.102,172.16.246.17" +REMOTE_IP="172.16.245.253,172.16.246.17" REMOTE_USER="ubuntu" GITLAB_REGISTRATION_TOKEN=${GITLAB_REGISTRATION_TOKEN:-} # Prepare remote machine for build if [ -n "$GITLAB_REGISTRATION_TOKEN" ]; then - ansible-playbook -i "$REMOTE_IP," -e GITLAB_REGISTRATION_TOKEN="$GITLAB_REGISTRATION_TOKEN" -e ansible_python_interpreter=python3 --user $REMOTE_USER ansible/build_remote_ssh_ubuntu.yml + ansible-playbook -i "$REMOTE_IP," -e GITLAB_REGISTRATION_TOKEN="$GITLAB_REGISTRATION_TOKEN" -e ansible_python_interpreter=python3 --user $REMOTE_USER ../ansible/build_remote_ssh_ubuntu.yml else - ansible-playbook -i "$REMOTE_IP," -e ansible_python_interpreter=python3 --user $REMOTE_USER ansible/build_remote_ssh_ubuntu.yml + ansible-playbook -i "$REMOTE_IP," -e ansible_python_interpreter=python3 --user $REMOTE_USER ../ansible/build_remote_ssh_ubuntu.yml fi diff --git a/tools/cleanup_all-vagrant_init_destroy_boxes.sh b/tools/cleanup_all-vagrant_init_destroy_boxes.sh new file mode 100755 index 00000000..e7694717 --- /dev/null +++ b/tools/cleanup_all-vagrant_init_destroy_boxes.sh @@ -0,0 +1,14 @@ +#!/bin/bash -eux + +set -o pipefail + +TMPDIR=${TMPDIR:-/var/tmp/vagrant_init_destroy_boxes} + +for DIR in `find /var/tmp -maxdepth 1 -mindepth 1 -type d`; do + VAGRANT_BOX_NAME=$(basename $DIR) + echo "*** $DIR" + cd $DIR + vagrant destroy -f + virsh --connect=qemu:///system vol-delete --pool default --vol ${VAGRANT_BOX_NAME}_vagrant_box_image_0.img + rm -rf $DIR +done