Dockerization

docker

Background

so, back in 2012 i posted about virtualizing my media storage and general backup infrastructure.

today i will post about going back to bare metal … well, sort of :)

just a couple of days ago, my setup was running and working mostly fine

the biggest nuisance was that since i didn’t leave the unraid boxes running 24x7, each time i wanted to turn them on, i had to start the unraid vms, then turn the das boxes and finally start the array manually. kind of tedious.

fast forward to 2013, esxi 5.5 is out and you start to hear that vsphere client will be crippled as far as new esxi versions are concerned.

some discussions started showing up in the unraid forums, about virtualizing unraid under xen or kvm.

the time was ripe for an overhaul of my infrastructure, get rid of esxi and move on to either xen or kvm. or so i thought.

Research

although a lot of topics were being discussed in the unraid forums, something that got to me, was the fact that actually i should be running unraid as close to the hardware as possible, which meant de-virtualizing my esxi vms.

at about the same time, a new player entered the scene, which i’d heard about before, but never really understood

enter Docker.

it made a huge difference to think in terms of containerized lightweight applications rather than full blown vms.

i wouldn’t even need xen nor kvm, if i could get the apps i ran on my vms to run as docker containers.

that’s what i set out to do, and that’s what i achieved.

this is the story of what i did

Step by Step

Devirtualize unraids

i removed 2 m1015s from my head server and installed them in two Asrock motherboards in each Norco case. I purchased the following components

Set up the new virtualization host

installed Ubuntu 12.04.3 LTS, with zfs, docker and kvm support. hard disks were used as follows

Qty.  ItemFilesystem/LayoutUsage
1x120Gb SSD  ext4boot and general purpose (/home, etc.)
2x2Tb HDluks encrypted zfs mirror pool  encrypted backup storage
2x1.5Tb HDzfs mirror poolstaging area for nzb downloading
1x0.5Tb HDzfs poolworking area for nzb downloading
4x1Tb HDzfs striped mirror poolgeneral purpose storage (databases, etc.)

having enabled zfs, now i needed to run my apps.

i managed to dockerize nzbget and filebot.

sickbeard was customized based on an image from the docker index

Profit

great success !!!

Docker ps command output

Docker images command output

Htop command output

Zfs pool status

Zfs pool status continued

Zfs list command output

Conclusion

i’m currently working on a postgresql and gitlab container.

Sharing is caring!

If you got value from this article, please consider sharing it with your friends and colleagues.