Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Rails based EC2 AMI

I trying to navigate my new EC2 setup and was hoping to find an AMI setup for Rails. I've been having trouble. Basically, I'm looking for something like this:

* Apache 2.2
* Ruby Enterprise Edtion (REE)
* Passenger
* MySql Installed and configured with Ruby

Anyone have an AMI with a basic rails stack they could point me to?

Moved Answer up here:

Thanks for the responses/ideas. I've seen most of these options. I think I'm going to go with a clean Linux AMI, and then use something like this to customize it myself:

http://www.rubyinside.com/how-to-install-a-ruby-18-stack-on-ubuntu-810-from-scratch-1566.html

Also, yes I plan on running Rails on a single EC2 instance as an alternative to a VPS. If I use a reserved instance I can get basically a dedicated machine and 1.7GB of RAM for about $22 per month. That beats any VPS I've found. There are other costs and burdens, but I'm going to continue investigating if it is possible.

Thanks.

like image 661
Jim Jones Avatar asked Oct 31 '09 01:10

Jim Jones


People also ask

How do I deploy a Rails project in AWS?

Deploy your applicationUpload the source bundle to Elastic Beanstalk to deploy Rails to your environment. Open the Elastic Beanstalk console , and in the Regions list, select your AWS Region. In the navigation pane, choose Environments, and then choose the name of your environment from the list.


2 Answers

First-off, are you planning to run Rails on a single EC2 instance? While possible, that's not really where EC2 shines, and you can get a simpler and cheaper setup on a VPS such as Slicehost, Linode, or Webbynode. EC2 is great for clustered setups with dedicated databases, multiple Rails servers, load balancers, etc., particularly if you need to be able to quickly scale up or down. But at that point, a single preconfigured AMI isn't going to do much good.

Having said that: Some time last year I used EC2 on Rails. It's decent, but not very flexible. It also uses mongrel_cluster instead of Passenger. Apparently there's a way to set up a cluster, but frankly at that point there are probably better alternatives.

I've heard great things about Rubber as a way to provision and deploy a Rails app on an EC2 cluster. It seems very flexible, yet fairly easy to get started with, and should scale nicely from single to multiple instances.

For more complex setups, I would probably be tempted to look at Chef as well, but I don't have any first-hand experience with it.

PoolParty, which sits on top of Chef, also seems worth a look.

like image 111
Mirko Froehlich Avatar answered Sep 30 '22 18:09

Mirko Froehlich


I highly suggest not using an AMI that has that stuff "preinstalled".

Instead, you want to use Chef as part of your deploy process. You can get cookbooks for most of the things you just listed.

Save all that, I highly recommend EY's cloud service.

like image 24
BJ Clark Avatar answered Sep 30 '22 17:09

BJ Clark