Bobcares

Docker in oVirt – how we configured ‘Container as a Service’ in oVirt

by | Dec 22, 2015

2015 State of the Cloud Survey showed that adoption of Docker technology was a rising trend, with around 48% DevOps companies using it. Docker is an open source project that package applications and run-time binaries into Linux containers. With Docker, developers can define project environments and deploy their apps quickly.

In a recent post, we covered how ‘oVirt was used to build an open source Cloud solution’. This cloud system was used by many software businesses, who wanted quick application deployment, resource scalability and faster project turn-around time.

We implemented this using Docker containers and Docker Swarm as management software (aka Orchestrator). This model is commonly known as ‘Container as a Service’ (CaaS).

See how our WHMCS oVirt plugin helps you!

Creating Docker containers in oVirt

The first stage in CaaS implementation was to setup the containers. But oVirt didn’t support container-based virtualization. To resolve this, we built a system that created Docker containers within oVirt VMs. For quick provisioning of Docker VMs, we created templates pre-configured with Docker service. Once these containers were provisioned, our custom script linked them to a cluster managed by Docker Swarm.

Docker Swarm is an open-source container orchestration software that enables quick provisioning of containers, multi-container management and configuration management. It allows quick scaling up of container resources by managing Docker hosts as clusters and allocating containers from one host to another.

To enable easy management of Docker Swarm, we setup an open source software called Shipyard in each VM. Its key feature was the GUI, which helped users to create, manage and scale their containers. A secure repository was configured in each VM for users to easily download and upload their Docker images. Here is the architecture of our oVirt cloud setup for Docker implementation.

 

oVirt-Docker

Docker Containers in oVirt

 

In this post, we will discuss the details of how we deployed Docker containers in oVirt.

1. Importing the OS image

For creating a VM with Docker support, an OS image with Docker service had to be used. We imported a minimal CentOS image with Docker support, from the oVirt external repository.

 

ovirt-docker-image

Choosing OS image with Docker service

 

2. Creating the first VM

We created the first VM with the downloaded OS image, as seen here:

 

oVirt-VM-create

Creating our first Docker VM

 

VM configuration parameters such as Authentication, Network, Hostname and memory were set and VM was created with Docker support.

3. Creating Docker containers

We created Docker containers in the VM with different images, specific to each application. A demo Docker VM is shown here.

 

docker-VM

Docker containers in VM

 

We then proceeded with installation and configuration of Shipyard GUI and the Docker Swarm. Providing Docker image repository and Shipyard GUI made things easy for end-users. The GUI helped users to easily create containers and scale them up.

[ Looking for custom plugins to manage your portals? Contact us to get tailor-made plugins to serve your business purposes. ]

The image repository was used to upload their Docker images and reuse them to create containers. The fully configured VM was secured and a template was created using it. This enabled easy cloning of more Docker VMs. We will discuss these details in our next post.

Fast provisioning is a core feature in any cloud hosting solution. Here we’ve covered how Docker VM provisioning was implemented for a server virtualization system. Bobcares helps cloud providers, data centers and web hosts deliver industry standard cloud services through custom configuration and maintenance of cloud systems.

 

LATEST - WHMCS PLUGIN FOR OVIRT

Efficient 2-in-1 WHMCS plugin for managing your oVirt VMs easily

CLICK HERE FOR WHMCS OVIRT PLUGIN

var google_conversion_label = "zWG9CLOojHIQ0aD71QM";

0 Comments

Submit a Comment

Your email address will not be published. Required fields are marked *

Never again lose customers to poor
server speed! Let us help you.