Hosting rails on ec2

2019-04-07 17:39发布

问题:

I want to deploy a rails onto amazon ec2. I've had a look at poolparty and ec2onrails but neither seem to be maintained anymore.

What are people using to do this? Is it all homebrewed puppet and capistrano or is there a project that will get me going?

回答1:

I can recommend two projects:

If you have a single Rails app, take a look at Rubber. It's a gem that can provision EC2 instances for you, install software and deploy your app. It's based on Capistrano. There are recipes for the most common components (mysql, apache, passenger, postgres, etc.).

In case you have more complex setup (e.g. multiple apps or specific needs that aren't covered by Rubber) I recommend Chef. It does have quite a learning curve, so prepare yourself. Take a look at OpsCode to get started with Chef.



回答2:

You may want to take a look at our Rubystack AMIs. They are free and we keep them up to date. You still need to do work for automating deployment and integrating in your workflow, the AMIs mainly address the environment and runtime setup.