Also,

Adding to above points if i want to create keypair using jcloud is it
necessary for me to use

"jclouds#" prefix while calling createKeyPairInRegion(region,name)

If i use without prefix i will get below,

java.util.NoSuchElementException: no nodes matched filter:
inGroup(production)
at
org.jclouds.compute.internal.BaseComputeService.nodesMatchingFilterAndNotTerminatedExceptionIfNotFound(BaseComputeService.java:325)
at
org.jclouds.compute.internal.BaseComputeService.runScriptOnNodesMatching(BaseComputeService.java:579)
at org.jclouds.examples.compute.basics.MainApp.main(MainApp.java:187)
error: no nodes matched filter: inGroup(production)

Any suggestion would be helpful

Thanks & Regards,
Poornima.BS

On Mon, Dec 12, 2016 at 4:29 PM, Poornima BS <poornimabs.g...@gmail.com>
wrote:

> Hi,
>
> Thanks for your reply.
>
> I have some doubts,
>
> 1. So is it possible to use an existing key pair created from amazon
> console and consume from jclouds while launching an instance.
> Say keyPair(poornima).
> As per my knowledge it can create an instance without error but while
> executing script using runScriptOnNodesMatching() gives 'no nodes matched
> filter' with groupName poornima.
>
> 2. In above case we should create key pair from jclouds and consume from
> jclouds. Other option would be create a keypair with prefix "jclouds#jcloud"
>
> 3. if keyPair Name is 'jclouds#Testkeypair'  groupname should be
> TestKeyPair while creating an instance? Is there any workaround for same
>
> 4. In case of tags can u please elaborate on tags limitation
>
> Does it mean each instance in amazon can have 50 tags or overall account
> can have 50 tags.
> I want this to be clarified because i am planning to use
> userMetaData("Name", "Test") option while launching instance so that we can
> identify machine.
>
> Please correct me if i am wrong in all above points.
>
>
> Thanks & Regards,
> Poornima.BS
>
> On Fri, Dec 9, 2016 at 10:49 PM, Ignasi Barrera <n...@apache.org> wrote:
>
>> Hi Poornima,
>>
>> This is a limitation specific to the aws-ec2 provider implementation.
>> jclouds uses a naming convention and creates the key pairs and
>> security groups with a prefix (usually 'jclouds') and a suffix that is
>> the "group". When getting the list of nodes, it parses the keys and
>> groups an instance is assigned to, and tries to extract the group from
>> there.
>>
>> We could definitely do better by storing the group in an instance tag,
>> but instance tags are limited to 50, and tags and user metadata key
>> value pairs are stored there. It is possible that we run out of tags
>> if we follow that approach, although I believe that won't be the
>> common pattern and it is a much consistent approach. (Mind opening a
>> JIRA [1] issue to track this?).
>>
>> In your case, since you are assigning the key pair "jclouds#jcloud",
>> jclouds believes it belongs to the "jcloud" group. That's why the
>> runScript method does not find groups. If you enable the
>> "jclouds.compute" logger at debug level [2] you should see relevant
>> logs.
>>
>>
>> HTH!
>>
>> I.
>>
>> [1] https://issues.apache.org/jira/browse/JCLOUDS
>> [2] https://jclouds.apache.org/reference/logging/
>>
>> On 9 December 2016 at 05:56, Poornima BS <poornimabs.g...@gmail.com>
>> wrote:
>> > Hi,
>> >
>> > Please let me know how jcloud works wrt groupName and keypair
>> >
>> > 1. Suppose my groupName and key pair is as below
>> >
>> > String groupName = "jcloud";
>> >
>> > keyPair("jclouds#jcloud")  - keypairname created in AWS
>> >
>> > Then execution of script works fine i.e runScriptOnNodesMatching
>> >
>> > 2. if i give a different groupName say,
>> >
>> > String groupName = "jcloudTest";
>> >
>> > and use an existing keypair say keyPair("jclouds#jcloud")
>> >
>> > Then runScriptOnNodesMatching gives error: no nodes matched filter:
>> > inGroup(jcloudTest)
>> >
>> > Please let me know how groupName and keypair work together
>> >
>> > 3. Also keypair is expected to be appended with "jclouds#"  i.e. jclouds
>> > finds for keypair with jclouds# prefix
>> >
>> > The groupName and keypair name should be same, then how can i create
>> > machines in multiple groups.
>> >
>> > Can u please let me know what is going wrong with using existing
>> keypair.
>> >
>> > ````
>> >  Template template = templateBuilder.build();
>> >
>> > template.getOptions().as(AWSEC2TemplateOptions.class).subnet
>> Id("subnet-a1e1d08b").
>> >
>> > keyPair("jclouds#jcloud").overrideLoginPrivateKey(login.credential)
>> > ````
>> > By using above template options i dont get issues while launching
>> instance,
>> > but while executing service i get below error,
>> >
>> > ````
>> > java.util.NoSuchElementException: no nodes matched filter:
>> inGroup(jcloud1)
>> > at org.jclouds.compute.internal.BaseComputeService.
>> > nodesMatchingFilterAndNotTerminatedExceptionIfNotFound(
>> > BaseComputeService.java:325)
>> > at org.jclouds.compute.internal.BaseComputeService.runScriptOnN
>> odesMatching(
>> > BaseComputeService.java:579)
>> > at org.jclouds.examples.compute.basics.MainApp.main(MainApp.java:187)
>> > error: no nodes matched filter: inGroup(jcloud1)
>> > ````
>> >
>> >
>> > Thanks & Regards,
>> > Poornima.BS
>>
>
>

Reply via email to