Running Perl Workers on Iron.IO

Quick start

IronWorkerNG (their upload/management tool)

We will need their management tool to upload code.

gem install iron_worker_ng

The credentials

IronWorkerNG reads the credentials from a file named iron.json.
To get it, we need to login to https://hud.iron.io/dashboard, click on the key-icon and download iron.json to the root directory of the project.

Resolving dependencies on CPAN modules

Iron.IO doesn’t come with any perl module other than what is in core, so we need to bring in all our dependencies.

Seting up the worker

The configuration for the worker is defined in a <service>.worker file, so we create a simple one that tells it to run our perl script and to upload our dependencies (generated by Carton, above) together with the code.

But, but..

Of course, this example is not very useful, manually scheduling tasks and getting results from calling iron_worker log <id> is not really something interesting :–)

To be useful it would need to be automatically triggered by some event and produce usable results (updating a databse, notifying another service, etc..) but I assume you already know this if you’re searching for how to run perl on IronWorker.

So, go crazy and drop me a hello on the comments bellow if this post was somehow helpful.