4 ms·
That's a feature, not a bug :-) I sometimes find myself needing to connect to any instance in a particular ASG, and I don't really care which one. This tool is
by mryan 11y ago
That's a feature, not a bug :-)
I sometimes find myself needing to connect to any instance in a particular ASG, and I don't really care which one. This tool is built to solve that particular problem. If I want to access a specific instance I will address it by its instance ID (ssh2ec2 --instance-id i-123456).
What would the index refer to? The list of instances in an ASG would need to be sorted (perhaps by instance ID) in order for an index to be useful. The behaviour would still be undefined to a certain extent, as the logic would be "return the instance at position n in the list", when the number of instances in the ASG might have changed due to a scaling event.
Edit: Thanks for the pull requests - we can discuss further there.
- nikolay 11y agoWhy do I need an index? So that I can do something aginst all - one by one. Otherwise, I need to list, copy and paste, etc.
- mryan 11y agoAs you mentioned in the GH issue, Fabric would probably be a better tool - this isn't supposed to be a config management framework or anything in that direction. Having said that, you can do something on all matching instances with: ssh2ec2 --tag foo=bar --all-matching-instances /some/command
- nikolay 11y agoIf you don't want to implement it - it's fine, don't, I understand it. This tool should be used for ad-hoc commands and there are some other tools that already use an index, which means that I'm not the only one who thinks a little addition like is useful. As previously covered multiple times, some innovative startups don't even enable SSH for their servers as SSH doesn't fit nicely in the immutable infrastructure paradigm. But then there's the real world.
- toomuchtodo 11y ago> If you don't want to implement it - it's fine, don't, I understand it. If you want to address a unique instance, do it by instance ID. If you want to address all of them, use the command example Mike put forth. To add an index is redundant. Use fabric if you're interested in that level of control. Not SSHing to your instances works just fine, until you need to tweak a knob without launching a new instance, or get logs that you didn't know you needed to get. If you feel the need to get on the immutable infrastructure hype train though, go for it.