mirror of
https://github.com/kelseyhightower/kubernetes-the-hard-way.git
synced 2025-12-15 17:28:58 +03:00
VTWO-14496 : start machines configuration
This commit is contained in:
2
scripts/download_node_binaries
Executable file
2
scripts/download_node_binaries
Executable 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 -
|
||||
16
scripts/install_container_runtime
Executable file
16
scripts/install_container_runtime
Executable 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
3
scripts/node_names
Executable 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
22
scripts/run_script_on_all_nodes
Executable 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
|
||||
Reference in New Issue
Block a user