From 9367637be6bf240a3eb5bde5f1229bd19577a0c1 Mon Sep 17 00:00:00 2001 From: Peter Lomakin Date: Mon, 14 Oct 2013 13:26:22 +0400 Subject: [PATCH] [ci] Added script for vagrant parallel provision of web and devstack --- run_vagrant_provision.sh | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100755 run_vagrant_provision.sh 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 <