Closed johnclaus closed 10 years ago
Cool, I'll give this a shot. Thanks for putting this together.
:thumbsup: Sure thing.
Hrm, I think this needs to de-dup the returned instances:
$ assh kafka
Please select which node you wish to use:
0) kafkanode-1
1) kafkanode-1
Probably because we have a bunch of similar tags set:
$ ec2dtag | grep kafka
TAG instance i-1234 Name kafkanode-1
TAG instance i-1234 LIBRATO_SOURCE kafkanode-1
TAG instance i-1234 kafkanode-1
I just pushed a commit which only lists nodes with a resource_type of "instance". This should solve your original problem with duplicate tags.
@johnclaus The tags above are all instance tags though, so this doesn't reduce the dups. I think the code actually has to uniq the returned set of instances based on their instance ids. Give this a try on our dev account with assh kafka
, I would expect only one entry.
:thumbsup:
Looks good!
Added the ability to allow assh to connect to an EC2 node using a tag name.