Red Hat Training

A Red Hat training course is available for Red Hat Fuse

1.5. Register the Amazon EC2 Provider

What is the purpose of registering the provider?

Instead of administering your compute instances directly through the AWS Console, Amazon provides a Web service that enables you to administer your compute instances remotely (for example, using the JClouds utilities). Registering the Amazon EC2 provider consists essentially of caching your AWS login credentials in the container, so that the JClouds library and the Fabric console commands can administer the provider.

Create a new Access Key

If you do not already have an AWS Access Key (which consists of an Access Key ID and a Secret Access Key), create a new Access Key as follows:
  1. Use your Web browser to navigate to http://aws.amazon.com/
  2. Move your mouse to the My Account/Console drop-down menu and select the Security Credentials menu item.
  3. If you are not already logged on to AWS, you are now prompted to log on using the account details you specified in Section 1.2, “Create an Amazon EC2 Account”.
  4. Expand the Access Keys section and click Create New Access Key.
  5. The Create Access Key Dialog appears. Click Download Key File and save the downloaded file, rootkey.csv, to a secure location on your filesystem.
    Note
    This is the only chance you get to download the Secret Access Key from AWS. If you lose the key at this point, you cannot retrieve it later (you would then need to create a new Access Key).

Registering the Amazon EC2 provider

To register the Amazon EC2 provider, perform the following steps:
  1. Open the file containing your Access Key (usually named rootkey.csv), so that you can read the Access Key ID an the Secret Access Key for your Amazon account.
  2. In your local container, register the Amazon EC2 provider by entering the following console command:
    JBossFuse:karaf@root> fabric:cloud-service-add --name aws-ec2 --provider aws-ec2
    --identity AccessKeyID --credential SecretAccessKey
    This command can take a minute or two to complete. If it is successful, you should see some output like the following:
    Waiting for aws-ec2 service to initialize.