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.

change email address in mysql

A tiny piece of SQL to update email addresses in a table where the domain is changing:

update aliases set emailaddr = concat(SUBSTRING_INDEX(emailaddr, '@', 1),
'@newdomain.com') where emailaddr like '%@olddomain.com';

Very simple, but this has been hanging around in draft for ages and it may help someone.

Jetbrains have released a free version of their Python IDE

Free Community Edition — for pure Python coding and learning Intelligent Editor, with code completion, on-the-fly error highlighting, auto-fixes, etc. Automated code refactorings and rich navigation capabilities Integrated debugger and unit testing support Native VCS integrations Customizable UI and key-bindings, with VIM emulation available And much more, all available under the Apache 2 license

via Python IDE & Django IDE for Web developers : JetBrains PyCharm.