<?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; Eucalyptus</title>
	<atom:link href="http://www.jansipke.nl/tag/eucalyptus/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>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>Fetching meta-data and user-data in Eucalyptus</title>
		<link>http://www.jansipke.nl/fetching-meta-data-and-user-data-in-eucalyptus</link>
		<comments>http://www.jansipke.nl/fetching-meta-data-and-user-data-in-eucalyptus#comments</comments>
		<pubDate>Mon, 13 Apr 2009 20:08:48 +0000</pubDate>
		<dc:creator>jansipke</dc:creator>
				<category><![CDATA[Cloud computing]]></category>
		<category><![CDATA[Eucalyptus]]></category>

		<guid isPermaLink="false">http://www.jansipke.nl/?p=160</guid>
		<description><![CDATA[Eucalyptus is a cloud computing platform that is intended to be API compatible with Amazon&#8217;s EC2, but can be installed on your own machines. In the latest stable version available at the time of writing, version 1.4, there is a catch in fetching meta-data and user-data. According to Amazon&#8217;s API description, you can get the [...]]]></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 />
Eucalyptus is a cloud computing platform that is intended to be API compatible with Amazon&#8217;s EC2, but can be installed on your own machines. In the latest stable version available at the time of writing, version 1.4, there is a catch in fetching meta-data and user-data. According to Amazon&#8217;s API description, you can get the meta-data by doing an HTTP GET on the URL:</p>
<blockquote>
<pre>http://169.254.169.254/latest/meta-data</pre>
</blockquote>
<p>However, this doesn&#8217;t work in Eucalyptus 1.4. The correct host to fetch this data from is the gateway for the running instance and the port is 8773. This little script will print the correct host and port:</p>
<blockquote>
<pre>echo http://$(route -n | awk '$4 ~ ".*G.*" {print $2}'):8773/</pre>
</blockquote>
<p><strong>Meta-data</strong></p>
<p>You can fetch a list of meta-data keys by getting /latest/meta-data. Fetching the value for a key is as easy as getting /latest/meta-data/key. The following table shows an example of the keys and associated values:</p>
<table border="1">
<tbody>
<tr>
<td>local-ipv4</td>
<td>10.0.2.3</td>
</tr>
<tr>
<td>reservation-id</td>
<td>r-412F078F</td>
</tr>
<tr>
<td>local-hostname</td>
<td>10.0.2.3</td>
</tr>
<tr>
<td>security-groups</td>
<td>[default]</td>
</tr>
<tr>
<td>product-codes</td>
<td>not yet supported.</td>
</tr>
<tr>
<td>ami-launch-index</td>
<td>0</td>
</tr>
<tr>
<td>public-hostname</td>
<td>192.168.1.3</td>
</tr>
<tr>
<td>hostname</td>
<td>192.168.1.3</td>
</tr>
<tr>
<td>public-ipv4</td>
<td>192.168.1.3</td>
</tr>
<tr>
<td>ramdisk-id</td>
<td>emi-F4CB118E</td>
</tr>
<tr>
<td>kernel-id</td>
<td>eki-90591388</td>
</tr>
<tr>
<td>ami-id</td>
<td>emi-7C83135D</td>
</tr>
<tr>
<td>placement/</td>
<td>availability-zone</td>
</tr>
<tr>
<td>public-keys/</td>
<td>0=admin_key</td>
</tr>
<tr>
<td>ancestor-ami-ids</td>
<td>none</td>
</tr>
<tr>
<td>block-device-mapping</td>
<td>not yet supported.</td>
</tr>
<tr>
<td>ami-manifest-path</td>
<td>http://cloud1.example.org:8773/services/Walrus/ubuntu804-bucket/ubuntu.8-04.img.manifest.xml</td>
</tr>
<tr>
<td>instance-type</td>
<td>m1.small</td>
</tr>
<tr>
<td>instance-id</td>
<td>i-2ECA052C</td>
</tr>
</tbody>
</table>
<p><strong>User-data</strong></p>
<p>You can supply user-data as an option to ec2-run-instances:</p>
<blockquote>
<pre>ec2-run-instances &lt;emi&gt; -k &lt;key&gt; -d &lt;user-data&gt;</pre>
</blockquote>
<p>This data is fetched by getting /latest/user-data.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jansipke.nl/fetching-meta-data-and-user-data-in-eucalyptus/feed</wfw:commentRss>
		<slash:comments>0</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>
	</channel>
</rss>

