EC2 Client Notes (TP2.2)
When using a cloud running the EC2 frontend, you can download this EC2 client from Amazon or try a number of different client that are out there.
NOTE: Amazon EC2 upgrades happen without warning and so there is sometimes a sync error between their default tools and the tools needed to work with particular Nimbus elastic services.
- Nimbus TP2.2 supports the "2008-05-05" WSDL (this EC2 client).
- The older Nimbus TP2.0 supports the "2008-02-01" WSDL (this EC2 client).
- So the default client may not always be the one to use. See a specific cloud's documentation for the definitive tools URL (for example, the Nimbus cloud). And see enhancement 6558.
With the client from Amazon, you need to adjust the following environment variables (using other clients, the configurations can vary).
- EC2_HOME - Set the base directory (such that $EC2_HOME/bin is valid)
- EC2_URL - Set the service endpoint to the Nimbus based service
- EC2_CERT - Set the public credential to your public .pem based cert
- EC2_PRIVATE_KEY - Set the private credential to an unencrypted .pem based key
Example:
The URL for EC2_URL will be provided to you by an administrator or some documentation (HOST:PORT in the example is a placeholder for an actual hostname and port number)
For example, see the Nimbus cloud docs for running EC2 clients.
If you have a problem, consult the troubleshooting guide.
Before being able to launch an instance, you will need to register a keypair like so:
-
$ MYPUBKEY=`cat .ssh/id_rsa.pub`
-
Check to make sure those contents look OK:
$ echo $MYPUBKEY -
Send the public key value to the service, labelling it "mykey"
$ ec2-add-keypair "mykey||$MYPUBKEY"
List the available images in your personal directory:
Pick one, for example "hello-cloud". And with the "-k" argument, use the ssh key label you used above to register an ssh public key.
Check status:
After seeing 'pending' change to 'running', log in at the address printed:
Terminate using the "instance ID" printed when you first launched (and also available from ec2-describe-instances). It looks like "i-4662834e":