Sunday, March 26, 2017

Playing around with Vagrant

I finally finished preparing a Virtualbox image for OpenBSD to execute the CPAN::Reporter::Smoker, all provisioned by Vagrant.

Most of the provisioning was implemented with shell script (Bash) and honestly took me much more time I initially thought it would take.

Although I had almost all configuration steps already documented, the development cycle was long, specially because I had to wait for perl compilation as well all the required Perl modules. Disabling tests when provisioning did reduce the time (for the trade off regarding stability) , but that is still a long way to go.

Having to create a local mirror (CPAN::Mini) of CPAN inside the VM was not fun either: after finishing my first Vagrant box, I realized that shipping the VM with the mirror pre-initialized was not a good idea: the box ended with 3.2GB.

Worst... the mirror on the box might get considerable outdated pretty quickly.

Even though I was able to reduce the total size of the mirror in about 1Gb, it is still a lot, even to download. To my surprise, Vagrant doesn't seem to be able to resume downloads at all, which surprised me. This post confirms that too. It turns out that downloading boxes with wget on internet connections that sucks (like mine) is a better idea... At least I can download the box and still keep watching Netflix by using --limit-rate with it.

Lessons learned, I think I'll just cut out the pre-initialized CPAN mirror. At least this should give people a opportunity to maybe reuse their own CPAN on their local networks, although I do think that having a independent VM running the mirror is not a bad idea... disk is cheap anyway these days.

Next step should take Collectd installed on the OpenBSD VM... and try to figure out the best set of CPUs to be configured on it.

No comments:

Post a Comment