summaryrefslogtreecommitdiffstats
path: root/mcp/reclass/scripts/infra.sh
diff options
context:
space:
mode:
authorMichael Polenchuk <mpolenchuk@mirantis.com>2017-05-31 16:12:43 +0400
committerMichael Polenchuk <mpolenchuk@mirantis.com>2017-05-31 16:23:36 +0400
commitf19e006f84e98bdee061d79e68c316364251dcbc (patch)
tree3baa59efabe08d993aec82653611dc6eea189eea /mcp/reclass/scripts/infra.sh
parentecfbd90af36439bcb51ec2cace0d0d2340e9fee1 (diff)
[mcp] Bring in dpdk scenario support
Change-Id: Ifd6d61026a0e98e8faf59c7d218333122d70ffe9 Signed-off-by: Michael Polenchuk <mpolenchuk@mirantis.com>
Diffstat (limited to 'mcp/reclass/scripts/infra.sh')
-rwxr-xr-xmcp/reclass/scripts/infra.sh9
1 files changed, 6 insertions, 3 deletions
diff --git a/mcp/reclass/scripts/infra.sh b/mcp/reclass/scripts/infra.sh
index b83f21508..c88c061fd 100755
--- a/mcp/reclass/scripts/infra.sh
+++ b/mcp/reclass/scripts/infra.sh
@@ -1,7 +1,7 @@
#!/bin/bash
BASE_IMAGE=https://cloud-images.ubuntu.com/xenial/current/xenial-server-cloudimg-amd64-disk1.img
-declare -A NODES=( [cfg01]=4096 [ctl01]=6144 [ctl02]=6144 [ctl03]=6144 [gtw01]=2048 [cmp01]=2048 )
+declare -A NODES=( [cfg01]=4096 [ctl01]=8192 [ctl02]=8192 [ctl03]=8192 [gtw01]=2048 [cmp01]=6144 )
# get required packages
apt-get install -y mkisofs curl virtinst cpu-checker qemu-kvm
@@ -13,6 +13,9 @@ apt-get install -y mkisofs curl virtinst cpu-checker qemu-kvm
mkdir -p images
wget -P /tmp -nc $BASE_IMAGE
+# generate cloud-init user data
+envsubst < user-data.template > user-data.sh
+
for node in "${!NODES[@]}"; do
# clean up existing nodes
if [ "$(virsh domstate $node 2>/dev/null)" == 'running' ]; then
@@ -60,8 +63,8 @@ for node in "${!NODES[@]}"; do
sleep $[RANDOM%5+1]
done
-CONNECTION_ATTEMPTS=20
-SLEEP=15
+CONNECTION_ATTEMPTS=60
+SLEEP=5
# wait until ssh on Salt master is available
echo "Attempting to ssh to Salt master ..."