(R)?ex Deployment & Configuration Management

Automate Everything, Relax Anytime

  • > Integrates seamless in your running environment
  • > Easy to use and extend
  • > Easy to learn, it's just plain Perl
  • > Apache 2.0 licensed
task prepare => sub {
   pkg "apache2", ensure => "latest";
   service "apache2", ensure => "started";
};
Read the Getting Started Guide

News

2019-07-02
Deprecating official Rex packages

As part of our efforts to simplify maintenance around RexOps projects, we have decided to stop building Rex packages on our side. We recommend relying on OS packages maintained by the various distributions in their respective upstream repositories, or to install Rex from CPAN.

2019-06-09
Post-migration updates & clean-up

Over the course of the past weeks many clean-ups have been done, reaping the benefits provided by our new Statocles-based site:

2019-05-19
New site engine for rexify.org

After months of work on a new site backend, we reached the MVP today for our site to be switched over to a new engine: from now on, our site will be maintained using the static site generator Statocles.

Conferences

2016-06-21

Need Help?

Rex is a pure open source project, you can find community support in the following places:

Professional support is also available.

» (R)?ex - A simple framework to simplify system administration and datacenter automation

(R)?ex - A simple framework to simplify system administration and datacenter automation

Why use Rex?

If you have to do a task more than once, automate it!

Don‘t forget an installation step anymore. Automation reduces the risk of failure and let you do your real work.

Advantages

  • Uses ssh, no agent required
  • Seamless integration, no conflicts
  • Easy to use and to extend
  • Easy to learn, it‘s just plain Perl

Open source

We believe in the idea of open source. So Rex, and all its parts are released under the Apache 2.0 license.

You‘re invited to join the community to make Rex better and better.

Uptime?

This command line example will execute uptime on all the given hosts (frontend01, frontend02, ...)

$ rex -H "frontend[01..15]" -e "say run 'uptime'"

The same, but with a Rexfile

use Rex -feature => ['1.0'];
desc "Get Uptime";
task "uptime", sub {
  say run "uptime";
};

Now you can run your task with this command:

$ rex -H "frontend[01..15] middleware[01..05] db[01..04]" -u ssh-user -p ssh-password uptime

Keep Your Configuration In Sync

This example will install the Apache webserver on 5 machines and keep their configuration in sync. If the deployed configuration file changes, it will automatically reload the service.

If this task gets executed against a "virgin" host (where no Apache is installed yet), it will first install it.

use Rex -feature => ['1.0'];

user "root";
group frontend => "frontend[01..05]";

desc "Prepare Frontend Server";
task "prepare", group => "frontend", sub {
  pkg "apache2",
    ensure => "latest";

  service "apache2",
    ensure => "started";
};

desc "Keep Configuration in sync";
task "configure", group => "frontend", sub {
  prepare();

  file "/etc/apache2/apache2.conf",
    source    => "files/etc/apache2/apache2.conf",
    on_change => sub { service apache2 => "reload"; };
  };

Running under sudo?

You can also run everything with sudo. Just define the sudo password and activate sudo.

use Rex -feature => ['1.0'];

user "ubuntu";
group frontend => "frontend[01..05]";
sudo TRUE;
sudo_password "mysudopw";

desc "Prepare Frontend Server";
task "prepare", group => "frontend", sub {
  pkg "apache2",
    ensure => "latest";

  service "apache2",
    ensure => "started";
};

desc "Keep Configuration in sync";
task "configure", group => "frontend", sub {
  prepare();

  file "/etc/apache2/apache2.conf",
    source    => "files/etc/apache2/apache2.conf",
    on_change => sub { service apache2 => "reload"; };
};
Google Group / Twitter / GitHub / Mailinglist / irc.freenode.net #rex   -.ô.-   Disclaimer