380 likes | 539 Views
Building and Deploying a Ruby on Rails Application on Amazon EC2. Rob Lambert rob@zabada.com twitter.com/zabada. About me (Rob Lambert) Independent software developer (Zabada, Inc.) Long time Java guy Lean heavily towards developing solutions utilizing open source software
E N D
Building and Deploying a Ruby on Rails Application on Amazon EC2 RobLambert rob@zabada.com twitter.com/zabada
About me (Rob Lambert) • Independent software developer (Zabada, Inc.) • Long time Java guy • Lean heavily towards developing solutions utilizing open source software • Try not to be religious in choice of platform, having recently developed solutions • in Java, Ruby on Rails and LAMP
This Talk • Quick Ruby on Rails Overview • Quick EC2 Overview • Demo: • Create Rails App From Scratch • Create EC2 Instance and Deploy Rails Application • Iterate: Add New Features and Re-Deploy (as time permits)
Rails is the holy grail (and the silver bullet)!
No. But great for a lot of use cases. And it’s a joy to use.
Image Credit: http://betterexplained.com/articles/intermediate-rails-understanding-models-views-and-controllers/
Photo Credit: http://www.flickr.com/photos/pixeljones/24128166/
ActiveRecord Image Credit: O’Reilly http://oreilly.com/catalog/9780596101329/toc.html
Image Credit: http://www.flickr.com/photos/sebastian_bergmann/2282734669/
Image Credit: http://www.flickr.com/photos/dan4th/2426490952/
Photo Credit: http://www.flickr.com/photos/these_are_julies_pics/3189991391/
Photo Credit: http://www.flickr.com/photos/notsogoodphotography/770557316/
EC2 is the holy grail (and the silver bullet)!
No. Great for a lot of use cases. Some downsides (but most can be mitigated)
Other “cloud” or “utility computing” vendors … (not necessary applicable for Rails Apps)
Demo ( going to build a a Rails app from scratch and deploy on EC2; hopefully iterate a couple times and deploy new features )
Prequisites I’m already set up with: • EC2 Command Line Tools • (w/ public/private keys configured) • Ruby 1.8.6 • Rails 2.2.2 (latest is 2.3.2) • Capistrano 2.5.5 • SVN/Git
GO! Home Viewers can pull down code that was developed: svn co http://subversion.assembla.com/svn/zabada_public/codecampbook (see README for quick and dirty steps to deploy on EC2)
RAILS RESOURCES http://rubyonrails.org/ http://guides.rubyonrails.org/ http://railsenvy.com/ (Weekly Podcast) http://railscasts.com/ (Screencasts) http://modrails.com/(easy & robust Rails deployment; not currently used in EC2onRails)
EC2 RESOURCES Wikipedia (Good Overview, including pricing etc.) http://en.wikipedia.org/wiki/Amazon_Elastic_Compute_Cloud Official Site http://aws.amazon.com/ec2/ Official FAQs http://aws.amazon.com/ec2/faqs/ EC2 on Rails http://ec2onrails.rubyforge.org/ http://github.com/pauldowman/ec2onrails http://www.zabada.com/tutorials/deploying-a-rails-application-to-production-on-amazon-ec2.php
If you are experimentally playing with EC2, when you’re done, don’t forget to … SHUT DOWN YOUR INSTANCE(S)! > ec2-describe-instances > ec2-terminate-instances i-XXXXXXXXX
Thanks! CONTACT ME rob@zabada.com twitter.com/zabada linkedin.com/in/roblambert www.zabada.com