LXC for your development, staging and production
Hubert Łępicki
WrocLove.rb, 2013-03-03
LXC = LinuX Containers
- Better/nicer than Virtuozzo/OpenVZ...
Virtualized Development
- Vagrant rocks
- VirtualBox not so much
- Dedicated memory space
- Limited disk images size
- When you run out of disk space you need some black magick
Provisioning
- Provision with Chef/Puppet/Capistrano/Shell
- Run the same provisioning recipes on LXC as on Vagrant
- Have *exactly* the same environment on staging, production and development!
Save RAM, save disk space
- LXC runs enhanced chroot environment on top of the same kernel as host system
- think FreeBSD Jail
- LXC + brtfs + templates == saved disk space
- Shared filesystem, separated network stack, shared/separated memory
- Will not crash when VirtualBox image goes out of space
Unless you run LXC in Vagrant in VirtualBox ;)
Staging/production setup
- You already run Linux there (probably)
- Easier to set up than XEN
- Faster than VirtualBox
Vagrant backend coming soon
- https://github.com/fgrehm/vagrant-lxc.git
Bottom line
-
Lightweight virtualization for your projects
- Save disk space
- Save RAM
- Easier to manage/replicate than VirtualBox images
- Already built in your kernel
- Sorry Apple fanboys, not for you :(