What the Heck is a Linux Container, and Who the Hell is Docker?

Docker-whaleA Linux Container is an Operating System level virtualization method for running isolated Linux environments on a single base install of Linux. Linux containers are not virtual machines, rather they are isolated virtual environments with dedicated CPU, memory, I/O, and network. One can think of a Linux Container as a light, virtual OS instance. At first glance one hearkens back to the time of Solaris Containers, but there is a lot more going on here then first meets the eye, especially when we throw Docker in the mix.

 

But first, lets focus on Linux Containers…

 

The technologies behind Linux Containers are Control Groups and Name Spaces. Control Groups manage and monitor resource allocation for processes and process groups such as CPU, Memory, and I/O. Name Spaces help isolate processes, in something akin to a chrooted environment, making processes running within them invisible to other processes in other Name Spaces.

 

So why would you possibly want to run a Linux Container?

 

Well for one you can consolidate multiple Linux servers into one Machine, therefor reducing the number of management points in your environment. Instead of having to patch 6 Virtual Machines, you now only have to patch one.

 

Linux Containers can also be used to quickly spin up sandbox environments for development and testing so that you no longer need to spin up a new VM for each individual project. As we all know, this is how we end up with Virtual Sprawl. You create someone a Virtual Machine, with the intention of reclaiming it after a short period of time and all of a sudden that Virtual Machine becomes a permanent fixture in your environment. In the case of Linux Containers, you just tear down the instance and toss it away.

 

Also, Linux Containers can be used to allow you to run multiple instances of the same application in parallel. Think of Apache virtual servers, running separately, independent and isolated from each other. Each with its own dedicated CPU, Memory, and I/O, and never stepping on each others toes.

 

Linux Containers also provide an added layer of security. Just because a Container on a server is compromised, it does not mean that any other local Containers, or the base system itself is compromised in the least.

 

Finally Linux Containers are efficient. First and foremost, they boot faster than traditional Virtual Machines. They also offer better performance over Virtual Machines as there is no hardware abstraction layer in the form of a hypervisor.

 

So what is Docker then, you ask? Docker is an open source project that streamlines the deployment of an application (or OS) inside a Linux Container. Its designed to make the creation and management of Linux Containers simple as Docker can create and share disk images with ease.

 

Here are just a few of the images available from the Docker Hub.

  • Apache CouchDB

  • PostgreSQL

  • Memcached

  • Mongo DB

  • NGINX

  • Mysql

  • WordPress

  • Centos

  • Ubuntu

Whats amazing is that any dockerized image can run on any machine that is running docker. Imagine an Ubuntu docker image running on Centos. Weird huh?

 

Have yourself a perfect OS image for your in-house java app? How about you dockerize that and use Docker as a revision control system for your application/OS. Sounds interesting, doesn't it.

 

I have heard it said that Docker is not just Platform as a Service (PAAS) , its possibly could be much more than that. Right now Docker only works with Linux Containers, but imagine if it worked with KVM or Xen.

 

Not sure about you but I look forward to getting deploy it in my lab.

Related articles

libswarm – Docker Orchestration Announced
Docker 1.0 Provides Enterprise Support for Container Virtualization
Docker 1.0 Backed By IBM, Red Hat, Rackspace
Docker all geared up for the enterprise
Docker: Lightweight Linux Containers for Consistent Development and Deployment
Docker Software Containers Go Commercial
Advertisements

Ubuntu Linux- Locate Failed Dimms without Pain

Cartoon_ramSo I have recently made the switch to Kubuntu 12.10 on my new desktop. Basically I am building a monster workstation and I ran into issue running Fedora 18. Since I wanted Steam support too I decided not to try to move to an earlier Fedora version, but rather, I chose to  give Ubuntu another try (its been years since I have run Ubuntu).

Anyway, I am building this hoss of a work station that has 12 Dimm slots, which I fully populated with 4GB dims. However when I booted my new monster, I found that I was 8GB short in the Memory department.

So, how do I figure out which two dimms are bad? I certainly dont want to have to pull all of them out and boot the machine and test each dimm one by one.

So this is where lshw comes to the rescue. Which I blogged about back in 2010 here.

Anyway. Here is how you find the empty slots.

# lshw -short -C memory

which output what you see below.

0/14                           memory      System Memory
/0/14/0                         memory      4GiB DIMM DDR3 1066 MHz (0.9 ns)
/0/14/1                         memory      4GiB DIMM DDR3 1066 MHz (0.9 ns)
/0/14/2                         memory      4GiB DIMM DDR3 1066 MHz (0.9 ns)
/0/14/3                         memory      4GiB DIMM DDR3 1066 MHz (0.9 ns)
/0/14/4                         memory      4GiB DIMM DDR3 1066 MHz (0.9 ns)
/0/14/5                         memory      4GiB DIMM DDR3 1066 MHz (0.9 ns)
/0/22                           memory      System Memory
/0/22/0                         memory      DIMM DDR3 [empty]
/0/22/1                         memory      DIMM DDR3 [empty]
/0/22/2                         memory      4GiB DIMM DDR3 1066 MHz (0.9 ns)
/0/22/3                         memory      4GiB DIMM DDR3 1066 MHz (0.9 ns)
/0/22/4                         memory      4GiB DIMM DDR3 1066 MHz (0.9 ns)
/0/22/5                         memory      4GiB DIMM DDR3 1066 MHz (0.9 ns)

Basically this is telling me that my first two dimms on CPU two are dead and are the ones that need to be replaced.

Now all I have to do is powerdown and pull and replace two dimms.. which will save my fingers from much discomfort.

Installing Spotify on Fedora

Spotify-logo So Spotify is finally available in the US, which is good news for those who are getting tired of Pandora. Hell, Pandora played Celine Dion on my Hardcore Punk Radio Station the other day…wtf.

So anyway, I decided to sign up and was disappointed to find that they did not have an official linux client, However they do publicize an Ubuntu client here, however, since I run Fedora this is not much interest to me.

Thankfully the Europeans have already figured out how to get Spotify running on other linuxes natively, and google found this link on installing the Debian packages on Fedora 13. I am glad to report that these instructions also work on Fedora 12. So far so good on Fedora 12.

However i decided to explore their repo a bit and found that in fact they do have rpm packages. Check out the link below. Sneaky.

http://repository.spotify.com/fedora/

I bit more googling found me this link which contains instructions on installing via the apparently secret rpms.

Btw, if you are a jackass and want to run Spotify under Wine for some reason, click here for instructions.