views:

52

answers:

2

We really like the idea of hosting with Amazon EC2 and the excellent EC2 on Rails, but our cashflow isn't enough to justify a move to EC2. So we've decided to host with linode. Now we're trying to put together the best Rails server build.

For those that don't know, EC2 on Rails is an opinionated Ubuntu Linux Server image for Amazon's EC2 hosting service. Out of the box, it runs a standard Ruby on Rails application with little to no customization.

So, is there something like EC2 on Rails for linode?

We'd need at least the following:

  • Ruby 1.8.7
  • Ruby on Rails 2.3.8
  • MySQL 5
  • memcached
  • Automatically runs hourly, daily, weekly and monthly scripts if they exist in Rails application’s script directory
  • Local Postfix SMTP mail server
  • SSL support
  • Passenger + Ngnix or Mongrel + Apache
  • 32 bit image Ubuntu

With a railsy setup, meaning fast and simple. So, anyone run across anything like EC2 on Rails, but for linode?

A: 

I have been using linode for my personal use for a while and I think no matter what, you are probably going to have to get your hands dirty. I kind of like it for exactly that reason, but that is just my taste. They do have stack scripts with some predefined setups. The closest I can find to what you are looking for is a ruby/apache/mysql script that is fairly customizable.

From the script:

Installs a fully functioning, ready to go stack that's optimized specifically for your Linode's resources. By default, it creates a VirtualHost using the reverse DNS of your Linode's primary IP.

This installs a stack based on Ruby, Apache, and MySQL. This also gives you the options to install gems so that you can be up and running Ruby on Rails in no time.

Optionally creates a MySQL database and user, and assigns that user grants to the database.

You may use this as an example for creating more VirtualHosts. Set up VirtualHosts, install your sites, point your domains to your Linode, and you're set!

This script downloads and compiles the source from Ruby's ftp. Along with Ruby, the latest version of ruby gems is installed and you have a choice of initial gems to install. Rails and passenger can be used to have a ready to go Rails server. Once this script has finished be sure to run 'passenger-install-apache2-module' to complete the passenger install.

Note that this script may take 1.5 - 2 hrs depending on the gems that are specified.

All details of this stack script are logged to /root/log.txt and the stack script is finish when the line "StackScript Finished!" is written to the log file.

You might have good luck talking to their support though, they might have some more secret sauce that I haven't found yet.

Geoff Lanotte
A: 

Nothing in that setup sounds EC2-specific beyond the name. It appears it is just convenient to use with EC2, because they let you grab a disk image from another account.

You are welcome to create your own StackScript to do this and contribute it to the community. Once a StackScript is written, it can be marked public and used by others. EC2 on Rails has a public GitHub repository from which you can get started, and honestly, I'd love to see things like this ported to the StackScript system.

Jed Smith
@Jed Smith I'd also love to see things like this ported to the StackScript system. For people new to linode, can you elaborate on what exactly the StackScript system is?
Jack Benning
@Jed Smith You work for Linode, right? Seriously, you've gotta know the system better than some green newly recruited first-time customer, right? Can't you guys at Linode assemble the armada and flush out the Linode on Rails concept? Nah...nevermind, why would you want to completely dominate the Rails hosting market?
Jack Benning