DEBUG=0
SSH_PORT=22
+PUPPET_CONCURRENCY=5
read -d] -r SCOPES <<EOF
--scopes
echo >&2
echo >&2 "$0 options:"
echo >&2 " -p, --port <ssh port> SSH port to use (default 22)"
+ echo >&2 " -c, --concurrency <max> Maximum concurrency for puppet runs (default 5)"
echo >&2 " -d, --debug Enable debug output"
echo >&2 " -h, --help Display this help and exit"
echo >&2
# NOTE: This requires GNU getopt (part of the util-linux package on Debian-based distros).
-TEMP=`getopt -o hdp: \
- --long help,debug,port: \
+TEMP=`getopt -o hdpc: \
+ --long help,debug,port,concurrency: \
-n "$0" -- "$@"`
if [ $? != 0 ] ; then echo "Use -h for help"; exit 1 ; fi
-p | --port)
SSH_PORT="$2"; shift 2
;;
+ -c | --concurrency)
+ PUPPET_CONCURRENCY="$2"; shift 2
+ ;;
-d | --debug)
DEBUG=1
shift
export -f title
export SSH_PORT
export PUPPET_AGENT
-echo $nodes|xargs -d " " -n 1 -P 10 -I {} bash -c "run_puppet {}"
+echo $nodes|xargs -d " " -n 1 -P $PUPPET_CONCURRENCY -I {} bash -c "run_puppet {}"
title "Locating Arvados Standard Docker images project"