Amazon EC2
Introduction
HyperCloud Supports bursting workloads into AWS as part of the Hybrid Cloud Model.
Note
- The usual HyperCloud functionality for snapshotting, hot-plugging, or migration is not available with EC2.
- Monitoring of VMs in EC2 is done through CloudWatch.
Prerequisites
- You must have a working account for AWS.
- Amazon VPC (Amazon Virtual Private Cloud to launch virtual machines).
- Amazon IAM key pair with sufficient access to EC2 and S3 resources.
Step 1: Cluster-control facts
-
Make the cluster-control base directory:
-
Upload the access key
-
Upload the secret key
-
Tell HyperCloud which AWS regions should be accessible:
Insert region names, from AWS, such as
us-east-1
,us-west-1
, etc. (one per line)See Amazon Regions List.
-
Wait a few minutes for HyperCloud to restart and resources to register.
-
Verify that the new hosts now exist:
#output [Cluster1] root@hypercloud-dashboard:~# hypercloud host list ID NAME CLUSTER TVM ALLOCATED_CPU ALLOCATED_MEM STAT 3 ec2_us-east-1 default 0 0 / 473500000 (0%) 0K / 26325.9T (0%) on 2 ec2_us-west-1 default 0 0 / 473500000 (0%) 0K / 26325.9T (0%) on 1 hypercloud-compute-kvm-5455000 default 0 0 / 3200 (0%) 0K / 14.1G (0%) on 0 hypercloud-compute-kvm-5455000 default 0 0 / 3200 (0%) 0K / 6G (0%) on [Cluster1] root@hypercloud-dashboard:~#
Info
For Every AWS Region, a new HyperCloud host will be created to represent a specific region. Adding or Removing a region from the regions file will result in the remove or adding of a hypercloud host.
Step 2: Virtual machine template
In order to deploy an instance in EC2 through HyperCloud, you must include an EC2 PUBLIC_CLOUD section in the virtual machine template. This is an example of a virtual machine template that can be deployed in local resources or in EC2.
CPU = 0.5
MEMORY = 128
# KVM template machine, this will be use when submitting this VM to local resources
DISK = [ IMAGE_ID = 3 ]
NIC = [ NETWORK_ID = 7 ]
# PUBLIC_CLOUD template, this will be use wen submitting this VM to EC2
PUBLIC_CLOUD = [ TYPE="ec2",
AMI="ami-053b0d53c279acc90",
KEYPAIR="gsg-keypair",
INSTANCETYPE=m1.small]
#Add this if you want to use only EC2 cloud
#SCHED_REQUIREMENTS = 'HOSTNAME = "ec2"'
See the exhaustive list of attributes in the Virtual Machine Definition File Reference Section.