In this post I’m gonna explain you how to deploy really fast and cheap cluster of Linux Containers. I use the same setup in a production enviroment for a big accounting software (10GB++ of MySQL).

Why LXC? Because it is Über-cool! Compared to the Hardware Virtualization, the runtime performance is near the bare metal speeds. Operations like starting/stopping of the system or clonning and snapshots are really fast. There’s no virtual BIOS, boot loader and kernel. A given number of containers can share the same system resources as they are installed on the same bare metal system and are still isolated. It’s really lightweight and flexible. You can containerize everything - a whole system or a single application. Stéphane Graber has a really good blog post series about LXC.

DRBD will provide the block device replication between the servers. Let’s think of it as a RAID1 array between the two machines. It can work as master-master or master-slave. The master-master setup is more risky and it works only with shared cluster file systems (GFS, OCFS2 or GlusterFS). I don’t have the balls to use it master-master on two nodes for VM’s and containers, so in this setup I’ll use master-slave. The difference is that when an array is promoted as slave on a given machine, it cannot be accessed.

Btrfs is the new hipster in town :) It’s a new “copy on write” file system and logical volume manager for the Linux kernel. It has many similarities with the ZFS, but is part of the kernel. Snapshotting and cloning of the containers are easier with Btrfs. It can make snapshots and subvolumes of a given directory and mount it as another block device. Note that it’s already stable but still has problems. Stable filesystem for production environment must be 7+ years old! I bet on the backups :)

So, let’s suppose that we have two identical machines with this sample configuration:

  • Intel Xeon E5;
  • 16GB of RAM;
  • 500GB RAID1 array -> /dev/sda;
  • 2x 1TB RAID10 arrays -> /dev/sdb and /dev/sdc;
  • Standart gigabit interface/s -> eth0;
  • 10GB Ethernet interface, linked between the machines -> eth1;
Continue reading

Today Perl helped me again to solve a boring office problem. The colleagues gave me a presentation with almost 1000 slides. It was designed for a theatre subtitles. The slides was simple. Just a sentence per each slide. Only the colors was mistaken. Not black on white but white on black. My colleagues spent hours in googling for M$ Office bulk color change function. Then something blinked in me. It was Perl’s Regex {}.
The new open Office formats - ODF and OOXML are both zipped XML files, binary media content and files with metadata. I converted the presentation to odt (It was on the old crappy ppt) and then, just

Continue reading

F.B. Purity

in Fun IT

Some of my Facebook friends have enough free time to tepost stupid Facebook page images, Tumblr gifs and other crap. Others are just not clever enough. The worst is when there’s a new reality show on the TV, a new internet meme or “just-share-crap” trend. I don’t wanna be part of that. F.B. Purity helps me to filter the Facebook wall with more advanced tools than the standart FB options. It supports custom words blacklist. Mine is shared on GitHub. :)

Comment and share

This year, on OpenFest 2013 I will talk about Ulteo OVD - Open Source Application Delivery system. The conference shedule was full and there was just a place on the Lighting Talks, but it’s enough. I will cover the core functionality and some words about the company which is developing Ulteo. It’s a good idea to invite the developers on the next OpenFest.

I have a working setup in the Francophone center of Sofia University, so it’s possible to show it as a demo from my laptop outside.

OpenFest is the biggest conference about Free and Open Source Software and “Open Mind” in Bulgaria. Each year international guests from big projects and companies are invited.

You can see the shedule and the address in the OpenFest site.

My slides are on GitHub.
Or a temporary snapshot here: http://dallas.petrovs.info/Openfest2013-UlteoOVDPresentation

Hope someone is interested :)

Comment and share

Blagovest Petrov

An ordinary IT


DevOps Engineer


Sofia, Bulgaria