Improve the boostrap script
* force the removal of existing nodes * send generated log message to STDOUT and to a logfile * fix a typo (bringign --> bringing) * add a note to the documentation where to find the log files * add a note to the documentation about the running time * print the status of all VMs at the end Change-Id: I29e9b0cb482188345345527e09b248eb8b0b52d7
This commit is contained in:
parent
9ffb12f423
commit
65dce2a8c2
|
@ -7,6 +7,10 @@ First run the ``bootstrap.sh`` script to prepare all required nodes.
|
|||
|
||||
$ ./scripts/bootstrap.sh
|
||||
|
||||
- A logfile for each node will be created in the directory ``log``.
|
||||
- It will take a long time (approximately 30 minutes, depends on your
|
||||
local environment) to boostrap all required nodes.
|
||||
|
||||
Afterwards run the following command on the controller node
|
||||
(``vagrant ssh controller``) to deploy OpenStack with Packstack.
|
||||
|
||||
|
|
|
@ -10,7 +10,7 @@ run() {
|
|||
number=$1
|
||||
shift
|
||||
python scripts/get_hosts.py | grep -v controller | xargs -n 1 -P $number \
|
||||
-I BOX sh -c "echo - BOX && (vagrant $* BOX 2>&1 >> log/BOX.log)"
|
||||
-I BOX sh -c "echo - BOX && (vagrant $* BOX 2>&1 | tee -a log/BOX.log)"
|
||||
}
|
||||
|
||||
if [[ ! -e config.yaml ]]; then
|
||||
|
@ -20,11 +20,12 @@ fi
|
|||
|
||||
echo "$(date) cleaning up"
|
||||
rm -f log/*
|
||||
vagrant destroy
|
||||
vagrant destroy --force
|
||||
|
||||
echo "$(date) bringign up, provisioning and reloading the controller VM"
|
||||
vagrant up controller >> log/controller.log
|
||||
vagrant reload controller >> log/controller.log
|
||||
echo "$(date) bringing up, provisioning and reloading the controller VM"
|
||||
logfile=log/controller.log
|
||||
vagrant up controller | tee -a $logfile
|
||||
vagrant reload controller | tee -a $logfile
|
||||
|
||||
echo "$(date) brining up all VMs"
|
||||
run $p up --no-provision
|
||||
|
@ -36,4 +37,8 @@ echo "$(date) reloading all other VMs"
|
|||
run $p reload
|
||||
|
||||
echo "$(date) initializing the controller node"
|
||||
vagrant ssh controller -c '/home/vagrant/scripts/initialize.sh' 2>&1 >> log/controller.log
|
||||
logfile=log/controller.log
|
||||
vagrant ssh controller -c '/home/vagrant/scripts/initialize.sh' 2>&1 | tee -a $logfile
|
||||
|
||||
echo "$(date) getting status of all VMs"
|
||||
vagrant status
|
||||
|
|
Loading…
Reference in New Issue