Adding an EC2 Account

EC2 is different from other virtualization systems supported by Cloudmin, as it is a hosted service run by Amazon on their machines. They charge by the hour of machine time, and also for storage of any machine images that you create and host on their S3 service.

Cloudmin can manage virtual systems running under EC2 in almost exactly the same way as it does for other virtualized systems. The biggest difference is that they cannot be shut down without losing the contents of the system, which makes them a little risky for web hosting, as Amazon gives no guarantees of the stability of EC2 instances. Fortunately, Virtualmin makes it easy to backup hosted domains to Amazon's S3 service, which is fast and cheap when accessed from EC2 instances.

Signing Up With Amazon

The first step in the process of using EC2 is to sign up for an account at Amazon's website, http://aws.amazon.com/ . You will need to provide credit card details for billing. If you already have an Amazon account, adding the EC2 service to it is simple.

Once you have an account, you will need to find out the account number, access key and secret key. This can be done by :

  1. Go to http://aws.amazon.com/ , and mouse over the Your Web Services Account button on the right. In the window that pops up, click on AWS Access Identifiers.
  2. The access key is shown under Your Access Key ID . The secret is shown under Your Secret Access Key, when you click the Show link.
  3. Mouse over Your Web Services Account again, and click on Account Activity.
  4. At the top of the page is your Account Number .

Adding Your Account to Cloudmin

Once you have found your EC2 account number, access key and secret key, the account can be registered with Cloudmin. The steps to do this are :

  1. On the left menu, open the Cloudmin Settings section and click on EC2 Accounts.
  2. Click on the Add an EC2 account link.
  3. On the page that appears, enter a short name for this account in the Account description field, such as Bob's EC2 service.
  4. Fill in the Account ID, Access key ID and Secret access key fields with the account details retrieved from Amazon.
  5. Click the Create button.

Assuming that the account details are correct, you will be returned to the list of registered accounts. At the same time, Cloudmin will contact the Virtualmin webserver to grant your account access to system images containing Virtualmin Pro.

Creating an SSH Key

Before you can create any EC2 instances, you must create and register at least one SSH key with EC2. Fortunately, Cloudmin makes this easy - the steps to follow are :

  1. Open the Cloudmin Settings section on the left menu, and click on SSH Keys.
  2. Click on Add a new SSH key, which will open the key creation form.
  3. In the Key description field, enter something like Amazon EC2 key.
  4. Select the Generate new EC2 key option.
  5. Click Create.

Assuming that Cloudmin is able to contact the EC2 servers successfully, a new key will be created and registered. When an EC2 instance is created you must select an SSH key that will be used to initially login to it, and this key must be one generated using this process. Existing keys imported from some other source cannot be used.