You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@jclouds.apache.org by Coder One <co...@yahoo.com> on 2013/11/24 20:48:22 UTC

Full power of AWS EC2 Client?

Another puzzle piece, in 1.6.2-incubating or any newer version, how do I assign private IP/network interfaces to my AWS EC2 instances?

I have manged to bring up multiple instances in the right VPC, Subnet, Security Group, key pair.  Now, I need to be able to assign the instance specific primary and secondary private IP addresses and add network interfaces.

Related question, is there a way to get a reference to the full AWS EC2 client?

JCLOUDS AWS Docs
http://demobox.github.io/jclouds-maven-site-1.6.2/1.6.2-incubating/jclouds/apidocs/org/jclouds/aws/ec2/AWSEC2Api.html


AWS Docs
http://docs.aws.amazon.com/AWSJavaSDK/latest/javadoc/com/amazonaws/services/ec2/AmazonEC2.html

Re: Full power of AWS EC2 Client?

Posted by Andrew Phillips <an...@apache.org>.
> I could create a separate AmazonEC2Client to deal just with Amazon   
> specific portion, but if there is a way to get the AmazonEC2Client   
> from jclouds API, that would make the code a bit nicer -- one   
> instead of two initialization paths.

Just to expand on Andrew Bayer's answer a bit: jclouds does not depend  
on the Amazon libraries, so there is no AmazonEc2Client "hidden"  
somewhere inside jclouds. jclouds talks directly to the EC2 HTTP API.

ap

Re: Full power of AWS EC2 Client?

Posted by Andrew Bayer <an...@gmail.com>.
AWSEC2Api has everything jclouds does with EC2 - if it's missing
functionality in one of the sub-APIs, then you should open a JIRA to get it
added.

A.


On Sun, Nov 24, 2013 at 3:52 PM, Coder One <co...@yahoo.com> wrote:

> Could you help with some sample code?  I have looked at both
> ContextBuilder.buildApi, ComputeServiceContext unwrap(), unqrap(TypeToken<http://us-mg5.mail.yahoo.com/neo/*2><C>
> tt) but was stumped.
>
> It looks to me that buildApi, unwrap would return a AWSEC2Api but that
> class does not have the "full power" of the native AmazonEc2Client.
>
> I could create a separate AmazonEC2Client to deal just with Amazon
> specific portion, but if there is a way to get the AmazonEC2Client from
> jclouds API, that would make the code a bit nicer -- one instead of two
> initialization paths.
>
>
>
>
>   On Sunday, November 24, 2013 1:47 PM, Ignasi <ig...@gmail.com>
> wrote:
>   Not sure about the ip address thing, but you can get the
> provider-specific api easily:
> - calling the "unwrapApi" method in the ComputeServiceContext.
> - or if you don't plan to use the portable compute service you can just
> create the api directly instead of creating the compute context by calling
> the "buildApi" method in the ContextBuilder.
>  HTH!
> I.
> El 24/11/2013 20:48, "Coder One" <co...@yahoo.com> escribió:
>
> Another puzzle piece, in 1.6.2-incubating or any newer version, how do I
> assign private IP/network interfaces to my AWS EC2 instances?
>
> I have manged to bring up multiple instances in the right VPC, Subnet,
> Security Group, key pair.  Now, I need to be able to assign the instance
> specific primary and secondary private IP addresses and add network
> interfaces.
>
> Related question, is there a way to get a reference to the full AWS EC2
> client?
>
> JCLOUDS AWS Docs
>
> http://demobox.github.io/jclouds-maven-site-1.6.2/1.6.2-incubating/jclouds/apidocs/org/jclouds/aws/ec2/AWSEC2Api.html
>
>
> AWS Docs
>
> http://docs.aws.amazon.com/AWSJavaSDK/latest/javadoc/com/amazonaws/services/ec2/AmazonEC2.html
>
>
>
>

Re: Full power of AWS EC2 Client?

Posted by Coder One <co...@yahoo.com>.
Could you help with some sample code?  I have looked at both ContextBuilder.buildApi, ComputeServiceContext unwrap(), unqrap(TypeToken<C>  tt) but was stumped.  

It looks to me that buildApi, unwrap would return a AWSEC2Api but that class does not have the "full power" of the native AmazonEc2Client.  

I could create a separate AmazonEC2Client to deal just with Amazon specific portion, but if there is a way to get the AmazonEC2Client from jclouds API, that would make the code a bit nicer -- one instead of two initialization paths.





On Sunday, November 24, 2013 1:47 PM, Ignasi <ig...@gmail.com> wrote:
 
Not sure about the ip address thing, but you can get the provider-specific api easily:
- calling the "unwrapApi" method in the ComputeServiceContext.
- or if you don't plan to use the portable compute service you can just create the api directly instead of creating the compute context by calling the "buildApi" method in the ContextBuilder.

HTH!
I.
El 24/11/2013 20:48, "Coder One" <co...@yahoo.com> escribió:

Another puzzle piece, in 1.6.2-incubating or any newer version, how do I assign private IP/network interfaces to my AWS EC2 instances?
>
>I have manged to bring up multiple instances in the right VPC, Subnet, Security Group, key pair.  Now, I need to be able to assign the instance specific primary and secondary private IP addresses and add network interfaces.
>
>Related question, is there a way to get a reference to the full AWS EC2 client?
>
>JCLOUDS AWS Docs
>http://demobox.github.io/jclouds-maven-site-1.6.2/1.6.2-incubating/jclouds/apidocs/org/jclouds/aws/ec2/AWSEC2Api.html
>
>
>AWS Docs
>http://docs.aws.amazon.com/AWSJavaSDK/latest/javadoc/com/amazonaws/services/ec2/AmazonEC2.html
>

Re: Full power of AWS EC2 Client?

Posted by Ignasi <ig...@gmail.com>.
Not sure about the ip address thing, but you can get the provider-specific
api easily:

- calling the "unwrapApi" method in the ComputeServiceContext.
- or if you don't plan to use the portable compute service you can just
create the api directly instead of creating the compute context by calling
the "buildApi" method in the ContextBuilder.

HTH!

I.
El 24/11/2013 20:48, "Coder One" <co...@yahoo.com> escribió:

> Another puzzle piece, in 1.6.2-incubating or any newer version, how do I
> assign private IP/network interfaces to my AWS EC2 instances?
>
> I have manged to bring up multiple instances in the right VPC, Subnet,
> Security Group, key pair.  Now, I need to be able to assign the instance
> specific primary and secondary private IP addresses and add network
> interfaces.
>
> Related question, is there a way to get a reference to the full AWS EC2
> client?
>
> JCLOUDS AWS Docs
>
> http://demobox.github.io/jclouds-maven-site-1.6.2/1.6.2-incubating/jclouds/apidocs/org/jclouds/aws/ec2/AWSEC2Api.html
>
>
> AWS Docs
>
> http://docs.aws.amazon.com/AWSJavaSDK/latest/javadoc/com/amazonaws/services/ec2/AmazonEC2.html
>