VTWO-14496 : start machines configuration

This commit is contained in:
mbenabda
2019-06-20 16:44:59 +02:00
parent ce236f216f
commit e577b6e5ac
6 changed files with 68 additions and 2 deletions

2
scripts/download_node_binaries Executable file
View File

@@ -0,0 +1,2 @@
#!/usr/bin/env bash
curl -sL https://github.com/kubernetes/kubernetes/releases/download/v1.15.0/kubernetes.tar.gz | tar zxvf -

View File

@@ -0,0 +1,16 @@
#!/usr/bin/env bash
sudo apt-get update -y
sudo apt-get install -y \
apt-transport-https \
ca-certificates \
curl \
gnupg2 \
software-properties-common
curl -fsSL https://download.docker.com/linux/debian/gpg | sudo apt-key add -
sudo add-apt-repository -y "deb [arch=amd64] https://download.docker.com/linux/debian $(lsb_release -cs) stable"
sudo apt-get install -y --allow-unauthenticated docker-ce docker-ce-cli containerd.io

3
scripts/node_names Executable file
View File

@@ -0,0 +1,3 @@
#!/usr/bin/env bash
vagrant status --machine-readable | grep ,state, | cut -d, -f2 | sort | uniq

22
scripts/run_script_on_all_nodes Executable file
View File

@@ -0,0 +1,22 @@
#!/usr/bin/env bash
SCRIPTS_DIR=$(dirname $0)
SCRIPT_NAME=$1
NODE_NAMES=$($SCRIPTS_DIR/node_names)
cat $SCRIPTS_DIR/$SCRIPT_NAME
echo ""
echo ""
echo ""
echo ""
read -n 1 -s -r -p "Press any key to continue..."
echo ""
echo ""
# copy script over
chmod u+x "$SCRIPTS_DIR/$SCRIPT_NAME"
parallel vagrant scp "$SCRIPTS_DIR/$SCRIPT_NAME" "{}:~/" ::: $NODE_NAMES
# remotely run the script
parallel vagrant ssh {} -c "\~/$SCRIPT_NAME" ::: $NODE_NAMES