This page gives you the first keys to using Ubuntu's images on Amazon EC2 and notes on setting up the EC2 API tools...
https://help.ubuntu.com/community/EC2StartersGuide
Installing the API tools
The EC2 API tools is now available for 9.04+ users to install and configure the software. For previous versions of Ubuntu please see here.
Make sure you have multiverse enabled and run the following command:
sudo apt-get install ec2-api-tools
-------------------------------------------------------------------------------------------------------
*Note : the 'cert-xxxx.perm' and 'pk-xxxx.perm' are generated through the AWS account on the Amazon website under 'Security Credentials'. Once have created a x.509 cert you can then download the PK.xxxx.perm file, however the x.509 cert is stored on the Amazon website account the PK.xxx.perm is not - so keep it safe otherwise you will have then generate the certificates again. These 2 files are used for talking to the API directly.
**Note : the key pair that you can name within the console is the 3rd file required. This is used for direct communication with the AMI instances you have created i.e. for SSH'ing onto your Amazon servers.
-------------------------------------------------------------------------------------------------------
Make sure you have the following environment variables set up in your shell profile. This is accomplished by adding the following lines to your ~/.bashrc if you use bash as your shell:
ec2-describe-images -o self -o amazon
Note: If this fails due to "Client.AuthFailure" then ensure you have signed up for both AWS and ec2 with amazon.com, and have provided valid payment details. Also double check that the EC2_PRIVATE_KEY and EC2_CERT point to the correct locations.
To use public AMIs you have to generate an ssh key. Run the following command which will also save the private key returned to a local file called ec2-keypair:
ec2-add-keypair ec2-keypair > ec2-keypair.pem
Make sure the permissions on the file is 600
chmod 600 ec2-keypair.pem
Now that your computer is set up to work with EC2, it is time to make your server instance.
ec2-describe-images -o amazon
Now connecting the command line of the running AMI instance :
ssh -i ec2-keypair root@ec2-xx-xxx-xx-xx.compute-1.amazonaws.com
(where ec2-keypair is the download keypair.pem from the AWS console)
-----------------------------------------------------------------------------------------------------------------
Getting the images (AMIs)
The Official AMI Ids can be obtained from http://uec-images.ubuntu.com. Official Ubuntu AMIs are published by the 'Canonical' user, with Amazon ID '099720109477'. Images containing the string 'ubuntu' but not owned by that ID are not official AMIs.
10.04 LTS Lucid Lynx : http://uec-images.ubuntu.com/releases/10.04/release/
9.10 Karmic Koala : http://uec-images.ubuntu.com/releases/9.10/release/
8.04 LTS Hardy Heron : http://uec-images.ubuntu.com/releases/8.04/release/
Maverick Meerkat (Development Release) : http://uec-images.ubuntu.com/server/maverick/current/
Unofficial but well-maintained AMIs (8.04 Hardy through 9.04 Jaunty), including "EBS root" images for Hardy and Karmic are available from Eric Hammond's site Alestic.com.
-----------------------------------------------------------------------------------------------------------------
sources :
http://www.robertsosinski.com/2008/01/26/starting-amazon-ec2-with-mac-os-x/
http://aws.amazon.com/web-hosting/
https://help.ubuntu.com/community/EC2StartersGuide
http://www.linuxconfig.org/Howto_CREATE_BUNDLE_UPLOAD_and_ACCESS_custom_...
ami references :
http://alestic.com/

Post new comment