The CPAN Testers game

I'm not sure of how many of you know the ecosystem of Perl QA, so I decided to move an old article of mine to and update it to reflect all the changes that happened between those years.

Here is the link to the old-new article.

I also made several changes to the project cpan-openbsd-smoker and would like to share with the community the details about it, specially with the people that not only publishes modules to CPAN, but also those are part (or want to be part of) the QA group.

The CPAN OpenBSD Smoker project

This project basically applies a lot of documented steps scattered around and produces an local VM running OpenBSD with a running CPAN Smoker in an automated fashion.

In the first versions, much of the automation was implemented with Bash scripts. Later, I started introducing Perl code to replace the scripts that become more complex. Then I added parallel to the mix and things started getting really complicated.

Not surprisingly, I replaced almost everything with Ansible and although some features were discarded during the process, the project now is much easier to understand and maintain.

Currently I'm considering writing a more generic Ansible role to allow the setup of a CPAN Smoker in not only OpenBSD, but all OSes that supports Perl and Ansible itself.

Why Ansible?

Since the beginning of the project I was using Vagrant. Adding Packer to the mix followed quickly because it helped putting a lot of effort in creating a base Vagrant box, which speed up the provisioning process greatly.

Adding Ansible to the mix with Vagrant and Packer was really easy.

First because I already knew Ansible. Second, because it was nicely integrated with both tools. Third, many of what I was implementing with my own code already exists ready to use as Ansible modules and roles.

I already asked myself if I shouldn't try to use Rex instead, since is written in Perl and all this work is to help the Perl ecosystem.

As I stated before, I already know Ansible. While I think Rex might do the same things, I'm not sure about. And since I need to have it integrated with Packer and Vagrant (the first is written in Golang, the second in Ruby) I believe it will take a long walk before I could make it happen.

If I'm wrong, please let me know. Or even better, send me a pull request!

What about preferences?

Another aspect of the project that I would like share is that it uses distroprefs to block Perl distribution to run in the smoker. Yes, you read it right.

Some distributions just bring the smoker down for different reasons. What makes me worried is that those distribution maintainers might not even know that those things happens.

The first problem is to communicate those issues. One thing that occurred me is that I could open a bug for the distribution, but that's a lot of work to do it manually by myself. The idea of distributions not being actively maintained surely also don't help.

What I did is to make those distroprefs available through the Github project.

A nice this is that the distroprefs YAML format allows a comment to explain what is happening over there. I wish we could selective choose which distribution not to install after testing, but I guess is not possible right now.

In order to make it easier to maintain these files, I developed the CLI dblock (available in the CPAN-Reporter-Smoker-OpenBSD distribution, which I'm planning to migrate to it's own Git repository).

If there is a better way to manage those preferences and communicate with the distribution maintainers, please let me know.

Finally, if you want to release your distribution from the blockage, please let me know.

Leave a comment

About Alceu Rodrigues de Freitas Junior

user-pic I blog about Perl.