Topic: Configure and Start Mongrel Cluster for a Simple Installation

Topic type:

The steps necessary for getting a Mongrel cluster up and running in the context of a simple installation as outlined in the installation guide.

Originally written by Walter McGinnis, Kete Project Lead for Katipo Communications, Ltd.

Part of the Installation Guide

Important Note: This step assumes that you are logged in as the user who will be running your Kete. For demos and development this is likely your normal account, for production this is the "kete" account if you have followed the conventions laid forth in the last step.

Configure and start your Mongrel Cluster

You have to configure your Mongrel Cluster (and Nginx) before your Kete application is ready to answer web requests.

We designate which ports our mongrels will be listening on by the "-p" argument, in this case 8000. The -N option specifies how many mongrels to run in your cluster. For development, only one mongrel is necessary, so we put "-N 1" and only port 8000 is used. For demos or a small traffic site, specify "-N 3" and ports 8000, 8001, and 8002 would be used. Make note of the ports you are using for your cluster. You will need them when configuring the Nginx web proxy.

$ cd ~/apps/your_app
$ mongrel_rails cluster::configure -p 8000 -N 1

(if you are configuring mongrel for production environment add -e production)

This will write a configuration file to ~/apps/your_app/config/mongrel_cluster.yml.

To start your Mongrel Cluster, use the following:

$ mongrel_rails cluster::start # assuming you are still in ~/apps/your_app directory

You can safely ignore warnings like "** Ruby version is not up-to-date; loading cgi_multipart_eof_fix"

Your Mongrel Cluster will now be running in the background. If you ever need to stop it, you can do this:

$ mongrel_rails cluster::stop

Leave your Mongrel Cluster running before the next step.

If you would like your Mongrel Cluster to start at boot, see the Start Mongrel Cluster at Boot Appendix.

Next step:
Configuring Nginx

Discuss This Topic

There are 2 comments in this discussion.

Read and join this discussion

join this discussion

Creative Commons Attribution-Share Alike 3.0 New Zealand License
Configure and Start Mongrel Cluster for a Simple Installation by Walter McGinnis is licensed under a Creative Commons Attribution-Share Alike 3.0 New Zealand License