Ubuntu Hardy - Apache, Rails and mongrels

Following from the mongrel and mongrel cluster article, we can now look at creating and configuring Apache to proxy to a mongrel cluster so we can serve our Ruby on Rails application.


Ubuntu Hardy - mongrel and mongrel clusters

There are variety of options open to the sysadmin when serving Ruby applications.

One of the original ways is to use the mongrel web server. Requests are proxied to the mongrel(s) from the main web server (Apache, Nginx, etc).


Ubuntu Hardy - Apache, Rails and thin

Following from the thin web server for Ruby article, let's look at creating and configuring Apache to proxy to thin so we can serve our Ruby on Rails application.


Ubuntu Hardy - thin web server for Ruby

There are variety of options open to the sysadmin when serving Ruby applications.

One of them is thin. This is a 3rd party web server that is proxied to from the main web server (similar to mongrels in a general setup). Let's take a look at installing thin.


Ubuntu Hardy - using mod_rails to serve your application

Following from the first article, we now have passenger (mod_rails) installed.

As such, we can move on and create a Ruby on Rails application and see how easy it is to serve using passenger.


Ubuntu Hardy - mod_rails installation

Phusion's Passenger (mod_rails) is an exciting development in serving your Ruby on Rails application with the Apache web server.

Incredibly simple to install and use, you can have a rails application up and running in no time. You don't have to worry about ports or setting up a proxy to another server.


Ubuntu Hardy - Ruby on Rails

In the Ubuntu Hardy setup articles (page 1 and page 2) we secured, updated and personalised the install ready to add some working software.

We also installed the build-essential package. Now we can go ahead and install Ruby on Rails.


Capistrano series - alternative subversion setups

In the main Capistrano series, we set it up so that the main repository could only be access from the local workstation (so a deployment would checkout the repo to the workstation, zip it up, upload it and then unzip it).

This is great from a security point of view, but what if the subversion repository is on the same Slice as the application (as is the case with many people)?


Capistrano series - database migrations

The basic setup of a Slice and deploying an application from your workstation via Capistrano is now completed.

However, there is one thing left that needs an introduction, and that is how to handle database migrations when deploying your app.


Capistrano series - deploying application changes

So, we have Nginx and Capistrano setup and we've deployed our application for the first time. Everything seems to be zinging along very nicely.

What happens now though? How do I deploy any future application changes?

Let's take look.


Capistrano series - application vhost creation

Well, we've deployed our application to the Slice and seen Capistrano at work but, perhaps a little frustratingly, we couldn't actually browse the site as we hadn't set up a virtual host.

Let's do that now and, with our previous knowledge of Nginx and vhosts, it won't take much time at all.


Capistrano series - configuring Capistrano #2

So now Capistrano has created the base structure for the application deployment, we need to look at actually deploying it.

Let's look at some of the settings we need for this and then deploy the application for the first time.


Capistrano series - configuring Capistrano #1

We're at a crucial stage with our Ruby on Rails with Capistrano stack as we have all the pieces installed and a lot has been configured.

Now we need to look at the Capistrano configuration file and see what needs adding.


Capistrano series - local setup and Capistrano

Well, we've nearly done the work needed on the Slice so now we can concentrate on setting up our local workstation and installing Capistrano.

Remember that the subversion repository will hold the application revisions and Capistrano will deploy any changes from our workstation to the Slice.


Capistrano series - Nginx vhosts, rails and mongrels

One of the last things we need to do on the Slice is setup Ruby on Rails and install the mongrel application server which Nginx will proxy requests to.

Easily done. We'll even look at setting up a vhost to test the setup before moving onto the Capistrano install.


Ubuntu Gutsy - Nginx vhosts, rails and mongrels

There are several ways of serving a Ruby on Rails application, one of which is to use Nginx to proxy requests to mongrels.

There are a few ways of completing this and we're going to look at one solution. Other methods, such as using a mongrel cluster will be looked at in future articles.


Capistrano series - installing Ruby, Nginx and sqlite3.

Continuing with setting up the Slice, we need to install Ruby, rubygems and Nginx.

We'll install Ruby via aptitude and then install rubygems from source (as that will give us the latest version).

Once done, we can go ahead and install Nginx, a lightweight web server, via aptitude.


Capistrano series - setting up subversion

So now the Slice is setup and ready for our Ruby on Rails with Capistrano stack.

Let's get straight on and install subversion and set up a repository with SSH access.


Capistrano series - Setting up your Slice

So you have your new Ubuntu Gutsy Slice and want to follow the mini series to a fully functional Capistrano and Ruby on Rails stack.

Well, the first thing you need to do is add a new user (you never normally log in as root) and secure the Slice. Then you need to update to the latest packages and install some basic work tools.


Capistrano series - introduction

Welcome to the first Slicehost mini series.

This first article will flesh out the aim of the series and explain what the end goal is.

Please don't skip this article as it will contain some important information...


Ubuntu Gutsy - mongrel clusters and surviving a reboot

Proxying requests to a mongrel cluster is one of the ways of serving your Ruby on Rails web application.

Let's create a cluster of mongrels and configuring it to restart after a reboot.


Ubuntu Gutsy - Apache vhosts, rails and mongrels

There are several ways of serving a Ruby on Rails application, one of which is to use Apache to proxy requests to mongrels.

There are a few ways of completing this and we're going to look at one simple solution. Other ways will be looked at in future articles.


Ubuntu Gutsy - MySQL and RoR

In the Ubuntu Gutsy setup articles (page 1 and page 2) we secured, updated and personalised the install ready to add some working software.

As such, we can now install MySQL and Ruby on Rails with subversion and Postfix support.


Capistrano 2 - an introduction

Before delving into the mini series, an introduction and explanation of what Capistrano is and what it does is needed.

Once setup, deploying your application changes (and it doesn't have to be Ruby on Rails) is a breeze with Capistrano.


Ubuntu Feisty - mongrel clusters and surviving a reboot

Proxying requests to a mongrel cluster is one of the ways of serving your Ruby on Rails web application.

Let's create a cluster of mongrels and configuring it to survive and restart after a reboot.


Ubuntu Feisty - Apache vhosts, rails and mongrels

There are several ways of serving a Ruby on Rails application, one of which is to use Apache to proxy requests to mongrels.

There are a few ways of completing this and we're going to look at one simple solution. Other ways will be looked at in future articles.


Debian Etch - mongrel clusters and surviving a reboot

Proxying requests to a mongrel cluster is one of the ways of serving your Ruby on Rails web application with Debian Etch.

Let's look at creating a cluster and configuring it to survive and restart after a reboot.


Debian Etch - Apache Vhosts, rails and mongrels

One of the ways of serving a Ruby on Rails application is to use Apache to proxy requests to mongrels.

There are a few ways of completing this and we're going to look at one simple solution. Other ways will be looked at in future articles.


Ubuntu Feisty - MySQL and RoR

In the previous Ubuntu Feisty articles (page 1 and page 2) we secured, updated and personalised the install ready to add some working software.

As such, we can now install MySQL and Ruby on Rails with subversion and Postfix support.


Debian Etch - MySQL and RoR

Previously we secured, updated and personalised our Debian Etch install ready for some action (see Debian Etch page 1 and page 2) .

Now we can install MySQL and Ruby on Rails with subversion and Postfix support.


Ubuntu LTS - MySQL and RoR

In the previous Ubuntu LTS setup articles page 1 and page 2 we secured, updated and personalised the install ready for some action.

Now we can install MySQL and Ruby on Rails with subversion and postfix support.