read

Utilizing Vagrant for the CPAN Pull Request Challenge

I’ve been participating in the CPAN pull request challenge in the Perl community this year and it’s been a great learning experience. I’ve learned about Dist::Zilla, Travis CI and Perlbrew. This month, I’ve been working on html-scrubber, and the Dist::Zilla plugins are giving my windows 8 box a headache so I decided to use Vagrant to spinup a Ubuntu box. Travis uses perlbrew to install a new perl, run the build and tests so why shouldn’t I?

I installed HyperV VirtualBox, initialized a new ubuntu/trusty64 box (vagrant init ubuntu/trusty64, vagrant up), and then fired up Perl. It was set to version 5.14. So here’s what I had to do to get up and running:

  1. Update Apt-Get
  2. Install git (sudo apt-get install git) and dependencies
  3. Install libssl headers & includes (sudo apt-get install libssl-dev) (for Dist::Zilla deps)
  4. Install perlbrew (sudo apt-get install perlbrew)
  5. Use perlbrew to install Perl 5.20, and “use” it
  6. perlbrew init
  7. perlbrew install stable
  8. perlbrew use perl-5.20.2
  9. Install CpanMinus
  10. perlbrew install-cpanm
  11. Create a library home for new repos to sandbox things and use it
  12. perlbrew lib create mrc
  13. perlbrew use perl-5.20.2@mrc
  14. export PATH=$PATH:$PERLBREW_PATH (needed to include the bin for dzil)
  15. Install Dist::Zilla
  16. cpanm -n Dist::Zilla

Update

After some frustration with Hyper-V and proxy, I decided to go back to VirtualBox. I was having some issues getting through my CNTLM proxy still. I had to setup an additional private NIC and then setup a firewall rule to allow the VM to connect to my CNTLM proxy. Still wasn’t working. Then I discovered that I had to turn on the -g (gateway) option in CNTLM, allowing it to be accessed from ...:3128, not just the loopback device. That worked! Now I’m back up (with VirtualBox), proxy-enabled and sharing folders.

Blog Logo

Michael Caron


Published

Image

Coder Omnipotens

Another Coding Blog

Back to Overview