Network and DNS in “Services – Docker”

Following on from Testing Ansible Roles Using Containers, this is one of the series of posts that collectively step the reader through the testing of all the services implemented by Libraries – Ansible using Services – Docker. This post covers the testing of the network in Services – Docker, including the DNS service and how the Dynamic DNS service is spoofed in the test environments within Services – Docker in the absence of Akami integration.

Continue reading

Testing Ansible Roles Using Containers

My Services – Docker repository provides the means to test the Ansible roles in my Libraries – Ansible repository using Docker containers, which simulate the Varilink Computing Ltd server estate on the developer desktop and support the use of Ansible to manage them via SSH connections. Since our servers are based on Debian, so are those Docker containers.

I believe this to be an artificial/unusual use of Docker. You wouldn’t normally use Ansible and SSH to connect to Docker containers and configure services within them using non-Docker related Ansible modules, though there are a set of Ansible community modules for managing Docker containers and this includes an Ansible module to execute a command in a Docker container. However, I’ve found this approach to be useful for the purpose of testing Ansible roles that will subsequently be used on non-Docker hosts, because it’s so easy to recreate containers.

I had a scenario in which I was retro fitting Ansible to a server estate that was already hosting services I had built without an automation tool. So I was seeking confidence that the Ansible roles I had developed would work for builds from scratch, making that ability to easily recreate containers important.

Continue reading