<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>jansipke.nl &#187; CentOS</title>
	<atom:link href="http://www.jansipke.nl/tag/centos/feed" rel="self" type="application/rss+xml" />
	<link>http://www.jansipke.nl</link>
	<description>Technology Blog</description>
	<lastBuildDate>Tue, 10 Jan 2012 09:20:42 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Increasing the size of an LVM volume</title>
		<link>http://www.jansipke.nl/increasing-the-size-of-an-lvm-volume</link>
		<comments>http://www.jansipke.nl/increasing-the-size-of-an-lvm-volume#comments</comments>
		<pubDate>Thu, 03 Jun 2010 14:58:27 +0000</pubDate>
		<dc:creator>jansipke</dc:creator>
				<category><![CDATA[Storage]]></category>
		<category><![CDATA[CentOS]]></category>
		<category><![CDATA[LVM]]></category>
		<category><![CDATA[XenServer]]></category>

		<guid isPermaLink="false">http://www.jansipke.nl/?p=1049</guid>
		<description><![CDATA[In a previous article we looked at LVM. This short article describes how to grow an existing volume by adding an extra disk to the system. Specifically, we use a XenServer guest VM with CentOS installed. The first disk of a XenServer guest VM is called xvda, the second disk (the one we added) is [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.jansipke.nl/wp-content/uploads/harddisk.jpg"><img class="alignnone size-full wp-image-604" title="harddisk" src="http://www.jansipke.nl/wp-content/uploads/harddisk.jpg" alt="" width="61" height="60" /></a></p>
<p>In a <a href="/an-introduction-to-logical-volume-management-lvm">previous article</a> we looked at LVM. This short article describes how to grow an existing volume by adding an extra disk to the system. Specifically, we use a XenServer guest VM with CentOS installed.</p>
<p>The first disk of a XenServer guest VM is called <em>xvda</em>, the second disk (the one we added) is called <em>xvdb</em>. We start with the creation of a Physical Volume (PV) on the extra disk.</p>
<blockquote>
<pre>pvcreate /dev/xvdb
</pre>
</blockquote>
<p>Then we extend the existing Volume Group (VG) called VolGroup00.</p>
<blockquote>
<pre>vgextend VolGroup00 /dev/xvdb
</pre>
</blockquote>
<p>Then we extend the Logical Volume (LV) by the size of the extra disk, in this case 8GB.</p>
<blockquote>
<pre>lvextend -L8G /dev/VolGroup00/LogVol00
</pre>
</blockquote>
<p>Finally we resize the filesystem that uses this LV.</p>
<blockquote>
<pre>resize2fs /dev/VolGroup00/LogVol00
</pre>
</blockquote>
]]></content:encoded>
			<wfw:commentRss>http://www.jansipke.nl/increasing-the-size-of-an-lvm-volume/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Using a Xen virtual machine image with Eucalyptus</title>
		<link>http://www.jansipke.nl/using-a-xen-virtual-machine-image-with-eucalyptus</link>
		<comments>http://www.jansipke.nl/using-a-xen-virtual-machine-image-with-eucalyptus#comments</comments>
		<pubDate>Tue, 28 Apr 2009 18:28:05 +0000</pubDate>
		<dc:creator>jansipke</dc:creator>
				<category><![CDATA[Cloud computing]]></category>
		<category><![CDATA[CentOS]]></category>
		<category><![CDATA[Eucalyptus]]></category>
		<category><![CDATA[Xen]]></category>

		<guid isPermaLink="false">http://www.jansipke.nl/?p=322</guid>
		<description><![CDATA[In the previous article we created a CentOS virtual machine image that was usable with Xen. In this short article we will use this image in Eucalyptus. Bundle, upload and register the kernel with Eucalyptus: ec2-bundle-image --image /boot/vmlinuz-2.6.18-128.1.6.el5xen --kernel true ec2-upload-bundle --bucket centos-kernel-bucket --manifest /tmp/vmlinuz-2.6.18-128.1.6.el5xen.manifest.xml ec2-register centos-kernel-bucket/vmlinuz-2.6.18-128.1.6.el5xen.manifest.xml Bundle, upload and register the ramdisk with Eucalyptus: [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignnone size-full wp-image-611" title="eucalyptus" src="http://www.jansipke.nl/wp-content/uploads/eucalyptus.gif" alt="eucalyptus" width="179" height="40" /><br />
In the previous article we <a href="/creating-a-centos-xen-virtual-machine-image">created a CentOS virtual machine image that was usable with Xen</a>. In this short article we will use this image in Eucalyptus.</p>
<p>Bundle, upload and register the kernel with Eucalyptus:</p>
<blockquote>
<pre>ec2-bundle-image --image /boot/vmlinuz-2.6.18-128.1.6.el5xen --kernel true
ec2-upload-bundle --bucket centos-kernel-bucket --manifest /tmp/vmlinuz-2.6.18-128.1.6.el5xen.manifest.xml
ec2-register centos-kernel-bucket/vmlinuz-2.6.18-128.1.6.el5xen.manifest.xml</pre>
</blockquote>
<p>Bundle, upload and register the ramdisk with Eucalyptus:</p>
<blockquote>
<pre>ec2-bundle-image --image /root/centos-ramdisk.img --ramdisk true
ec2-upload-bundle --bucket centos-ramdisk-bucket --manifest /tmp/centos-ramdisk.img.manifest.xml
ec2-register centos-ramdisk-bucket/centos-ramdisk.img.manifest.xml</pre>
</blockquote>
<p>Bundle, upload and register the filesystem with Eucalyptus:</p>
<blockquote>
<pre>ec2-bundle-image --image /root/centos-root.img
ec2-upload-bundle --bucket centos-root-bucket --manifest /tmp/centos-root.img.manifest.xml
ec2-register centos-root-bucket/centos-root.img.manifest.xml</pre>
</blockquote>
<p>Start an instance, replacing the emi-, eki- and eri-identifiers with your own:</p>
<blockquote>
<pre>ec2-run-instances emi-F4CB118E --kernel eki-38AC43DC --ramdisk eri-98FE2101</pre>
</blockquote>
]]></content:encoded>
			<wfw:commentRss>http://www.jansipke.nl/using-a-xen-virtual-machine-image-with-eucalyptus/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Creating a CentOS Xen virtual machine image</title>
		<link>http://www.jansipke.nl/creating-a-centos-xen-virtual-machine-image</link>
		<comments>http://www.jansipke.nl/creating-a-centos-xen-virtual-machine-image#comments</comments>
		<pubDate>Tue, 28 Apr 2009 18:15:33 +0000</pubDate>
		<dc:creator>jansipke</dc:creator>
				<category><![CDATA[Cloud computing]]></category>
		<category><![CDATA[CentOS]]></category>
		<category><![CDATA[Xen]]></category>

		<guid isPermaLink="false">http://www.jansipke.nl/?p=306</guid>
		<description><![CDATA[In this article we will create a CentOS 5.2 virtual machine image that can be used by Xen. We need to bring three pieces together: The kernel (vmlinuz) The ramdisk (initrd) The filesystem Kernel The easiest way to create a suitable kernel, ramdisk and filesystem is to use a system with CentOS 5.2 on it [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignnone size-full wp-image-613" title="xen" src="http://www.jansipke.nl/wp-content/uploads/xen.gif" alt="xen" width="80" height="40" /><br />
In this article we will create a <a href="http://www.centos.org/">CentOS</a> 5.2 virtual machine image that can be used by <a href="http://www.xen.org/">Xen</a>. We need to bring three pieces together:</p>
<ol>
<li>The kernel (vmlinuz)</li>
<li>The ramdisk (initrd)</li>
<li>The filesystem</li>
</ol>
<p><strong>Kernel</strong></p>
<p>The easiest way to create a suitable kernel, ramdisk and filesystem is to use a system with CentOS 5.2 on it with xen enabled:</p>
<blockquote>
<pre>yum install xen</pre>
</blockquote>
<p>Change the default kernel to the new kernel with xen support by editing /boot/grub/menu.lst:</p>
<blockquote>
<pre>default=0</pre>
</blockquote>
<p>and reboot</p>
<p><strong>Ramdisk</strong></p>
<p>Create the ramdisk by running mkinitrd:</p>
<blockquote>
<pre>mkinitrd --omit-scsi-modules --with=xennet --with=xenblk --preload=xenblk /root/xen-image/centos-ramdisk.img</pre>
</blockquote>
<p><strong>Filesystem</strong></p>
<p>The hardest job is getting a filesystem. Create a directory where we will hold the filesystem image:</p>
<blockquote>
<pre>mkdir /root/xen-image
cd /root/xen-image</pre>
</blockquote>
<p>Create an image file and make a filesystem on this file:</p>
<blockquote>
<pre>dd if=/dev/zero of=centos-root.img bs=1M count=1999
mkfs.ext3 centos-root.img</pre>
</blockquote>
<p>Create a directory where we can mount the newly created image:</p>
<blockquote>
<pre>mkdir rootdisk
mount -o loop centos-root.img /root/xen-image/rootdisk/
cd rootdisk</pre>
</blockquote>
<p>Create the /etc directory:</p>
<blockquote>
<pre>mkdir etc</pre>
</blockquote>
<p>and edit the file /etc/fstab:</p>
<blockquote>
<pre>/dev/sda1   /          ext3     defaults         1 1
none        /dev/pts   devpts   gid=5,mode=620   0 0
none        /dev/shm   tmpfs    defaults         0 0
none        /proc      proc     defaults         0 0
none        /sys       sysfs    defaults         0 0</pre>
</blockquote>
<p>Create some necessary device files:</p>
<blockquote>
<pre>mkdir dev
for i in console null zero; do /sbin/MAKEDEV -d /root/xen-image/rootdisk/dev -x $i; done</pre>
</blockquote>
<p>Copy the kernel modules:</p>
<blockquote>
<pre>mkdir -p lib/modules
cp -a /lib/modules/2.6.18-128.1.6.el5xen/ /root/xen-image/rootdisk/lib/modules/</pre>
</blockquote>
<p>Create the directory for network scripts:</p>
<blockquote>
<pre>mkdir -p etc/sysconfig/network-scripts</pre>
</blockquote>
<p>Edit the file that describes the first network interface, /etc/sysconfig/network-scripts/ifcfg-eth0:</p>
<blockquote>
<pre>DEVICE=eth0
BOOTPROTO=dhcp
ONBOOT=yes</pre>
</blockquote>
<p>Do the same for the second network interface, /etc/sysconfig/network-scripts/ifcfg-eth1:</p>
<blockquote>
<pre>DEVICE=eth1
BOOTPROTO=dhcp
ONBOOT=yes</pre>
</blockquote>
<p>And the last network script, etc/sysconfig/network:</p>
<blockquote>
<pre>NETWORKING=yes
HOSTNAME=centos52
GATEWAY=x.x.x.x</pre>
</blockquote>
<p>Create the RPM lock directory:</p>
<blockquote>
<pre>mkdir -p var/lock/rpm</pre>
</blockquote>
<p>We need to create a specific configuration file for yum, /root/xen-image/yum-xen.conf:</p>
<blockquote>
<pre>[main]
cachedir=/var/cache/yum
keepcache=0
debuglevel=2
logfile=/var/log/yum.log
distroverpkg=redhat-release
tolerant=1
exactarch=1
obsoletes=1
gpgcheck=0
plugins=1
metadata_expire=1h

[base]
name=CentOS-5.2 - Base
baseurl=http://mirror.centos.org/centos/5.2/os/i386/
enabled=1

[extras]
name=CentOS-5.2 - Extras
baseurl=http://mirror.centos.org/centos/5.2/extras/i386/
enabled=1

[updates]
name=CentOS-5.2 - Updates
baseurl=http://mirror.centos.org/centos/5.2/updates/i386/
enabled=1

[addons]
name=CentOS-5.2 - Addons
baseurl=http://mirror.centos.org/centos/5.2/addons/i386/
enabled=1</pre>
</blockquote>
<p>Use the configuration file we just edited to install the base system and add the openssh server:</p>
<blockquote>
<pre>yum -c /root/xen-image/yum-xen.conf --installroot=/root/xen-image/rootdisk -y groupinstall base
yum -c /root/xen-image/yum-xen.conf --installroot=/root/xen-image/rootdisk -y install openssh openssh-server</pre>
</blockquote>
<p>To set an initial password for root, we chroot into the rootdisk we created:</p>
<blockquote>
<pre>chroot /root/xen-image/rootdisk</pre>
</blockquote>
<p>Edit the /etc/passwd file inside the chroot and change the &#8216;*&#8217; on the first line with an &#8216;x&#8217;:</p>
<blockquote>
<pre>root:x:0:0:root:/root:/bin/bash</pre>
</blockquote>
<p>Run pwconv to enable shadow passwords and set the root password:</p>
<blockquote>
<pre>pwconv
passwd root</pre>
</blockquote>
<p>Disable TLS:</p>
<blockquote>
<pre>mv /lib/tls /lib/tls.disabled</pre>
</blockquote>
<p>Exit from the chroot:</p>
<blockquote>
<pre>exit</pre>
</blockquote>
<p>Unmount the rootdisk:</p>
<blockquote>
<pre>cd /root
umount /root/xen-image/rootdisk</pre>
</blockquote>
<p><strong>Putting it all together</strong></p>
<p>Create a new configuration file for Xen specific to this image, /etc/xen/centos52:</p>
<blockquote>
<pre>kernel = "/boot/vmlinuz-2.6.18-128.1.6.el5xen"
ramdisk = "/root/xen-image/centos-ramdisk.img"
name = "centos52"
memory = "256"
disk = [ 'file:/root/xen-image/centos-root.img,sda1,w' ]
root = '/dev/sda1 ro'
vif = [ 'bridge=xenbr0', '']
vcpus=1
on_reboot = 'destroy'
on_crash = 'destroy'</pre>
</blockquote>
<p>And finally, starting the Xen VM image:</p>
<blockquote>
<pre>/usr/sbin/xm create -c centos52</pre>
</blockquote>
]]></content:encoded>
			<wfw:commentRss>http://www.jansipke.nl/creating-a-centos-xen-virtual-machine-image/feed</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Installing Ganglia on CentOS</title>
		<link>http://www.jansipke.nl/installing-ganglia-on-centos</link>
		<comments>http://www.jansipke.nl/installing-ganglia-on-centos#comments</comments>
		<pubDate>Mon, 20 Apr 2009 18:15:08 +0000</pubDate>
		<dc:creator>jansipke</dc:creator>
				<category><![CDATA[Networking]]></category>
		<category><![CDATA[CentOS]]></category>
		<category><![CDATA[Ganglia]]></category>
		<category><![CDATA[Monitoring]]></category>

		<guid isPermaLink="false">http://www.jansipke.nl/?p=538</guid>
		<description><![CDATA[In this article we will install the Ganglia monitoring system on a set of machines running CentOS. There are two kinds of machines involved: The meta node: one machine that receives all measurements and presents it to a client through a website. The monitoring nodes: machines that run only the monitoring daemon and send the [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignnone size-full wp-image-615" title="ganglia" src="http://www.jansipke.nl/wp-content/uploads/ganglia.gif" alt="ganglia" width="149" height="60" /></p>
<p>In this article we will install the <a href="http://ganglia.info/">Ganglia</a> monitoring system on a set of machines running CentOS. There are two kinds of machines involved:</p>
<ul>
<li>The meta node: one machine that receives all measurements and presents it to a client through a website.</li>
<li>The monitoring nodes: machines that run only the monitoring daemon and send the measurements to the meta node.</li>
</ul>
<p><strong>Meta node</strong></p>
<p>For this example we assume the meta node has the IP address 192.168.1.253. We start by installing the necessary software:</p>
<blockquote>
<pre>rpm -Uvh http://download.fedora.redhat.com/pub/epel/5/i386/epel-release-5-3.noarch.rpm
yum install rrdtool ganglia ganglia-gmetad ganglia-gmond ganglia-web httpd php apr apr-util</pre>
</blockquote>
<p>If you want to monitor the meta node as well as the monitoring nodes, edit the gmond configuration file /etc/gmond.conf:</p>
<blockquote>
<pre>cluster {
  name = "cluster1"
  owner = "owner1"
  latlong = "unspecified"
  url = "unspecified"
}

udp_send_channel {
  host = 192.168.1.253
  port = 8649
  ttl = 1
}

udp_recv_channel {
  port = 8649
}</pre>
</blockquote>
<p>Start the gmond service and make sure it starts at boot:</p>
<blockquote>
<pre>chkconfig gmond on
service gmond start</pre>
</blockquote>
<p>Edit the gmetad configuration file /etc/gmetad.conf:</p>
<blockquote>
<pre>data_source "my cluster" 192.168.1.253:8649</pre>
</blockquote>
<p>Start the gmetad service and make sure it starts at boot:</p>
<blockquote>
<pre>chkconfig gmetad on
service gmetad start</pre>
</blockquote>
<p>Enable the http daemon, to be able to see the pretty monitoring pictures:</p>
<blockquote>
<pre>chkconfig httpd on
service httpd start</pre>
</blockquote>
<p><strong>Monitoring nodes</strong></p>
<p>On all the monitoring nodes start by installing the necessary software:</p>
<blockquote>
<pre>rpm -Uvh http://download.fedora.redhat.com/pub/epel/5/i386/epel-release-5-3.noarch.rpm
yum install ganglia-gmond</pre>
</blockquote>
<p>Edit the gmond configuration file /etc/gmond.conf. You can use an exact replica of the gmond configuration file shown for the meta node.<br />
Start the gmond service and make sure it starts at boot:</p>
<blockquote>
<pre>chkconfig gmond on
service gmond start</pre>
</blockquote>
<p>If you would like to emit your own measurements (called metrics in Ganglia) and view them on the website, call the gmetric program:</p>
<blockquote>
<pre>gmetric --name mymetricname --value mymetricvalue --type string</pre>
</blockquote>
<p>To use the output of a program you wrote as a metric, simply call it like this, making sure to use backticks (`) instead of quotes (&#8216;):</p>
<blockquote>
<pre>gmetric --name mymetricname --value `/home/user/mymetricprogram` --type string</pre>
</blockquote>
]]></content:encoded>
			<wfw:commentRss>http://www.jansipke.nl/installing-ganglia-on-centos/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Installing Eucalyptus on CentOS</title>
		<link>http://www.jansipke.nl/installing-eucalyptus-on-centos</link>
		<comments>http://www.jansipke.nl/installing-eucalyptus-on-centos#comments</comments>
		<pubDate>Mon, 06 Apr 2009 14:41:22 +0000</pubDate>
		<dc:creator>jansipke</dc:creator>
				<category><![CDATA[Cloud computing]]></category>
		<category><![CDATA[CentOS]]></category>
		<category><![CDATA[Eucalyptus]]></category>

		<guid isPermaLink="false">http://www.jansipke.nl/?p=169</guid>
		<description><![CDATA[Setup Eucalyptus is software that enables you to run your own cloud. It aims to be API compatible with Amazon&#8217;s EC2, which means you can use most of the tools that are written for that system with Eucalyptus too. This articles describes my successful attempt at installing Eucalyptus 1.4 on CentOS 5.2 with managed network [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignnone size-full wp-image-611" title="eucalyptus" src="http://www.jansipke.nl/wp-content/uploads/eucalyptus.gif" alt="eucalyptus" width="179" height="40" /><br />
<strong>Setup</strong></p>
<p><a href="http://www.eucalyptus.com/">Eucalyptus</a> is software that enables you to run your own cloud. It aims to be API compatible with <a href="http://aws.amazon.com/ec2/">Amazon&#8217;s EC2</a>, which means you can use most of the tools that are written for that system with Eucalyptus too.</p>
<p>This articles describes my successful attempt at installing Eucalyptus 1.4 on CentOS 5.2 with managed network mode. The installation is performed on two different types of machines:</p>
<ul>
<li>The front-end, which is the machine controlling the cloud</li>
<li>The compute nodes, which run the virtual machines</li>
</ul>
<p><strong>Front-end<br />
</strong></p>
<p><img class="alignnone size-full wp-image-723" title="eucalyptus-head-node" src="http://www.jansipke.nl/wp-content/uploads/eucalyptus-head-node.gif" alt="eucalyptus-head-node" width="194" height="93" /></p>
<p>The front-end has two network interfaces. One (eth0) is connected to the compute nodes and has IP address 192.168.1.254. The other (eth1) is connected to the LAN and has IP address 172.16.0.254.</p>
<p>We start by disabling SELinux. This is accomplished by editing the file /etc/selinux/config:</p>
<blockquote>
<pre>SELINUX=disabled</pre>
</blockquote>
<p>Now reboot for this change to take effect.</p>
<p>Allow the machine to forward IP packets by editing /etc/sysctl.conf:</p>
<blockquote>
<pre>net.ipv4.ip_forward = 1</pre>
</blockquote>
<p>and change the value immediately without rebooting:</p>
<blockquote>
<pre>sysctl -p /etc/sysctl.conf</pre>
</blockquote>
<p>Start with a clean iptables firewall and allow NAT:</p>
<blockquote>
<pre>iptables --flush
iptables --table nat --flush
iptables --delete-chain
iptables --table nat --delete-chain
iptables --table nat --append POSTROUTING --out-interface eth1 -j MASQUERADE
iptables --append FORWARD --in-interface eth0 -j ACCEPT</pre>
</blockquote>
<p>Make the changes permanent by running:</p>
<blockquote>
<pre>/etc/init.d/iptables save</pre>
</blockquote>
<p>Download the Sun Java Development Kit version 6 and install it:</p>
<blockquote>
<pre>chmod +x jdk-6u13-linux-i586-rpm.bin
./jdk-6u13-linux-i586-rpm.bin</pre>
</blockquote>
<p>Download Apache ANT and install it:</p>
<blockquote>
<pre>cd /opt
tar -zxvf apache-ant-1.7.1-bin.tar.gz</pre>
</blockquote>
<p>Download the EC2 tools and install them:</p>
<blockquote>
<pre>cd /opt
unzip /root/ec2-ami-tools-1.3-26357.zip
unzip /root/ec2-api-tools-1.3-30349.zip</pre>
</blockquote>
<p>Some environment variables need to be present for Eucalyptus to work. Edit the file /etc/profile and add the following:</p>
<blockquote>
<pre>export JAVA_HOME=/usr/java/jdk1.6.0_13
export EC2_HOME=/opt/ec2-api-tools-1.3-30349
export EC2_AMITOOL_HOME=/opt/ec2-ami-tools-1.3-26357
export PATH=$PATH:/opt/apache-ant-1.7.1/bin:$EC2_HOME/bin:$EC2_AMITOOL_HOME/bin</pre>
</blockquote>
<p>Install some dependencies:</p>
<blockquote>
<pre>yum install dhcp xen-libs bridge-utils</pre>
</blockquote>
<p>Download the Eucalyptus files and extract the RPM dependencies file:</p>
<blockquote>
<pre>tar -zxvf eucalyptus-rpm-deps-i386.tar.gz</pre>
</blockquote>
<p>Install the Eucalyptus RPMs:</p>
<blockquote>
<pre>rpm -Uvh euca-axis2c-1.4-1.i386.rpm
         euca-httpd-1.4-1.i386.rpm
         euca-libvirt-1.4-1.i386.rpm
         eucalyptus-1.4-2.i386.rpm
         eucalyptus-cloud-1.4-2.i386.rpm
         eucalyptus-gl-1.4-2.i386.rpm
         eucalyptus-cc-1.4-2.i386.rpm</pre>
</blockquote>
<p>The configuration file /opt/eucalyptus/etc/eucalyptus/eucalyptus.conf contains the following for our setup:</p>
<blockquote>
<pre>EUCALYPTUS="/opt/eucalyptus"
START_CLOUD="Y"
START_CC="Y"
START_NC="N"
ENABLE_WS_SECURITY="Y"
LOGLEVEL="DEBUG"
CLOUD_PORT="8773"
CLOUD_SSL_PORT="8443"
CC_PORT="8774"
SCHEDPOLICY="GREEDY"
NODES="192.168.1.1 192.168.1.2 192.168.1.3"
NC_SERVICE="axis2/services/EucalyptusNC"
NC_PORT="8775"
VNET_INTERFACE="eth0"
VNET_DHCPDAEMON="/usr/sbin/dhcpd"
VNET_MODE="MANAGED"
VNET_SUBNET="10.0.0.0"
VNET_NETMASK="255.0.0.0"
VNET_DNS="172.16.0.1"
VNET_ADDRSPERNET="64"
VNET_PUBLICIPS="172.16.0.11 172.16.0.12 172.16.0.13 172.16.0.14"</pre>
</blockquote>
<p><strong>Compute nodes</strong></p>
<p><img class="alignnone size-full wp-image-724" title="eucalyptus-compute-node" src="http://www.jansipke.nl/wp-content/uploads/eucalyptus-compute-node.gif" alt="eucalyptus-compute-node" width="242" height="93" /></p>
<p>The compute nodes have one network interface (eth0) which is connected to the front-end and they have IP addresses ranging from 192.168.1.1 to 192.168.1.3 (for three compute nodes).</p>
<p>We start by disabling SELinux. This is accomplished by editing the file /etc/selinux/config:</p>
<blockquote>
<pre>SELINUX=disabled</pre>
</blockquote>
<p>Now reboot for this change to take effect.</p>
<p>Start with a clean iptables firewall:</p>
<blockquote>
<pre>iptables --flush
iptables --table nat --flush
iptables --delete-chain
iptables --table nat --delete-chain</pre>
</blockquote>
<p>Make the changes permanent by running:</p>
<blockquote>
<pre>/etc/init.d/iptables save</pre>
</blockquote>
<p>Install Xen:</p>
<blockquote>
<pre>yum install xen</pre>
</blockquote>
<p>Make sure the correct kernel with xen enabled is started at boot by editing the file /boot/grub/menu.lst:</p>
<blockquote>
<pre>default=0</pre>
</blockquote>
<p>And reboot.</p>
<p>Download the Eucalyptus files and extract the RPM dependencies file:</p>
<blockquote>
<pre>tar -zxvf eucalyptus-rpm-deps-i386.tar.gz</pre>
</blockquote>
<p>Install the Eucalyptus RPMs:</p>
<blockquote>
<pre>rpm -Uvh euca-axis2c-1.4-1.i386.rpm
euca-libvirt-1.4-1.i386.rpm
euca-httpd-1.4-1.i386.rpm
eucalyptus-1.4-2.i386.rpm
eucalyptus-gl-1.4-2.i386.rpm
eucalyptus-nc-1.4-2.i386.rpm</pre>
</blockquote>
<p>Make a directory for holding the running instances:</p>
<blockquote>
<pre>mkdir -p /usr/local/instances</pre>
</blockquote>
<p>The configuration file /opt/eucalyptus/etc/eucalyptus/eucalyptus.conf contains the following for our setup:</p>
<blockquote>
<pre>EUCALYPTUS="/opt/eucalyptus"
START_CLOUD="N"
START_CC="N"
START_NC="Y"
ENABLE_WS_SECURITY="Y"
LOGLEVEL="DEBUG"
NC_PORT="8775"
INSTANCE_PATH="/usr/local/instances"
VNET_INTERFACE="peth0"
VNET_BRIDGE="xenbr0"
VNET_MODE="MANAGED"</pre>
</blockquote>
<p>Start Eucalyptus by running:</p>
<blockquote>
<pre>/etc/init.d/eucalyptus start</pre>
</blockquote>
<p><strong>Back to the front-end</strong></p>
<p>Start Eucalyptus by running:</p>
<blockquote>
<pre>/etc/init.d/eucalyptus start</pre>
</blockquote>
<p>If all went according to plan, the following website should be viewable: https://172.16.0.254:8443. Login with username admin and password admin. Add a cluster with a name you like, e.g. my_cluster, and the IP address of the front-end, in our case 172.16.0.254.</p>
<p>Now download the x509 certificate to be able to connect to the Eucalyptus setup. Unzip the contents of this file:</p>
<blockquote>
<pre>mkdir /root/.euca
cd /root/.euca
unzip /root/euca2-admin-x509.zip</pre>
</blockquote>
<p>There is a file containing aliases for several commands you run that needs to be sourced every time you login. It is easier to do this automatically, so edit the file ~/.bash_profile and add this line to the end:</p>
<blockquote>
<pre>source /root/.euca/eucarc</pre>
</blockquote>
<p>Synchronise the keys between all the hosts:</p>
<blockquote>
<pre>/opt/eucalyptus/usr/sbin/euca_sync_key -c /opt/eucalyptus/etc/eucalyptus/eucalyptus.conf</pre>
</blockquote>
<p>Install ruby to be able to run the EC2 command line tools:</p>
<blockquote>
<pre>yum install ruby</pre>
</blockquote>
<p>You can now see if the EC2 command line tools and Eucalyptus are working:</p>
<blockquote>
<pre>ec2-describe-availability-zones verbose</pre>
</blockquote>
<p>This should give you an overview of the running system, with a listing of the compute nodes and the capacity of them in terms of number of running instances they can hold.</p>
<p>Extract the example VM image from Eucalyptus:</p>
<blockquote>
<pre>tar -zxvf euca-ttylinux.tgz</pre>
</blockquote>
<p>Bundle the image, upload it and register it:</p>
<blockquote>
<pre>ec2-bundle-image --image /root/ttylinux/vmlinuz-2.6.16.33-xen --kernel true
ec2-upload-bundle --bucket kernel-bucket --manifest /tmp/vmlinuz-2.6.16.33-xen.manifest.xml
ec2-register kernel-bucket/vmlinuz-2.6.16.33-xen.manifest.xml

ec2-bundle-image --image /root/ttylinux/ttylinux.img
ec2-upload-bundle --bucket image-bucket --manifest /tmp/ttylinux.img.manifest.xml
ec2-register image-bucket/ttylinux.img.manifest.xml</pre>
</blockquote>
<p>If all went well, you can list the images just uploaded:</p>
<blockquote>
<pre>ec2-describe-images</pre>
</blockquote>
<p>Add a keypair for the current user to Eucalyptus:</p>
<blockquote>
<pre>ec2-add-keypair admin_key &gt; /root/admin_key.private
chmod 0600 /root/admin_key.private</pre>
</blockquote>
<p>Run a VM (change emi-F4CB118E with the emi-identifier returned by ec2-describe-images):</p>
<blockquote>
<pre>ec2-run-instances emi-F4CB118E -k admin_key</pre>
</blockquote>
<p>Get a list of instances:</p>
<blockquote>
<pre>ec2-describe-instances</pre>
</blockquote>
<p>To see the console output of the running instance (change i-3F170798 with the instance-identifier returned by ec2-describe-instances):</p>
<blockquote>
<pre>ec2-get-console-output i-3F170798</pre>
</blockquote>
]]></content:encoded>
			<wfw:commentRss>http://www.jansipke.nl/installing-eucalyptus-on-centos/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Disabling default security on CentOS</title>
		<link>http://www.jansipke.nl/disabling-default-security-on-centos</link>
		<comments>http://www.jansipke.nl/disabling-default-security-on-centos#comments</comments>
		<pubDate>Wed, 01 Apr 2009 15:17:58 +0000</pubDate>
		<dc:creator>jansipke</dc:creator>
				<category><![CDATA[Security]]></category>
		<category><![CDATA[CentOS]]></category>
		<category><![CDATA[iptables]]></category>
		<category><![CDATA[SELinux]]></category>

		<guid isPermaLink="false">http://www.jansipke.nl/?p=153</guid>
		<description><![CDATA[Everybody wants their stuff to be secure, until they actually try to use it. That&#8217;s the reason for this tidbit about disabling the default security on CentOS. SELinux is enabled by default on CentOS. To disable it, we need to edit /etc/selinux/config: SELINUX=disabled We need to reboot the machine for this to take effect. The [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignnone size-full wp-image-619" title="lock" src="http://www.jansipke.nl/wp-content/uploads/lock.gif" alt="lock" width="60" height="60" /></p>
<p>Everybody wants their stuff to be secure, until they actually try to use it. That&#8217;s the reason for this tidbit about disabling the default security on CentOS.</p>
<p>SELinux is enabled by default on CentOS. To disable it, we need to edit /etc/selinux/config:</p>
<blockquote>
<pre>SELINUX=disabled</pre>
</blockquote>
<p>We need to reboot the machine for this to take effect.</p>
<p>The firewall iptables has some default rules we want to get rid of:</p>
<blockquote>
<pre>iptables --flush
iptables --table nat --flush
iptables --delete-chain
iptables --table nat --delete-chain</pre>
</blockquote>
<p>To make these changes permanent, we can save the current rules:</p>
<blockquote>
<pre>/etc/init.d/iptables save</pre>
</blockquote>
]]></content:encoded>
			<wfw:commentRss>http://www.jansipke.nl/disabling-default-security-on-centos/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Network configuration on CentOS</title>
		<link>http://www.jansipke.nl/network-configuration-on-centos</link>
		<comments>http://www.jansipke.nl/network-configuration-on-centos#comments</comments>
		<pubDate>Fri, 01 Aug 2008 17:21:19 +0000</pubDate>
		<dc:creator>jansipke</dc:creator>
				<category><![CDATA[Networking]]></category>
		<category><![CDATA[Bonding]]></category>
		<category><![CDATA[CentOS]]></category>
		<category><![CDATA[Static IP]]></category>

		<guid isPermaLink="false">http://www.jansipke.nl/?p=126</guid>
		<description><![CDATA[Static IP address Assigning a static IP address on CentOS is accomplished by editing the files in the directory /etc/sysconfig/network-scripts. For example, assign a static IP address to interface eth0 by editing /etc/sysconfig/network-scripts/ifcfg-eth0: DEVICE=eth0 BOOTPROTO=none IPADDR=192.168.0.123 NETMASK=255.255.255.0 GATEWAY=192.168.0.1 ONBOOT=yes Network interface bonding To achieve higher bandwidth and/or reliability, network interfaces can be bonded. First, edit [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignnone size-full wp-image-625" title="network" src="http://www.jansipke.nl/wp-content/uploads/network.gif" alt="network" width="60" height="60" /></p>
<p><strong>Static IP address</strong></p>
<p>Assigning a static IP address on CentOS is accomplished by editing the files in the directory /etc/sysconfig/network-scripts. For example, assign a static IP address to interface eth0 by editing /etc/sysconfig/network-scripts/ifcfg-eth0:</p>
<blockquote>
<pre>DEVICE=eth0
BOOTPROTO=none
IPADDR=192.168.0.123
NETMASK=255.255.255.0
GATEWAY=192.168.0.1
ONBOOT=yes</pre>
</blockquote>
<p><strong>Network interface bonding</strong></p>
<p>To achieve higher bandwidth and/or reliability, network interfaces can be bonded. First, edit the file /etc/sysconfig/network-scripts/ifcfg-bond0:</p>
<blockquote>
<pre>DEVICE=bond0
BOOTPROTO=none
IPADDR=10.0.0.1
NETMASK=255.255.255.0
ONBOOT=yes</pre>
</blockquote>
<p>After that, you need to edit the network interfaces that are part of this bond, e.g. eth1 and eth2. Let&#8217;s start with /etc/sysconfig/network-scripts/ifcfg-eth1:</p>
<blockquote>
<pre>DEVICE=eth1
BOOTPROTO=none
MASTER=bond0
SLAVE=yes
ONBOOT=yes</pre>
</blockquote>
<p>Then edit /etc/sysconfig/network-scripts/ifcfg-eth2:</p>
<blockquote>
<pre>DEVICE=eth2
BOOTPROTO=none
MASTER=bond0
SLAVE=yes
ONBOOT=yes</pre>
</blockquote>
<p>The last file to edit is /etc/modprobe.conf:</p>
<blockquote>
<pre>alias bond0 bonding
options bond0 mode=active-backup miimon=100</pre>
</blockquote>
<p>The mode value in this last file can be one of several:</p>
<ul>
<li>balance-rr</li>
<li>active-backup</li>
<li>balance-xor</li>
<li>802.3ad</li>
<li>balance-tlb</li>
<li>balance-alb</li>
</ul>
<p>In the active-backup mode shown in the example, only one slave in the bond is active. A different slave becomes  active if, and only if, the active slave fails. The bond&#8217;s MAC address is externally  visible on only one port (network interface) to avoid confusing the switch.</p>
<p>The option miimon (media-independent interface monitoring) defines how often, in milliseconds, link monitoring occurs.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jansipke.nl/network-configuration-on-centos/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Enabling NTP daemon on CentOS</title>
		<link>http://www.jansipke.nl/enabling-ntp-daemon-on-centos</link>
		<comments>http://www.jansipke.nl/enabling-ntp-daemon-on-centos#comments</comments>
		<pubDate>Fri, 01 Aug 2008 17:16:31 +0000</pubDate>
		<dc:creator>jansipke</dc:creator>
				<category><![CDATA[Networking]]></category>
		<category><![CDATA[CentOS]]></category>
		<category><![CDATA[NTP]]></category>

		<guid isPermaLink="false">http://www.jansipke.nl/?p=124</guid>
		<description><![CDATA[Here are the steps to take to enable the Network Time Protocol (NTP) daemon on CentOS. Change the timeserver value to one that is close to you. yum install system-config-date ntpdate nl.pool.ntp.org service ntpd start chkconfig ntpd on]]></description>
			<content:encoded><![CDATA[<p><img class="alignnone size-full wp-image-628" title="clock" src="http://www.jansipke.nl/wp-content/uploads/clock.gif" alt="clock" width="70" height="70" /></p>
<p>Here are the steps to take to enable the Network Time Protocol (NTP) daemon on CentOS. Change the timeserver value to one that is close to you.</p>
<blockquote>
<pre>yum install system-config-date
ntpdate nl.pool.ntp.org
service ntpd start
chkconfig ntpd on</pre>
</blockquote>
]]></content:encoded>
			<wfw:commentRss>http://www.jansipke.nl/enabling-ntp-daemon-on-centos/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

