Speed Up Local Test Kitchen runs

I had an initial thought and that was whether it would be possible to create a Squid proxy Docker container and configure Test Kitchen and related cookbooks to use it. This should be simple right? Wrong!

At first it was, with simple HTTP requests, but then came the issue if making Squid intercept and cache SSL objects. This meant:

  • Understanding how Squid can intercept SSL traffic
  • Squid package in Ubuntu is not compiled with SSL or the option to generate dynamic certificates
  • Compile own Squid with these two options
  • Create new Docker image using the new Squid
  • Update the CA certificates in Ubuntu
  • Rebuild image
  • Push image to dockerhub
  • Create self signed CA for Squid to create certificates with

This last one is where things are not as clean as they could be and that although I have created something that does work, it is not as perfect as I would like it to be and there are some caveats. Needless to say I have been doing a lot of yak shaving.

Read More

Share Comments

Test Kitchen with Hyper-V on Windows 10

I have recently moved from using a Apple MacBook Pro to a Microsoft Surface Book running Windows 10 and I wanted to play around with Docker for Windows. This meant that I had to install Hyper-V which posed the problem of having to remove Virtual Box which I had been using for my Test Kitchen runs of my cookbooks.

This post shows how to configure Hyper-V to work with Test Kitchen. It took a little while to get all the configuration set correctly and there are some gotchas, but on the whole it works very well.

Astute readers will be asking why I did not just start working with Docker now that I had it installed. I have done that as well, but that is for another post.

A surprising side effect of using Hyper-V was that machines are created much more quickly than in Virtual Box. The reason for this is that the final machine uses a differencing disk from the original so the virtual hard disk is not copied leading to faster spin up times.

Read More

Share Comments