(R)?ex the friendly automation framework

News

2019-11-05
Rex-1.7.0

The Rex-1.7.0 release is now available on CPAN.

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.

» Home » Docs » Rex book » Infrastructure » SSH as an agent

SSH as an agent

To setup an environment to work with Rex you don't have to do much. You have to install Rex on your workstation or a central administration server. For most distributions you'll find packages on the package server. If you want to build Rex from source you have to install the following dependencies.

Perl (at least version 5.8.8)

On the server side you only need a working perl installation. The version doesn't matter. And of course a working ssh server and a valid user.

Rex will connect to your servers via SSH and execute the commands you've defined in the tasks. The logic is all done by your workstation (or administration server). This means, if you query a database, dns or a CMDB inside a task your workstation will do this and not your server. This is essential for security.

Parallelism

If you have many servers you want to connect to, you usually don't want to connect sequentially. You can define the number of parallel connections Rex should use.

use Rex -feature => ['1.0'];
⁠
⁠user "root";
⁠password "foob4r";
⁠
⁠group frontends => "frontend[01..50]";
⁠
⁠parallelism 15;
⁠
⁠task "prepare",
⁠  group => "frontends",
⁠  sub {
⁠    # do something  };

This will connect to 15 servers in parallel and executes the task.

Google Group / Twitter / GitHub / Mailinglist / irc.freenode.net #rex   -.ô.-   Disclaimer