<?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>RoAkSoAx's Weblog &#187; cluster</title>
	<atom:link href="http://www.roaksoax.com/tag/cluster/feed" rel="self" type="application/rss+xml" />
	<link>http://www.roaksoax.com</link>
	<description>My Personal Blog</description>
	<lastBuildDate>Thu, 05 May 2011 15:20:23 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3</generator>
		<item>
		<title>HA Cluster Stack Session at UDS-O</title>
		<link>http://www.roaksoax.com/2011/05/ha-cluster-stack-session-at-uds-o</link>
		<comments>http://www.roaksoax.com/2011/05/ha-cluster-stack-session-at-uds-o#comments</comments>
		<pubDate>Thu, 05 May 2011 14:56:34 +0000</pubDate>
		<dc:creator>roaksoax</dc:creator>
				<category><![CDATA[Planet]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[cluster]]></category>
		<category><![CDATA[ha]]></category>

		<guid isPermaLink="false">http://www.roaksoax.com/?p=773</guid>
		<description><![CDATA[Thursday the 12th at noon we will be having the HA Cluster Stack session. In the session we will discuss the following: Discuss the adoption of new upstream releases of the HA Cluster Stack to include in Oneiric in preparation for the next Ubuntu LTS release. Finish up work items from previous sessions (mainly documentation). [...]]]></description>
			<content:encoded><![CDATA[<p><em><strong>Thursday the 12th at noon</strong></em> we will be having the HA Cluster Stack session. In the session we will discuss the following:</p>
<ul>
<li>Discuss the adoption of new upstream releases of the HA Cluster Stack to include in Oneiric in preparation for the next Ubuntu LTS release.</li>
<li>Finish up work items from previous sessions (mainly documentation).</li>
<li>Gather feature requests and discuss the creation of meta-packages.</li>
<li>And, if the time allows us, I&#8217;d like to follow up with HA for OpenStack as they had a session in their Design Summit about it.</li>
</ul>
<p>If you are interested of the Future of HA Clustering in Ubuntu, you are more than welcome to join this session. For more information the blueprint can be found <em><strong><a href="https://blueprints.launchpad.net/ubuntu/+spec/server-o-cluster-stack">HERE</a>.</strong></em></p>
]]></content:encoded>
			<wfw:commentRss>http://www.roaksoax.com/2011/05/ha-cluster-stack-session-at-uds-o/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>UPDATED: Cluster Stack and PowerNap sessions at UDS-N</title>
		<link>http://www.roaksoax.com/2010/10/cluster-stack-and-powernap-session-at-uds-n</link>
		<comments>http://www.roaksoax.com/2010/10/cluster-stack-and-powernap-session-at-uds-n#comments</comments>
		<pubDate>Sat, 23 Oct 2010 20:53:48 +0000</pubDate>
		<dc:creator>roaksoax</dc:creator>
				<category><![CDATA[Planet]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[cluster]]></category>
		<category><![CDATA[cluster stack]]></category>
		<category><![CDATA[powernap]]></category>
		<category><![CDATA[uec]]></category>

		<guid isPermaLink="false">http://www.roaksoax.com/?p=665</guid>
		<description><![CDATA[At UDS-N (Natty) I&#8217;ll be leading these two sessions: Cluster Stack for Natty The Cluster stack session will be divided in two main parts. The first part we will discuss the current status of the Cluster Stack in Ubuntu, things that have been and haven&#8217;t been achieved so far, as well as the features we [...]]]></description>
			<content:encoded><![CDATA[<p>At UDS-N (Natty) I&#8217;ll be leading these two sessions:</p>
<ul>
<li><strong>Cluster Stack for Natty</strong><br />
<span style="font-weight: normal;">The Cluster stack session will be divided in two main parts. The first part we will discuss the current status of the Cluster Stack in Ubuntu, things that have been and haven&#8217;t been achieved so far, as well as the features we would like to see in the future. The second part of the session will be concentrated in the integration of the Cluster Stack with the Ubuntu Enterprise Cloud (UEC).</p>
<p>The outcome of the discussion is:</p>
<ul>
<li>Merge library split changes for cluster-glue, pacemaker from debian packages.</li>
<li>Complete MIR requests to finally get packages into Main.</li>
<li>Improve documentation, and add it to the Ubuntu Server Guide.
<ul>
<li>Docs: HA Apache2, HA MySQL, CLVM, Recommend a Cluster FS &#8211; OCFS2, Fecing, etc.</li>
</ul>
</li>
<li>Automated Deployment (Look into deploying with puppet.).
<ul>
<li>Simple: Join a simple cluster/Virtual IP.</li>
<li>Advanced: CLVM, DRBD, Filesystems.</li>
</ul>
</li>
<li>Meta-packages / Tasksel to install and join a Cluster.</li>
<li>HA for UEC.
<ul>
<li>Continue with the research on HA for CLC, Walrus, CC, SC</li>
<li>Eventually, write OCF RA&#8217;s for above components.</li>
</ul>
</li>
<li>Investigate on providing HA *inside* the Cloud.</li>
</ul>
<p></span></li>
</ul>
<ul>
<li><strong>PowerNap Improvements</strong><br />
<span style="font-weight: normal;">PowerNap is a power management tool, created by <a href="http://blog.dustinkirkland.com/">Dustin Kirkland</a>, that has been integrated with the Ubuntu Enterprise Cloud. However, this sessions we will discuss how to extend the functionality of PowerNap to make it available for other kinds of environments, as well as providing alternative methods of power savings for Servers.</p>
<p>The outcome of the discussion is:</span></p>
<ul>
<li>Investigate how PowerNap could tap into Upstart to monitor processes in an event driven manner rather than polling /proc.</li>
<li>Use pm-powersave for PowerNap new power save mode.</li>
<li>Contribute any new actions to pm-utils (rather keeping in PowerNap)</li>
<li>Use event based monitoring for input polling (limited to keyboard and mouse)</li>
<li>Get network monitor matching the MAC in the WoL.</li>
<li>Provide a powerwaked to track machines registered and be able to schedule poweroff&#8217;s/updates.</li>
</ul>
</li>
</ul>
<p>If you would like to know more and you are not attending to UDS personally, you can still participate remotely. Or, you can just show up at the session. I hope to see there anyone who&#8217;s interested.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.roaksoax.com/2010/10/cluster-stack-and-powernap-session-at-uds-n/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>UPDATE: High Availability for the Ubuntu Enterprise Cloud (UEC) &#8211; Cloud Controller (CLC)</title>
		<link>http://www.roaksoax.com/2010/10/high-availability-uec-clc-howto</link>
		<comments>http://www.roaksoax.com/2010/10/high-availability-uec-clc-howto#comments</comments>
		<pubDate>Fri, 15 Oct 2010 15:51:50 +0000</pubDate>
		<dc:creator>roaksoax</dc:creator>
				<category><![CDATA[Planet]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[cloud]]></category>
		<category><![CDATA[cluster]]></category>
		<category><![CDATA[DRBD]]></category>
		<category><![CDATA[ha]]></category>
		<category><![CDATA[heartbeat]]></category>
		<category><![CDATA[high availability]]></category>
		<category><![CDATA[pacemaker]]></category>
		<category><![CDATA[uec]]></category>

		<guid isPermaLink="false">http://www.roaksoax.com/?p=572</guid>
		<description><![CDATA[UPDATE So I finally had the time to write the OCF Resource Agent for the Cloud Controller as promised. It is an early Resource Agent and currently is tested for CLC&#8217;s running in Ubuntu ONLY (UEC). But first what is an OCF Resource Agent? An OCF RA is an executable script that is used to [...]]]></description>
			<content:encoded><![CDATA[<p style="text-align: justify;"><span style="font-weight: normal;"><strong><span style="color: #ff0000;">UPDATE</span></strong><br />
So I finally had the time to write the OCF Resource Agent for the Cloud Controller as promised. It is an early Resource Agent and currently is tested for CLC&#8217;s running in Ubuntu ONLY (UEC).</span></p>
<p><span style="font-weight: normal;">But first what is an OCF Resource Agent? An OCF RA is an executable script that is used to manage a resource within a cluster. In this case, this RA is a script that will manage the resource (Cloud Controller) in a 2 node pacemaker based HA Cluster. The resource starts, stops, and monitors the service (Cloud Controller) when the Cluster Resource Manager (Pacemaker) indicates it to (This means that upstart will NOT start the CLC).</span></p>
<p><span style="font-weight: normal;">Now that we all know what are OCF RA&#8217;s, let&#8217;s test it: First download the RA from <strong><em><a href="http://people.ubuntu.com/~andreserl/eucaclc">HERE</a></em></strong> and <strong>move</strong> the resource to:</span></p>
<blockquote><p><span style="font-weight: normal;"> </span><code>wget -c <a href="http://people.ubuntu.com/~andreserl/eucaclc">http://people.ubuntu.com/~andreserl/eucaclc</a><br />
sudo mkdir /usr/lib/ocf/resource.d/ubuntu<br />
sudo mv eucaclc /usr/lib/ocf/resource.d/ubuntu/eucaclc<br />
sudo chmod 755 /usr/lib/ocf/resource.d/ubuntu/eucaclc</code></p></blockquote>
<p><span style="font-weight: normal;">Then, change the cluster configuration (<strong>sudo crm configure edit</strong>) for <em>res_uec </em>resource<em> </em>as follows:</span></p>
<p><span style="font-weight: normal;"><span style="font-family: monospace;">primitive res_uec ocf:ubuntu:eucaclc op monitor interval=&#8221;20s&#8221;</span></span></p>
<p>And the new RA should start the Cloud Controller automatically and keep monitoring it.</p>
<p><span style="color: #ff0000;"><strong>NOTE: </strong>Please note that this Resource Agent is an initial draft and might be buggy. If you find any bugs or things don&#8217;t work as expected, please don&#8217;t hesitate to contact me. </span></p>
<p style="text-align: justify;">At UDS-M, I raised the concern of the lack of High Availability for the Ubuntu Enterprise Cloud (UEC). As part as the Cluster Stack Blueprint, the effort of trying to bring HA to UEC was defined, however, it was barely discussed due to the lack of time, and the work on HA for the UEC has been deferred for Natty. However, in preparation for the next release cycle, I&#8217;ve been able to setup a two node HA Cluster (Master/Slave) for the Cloud Controller (CLC).</p>
<p style="text-align: justify;"><strong>NOTE: </strong>Note that this tutorial is an early draft and might contain typos/erros that I might have not noticed. Also, this might not also work for you, that&#8217;s why I first recommend to have a UEC up and running with one CLC, and then add the second CLC. If you need help or guidance, you know where to find me <img src='http://www.roaksoax.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> . Also note that this is only for <strong>testing purposes!, </strong>and I&#8217;ll be moving this HowTo to an Ubuntu Wiki page soon since the formatting seems to be somehow annoying <img src='http://www.roaksoax.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> .</p>
<p style="text-align: justify;"><strong>1. Installation Considerations<br />
</strong>I&#8217;ll show you how to configure two UEC (eucalyptus) Cloud Controllers in High Availability (Active/Passive) , using the HA Clustering tools (Pacemaker, Heartbeat), and DRBD for replication between CLC&#8217;s. This is shown in the following image.</p>
<p style="text-align: justify;"><a href="http://www.roaksoax.com/wp-content/uploads/2010/10/HA-for-CLC.png"><img class="aligncenter size-medium wp-image-649" title="HA-for-CLC" src="http://www.roaksoax.com/wp-content/uploads/2010/10/HA-for-CLC-300x117.png" alt="" width="300" height="117" /></a></p>
<p style="text-align: justify;">The setup I used is a 4 node setup, 1 CLC, 1 Walrus, 1 CC/SC, 1 NC, as it is detailed in the UEC <em><a href="https://help.ubuntu.com/community/UEC/PackageInstallSeparate">Advanced Installation Doc</a>, </em>however, I installed the packages from the Ubuntu Server Installer. Now, as per the UEC <em><a href="https://help.ubuntu.com/community/UEC/PackageInstallSeparate">Advanced Installation Doc</a>, </em>it is assumed that there is only one network interface (eth0) in the Cloud Controller connected to a &#8220;public network&#8221; that connects it to both, the outside world and the other components in the Cloud. However, to be able to provide HA be need the following requirements:</p>
<ul>
<li>First, we need a <strong><em>Virtual IP (VIP)<span style="font-weight: normal;"> <span style="font-style: normal;">to allow both, the clients and the other Controllers to access either one of the CLC&#8217;s using that single IP. In this case, we are assuming that the &#8220;public network&#8221; is <strong>192.168.0.0/24, </strong>and that the <strong>VIP</strong> is 192.168.0.100<strong>. </strong>This VIP will also be used to generate the new certificates.</span></span></em></strong></li>
<li>Second, we need to add a second network interface to the CLC&#8217;s to use it as a replication link between DRBD. This second interface is eth1 and will have address ranged in <strong>10.10.10.0/30</strong>.</li>
</ul>
<p style="text-align: justify;"><strong> </strong><strong>2. Install Second Cloud Controller (CLC2)<br />
<span style="font-weight: normal;">Once you finish setting up the UEC and everything is working as expected, please install a second cloud controller. </span></strong><strong> </strong>Once installed, it is desirable to not start the services just yet. However, you will need to exchange the <strong><em>CLC</em></strong> ssh keys with both the<strong><em> CC</em></strong> and the <strong><em>Walrus</em></strong> as it is specified in <a href="https://help.ubuntu.com/community/UEC/PackageInstallSeparate#STEP 4: Register the Cluster, Storage, and Walrus Servers"><strong><em>SSH Key Authentication Setup, under STEP4 of the UEC Advanced Installation doc</em></strong></a>. Please note that this second CLC will also have two interfaces, eth0 and eth1. Leave eth1 unconfigured, but configure eth0 with an IP address in the same network as the other controllers.</p>
<p style="text-align: justify;"><strong>3. Configure Second Network Interface<br />
<span style="font-weight: normal;">Once the two CLC&#8217;s are installed (CLC1 and CLC2), we need to configure </span><em>eth1<span style="font-weight: normal;">. </span><span style="font-style: normal;"><span style="font-weight: normal;">This interface will be used as a</span> direct link <span style="font-weight: normal;">between CLC1 and CLC2 and will be used by DRBD as the replication link. In this example, we&#8217;ll be using 10.10.10.0/30. On your</span><em> /etc/network/interfaces</em><span style="font-weight: normal;">.</span></span></em></strong></p>
<p style="text-align: justify; padding-left: 30px;"><em><span style="font-style: normal;"><span style="font-weight: normal;"><strong>On </strong></span><span style="font-weight: normal;"><em><strong>CLC1</strong></em></span><span style="font-weight: normal;"><strong>:</strong></span></span></em></p>
<blockquote>
<p><code></p>
<p style="padding-left: 30px;"><span style="font-style: normal;">auth eth1<br />
</span><span style="font-style: normal;">iface eth1 inet static<br />
</span><span style="font-style: normal; padding-left: 30px;">address 10.10.10.1<br />
</span><span style="font-style: normal; padding-left: 30px;">netmask 255.255.255.252</span></p>
<p></code></p></blockquote>
<p style="padding-left: 30px;"><em><strong>On CLC2</strong></em><span style="font-weight: normal;"><strong>:</strong></span></p>
<blockquote>
<p><code></p>
<p style="padding-left: 30px;"><span style="font-style: normal;">auth eth1<br />
</span><span style="font-style: normal;">iface eth1 inet static<br />
</span><span style="font-style: normal; padding-left: 30px;">address 10.10.10.2<br />
</span><span style="font-style: normal; padding-left: 30px;">netmask 255.255.255.252</span></p>
<p></code></p></blockquote>
<p><em><span style="font-style: normal;"><span style="font-weight: normal;"><strong>NOTE: </strong>Do <strong>*NOT*</strong> add the <strong>gateway </strong>because it is a direct link between CLC&#8217;s. If we add it, it will create a default route the configuration of the resources will fail further along the way.</span></span></em></p>
<p><strong>4. Setting up DRBD</strong></p>
<p>Once the CLC2 is installed and configured, we need to setup DRBD for replication between CLC&#8217;s.</p>
<p style="padding-left: 30px;"><strong>4.1. Create Partitions (CLC1/CLC2)<br />
</strong>For this, we either need a new disk or disk partition. In my case, I&#8217;ll be using /dev/vdb1. Please note that both partitions need to be exactly equal in both nodes. You can create them whichever way you prefer.</p>
<p style="padding-left: 30px;"><strong>4.2. Install DRBD and load module <strong>(CLC1/CLC2)</strong><br />
<span style="font-weight: normal;"><span style="font-weight: normal;">Now we need to install DRBD Utils.</span></span></strong></p>
<blockquote>
<p><code></p>
<p style="padding-left: 30px;">sudo apt-get install drbd</p>
<p></code></p></blockquote>
<p style="padding-left: 30px;">Once it is installed, we need to load the kernel module, and add it is /etc/modules. Please note that DRBD Kernel Module is now included in mainline kernel.</p>
<blockquote>
<p><code></p>
<p style="padding-left: 30px;">sudo modprobe drbd<br />
sudo -i<br />
echo drbd &gt;&gt; /etc/modules</p>
<p></code></p></blockquote>
<p style="padding-left: 30px;"><strong>4.3. Configuring the DRBD resource (CLC1/CLC2)<br />
<span style="font-weight: normal;">Add a new resource for DRBD by editing the following file:</span></strong></p>
<blockquote>
<p><code></p>
<p style="padding-left: 30px;"><strong><span style="font-weight: normal;">sudo vim /etc/drbd.d/uec-clc.res</span></strong></p>
<p></code></p></blockquote>
<p style="padding-left: 30px;"><strong><span style="font-weight: normal;">The configuration looks similar as the following:</span></strong></p>
<blockquote>
<p><code></p>
<div id="_mcePaste" style="padding-left: 30px;">resource uec-clc {</div>
<div id="_mcePaste" style="padding-left: 60px;">device /dev/drbd0;</div>
<div id="_mcePaste" style="padding-left: 60px;">disk /dev/vdb1;</div>
<div id="_mcePaste" style="padding-left: 60px;">meta-disk internal;</div>
<div id="_mcePaste" style="padding-left: 60px;">on clc1 {</div>
<div id="_mcePaste" style="padding-left: 90px;">address 10.10.10.1:7788;</div>
<div id="_mcePaste" style="padding-left: 60px;">}</div>
<div id="_mcePaste" style="padding-left: 60px;">on clc2 {</div>
<div id="_mcePaste" style="padding-left: 90px;">address 10.10.10.2:7788;</div>
<div id="_mcePaste" style="padding-left: 60px;">}</div>
<div id="_mcePaste" style="padding-left: 60px;">syncer {</div>
<div id="_mcePaste" style="padding-left: 90px;">rate 10M;</div>
<div id="_mcePaste" style="padding-left: 60px;">}</div>
<div id="_mcePaste" style="padding-left: 30px;">}</div>
<p></code></p></blockquote>
<p style="padding-left: 30px;"><strong>4.4. Creating the resource (CLC1/CLC2)<br />
<span style="font-weight: normal;">Now we need to do the following on CLC1 and CLC2:</span></strong></p>
<blockquote>
<p><code></p>
<p style="padding-left: 30px;">sudo drbdadm create-md uec-clc<br />
sudo drbdadm up uec-clc</p>
<p></code></p></blockquote>
<p style="padding-left: 30px;"><strong>4.5. Establishing initial communication (</strong><span style="font-weight: 800;">CLC1)<br />
<span style="font-weight: normal;">Now, we need to do the following:</span></span></p>
<blockquote>
<p><code></p>
<p style="padding-left: 30px;">sudo drbdadm -- --clear-bitmap new-current-uuid uec-clc<br />
sudo drbdadm primary uec-clc<br />
mkfs -t ext4 /dev/drbd0</p>
<p></code></p></blockquote>
<p style="padding-left: 30px;"><span style="font-weight: 800;">4.6. Copying the Cloud Controller Data for DRBD Replication (CLC1)<br />
<span style="font-weight: normal;">Once the DRBD nodes are in sync, we need have the data replicated between the CLC1 and the CLC2 and make the necessary changes so that they both can access the data at a given point in time. To do this, do the following in CLC1:</span></span></p>
<blockquote>
<p><code></p>
<p style="padding-left: 30px;"><span style="font-weight: 800;"><span style="font-weight: normal;">sudo mkdir /mnt/uecdata<br />
sudo mount -t ext4 /dev/drbd0 /mnt/uecdata<br />
sudo mv /var/lib/eucalyptus/ /mnt/uecdata<br />
sudo mv /var/lib/image-store-proxy/ /mnt/uecdata<br />
sudo ln -s /mnt/uecdata/eucalyptus/ /var/lib/eucalyptus<br />
sudo ln -s /mnt/uecdata/image-store-proxy/ /var/lib/image-store-proxy<br />
sudo umount /mnt/uecdata</span></span></p>
<p></code></p></blockquote>
<p style="padding-left: 30px;">What we did here is to move the Cloud Controller data to the DRBD mount point so that it get&#8217;s replicated to the second CLC, and then do a symlink from the mountpoint to the original data folders.</p>
<p style="padding-left: 30px;"><span style="font-weight: 800;">4.7. Preparing the second Cloud Controller (CLC2)<br />
<span style="font-weight: normal;">Once we prepared the data in CLC1, we can discard the data in CLC2, and we need to create the symlinks the same way we did in the CLC1. We do this as follows:</span></span></p>
<blockquote>
<p><code></p>
<p style="padding-left: 30px;"><span style="font-weight: 800;"><span style="font-weight: normal;">sudo mkdir /mnt/uecdata<br />
sudo rm -fr /var/lib/eucalyptus<br />
</span></span>sudo rm -fr /var/lib/image-store-proxy<br />
sudo ln -s /mnt/uecdata/eucalyptus/ /var/lib/eucalyptus<br />
sudo ln -s /mnt/uecdata/image-store-proxy/ /var/lib/image-store-proxy</p>
<p></code></p></blockquote>
<p style="padding-left: 30px;">After this, the data will be replicated via DRBD. Whenever CLC1.</p>
<p><strong>5. Setup the Cluster</strong></p>
<p style="padding-left: 30px;"><strong>5.1. Install the Cluster Tools<br />
<span style="font-weight: normal;">First we need to install the clustering tools:</span></strong></p>
<blockquote>
<p><code></p>
<p style="padding-left: 30px;">sudo apt-get install heartbeat pacemaker</p>
<p></code></p></blockquote>
<p style="padding-left: 30px;"><strong>5.2. Configure Heartbeat<br />
<span style="font-weight: normal;">Then we need to configure Heartbeat. First, create /etc/ha.d/ha.cf and add the following:</span></strong></p>
<p><strong> </strong></p>
<blockquote>
<p><code></p>
<p style="padding-left: 30px;"><span style="font-weight: normal;">autojoin none<br />
mcast eth0 239.0.0.43 649 1 0<br />
warntime 5<br />
deadtime 15<br />
initdead 60<br />
keepalive 2<br />
node clc1<br />
node clc2<br />
crm respawn</span></p>
<p></code></p></blockquote>
<p style="padding-left: 30px;">Then create the authentication file (/etc/ha.d/authkeys), ad add the following:</p>
<blockquote>
<p><code></p>
<p style="padding-left: 30px;">auth1<br />
1 md5 password</p>
<p></code></p></blockquote>
<p style="padding-left: 30px;">and change the permissions:</p>
<blockquote>
<p><code></p>
<p style="padding-left: 30px;">sudo chmod 600 /etc/ha.d/authkeys</p>
<p></code></p></blockquote>
<p style="padding-left: 30px;"><strong>5.3. Removing Startup of services at boot up<br />
<span style="font-weight: normal;">We need to let the Cluster manage the resources, instead of starting them at bootup.</span></strong></p>
<blockquote>
<p><code></p>
<p style="padding-left: 30px;">sudo update-rc.d -f eucalyptus remove<br />
sudo update-rc.d -f eucalyptus-cloud remove<br />
sudo update-rc.d -f eucalyptus-network remove<br />
sudo update-rc.d -f image-store-proxy remove</p>
<p></code></p></blockquote>
<p style="padding-left: 30px;">And we also need to change the &#8220;start on&#8221; to &#8220;stop on&#8221; in the upstart configuration scripts at /etc/init/* for:</p>
<blockquote>
<p><code></p>
<p style="padding-left: 30px;">eucalyptus.conf<br />
eucalyptus-cloud.conf<br />
eucalyptus-network.conf</p>
<p></code></p></blockquote>
<p style="padding-left: 30px;"><strong>5.4. Configuring the resources</strong><strong><br />
</strong><strong> </strong><strong><span style="font-weight: normal;">Then, we need to configure the cluster resources. For this do the following:</span></strong></p>
<blockquote>
<p><code></p>
<p style="padding-left: 30px;"><strong><span style="font-weight: normal;">sudo crm configure</span></strong></p>
<p></code></p></blockquote>
<p style="padding-left: 30px;"><strong><span style="font-weight: normal;">and paste the following:</span></strong></p>
<blockquote>
<p><code></p>
<p style="padding-left: 30px;">primitive res_fs_clc ocf:heartbeat:Filesystem params device=/dev/drbd/by-res/uec-clc directory=/mnt/uecdata fstype=ext4 options=noatime<br />
primitive res_ip_clc ocf:heartbeat:IPaddr2 params ip=192.168.0.100 cidr_netmask=24 nic=eth0<br />
primitive res_ip_clc_src ocf:heartbeat:IPsrcaddr params ipaddress="192.168.0.100"<br />
primitive res_uec upstart:eucalyptus  op start timeout=120s op stop timeout=120s op monitor interval=30s<br />
primitive res_uec_image_store_proxy lsb:image-store-proxy<br />
group rg_uec res_fs_clc res_ip_clc res_ip_clc_src res_uec res_uec_image_store_proxy<br />
primitive res_drbd_uec-clc ocf:linbit:drbd params drbd_resource=uec-clc<br />
ms ms_drbd_uec res_drbd_uec-clc meta notify=true<br />
order o_drbd_before_uec inf: ms_drbd_uec:promote rg_uec:start<br />
colocation c_uec_on_drbd inf: rg_uec ms_drbd_uec:Master<br />
property stonith-enabled=False<br />
property no-quorum-policy=ignore</p>
<p></code></p></blockquote>
<p><strong>6. Specify the Cloud IP for the CC, NC, and in the CLC.</strong><strong><br />
</strong>Once you finish the configuration above, one of the CLC&#8217;s will be the Active one and the Second will the passive one. The Cluster Resource Manager will decide which one will become the primary one. However, it is expected that CLC1 will become the primary.</p>
<p>Now, as specified in the UEC <em><a href="https://help.ubuntu.com/community/UEC/PackageInstallSeparate">Advanced Installation Doc</a>, </em>we need to specify the <strong><em><span style="color: #ff0000;">Cloud Controller VIP</span></em></strong> in the CC. However it is also important to do it in the NC. This is done in <strong><em>/etc/eucalyptus/eucalyptus.conf</em></strong> by adding:</p>
<blockquote><p><code>VNET_CLOUDIP="192.168.0.100"</code></p></blockquote>
<p>Then, log into the Web Front end (192.168.0.100:8443), and change the Cloud Configuration to have the <strong><em><span style="color: #ff0000;">VIP</span></em></strong> as the Cloud Host.</p>
<p><a href="http://www.roaksoax.com/wp-content/uploads/2010/10/cloud-config.png"><img class="aligncenter size-medium wp-image-650" title="cloud-config" src="http://www.roaksoax.com/wp-content/uploads/2010/10/cloud-config-300x94.png" alt="" width="300" height="94" /></a></p>
<p>By doing this you will have the new certificates generated with the VIP, that will allow you to connect to the cloud even if the primary Cloud Controller failed, and the Second one tool control of the service.</p>
<p>Finally, restart the Walrus, CC/SC, and NC and enjoy.</p>
<p><strong>7. Final Thoughts</strong><br />
<span style="font-weight: normal;">The cluster resource manager is using the upstart script to manage the Cloud Controller. However, this is not optimal, and it is used for testing purposes. The creation of an OCF Resource Agent will be required to adequately start/stop and monitor eucalyptus. The OCF RA will be developed soon, and this will be discussed at Ubuntu Developer Summit &#8211; Natty.</span></p>
]]></content:encoded>
			<wfw:commentRss>http://www.roaksoax.com/2010/10/high-availability-uec-clc-howto/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>My Thesis&#8230;</title>
		<link>http://www.roaksoax.com/2009/03/my-thesis</link>
		<comments>http://www.roaksoax.com/2009/03/my-thesis#comments</comments>
		<pubDate>Fri, 13 Mar 2009 16:28:21 +0000</pubDate>
		<dc:creator>roaksoax</dc:creator>
				<category><![CDATA[Planet]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[cluster]]></category>
		<category><![CDATA[DRBD]]></category>
		<category><![CDATA[heartbeat]]></category>
		<category><![CDATA[meatware]]></category>
		<category><![CDATA[stonith]]></category>
		<category><![CDATA[ubuntu in my thesis]]></category>

		<guid isPermaLink="false">http://roaksoax.wordpress.com/?p=190</guid>
		<description><![CDATA[For all of you who wanted to take a look to my thesis (Design of a model to implement High Availability Web Servers, an overview here)&#8230; you can donwload it from here: http://roaksoax.files.wordpress.com/2009/03/thesis.pdf Btw&#8230; it is in Spanish.]]></description>
			<content:encoded><![CDATA[<p>For all of you who wanted to take a look to my thesis (Design of a model to implement High Availability Web Servers, an overview <a href="http://roaksoax.wordpress.com/2008/07/17/ubuntu-in-my-thesis-part-2/">here</a>)&#8230; you can donwload it from <a href="http://roaksoax.files.wordpress.com/2009/03/thesis.pdf">here:</a> http://roaksoax.files.wordpress.com/2009/03/thesis.pdf</p>
<p>Btw&#8230; it is in Spanish. <img src='http://www.roaksoax.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.roaksoax.com/2009/03/my-thesis/feed</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Cluster Sinchronization Tool (CSync2)</title>
		<link>http://www.roaksoax.com/2008/06/cluster-sinchronization-tool-csync2</link>
		<comments>http://www.roaksoax.com/2008/06/cluster-sinchronization-tool-csync2#comments</comments>
		<pubDate>Fri, 20 Jun 2008 22:45:00 +0000</pubDate>
		<dc:creator>roaksoax</dc:creator>
				<category><![CDATA[How-To]]></category>
		<category><![CDATA[Planet]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[cluster]]></category>
		<category><![CDATA[csync2]]></category>
		<category><![CDATA[synchronization]]></category>
		<category><![CDATA[tool]]></category>

		<guid isPermaLink="false">http://roaksoax.wordpress.com/?p=35</guid>
		<description><![CDATA[As you may know, there are many tools for file synchronization between servers that can suit your needs, but Csync2 (Website and Paper) was specially designed for Cluster File Synchronization, which makes it a great tool to synchronize config files and folders. Now, I&#8217;ll show you a simple way of configuring it, by having a [...]]]></description>
			<content:encoded><![CDATA[<p>As you may know, there are many tools for file synchronization between servers that can suit your needs, but<em> Csync2 (<a href="http://oss.linbit.com/csync2/" target="_blank">Website</a> and <a href="http://oss.linbit.com/csync2/paper.pdf" target="_blank">Paper</a>)</em> was specially designed for Cluster File Synchronization, which makes it a great tool to synchronize config files and folders.</p>
<p>Now, I&#8217;ll show you a simple way of configuring it, by having a master server (where we can make changes to the config files) and one or multiple slave servers, where the files will be synchronized. First of all, we have to install it along with other packages:</p>
<blockquote><p>:~# sudo apt-get install csync2 sqlite3 openssl xinetd</p></blockquote>
<p>After having everything installed, we have to create the certificates that will allow <em>Csync2</em> authenticate between servers so that the files can be synchronized. To do that we do this:</p>
<p><span id="more-35"></span></p>
<blockquote><p>:~# openssl genrsa -out /etc/csync2_ssl_key.pem 1024</p></blockquote>
<blockquote><p>:~# openssl req -new -key /etc/csync2_ssl_key.pem -out /etc/csync2_ssl_cert.csr</p></blockquote>
<blockquote><p>:~# openssl x509 -req -days 600 -in /etc/csync2_ssl_cert.csr -signkey /etc/csync2_ssl_key.pem -out /etc/Csync2_ssl_cert.pem</p></blockquote>
<p>So after having all the certificates, we have to create the <em>Csync2</em> key by issuing the following:</p>
<blockquote><p>:~# csync2 -k /etc/csync2_ssl_cert.key</p></blockquote>
<p>Once all the keys and certificates have been generated, we have to copy them from the master server to the slaves. To do this we can use whatever method you are more familiarized with.</p>
<p>Now, we have to configure<em> xinetd</em> so that Csync2 can work, because it works as an <em>xinetd</em> service. To do this we create a <em>Csync2</em> file on <strong><em>/etc/xinetd.d/</em></strong> and edit it like this:</p>
<blockquote><p>:~# vim /etc/xinetd.d/Csync2</p></blockquote>
<blockquote><p>service Csync2<br />
{<br />
disable = no<br />
protocol = tcp<br />
socket_type = stream<br />
wait = no<br />
user = root<br />
server = /usr/sbin/csync2<br />
server_args = -i<br />
}</p></blockquote>
<p>and then we have to add the port number to <strong><em>/etc/services</em></strong>, by doing this:</p>
<blockquote><p>:~# echo &#8220;Csync2 30865/tcp&#8221; &gt;&gt; /etc/services</p></blockquote>
<p>After having done everything, we are now going to configure<em> Csync2 </em>so that we can determine which files are going to be synchronized. For this example, we are going to synchronize <em><strong>/etc/apache2</strong></em> and <em><strong>/etc/mysql</strong></em>. For that we open /etc/csync2.cfg and we configure it like this:</p>
<blockquote><p>group testing #group name, we can have multiple groups<br />
{<br />
host node1; #master server<br />
host (node2); #slave server<br />
host (node3);</p>
<p>key /etc/csync2_ssl_cert.key;</p>
<p>include /etc/apache2/;<br />
include /etc/mysql/;</p>
<p>backup-directory /var/backups/csync2;<br />
backup-generations 3;<br />
auto none; #no automatic sync<br />
}</p></blockquote>
<p><strong>Note:</strong> This tool does not just synchronize files but issues commands (such as restarting services) after the synchronization process is finished, but, I&#8217;ll let you find out how <img src='http://www.roaksoax.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> . We can also have multiple groups with different servers on it. For further information you can refer to its <a href="http://oss.linbit.com/csync2/paper.pdf" target="_blank">Paper</a>.</p>
<p>Then, we create the <em>Csync2</em> backup directory:</p>
<blockquote><p>:~# mkdir /var/backups/csync2</p></blockquote>
<p>and we restart <em>xinetd</em>:</p>
<blockquote><p>:~# /etc/init.d/xinetd restart</p></blockquote>
<p>And finally, we do the first sync by issuing:</p>
<blockquote><p>:~# csync -x</p></blockquote>
<p>If errors are displayed here, just ignore them and check if the files have been synchronized. Every time we make a changes to the files in <strong><em>/etc/apache2</em></strong> or <em><strong>/etc/mysql</strong></em> on the master server, we have to synchronize the changes by issuing the command above.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.roaksoax.com/2008/06/cluster-sinchronization-tool-csync2/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

