1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71
|
.TH MONGREL-CLUSTER 1 "2007-05-17" "Mongrel Cluster"
.SH NAME
/etc/init.d/mongrel-cluster \- init script for Mongrel Cluster
.
.SH SYNOPSIS
.B /etc/init.d/mongrel-cluster
.RI {start|stop|restart|status}
.
.SH DESCRIPTION
Mongrel_cluster is a GemPlugin that wrappers the mongrel HTTP server and simplifies the deployment of webapps using a cluster of mongrel servers. Mongrel_cluster will conveniently configure and control several mongrel servers, or groups of mongrel servers, which are then load balanced using a reverse proxy solution.
.PP
With mongrel working and our webapp directory prepared we can proceed with the mongrel_cluster configuration step:
.PP
$ mongrel_rails cluster::configure -e production \\
.br
-p 8000 -N 3 -c /var/www/apps/testapp -a 127.0.0.1 \\
.br
--user www-data --group www-data
.PP
This will write a configuration file in config/mongrel_cluster.yml. We have setup to run our cluster in production mode as the user www-data and will start 3 mongrel servers listening on ports 8000, 8001, and 8002. Now, lets do a quick test of what we have setup so far:
.PP
$ mongrel_rails cluster::start
.PP
Checking our host on ports 8000, 8001, and 8002 we should now be able to see our test application. We can stop all of those mongrels with
.PP
$ mongrel_rails cluster::stop
.PP
Now, we need to set into mongrel_cluster init script configuration directory:
.PP
$ mv /var/www/apps/testapp/config/mongrel_cluster.yml \\
.br
/etc/mongrel_cluster/sites-available/testapp.yml
.br
$ ln -s /etc/mongrel_cluster/sites-available/testapp.yml \\
.br
/etc/mongrel_cluster/sites-enabled/001-testapp.yml
.PP
And now, finally
.PP
$ /etc/init.d/mongrel_cluster start
.PP
.SH CONFIGURATION
Each application is configured with a file located in (or symlinked to)
\fB/etc/mongrel-cluster/sites-enabled\fP.
Each configuration file is a mongrel_cluster configuration file.
.PP
.SH OPTIONS
Mongrel_cluster adds the following new commands to mongrel_rails:
.PP
\fBcluster::configure\fP creates the cluster configuration file using mongrel_rails parameters
.br
\fBcluster::start\fP start the cluster for one rails application
.br
\fBcluster::stop\fP stop one cluster
.PP
The init script accept the following parameters:
.PP
\fBstart\fP start all mongrel_cluster using configuration files in /etc/mongrel-cluster/sites-enabled
.br
\fBstop\fP stop all mongrel_cluster using configuration files in /etc/mongrel-cluster/sites-enabled
.br
\fBstatus\fP show the status of all mongrel_cluster
.br
\fBrestart\fP restart all mongrel_cluster using configuration files in /etc/mongrel-cluster/sites-enabled
.PP
.SH SEE ALSO
.BR mongrel_rails (1), rails (1)
.br
.SH AUTHOR
Mongrel Cluster (http://mongrel.rubyforge.org/) was written by Bradley Taylor <bradley@fluxura.com>
This man page was written for the Debian Project by Filipe Lautert <filipe@icewall.org> using resources written by Zed Shaw <zed@zedshaw.com>.
|