Network in a Box
I finally managed to get a new development server that I’ll use to build the ad server engine I was talking about. As you (might) know from my previous post, the system is supposed to run on multiple load-balanced servers. Using this setup I believe scaling won’t be a problem in the future, but I guess I’ll just have to wait and see.
My first task was to create this system setup on my development server. Basically, the system has N nodes with a load-balancer in front of them. Since I only have one server, the obvious choice is to use XEN and create a virtual machine for every node of the system (including the load balancer). All nodes of the system (i.e.: XEN virtual machines) will sit on a private virtual network which is, again, created on just one real computer (my development server).
So far, so good! Everything seems quite simple from the description above and is definitely simple to setup (… after 3 days of intense googling!!!). The story goes like this…
I’m getting my server (yay!) with CentOS installed on it (I requested it). When it comes to Linux distributions I like Slackware, but using CentOS is so much easier when you don’t want to configure and install everything by hand and I didn’t want to spend too much time on installing and compiling software from source, like I usually do on Slackware.
So, anyway, my CentOS is up and running and I’m about to install XEN… easy!, just type “yum install xen” and you’re done. XEN requires a new kernel, so once you reboot the machine (with the new XEN kernel) you have a working XEN environment where you can create additional virtual machines. Just to note, at least on CentOS, you don’t have to configure anything (like grub for example); yum does everything for you… so once you install XEN with yum you just restart the server and you’re done… pretty cool!
Next step: build a virtual machine… how hard could this be? Well, it turns out it’s not that simple, at least not on CentOS. First of all, I think the documentation about this is a bit lacking, especially if you’re not familiar with how Linux works and a dozen or so command-line tools. I think I’m pretty good at Linux stuff, but nevertheless, I couldn’t create a XEN virtual machine on CentOS. To keep a long story short, I was able to boot a virtual machine but I wasn’t able to install the “guest” operating system on it because I didn’t have network access from inside the virtual machine and frankly I don’t know what didn’t work and I also didn’t want to spend too much time on this.
So I went and asked Google what’s the easiest way to create a XEN virtual machine… and the answer was “use xen-tools”. I said “aha! let’s try that…” and immediately went to my CentOS to type “yum install xen-tools”. To my surprise, yum said there is no package with that name, so again I turned to Google to find out more about these xen-tools. I read now from their page: “xen-tools is a collection of simple perl scripts which allow you to easily create new guest Xen domains upon your Debian GNU/Linux host”. Damn, I’m on the wrong Linux distribution… and from looking at the examples of how to use xen-tools it seems quite simple and easy, so it’s worth trying to work with Debian on my development server.
Luckily my hosting provider has a very easy and convenient way to (re)install a new OS, so I went to my administration console and looked for Debian through the available OSes and I was very happy to find a “Debian + XEN 3.2″ OS template there… I selected that, clicked “Restore” and in about 30 minutes my new Debian + XEN 3.2 development server was back online!
What comes next… you’ll have to read it in part 2 of this post. Stay tuned!
You can follow any responses to this entry through the RSS 2.0 feed. Responses are currently closed, but you can trackback from your own site.
Comments are closed.