First of all, you need of course an Amazon AWS account. Using Amazon AWS is implemented using the EC2 interface, thus the EC2-Helloworld tutorial is a good starting point.
In case of Amazon EC2, the following information is necessary to start up a node in an Occopus infrastructure:
- Security credentials (access key and secret key)
- Amazon region name and its EC2 endpoint
- an image ID (AMI)
- an instance type
- at least one security group ID
- a key pair name
- a subnet identifier.
Security credentials (access key and secret key)
You can get your access key and secret key through the web interface of Amazon AWS:
- Visit the AWS console
- In the top right corner, select "Security credentials" under your profile as shown in the following screenshot:
- Expand the Access keys menu, as shown in the following screenshot:
- Click on the "Create New Access Key" button to create new credentials if you don't know the Secret Access Key of your already existing key(s). A window similar to the following screenshot will appear. Here you can make your Access Key ID and Secret Access Key appear, but you can also download your credentials for later use.
Amazon region name and its EC2 endpoint
Amazon hosts its services in multiple regions. There are two possible ways to get region names and their relevant EC2 endpoints: using the EC2 command line tools or the web interface.
Use the web interface to get region names and EC2 endpoints
The Amazon Documentation has a list of available regions and their EC2 endpoints. In order to get the complete EC2 endpoint URL for Occopus, simply add
https:// before the Endpoint specified by the table shown in the Amazon Documentation's table.
For example, the EC2 endpoint URL of the
eu-west-1 region is
https://ec2.eu-west-1.amazonaws.com. Simple as that.
Use the EC2 command line tools to get region names and EC2 endpoints
Follow the EC2 command line tool setup guide to set up and configure EC2 command line tools onto your machine. Once done, you can use the
ec2-describe-regions command to list available regions and EC2 endpoints:
$ ec2-describe-regions -H
REGION Name Endpoint
REGION eu-west-1 ec2.eu-west-1.amazonaws.com
REGION ap-southeast-1 ec2.ap-southeast-1.amazonaws.com
REGION ap-southeast-2 ec2.ap-southeast-2.amazonaws.com
REGION eu-central-1 ec2.eu-central-1.amazonaws.com
REGION ap-northeast-1 ec2.ap-northeast-1.amazonaws.com
REGION us-east-1 ec2.us-east-1.amazonaws.com
REGION sa-east-1 ec2.sa-east-1.amazonaws.com
REGION us-west-1 ec2.us-west-1.amazonaws.com
REGION us-west-2 ec2.us-west-2.amazonaws.com
Here, the second column shows the region name, the third column shows the EC2 endpoint for the given region. You should prefix the endpoint name with
https:// for receiving the endpoint URL for Occopus.
Get image ID
Two possible methods are available to get a proper image ID: using the EC2 CLI tools'
ec2-describe-images -a command and the web interface. The second one is preferred, as one can get a more user-friendly description of the picked on image.
In the AWS EC2 management console, select AMIs from the IMAGES menu. Search for an AMI, as shown in the screenshot below:
Here, the value of the AMI ID column contains the image identifier.
Get instance type
The instance type determines the characteristics (CPU, memory) of the VM created. You can get the names and properties of the instance types supported by Amazon through the Instance types documentation.
Get security group IDs
Security groups define the network traffic allowed for the instances to be started. Thus, you should create security groups in order to enable SSH or HTTP traffic into your VM.
The following screenshot shows a number of security groups already defined. Select those you'd like to attach to the VM started by Occous. The value of the Group ID column contains the values which are needed by Occopus.
Get keypair name
Key pairs are imported into your running VM so SSH access is possible. You can check the name of available keypairs in the AWS EC2 management console, under the Key Pairs menu as shown in the following screenshot. The value of the Key pair name is the one Occopus needs.
Get Subnet identifier
You can get the list of available subnets through the AWS VPC dashboard, by selecting Subnets from the menu as shown in the following screenshot. You should use the value of the Subnet ID column for Occopus.
With all the above values, now you can modify the EC2-Helloworld tutorial to run on Amazon.