Hello! Care to or ?

The post

ryan: How To Make An Easy Xen Cluster, Part 0

Ryan Creasey posted this 6 months ago (more), and updated it 6 months ago.

Tagged

This is going to be the first in a series of posts that describe a recent server build-out that I did involving creating a xen cluster in centos. It'll describe how I've split the server into separate vms, created an nfs share between them, distributed services while installing to a centralized location, and established service vms for stuff like static, dynamic and rails application web hosting.

I'm not going to give you the standard "this is what a vm domU is" speech, I'll leave that to the professionals. So sharpen your pencils, get a fresh centos installation and follow that guide. When it comes time to build your first domU, stop there and start reading back here. The basic idea is that you're going to create a very small-ish vm slice (I used 12g of disk per vm, which is excessive. I should have sliced it smaller, but alas, I digress) and use it as a "master" vm. Think of it as post-installation, pre-configuration. You just got done with installing the base OS, and configuring normal serivces (like, ntpd, snmpd, sendmail, etc). You're going to take this vm all the way up until the point you'd start installing stuff like apache, mysql, etc.

I really don't care how you set some stuff up, but when you're running through anaconda for the first time, these are the rpm packages I chose to install:

%packages
@base
@core
@development-tools
@ruby

This should give you a centos installation less than 2g (so now you can see why 12g is excessive) with the base system libraries, stuff to compile new things with, and of course, ruby. Then I used the following xen config for this domU (which yes, I've named centos_base and told the virtinstaller to create a flat file disk at /vm/centos_base.img. There are other ways to skin the cat of xen storage, but I'm not going to touch that in this article. I chose the easiest to setup, but probably the one that's going to be a pain later.

Here's that xen config I was talking about:

name = "centos_base"
memory = "512"
disk = [ 'tap:aio:/vm/centos_base.img,xvda,w', ]
vif = [ 'mac=00:16:3e:3e:ef:90', ]

uuid = "35619e3e-111f-4c04-6623-342ec6c5112f"
bootloader="/usr/bin/pygrub"
vcpus=1
on_reboot   = 'restart'
on_crash    = 'restart'

By the time you get all of this setup (ie: your dom0 and your domU centos_base), I should have the next section done. I'll be covering what to do right after you've finished your installation, and what kind of pre-configuration stuff you should do next (setup network, autofs, nfs, smtp, snmp, ntp, users, etc).

0 comments

You need to be logged in to leave a comment.