Rex – a systems orchestration tool written in Perl

Now, in 2014 Perl is considered rather embarrassing – but it is still widely used. I’ve wandered off the Perl path towards the seductive embrace of Python myself.

However, in some environments you cannot choose your toolset. I’m a big fan of Ansible and it has gone on from strength to strength with VC and a commercial operation behind it, but there are alternatives.

Rex is a similar tool to Ansible, but written in Perl. I’ve used it for a few basic tasks and here are some of its features:

Low Entry Requirements

On the “master” server side you need Perl 5.8.8 or greater (ie – the version that comes with Red Hat / Centos 5) and a small number of additional modules. On the client “target” side all you need is Perl.

For communication from master to target, it just uses ssh, like Ansible. No installing new daemons or opening up new firewall rules.

Works well with existing environments

As well as using existing ssh infrastructure, Rex can use ssh certificates (with or without ssh-agent) or username/password. It can enter your ssh private key passphrase or password for you. It can also use sudo on the remote box and enter the password for that too.

Open Source

On CPAN and Github.

Powerful

As Rex recipes are written in enhanced Perl, you can easily use other features of the language or other modules in your scripting.

Fast

Rex supports running tasks in parallel – you select how many threads you want running simultaneously.

Update: I asked in IRC whether it was possible to split groups for staging pushes – the author of Rex answered.

Leave a Reply

Your email address will not be published. Required fields are marked *