(R)?ex the friendly automation framework

News

2020-07-05
Rex-1.12.0

The Rex-1.12.0 release is now available on CPAN. It adds support for local rsync operations, improves tab completion for Bash and Zsh, and fixes related bugs. It also discontinues support for running Rex on Windows 7, Windows Server 2008 R2, and older versions since both mainstream and extended support has already ended for these products.

2020-06-09
Rex on StackShare

Thanks to the support from their amazing team, Rex is now listed on StackShare.

2020-06-05
Rex-1.11.0

The Rex-1.11.0 release is now available on CPAN. It enhances the behaviour of sysctl and file management, fixes bugs about group management and OpenSSH connection options, and clarifies quite a bit of documentation.

2020-05-05
Rex-1.10.0

The Rex-1.10.0 release is now available on CPAN (changelog). Apart from documentation updates and bug fixes, it adds initial package glob support, and an on_change hook for the mkdir command.

2020-04-05
Rex-1.9.0

The Rex-1.9.0 release is now available on CPAN, and it adds a new feature flag to force writing UTF-8 encoded files, documents configuration options, and fixes bugs.

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.

Proudly powered by Statocles

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