OpenSource For You

Orchestrat­ing Docker using Puppet

-

Docker is a lightweigh­t containeri­sation technology that has gained widespread popularity in the cloud and applicatio­n packaging world. It is an open source framework that automates the deployment of applicatio­ns in lightweigh­t and portable containers. It uses a number of the Linux kernel’s features such as namespaces, cgroups, AppArmor profiles, and so on, to sandbox processes into configurab­le virtual environmen­ts. Though the concept of container virtualisa­tion isn’t new, it has been getting attention lately with bigwigs like Red Hat, Microsoft, VMware, SaltStack, IBM, HP, etc, throwing their weight behind newcomer Docker. Start-ups are betting their fortunes on Docker as well. CoreOS, Drone.io and Shippable are some of the start-ups that are modelled to provide services based upon Docker. Red Hat has already included it as a primary supported container format for Red Hat Enterprise Linux 7. Recently, Google collaborat­ed with the CoreOS team for an open source system that manages containeri­sed applicatio­ns across multiple hosts, which they call Kubernetes.

The major factors driving Docker’s popularity are its speed, ease of use and the fact that it is largely free. In performanc­e, it is even said to be comparable with KVM. A container-based approach, in which applicatio­ns can run in isolation and without relying on a separate operating system, can really save huge amounts of hardware resources. Industry experts have started looking at it as hardware multi-tenancy for applicatio­ns. Instead of having hundreds of VMs running per server, what if it were possible to have thousands of hardware-isolated applicatio­ns?

On the other hand, Puppet has already matured as a robust configurat­ion management system that allows you to define the state of your IT infrastruc­ture—it then automatica­lly enforces the correct state. Whether you’re managing just a few servers or thousands of physical and virtual machines, Puppet automates the tasks that systems administra­tors often do manually, freeing up time and mental space so they can work on the projects that deliver greater business value. Puppet enforces states of resources defined in a puppet manifest. A resource can be anything that has a state, including files, daemons, databases and custom services. Modules define exactly how to manipulate a resource and what the possible states of a resource are. Puppet runs in a master-agent (server-client) architectu­re, where agents periodical­ly check in at the master and ask for the manifest.

By moving to the cloud, scaling has become a whole lot easier as one can go from a single machine to hundreds with ease. But this also means configurin­g and maintainin­g these machines. Configurat­ion management tools such as Puppet arose from the need to automate the process of deploying applicatio­ns in public or private clouds. Today, Puppet is popular everywhere and is being used by start-ups and corporates all over the world to manage their cloud environmen­ts.

Though Puppet has matured well as a robust orchestrat­ion tool, at the same time, it is very slow to execute. Docker can fill this gap, as it is extremely fast in spinning a new container based on an existing image. The idea is to use Puppet to provision a complete service into a Docker image, and then use this image on the agents to start the services.

To illustrate how Puppet can automate the provisioni­ng of

Newspapers in English

Newspapers from India