After building it, we were requested to host and manage it for them. Initially we went with knownhost which is OK but a production RoR application needs more RAM than what we get on most VPS plans - especially if we have image processing. We did consider AWS but at that time it did not have EBS and the client did not initially expect enough traffic to justify a 'scalr' managed cluster. We were looking for a replacement to a dedicated server. Once EBS was launched, we immediately decided to move the site to AWS. The Cost-benefit analysis is compelling.
The following tutorial starts off after signing up with AWS and configuring your desktop/laptop to be able to connect to AWS and launch instances i.e. we assume that you have completed the 'Getting Started' section of AWS.
We have started with the stock Fedora image and modified it to our requirements. We could have used CentOS but Fedora-8 appeared at the top of the list and we went ahead with it.
The application hosting has the following steps.
- Launching an instance.
- Installing RoR, gems, plugins...We used rmagick, hence we had to install Imagemagick too.
- Installing mysql.
- Intalling the application (checkout from subversion).
- Creating and attaching a EBS volume. Mysql with data on EBS
- Modifying the RoR app to save user upload files to EBS.
- Installing and configuring a production level ferret server
- Installing and configuring mongrel cluster.
- Configuring Apache to proxy to mongrel cluster, caching optimisations for performance.
- Configuring permanent public IP (covered) and DNS (we have the domain parked with go daddy but this is not covered in this article)
- Configuring smtp (email) support for RoR application.
- Once we have the perfect server setup, save it to S3.
- Periodic automated backups -This is available here: http://docs.google.com/Doc?id=dcn2ckbh_21gznbbjhr
For the full tutorial - go to this link.