From 672700775400341dc162d20fa487f8036edf6e64 Mon Sep 17 00:00:00 2001 From: Bridget Kromhout Date: Fri, 2 Mar 2018 18:11:32 -0600 Subject: [PATCH 1/5] Missing variable --- prepare-vms/lib/commands.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/prepare-vms/lib/commands.sh b/prepare-vms/lib/commands.sh index f9cc6671..7b4a70d3 100644 --- a/prepare-vms/lib/commands.sh +++ b/prepare-vms/lib/commands.sh @@ -434,6 +434,7 @@ tag_is_reachable() { } test_tag() { + TAG=$1 ips_file=tags/$TAG/ips.txt info "Picking a random IP address in $ips_file to run tests." n=$((1 + $RANDOM % $(wc -l <$ips_file))) From 848679829dd7f86094a13ccfdb6d3e5e31916b19 Mon Sep 17 00:00:00 2001 From: Bridget Kromhout Date: Fri, 2 Mar 2018 18:18:04 -0600 Subject: [PATCH 2/5] Removed -i and trailing space --- prepare-vms/lib/commands.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/prepare-vms/lib/commands.sh b/prepare-vms/lib/commands.sh index 7b4a70d3..7b33e5fc 100644 --- a/prepare-vms/lib/commands.sh +++ b/prepare-vms/lib/commands.sh @@ -175,10 +175,10 @@ _cmd kubetest "Check that all notes are reporting as Ready" _cmd_kubetest() { # There are way too many backslashes in the command below. # Feel free to make that better ♥ - pssh -i " + pssh " set -e if grep -q node1 /tmp/node; then - for NODE in \$(awk /\ node/\ {print\ \\\$2} /etc/hosts); do + for NODE in \$(awk /\ node/\ {print\ \\\$2} /etc/hosts); do echo \$NODE ; kubectl get nodes | grep -w \$NODE | grep -w Ready done fi" From 9debd76816895fe1ce7be32cfdde9c4d55e67d9b Mon Sep 17 00:00:00 2001 From: Bridget Kromhout Date: Sat, 3 Mar 2018 08:44:58 -0600 Subject: [PATCH 3/5] Document kubetest --- prepare-vms/README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/prepare-vms/README.md b/prepare-vms/README.md index daa1f80a..8df08afa 100644 --- a/prepare-vms/README.md +++ b/prepare-vms/README.md @@ -64,6 +64,7 @@ help Show available commands ids List the instance IDs belonging to a given tag or token ips List the IP addresses of the VMs for a given tag or token kube Setup kubernetes clusters with kubeadm (must be run AFTER deploy) +kubetest Test health of kubernetes clusters (must be run AFTER kube) list List available batches in the current region opensg Open the default security group to ALL ingress traffic pull_images Pre-pull a bunch of Docker images From 5c663f9e096ed5075507d2e204b7d96e3740a707 Mon Sep 17 00:00:00 2001 From: Bridget Kromhout Date: Sat, 3 Mar 2018 08:48:02 -0600 Subject: [PATCH 4/5] Updating help output --- prepare-vms/README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/prepare-vms/README.md b/prepare-vms/README.md index 8df08afa..57a192ff 100644 --- a/prepare-vms/README.md +++ b/prepare-vms/README.md @@ -57,6 +57,7 @@ workshopctl - the orchestration workshop swiss army knife Commands: ami Show the AMI that will be used for deployment amis List Ubuntu AMIs in the current region +build Build the Docker image to run this program in a container cards Generate ready-to-print cards for a batch of VMs deploy Install Docker on a bunch of running VMs ec2quotas Check our EC2 quotas (max instances) @@ -64,7 +65,7 @@ help Show available commands ids List the instance IDs belonging to a given tag or token ips List the IP addresses of the VMs for a given tag or token kube Setup kubernetes clusters with kubeadm (must be run AFTER deploy) -kubetest Test health of kubernetes clusters (must be run AFTER kube) +kubetest Check that all notes are reporting as Ready list List available batches in the current region opensg Open the default security group to ALL ingress traffic pull_images Pre-pull a bunch of Docker images @@ -73,6 +74,7 @@ start Start a batch of VMs status List instance status for a given batch stop Stop (terminate, shutdown, kill, remove, destroy...) instances test Run tests (pre-flight checks) on a batch of VMs +wrap Run this program in a container ``` ### Summary of What `./workshopctl` Does For You From ca828343e414c2172e5be184b03b7f9edb3f2e3b Mon Sep 17 00:00:00 2001 From: Bridget Kromhout Date: Sat, 3 Mar 2018 08:51:54 -0600 Subject: [PATCH 5/5] Remove azure instances post-workshop. --- prepare-vms/README.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/prepare-vms/README.md b/prepare-vms/README.md index 57a192ff..a8540860 100644 --- a/prepare-vms/README.md +++ b/prepare-vms/README.md @@ -131,6 +131,13 @@ az group deployment create --resource-group workshop --template-file azuredeploy az vm list-ip-addresses --resource-group workshop --output table ``` +After the workshop is over, remove the instances: + +``` +az group delete --resource-group workshop +``` + + ## Other Tools ### Deploying your SSH key to all the machines