Re: Group name not set for new nodes on EC2

2016-03-21 Thread Ignasi Barrera
Well, jclouds will create key pairs based on the login credentials. If you provide the "login private key" option, jclouds will create a key pair for it, if it still doesn't exist, and generate a unique name for the key pair based on the group name (using the mentioned group naming convention that

Re: Group name not set for new nodes on EC2

2016-03-21 Thread cen
Since createNodesInGroup() accepts group name as a parameter am I correct to assume that the current logic with key pairs and security groups should be ignored in this case and the name provided should be used as the group name? Also, if I created security group and/or key together with the node,

Re: Group name not set for new nodes on EC2

2016-03-21 Thread Ignasi Barrera
Regarding the group names thing, jclouds tries to infer the group name from the security groups and key pairs [1]. When key pairs or security groups are (indirectly) created as part of the "createNodesInGroup" call, jclouds applies the naming convention taking into account the group name. The code

Re: Group name not set for new nodes on EC2

2016-03-20 Thread Andrew Phillips
On 2016-03-20 10:00, cen wrote: Agree with both statements. If there was documentation about this on createSecurityGroup I'd knew instantly what is going on. It could even be a generic statement that a certain method adheres to GroupNamingConvention. The pattern does not really match my use

Re: Group name not set for new nodes on EC2

2016-03-20 Thread cen
Agree with both statements. If there was documentation about this on createSecurityGroup I'd knew instantly what is going on. It could even be a generic statement that a certain method adheres to GroupNamingConvention. The pattern does not really match my use case because I create a single

Group name not set for new nodes on EC2

2016-03-19 Thread cen
Hi For some reason the new nodes I create on EC2 are missing the group names. NodeMetadata node = getOnlyElement(compute.createNodesInGroup(vmSettings.getGroupName(), 1, template)); logger.info("New node " + node.getId() + " " + concat(node.getPrivateAddresses(), node.getPublicAddresses())+" in

Re: Group name not set for new nodes on EC2

2016-03-19 Thread cen
Yeah sure. This is my final code to create the security group: AWSEC2SecurityGroupExtension client = (AWSEC2SecurityGroupExtension)compute.getSecurityGroupExtension().get(); SecurityGroup sg = client.createSecurityGroup("crossbuild", CLOUD_REGION); Builder b =

Re: Group name not set for new nodes on EC2

2016-03-19 Thread Andrew Phillips
Regarding the group name in the nodes, could you share the code you use to build the template, including the template options? Thanks for the additional details! More information on the resource prefixing Ignasi was mentioning is here, by the way:

Re: Group name not set for new nodes on EC2

2016-03-19 Thread Ignasi Barrera
Good to see that part is working! FWIW, jclouds adds a prefix to some resources, for convenience. This can be configured, though, by setting the ComputeServiceProperties.RESOURCENAME_PREFIX property [1] when creating the context. You can change the default "jclouds" value or set it to an empty

Re: Group name not set for new nodes on EC2

2016-03-19 Thread cen
Thank you. I have already solved the security group issue. The problem was the "cosmetic" one I mentioned in the email on the end. I was creating a group with name "crossbuild" and tried to use the same name when creating the node. The exception was thrown when creating the node, not when

Re: Group name not set for new nodes on EC2

2016-03-19 Thread Ignasi Barrera
Regarding the group name in the nodes, could you share the code you use to build the template, including the template options? On 17 March 2016 at 01:52, Ignasi Barrera wrote: > Good to see that part is working! > > FWIW, jclouds adds a prefix to some resources, for convenience.

Re: Group name not set for new nodes on EC2

2016-03-18 Thread Andrew Phillips
After changing the group name in template to "jclouds#crossbuild" it started working. Ah, glad to hear! Could you share your final code and perhaps a short description of "this is what I was trying to do, this approach didn't work, this different approach did"? I suspect that may turn into