(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

Search

News

2015-03-29
(R)?ex 1.1.0 released. See the release notes for more details.
2015-03-27
View the slides of the talk An introduction to Rex from Andy Beverley.
2015-03-08
(R)?ex 1.0.0 released. See the release notes for more details.
2015-02-27
Work with (R)?ex at adjust! Check out their job posting for details, or contact our fellow core developer, FErki.
2015-03-06
Repositor.io 0.6.0 released. repositor.io is a repository management tool for apt, yum and docker. This is a bugfix release. See the website for more details.
2014-11-14
Gabor Szabo wrote an article on (R)?ex, focusing on different authentication methods and with tips about how to secure your unattended access. Check it out at Perl Maven!

Training

2015-04-20/21 (Karlsruhe)

Need Help?

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

Professional support is also available.

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 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] middleware[01..05] db[01..04]" -e "say run 'uptime'"

The same, but with a Rexfile

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

desc "Get Disk Free";
task "disk_free", sub {
   my $output = run "df -h";
   say $output;
};

Now you can run your Task with this command

$ rex -H "frontend[01..15] middleware[01..05] db[01..04]" disk_free

Keep Your Configuration In Sync

This example will install the Apache Webserver on 5 servers and keep the configuration in sync. If the configuration file was changed it will automatically reload apache.

If this task gets executed against a virgin host (where no apache is installed) 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;

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"; };
};
Fork me on GitHub
Google Group / Twitter / GitHub / Mailinglist / irc.freenode.net #rex   -.ô.-   Disclaimer