rkrishnakumar@gmail.com
The uml version of ci consists of a linux executable and a root file system. The linux executable is made out of vanilla kernel source code, ci cvs source code, uml patches and uml addon for ci. More information on how to do this is available in the "Playing around with source code section". The root filesystem is a filesytem image in a file (named root_fs). This image consists of busybox tools (from http://busybox.net/) and ci tools (from http://sourceforge.net/projects/ci-linux/ ).
This article assumes that uml tools, such as uml_switch, is installed on the system on which the CI UML is run. The required rpm can be downloaded from http://user-mode-linux.sourceforge.net/.
A 'linux' uml binary pre-compiled with ci, is placed at the following location http://ci-linux.sourceforge.net/contrib/uml/binaries/linux.bz2 The root file system (root_fs in UML terminology) which has busybox userland tools and the ci tools can be downloaded from http://ci-linux.sourceforge.net/contrib/uml/binaries/root_fs.bz2. Download and bunzip the files.
Create two directories uml1 and uml2. Place one copy each of 'linux' and 'root_fs' in uml1 and uml2.
UML switch (run by executing command uml_switch) is used for communication between different instances of uml. Run 'uml_switch' on one terminal. Leave it like that.
Execute the uml linux from one terminal as follows
./linux eth0=daemon
After the uml console comes up, type the following commands:
./script
cluster_start
cluster -V
The script will mount the proc filesystem, remount the root filesystem as read/write
and set the ip address of the uml instance. cluster_start will start the ci software
on the node and the cluster -V will show the status of the cluster.
The cluster is initialized and will look similar to this:
Before we start running the second node, we need to change the ip address in the script and the node number in the Glaser configuration file. For that run the following commands:
cd uml2
mkdir root
mount -o loop root_fs root
cd root
Change the CLUSTER_NODENUM=2 in the etc/cluster.conf
and in the script change the ifconfig line to the following:
/sbin/ifconfig eth0 192.168.0.7
So now our second node will come up with different ip and
as the cluster node 2. Umount the root_fs
and run the same commands, which were:
./linux eth0=daemon
After the uml console comes up, type the following commands:
./script
cluster_start
cluster -V
Here is a snapshot of it:
When the second node comes up and joins the cluster the cluster state will change. The following will be the output from cluster -V on node 1 at this point:
The following can be obtained from the given sites:
Following are the steps to be performed to get the final 'linux' binary.
Here is the listing of the commands:
tar xvjf linux-2.6.8.1.tar.bz2
cd linux-2.6.8.1
cp -af ../ci/kernel/* .
bzcat ../uml-patch-2.6.8.1-1.bz2 | patch -p1
patch -p1 < ../2.6.8.1-uml-addon-ci.patch
cp -a ../config-uml .config
make ARCH=um menuconfig
make ARCH=um linux