From d987f21cba7d8789fba55b8f63e1501571d4af54 Mon Sep 17 00:00:00 2001 From: Jerome Petazzoni Date: Fri, 24 May 2019 20:27:25 -0500 Subject: [PATCH] Add 'workshopctl ssh' helper command --- prepare-vms/lib/commands.sh | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/prepare-vms/lib/commands.sh b/prepare-vms/lib/commands.sh index f6d440b2..e409f2f4 100644 --- a/prepare-vms/lib/commands.sh +++ b/prepare-vms/lib/commands.sh @@ -391,6 +391,15 @@ _cmd_retag() { aws_tag_instances $OLDTAG $NEWTAG } +_cmd ssh "Open an SSH session to the first node of a tag" +_cmd_ssh() { + TAG=$1 + need_tag + IP=$(head -1 tags/$TAG/ips.txt) + info "Logging into $IP" + ssh docker@$IP +} + _cmd start "Start a group of VMs" _cmd_start() { while [ ! -z "$*" ]; do