It's been a long time since I have not written a post and ss you can see, i'm no longer on wordpress but on dotclear
This time, I would like to talk about something sysadmin are always needing in order to do proper research and analysis, a computer lab environment.
We are always needing one when we want to test out the latest features in mysql, apache or some more advance features like loadbalancing, MQ, firewalls, cache etc..
10 years ago, i was using physical PCs (intel PII and PIII, they were already outdated but I got those at very low prices ) to do the job but using those costs a lot and need a lot of maintenance. So we'll turn to a much more scalable and cheap solution, virtualization.
Nowadays, there is a lot of virtualization solutions out there, we speak a lot about cloud, VPS and all that stuffs. We'll try to look at some of those solutions and some lesser known such as UML.
We also have cloud computing sotware such as openstack which provides a complete environment for managing VMs. They generally provide enterprise features such as migrating VMs, High availability with control through and central management consoles,
Here are some of the solutions available and their common uses :
Linux Containers (Paravirtualization)
UML as its name suggests will work only on linux but can be a very good way to make simple and light VM. Netkit, although not maintained anymore provide a very simple way to create a lab of multiple servers, with multiple NICs and apps with custom configuration on server start. Marionet , like netkit provides a graphical interface but do the same job. Those two are most commonly used for network labs but can also be used for testing apps.
Openvz is a very simple solution to virtualize your lab. The vz tools allow to easily create and configure the servers. The main disadvantage is that a custom kernel is needed. There are also some open source web management panels out there but my favourite is OVZ
LXC on the other hand is gaining a lot of popularity and is becoming the de facto of containers on Linux. I found the tools intuitive but guess it's only because of lack of pratice.
Most of those method can also be driven by libvirt, the virtualization swiss-army. Check it out
With the advances in CPU, mostly Intel VT-x and AMD-V, we can now have fully virtualized systems ! This means that we can now run a windows, solaris or BSD on top of a linux hypervisor
Here are the most popular open source solutions for full virtualisation
VirtualBox Xen KVM (modified Qemu)
Mobile / handheld / device lab
Even mobile and handheld can be virtualized or emulated. This will enrich your labs.
Some proposed solutions :
- Firefox OS Simulator: Is installed as a firefox plugin and works great
- Android SDK, for android devices
- Qemu can now be used to emulate ARM processors, even rasperry Pis !!!
Many of those cloud computing softwares provides OS as images. Installing and OS is now easy as choosing and image at download it. The images are generally preconfigured with bascis apps such as WEB or Database servers,
Upgrading thoses OS can be more complicated though and waiting for a new image might be a better choice apps must be reinstalled.
With full virtualized systems installed manually like on Virtualbox, we could use PXE for remote automated install.
One of the nice features of netkit was the lab config, it allows you to quickly build a huge lab of UML instances (servers) with a simple text file.
Vagrant, a deploying tool also allows this and the best is that it has a libvirt support through a plugin, thus allowing to quickly build labs of different virtualization techs.
Installing and maintaining applications
Deploying apps can rapidement become a headache if we have more than 10 VMs. Puppet, salt or fabric can be used to automate this process. An agent may be needed on the servers in order for them to benefit those automations.
Those management software are often used with another great app, Docker.
Docker allow deploying and maintaining applications in a very intuative way. Most of all, it allows downloading and executing of thoses images on different linux systems through LXC.
Lab console management
There are a lot of web interfaces for the different technologies presented. Check out those proposed for libvirt. As libvirt can be used to managed most of those virtualization solutions, it could be a good start.
Hope that this post has helped you make your choice for building up your virtual computer lab.
In the next post, we' ll try some hands-on and begin building the lab