Capistrano Series - Installing Apache with Passenger (mod_rails) Support

One of the last things that we need to do is install Apache as our webserver, with Rails support via Passenger (mod_rails).

Passenger is an exciting development in Rails deployment, as it allows us to use a single webserver without the need to configure proxies. It supports both Apache and Nginx — for these articles we will be using Apache.


Capistrano Series - Installing Ruby, RubyGems and SQLite3

Continuing with setting up the Slice, now we need to install Ruby, RubyGems and SQLite.

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 SQLite3, a lightweight database, via aptitude.


Capistrano Series - Setting up Git

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

Let's get straight on and install git and set up a repository.


Capistrano series - Setting up your Slice

So, following from the introduction, you have a new Ubuntu Hardy Slice and want to follow the mini series to a fully functional Capistrano, git 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 to Capistrano 2

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.


Capistrano Series - Introduction

Welcome to the 'new and improved' Capistrano mini-series. We have updated these articles to work with Ubuntu Hardy, git (instead of subversion) and using the latest version of Capistrano (at the time of writing).

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...


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.


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...


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.