Version 4 (modified by 14 years ago) ( diff ) | ,
---|
Amazon EC2
Amazon's Cloud provides a flexible platform to deploy Eden scalably.
The costs aren't fixed & can be difficult to predict, despite their calculator, but are competitive, especially in Singapore, which is a good base for the Asia Pacific region.
Regions & Zones
Amazon supports multiple Regions in order to provide a service closest to your users.
- Namespaces of Instances, Volumnes & Snapshots are unique only within a Region.
- Within each Region, there are a couple of Availability Zones to allow spreading the risk across different facilities.
- Volumes are located within a specific Availability Zone
- Bandwidth transfers are free within an Availability Zone
Instance Size
- The free starter 'micro' instance is flexible as it can run both 32-bit & 64-bit Operating Systems.
- The normal production 'small' instance can only run 32-bit.
- Larger production instances can only run 64-bit, so can't have the exact same image used.
- The community Debian Squeeze AMI seems a fine base & attached scripts turn this into an Eden instance
Instance Persistence
- EBS-backed instances have persistent storage even whilst powered down, which is very useful.
- Each time you start an instance up, it will be assigned a new IP ('Public DNS')
Authentication
This can provide an early stumbling block.
- Each instance created needs to start with a unique SSH keypair
- When setting up an instance, be sure to safely download the private key.
- In order to get the public key (needed by SecureCRT for instance) then you need to login using CLI & retireve it:
ssh -l root -i private.pem <hostname> cat ~/.ssh/authorized_keys
SecureCRT needs the private key storing as <filename> & the public as <filename.pub> (all on one line)
CLI Management
There are extensive CLI tools available to manipulate your instances.
- Java CLI for Windows/Linux
- Python: http://libcloud.apache.org
Growing Storage
1Gb EBS is too small for Eden - need to grow to 3Gb
# --region ap-southeast-1 set EC2_URL=https://ec2.ap-southeast-1.amazonaws.com # Stop Host ec2stop i-c75af292 # Create a snapshot ec2-create-snapshot vol-e189e88c # Create new volume from snapshot ec2-create-volume -z ap-southeast-1b --size 3 --snapshot snap-63f89d08 # Attach new volume as secondary ec2-attach-volume -i i-c75af292 vol-a9c2a3c4 -d /dev/sdb1 # Start Host ec2start i-c75af292 ec2-describe-instances # Login (Remember different IP!) mkdir /mnt/data echo '/dev/xvdb1 /mnt/data ext3 defaults,noatime 0 0' >> /etc/fstab mount /mnt/data resize2fs /dev/xvdb1 umount /mnt/data # Stop Host ec2stop i-c75af292 # Unattach volumes ec2-detach-volume -i i-c75af292 vol-e189e88c ec2-detach-volume -i i-c75af292 vol-a9c2a3c4 # Attach volume as boot ec2-attach-volume -i i-c75af292 vol-a9c2a3c4 -d /dev/sda1 # Start Host ec2start i-c75af292 ec2-describe-instances # Login (Remember different IP!) df -h
Attachments (14)
- ami-built.png (156.9 KB ) - added by 11 years ago.
- ami-permissions.2.png (176.1 KB ) - added by 11 years ago.
-
orig-ami-built.png
(172.9 KB
) - added by 11 years ago.
lifeeth's original ami-built.png from 2 years ago
-
orig-create-image.png
(271.0 KB
) - added by 11 years ago.
lifeeth's original create-image.png from 2 years ago
-
orig-ami-permissions.png
(215.7 KB
) - added by 11 years ago.
lifeeth's original ami-permissions.png from 2 years ago
-
orig-create-image-config.png
(270.8 KB
) - added by 11 years ago.
lifeeth's original create-image-config.png from 2 years ago
- create-image-config.png (184.8 KB ) - added by 11 years ago.
- create-image.png (211.0 KB ) - added by 11 years ago.
- Dashboard.png (103.7 KB ) - added by 11 years ago.
- SelectAMI.png (94.4 KB ) - added by 11 years ago.
- SecurityGroup.png (70.1 KB ) - added by 10 years ago.
- UserData.png (59.3 KB ) - added by 10 years ago.
-
select_debian.png
(68.2 KB
) - added by 8 years ago.
selct debian OS
-
select_region.png
(12.8 KB
) - added by 8 years ago.
select region