So from now until the end of August I'll be working on documentation for oVirt. In particular I'll be documenting how to use containers with oVirt. Here we go...
What are containers?
Indeed, what are containers? One analogy I could use is food and how we carry it. When eating food, we use utensils to eat, namely forks, knives, and plates. When we're at home, we have access to these very easily. It is when we decide to pack food for a journey that we have to decide what to carry on the basis of ease and comfort. So we get a bag that will carry the disk containing the food as well as the tools we will use to eat (forks, knives, and/or spoons). A container in tech terms, is a lot like the bag; it carries the application (food) and the environment it needs (the forks, knives and/or spoons).
Containers are used most commonly with Docker and that's what I'll be using as I work on the documentation. Docker is available for Linux, MacOS and Windows. Depending on your version of MacOS or Windows, you may use boot2docker or you shall be able to run Docker natively, without any intermediaries. As far as I know, Docker from its initial stages has always been run natively on Linux, so your installation should relatively painless on this platform. A note regarding running Docker (and by extension containers) on Linux: you need elevated privileges. So either you run Docker using sudo or you add your normal user to the docker group. Docker containers are setup by running docker pull <image-name> and docker run <container-name>.
What is Docker?
I’ve mentioned images in the last paragraph without saying how it all fits together. The idea about containers is that they are self-sufficient, like our food container with utensils in my-not-so-very-good example above. Containers in Docker are formed by utilizing a Docker image, which in turn uses a Dockerfile (yes, apparently convention dictates that I spell that as one word. Not my fault :D).
A Dockerfile is saved as `Dockerfile` and basically contains instructions on how to build a Docker image. A Docker image contains whatever the Dockerfile specifies it should have. Usually this includes an operating system, some software libraries necessary for the application inside the image to run and the application itself. The container I was talking about earlier is an instance of the image. Now I didn’t have to actually make a Docker image myself because my use case is covered by the images at Docker Hub (link here). A Google search for ‘<application-name> + container’ should point you in the direction of where you can find Dockerfiles and images to build a container of your choosing. Docker has some excellent documentation on how to build your own Docker image using a Dockerfile and they have an example using PostgreSQL that is well worth looking at.
What is oVirt?
oVirt is an open source project started by Red Hat. Red Hat is well known as being behind Red Hat Enterprise Linux, a distribution of Linux that is used in organizations that want to use Linux and have professional support doing it. It also supports Fedora, which is another Linux distribution on which Red Hat Enterprise Linux (RHEL for short) is based. Fedora is more bleeding-edge; RHEL is stable and has well tested features.
What will I be doing exactly?
PostgreSQL, Gluster, Ceph, OpenStack, Glance/Cinder/Neutron, ManageIQ, and FreeIPA. These are all software that can used alongside oVirt or are actually dependencies of oVirt (PostgreSQL and Gluster fall into this category). The challenge here is that when developers create applications, these applications have conflicts that aren’t easily resolved. Deploying them on separate machines and then linking them is one option, but we would want a solution where they can all be deployed on one machine. Which is where containers come in. A container frees us from dependency hell (a situation where different software applications require libraries that are incompatible with each other and thus cannot co-exist on the same operating system) since containers are isolated from one another as separate processes and are only linked to access a service provided by that container e.g. PostgreSQL’s database.
My job will be to document how this can be done without too much head scratching and hair pulling.
My next post shall be about getting the PostgreSQL container to work with oVirt.