Building Php Application With Docker

Using Docker, deploying application components in production environment can be done in minutes. In this post i will build a simple wordpress PHP application stack using Nginx (front-end container), and two Application servers (back-end containers) which are connected to a MySQL container. Using the link feature in docker, we will be able to link the containers with each other without the need to expose the ports on the host machine, or worry about the IPs of the linked containers.
Read more

Control Resources With Cgroups

Controlling and limiting system resources is a great deal for sysadmins, especially on heavy loaded machines. When mentioning limiting or prioritization, some terms pop into my head like nice, and ulimit, that was before cgroups. CGroups (Control Groups) is a linux kernel feature written by Paul Menage and Rohit Seth at 2006, that limits and allocates system resources to different process groups. Cgroups considered the base technology used in Linux containers (LXC), Google’s lmctfy (“Let Me Contain That For You”) containers solution which uses only cgroups to implement OS-level virtualization, and of course Docker.
Read more

Using Overlayfs With Lxc

Overlay-filesystem (or Unionfs) is a filesystem service that uses union mount to mount different filesystems hierarchies to appear as one unified filesystem. The overlay-filesystem overlays one filesystem above the other into a layered representation. When a directory appears in both layers, overlayfs forms a merged directory for both of them. In case of two files have the same name in both layers, only one is served from the upper or the lower layer, but if a file only exists in the lower layer and an edit needs to be done on that file, a copy of this file is created on the upper layer to be edited.
Read more

Getting Started With Lxc

LXC (Linux Containers) is an OS-level Virtualization method, used to run separated linux containers on the same machine without hardware emulation layer between the containers and the OS. LXC uses some kernel features to create an isolated containers much like the ordinary virtual machines, the main kernel features that lxc relies on are: cgroups and namespaces. LXC also called lightweight virtualization that’s because LXC creates an isolated environment on the same kernel as the host which means creating a container can be made in a matter of seconds.
Read more

Before You Start With Lxc and Docker

When i started reading about Docker i started with a normal search on Google and i read the Wikipedia article then i got stopped by some terminologies like process groups, cgroups, and namespace and i was like huh..!!, i wanted to start using docker and do the cool stuff everyone is talking about, but i needed to understand everything before getting my hands dirty. This lead to a weekend of search about each term to understand the whole thing.
Read more