rundeck-ec2-nodes-plugin icon indicating copy to clipboard operation
rundeck-ec2-nodes-plugin copied to clipboard

Only one instance from ASG appears if EC2 name tag used as name

Open bashton-ajenkins opened this issue 5 years ago • 5 comments

By default the plugin will only list one instance of a group of instances if their EC2 name tag is the same.

To work around this I have had to set this as the mapping parameter:

tags.selector=tags/Rundeck-Tags,tags/Name;nodename.selector=instanceId;username.default=rundeck;hostname.selector=privateIpAddress

However it results in the Nodes list being harder to navigate unless you use the tags to filter (as you just have a list of ec2 instance IDs).

bashton-ajenkins avatar Jun 03 '19 09:06 bashton-ajenkins

Did you get this to work @bashton-ajenkins ?

I tried setting Mapping Params: nodename.selector=tags/Name,instanceId But, when I go to nodes, it's still just listing one node of each Name. Isn't pulling in instanceId.

jmilliron avatar Aug 01 '19 21:08 jmilliron

yeah, the , in the mapping doesn't seem to be working as expected. I ended up going with:

nodename.selector=instanceId;nametag.selector=tags/Name

And then just searching by nametag. IE:

nametag: "CassandraNode-awesome"

/shrug

jmilliron avatar Aug 02 '19 17:08 jmilliron

Hey guys, the best solution I found for this is to just use the instance ID as the name and use the instance name as a tag (this is the solution I mention in the original post). This allows you to target the instances by the tag name to run commands against all instances with that name or if you want to run on an individual instance you would need to just target it by it's ID

bashton-ajenkins avatar Aug 02 '19 20:08 bashton-ajenkins

I also have this issue. As noted above i have made changes to list nodes with their instance ID but this is really unreadable from a UI point of view.

It was documented that you could append a value like so: nodename.selector=tags/Name+'-'+instanceId But I tried this and it still only shows the Instance ID for the name instead of appending it to the name. Looks like a bug.

joeeuston avatar Feb 04 '20 02:02 joeeuston

I thought this was a bug too, but I think it's just sensitive. I used this in mine:

nodename.selector=tags/Name+' ('+privateIpAddress+')';username.default=;

Notice the nodename.selector is first on the params line, and also could not have a space between the semi-colon and username.default property. And it appears to be working now.

rarango9 avatar Feb 08 '20 06:02 rarango9