Amazon EC2 + Rails John Ward http://thinedgeofthewedge.blogspot.com/
Agenda <ul><li>What is EC2 </li></ul><ul><li>Provisioning </li></ul><ul><li>Rails + EC2 </li></ul><ul><li>Gotchas </li></u...
What is EC2 <ul><li>Amazon are providing infrasture on demand </li></ul><ul><ul><li>Simple Storage Service (S3) </li></ul>...
<ul><li>Register for S3 </li></ul><ul><ul><li>required for EC2 </li></ul></ul><ul><li>Register for EC2 </li></ul><ul><ul><...
Provisioning <ul><li>3 Steps to run </li></ul><ul><ul><li>create a keypair </li></ul></ul><ul><ul><ul><li>ec2-add-keypair ...
Provisioning <ul><li>Customise </li></ul><ul><ul><li>Security Groups </li></ul></ul><ul><ul><ul><li>ec2-describe-group <gr...
Rails + EC2 - Options <ul><li>Lots of options for using Rails with EC2 </li></ul><ul><ul><li>Gems </li></ul></ul><ul><ul><...
Rails + EC2 – Our Approach <ul><li>Our approach </li></ul><ul><ul><li>Ubuntu Feisty Image </li></ul></ul><ul><ul><li>MySQL...
Gotchas <ul><li>No static IP </li></ul><ul><li>No persistance storage </li></ul>
Other Useful Stuff <ul><li>Firefox Plugins </li></ul><ul><ul><li>EC2 UI  http://developer.amazonwebservices.com/connect/en...
Upcoming SlideShare
Loading in …5
×

Amazon EC2 + Rails

7,008 views

Published on

Presentation to the Ruby Ireland group

12th June 2007

Published in: Technology, Design
1 Comment
9 Likes
Statistics
Notes
  • Excellent presentation. I have taken a number of the structure graphics and adapted to my startup
    Teisha
    http://dashinghealth.com http://healthimplants.com
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
No Downloads
Views
Total views
7,008
On SlideShare
0
From Embeds
0
Number of Embeds
141
Actions
Shares
0
Downloads
0
Comments
1
Likes
9
Embeds 0
No embeds

No notes for slide

Amazon EC2 + Rails

  1. 1. Amazon EC2 + Rails John Ward http://thinedgeofthewedge.blogspot.com/
  2. 2. Agenda <ul><li>What is EC2 </li></ul><ul><li>Provisioning </li></ul><ul><li>Rails + EC2 </li></ul><ul><li>Gotchas </li></ul><ul><li>Other Useful Stuff </li></ul>
  3. 3. What is EC2 <ul><li>Amazon are providing infrasture on demand </li></ul><ul><ul><li>Simple Storage Service (S3) </li></ul></ul><ul><ul><li>Elastic Compute Cloud (EC2) </li></ul></ul><ul><li>S3 is a pay as you go storage solution </li></ul><ul><ul><li>$0.15 per 1GB stored </li></ul></ul><ul><li>EC2 is a virtual computing grid </li></ul><ul><ul><li>Provision virtual environments on Amazon infrastructure </li></ul></ul><ul><ul><li>XEN virtual environment </li></ul></ul><ul><ul><li>$0.10 per hour consumed </li></ul></ul><ul><ul><li>$0.18 (<= 10TB), $0.16 (>10TB & <=50TB), $0.13 per GB(>50TB) </li></ul></ul><ul><ul><li>Equivalent to physical spec of 1.7Ghz x86 processor, 1.75GB of RAM, 160GB of local disk, and 250Mb/s of network bandwidth </li></ul></ul><ul><ul><li>Maintain Complete Control </li></ul></ul>
  4. 4. <ul><li>Register for S3 </li></ul><ul><ul><li>required for EC2 </li></ul></ul><ul><li>Register for EC2 </li></ul><ul><ul><li>currently restricted beta </li></ul></ul><ul><li>Setup EC2 environment </li></ul><ul><ul><li>http://docs.amazonwebservices.com/AmazonEC2/gsg/2007-01-19/ </li></ul></ul>Provisioning
  5. 5. Provisioning <ul><li>3 Steps to run </li></ul><ul><ul><li>create a keypair </li></ul></ul><ul><ul><ul><li>ec2-add-keypair <name> </li></ul></ul></ul><ul><ul><li>find an image you want to use </li></ul></ul><ul><ul><ul><li>ec2-describe-images -o self -o amazon </li></ul></ul></ul><ul><ul><ul><li>ec2-describe-images -a </li></ul></ul></ul><ul><ul><li>run instance </li></ul></ul><ul><ul><ul><li>ec2-run-instances ami-*** -k gsg-keypair </li></ul></ul></ul><ul><li>Demo... </li></ul>
  6. 6. Provisioning <ul><li>Customise </li></ul><ul><ul><li>Security Groups </li></ul></ul><ul><ul><ul><li>ec2-describe-group <group> </li></ul></ul></ul><ul><ul><ul><li>ec2-authorize <group> -p <port> </li></ul></ul></ul><ul><ul><li>Custom Image </li></ul></ul><ul><ul><ul><li>scp -i <keypairname> <pk> <cert> root@<public hostname>:/mnt </li></ul></ul></ul><ul><ul><ul><li>ssh -i <keypairname> root@<public hostname> </li></ul></ul></ul><ul><ul><ul><li>ec2-bundle-vol -d /mnt -k <pk> -c <cert> -u <awsaccountid> -s <size> </li></ul></ul></ul><ul><ul><ul><li>ec2-upload-bundle -b <your-s3-bucket> -m /mnt/image.manifest.xml -a <aws-access-key-id> -s <aws-secret-access-key> </li></ul></ul></ul><ul><ul><ul><li>ec2-register <your-s3-bucket>/image.manifest.xml </li></ul></ul></ul><ul><li>Demo... </li></ul>
  7. 7. Rails + EC2 - Options <ul><li>Lots of options for using Rails with EC2 </li></ul><ul><ul><li>Gems </li></ul></ul><ul><ul><ul><li>Amazon EC2 http://amazon-ec2.rubyforge.org/ </li></ul></ul></ul><ul><ul><li>Plugins </li></ul></ul><ul><ul><ul><li>Elastic Rails http://www.elasticrails.com/elasticrails/ </li></ul></ul></ul><ul><ul><li>Capistrano </li></ul></ul><ul><ul><ul><li>Capazon http://capazon.rubyforge.org/ </li></ul></ul></ul><ul><ul><li>Roll your own </li></ul></ul><ul><ul><ul><li>Customise + Bundle an image </li></ul></ul></ul>
  8. 8. Rails + EC2 – Our Approach <ul><li>Our approach </li></ul><ul><ul><li>Ubuntu Feisty Image </li></ul></ul><ul><ul><li>MySQL, Apache 2.2, Mongrel Cluster 0.2.1, Mongrel (1.0.1), Ruby 1.8.5, Rails 1.2.3, Gems </li></ul></ul><ul><ul><li>Used for stage </li></ul></ul><ul><ul><ul><li>Launch Instance </li></ul></ul></ul><ul><ul><ul><li>Use Capistrano to deploy </li></ul></ul></ul><ul><li>Demo... </li></ul>
  9. 9. Gotchas <ul><li>No static IP </li></ul><ul><li>No persistance storage </li></ul>
  10. 10. Other Useful Stuff <ul><li>Firefox Plugins </li></ul><ul><ul><li>EC2 UI http://developer.amazonwebservices.com/connect/entry.jspa?entryID=609 </li></ul></ul><ul><ul><li>S3 Organizer http://www.rjonna.com/ext/s3fox.php </li></ul></ul><ul><li>S3 Filesystem </li></ul><ul><ul><li>S3DFS http://www.openfount.com/blog/s3dfs-for-ec2 </li></ul></ul><ul><li>Static IP </li></ul><ul><ul><li>WeoCeo http://weoceo.weogeo.com/ </li></ul></ul>

×