diff --git a/run_vagrant_provision.sh b/run_vagrant_provision.sh new file mode 100755 index 0000000..f1722f0 --- /dev/null +++ b/run_vagrant_provision.sh @@ -0,0 +1,22 @@ +#!/bin/sh + +MAX_PROCS=4 + +parallel_provision() { + while read box; do + echo "Provisioning '$box'. Output will be in: $box.out.txt" 1>&2 + echo $box + done | xargs -P $MAX_PROCS -I"BOXNAME" \ + sh -c 'vagrant provision BOXNAME >BOXNAME.out.txt 2>&1 || echo "Error Occurred: BOXNAME"' +} + +## -- main -- ## + +# start boxes sequentially to avoid vbox explosions +vagrant up --no-provision + +# but run provision tasks in parallel +cat <