Files
packstack-vagrant/scripts/bootstrap.sh
Christian Berendt 5b8bffb103 Directly use the provided Vagrantbox on Atlas
Change-Id: Ib3cfb474c712c2a123cc6493f69141e85c4d16b6
2014-12-11 21:46:46 +01:00

29 lines
637 B
Bash
Executable File

#!/bin/bash
run() {
number=$1
shift
python scripts/get_hosts.py | xargs -n 1 -P $number -I BOX sh -c "echo - BOX && (vagrant $* BOX 2>&1 >> log/BOX.log)"
}
if [[ ! -e config.yaml ]]; then
echo "error: configuration file 'config.yaml' does not exist"
exit 1
fi
echo "$(date) cleaning up"
rm -f log/*
vagrant destroy
echo "$(date) brining up all VMs"
run 2 up --no-provision
echo "$(date) provisioning all VMs"
run 4 provision
echo "$(date) reloading all VMs"
run 4 reload
echo "$(date) initializing the controller node"
vagrant ssh controller -c '/home/vagrant/scripts/initialize.sh' 2>&1 >> log/controller.log