Skip to content
This repository


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

A framework to simplify systemadministration

Fetching latest commit…


Cannot retrieve the latest commit at this time

Octocat-spinner-32 bin
Octocat-spinner-32 debian
Octocat-spinner-32 doc
Octocat-spinner-32 lib
Octocat-spinner-32 t
Octocat-spinner-32 .gitignore
Octocat-spinner-32 ChangeLog
Octocat-spinner-32 LICENSE
Octocat-spinner-32 MANIFEST
Octocat-spinner-32 MANIFEST.SKIP
Octocat-spinner-32 Makefile.PL
Octocat-spinner-32 README.pod

With (R)?ex you can manage all your boxes from a central point through the complete process of configuration management and software deployment.



A small example:


 user "root";
 password "root";

 group "frontend" => "frontend[01..09]", "varnish[01..04]";

 desc "Show Unix version";
 task "uname", "server[1..9]", sub {
     say run "uname -a";

 desc "Write into a file";
 task "write", group => "frontend", sub {
    file "/path/on/the/remote/machine",
       content => "Hello World!",
       mode    => 600,
       owner   => "root",
       group   => "root";


  • Run commands directly from command line
     bash# rex -e 'say run "uptime";' -H "frontend[01..10] middleware[01..05]" -u root -p password
  • List all known Tasks
     bash# rex -T
       uname                     Show Unix version
  • Run Task uname
     bash# rex uname
     Running task: uname
     Connecting to server1 (root)
     Linux mango 2.6.27-openvz-briullov.1-r4 #1 SMP Tue Nov 24 23:25:52 CET 2009 x86_64 Intel(R) Pentium(R) D CPU 2.80GHz GenuineIntel GNU/Linux
     Running task: uname
     Connecting to server2 (root)
     Linux debian01 2.6.26-2-amd64 #1 SMP Tue Aug 31 09:11:22 UTC 2010 x86_64 GNU/Linux


See for more information.

Create a new project on the master

 rexify myproject
 cd myproject

Edit the Rexfile.

 use lib 'lib';
 use Rex::myproject;

 # put your server in this group
 group "fe" => "fe[01..05]";
 group "mw" => "mw[01..04]";

 desc "Deploy Frontend Server";
 task "deploy-fe", group => 'fe', sub {

   needs Rex::myproject 'fe';


 desc "Deploy Middleware Server";
 task "deploy-mw", group => 'mw', sub {

   needs Rex::myproject 'mw';


Edit the file lib/Rex/

 package Rex::myproject 

 use Rex::Commands;
 use Rex::Commands::Run;
 use Rex::Commands::Pkg;

 task "fe", sub {
    install package => [


 task 'mw', sub {
    install package => [


Now start the rex-master server. The server will bind on any device and port 7345 (tcp)

 # debug mode (foreground)
 rex-master -d

 # daemon mode (background)
 rex-master -b

 # see all the options with rex-master --help

And start the agents on your servers.

 # see all the options with rex-agent --help

 # debug mode (foreground)
 # this will start the agent with:
 #        -s your-rex-server = the master server
 #        -i 5               = 5 seconds interval
 #        -f                 = foreground
 #        -d                 = debug mode
 #        -c                 = cache dir (this directory must be writable)
 rex-agent -s your-rex-server -i 5 -f -d -c /tmp/cache

Please test and reports bugs :) Any kind of feedback is welcome.

Something went wrong with that request. Please try again.