<?xml version="1.0" encoding="ISO-8859-1"?>

<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/">
	<channel>
		<title>HPC Community - High Performance Computing (HPC) Community - Blogs - George Goh</title>
		<link>http://www.hpccommunity.org/blogs/george-goh/</link>
		<description><![CDATA[HPCCommunity.org is a technical discussion HPC community portal for the High Performance Computing (HPC) community. The community includes Platform Computing R&D team members, architects and developers, external collaborators and a growing community of users and developers in the HPC world.]]></description>
		<language>en</language>
		<lastBuildDate>Fri, 10 Feb 2012 05:48:50 GMT</lastBuildDate>
		<generator>vBulletin</generator>
		<ttl>60</ttl>
		<image>
			<url>http://www.hpccommunity.org/images/misc/rss.jpg</url>
			<title>HPC Community - High Performance Computing (HPC) Community - Blogs - George Goh</title>
			<link>http://www.hpccommunity.org/blogs/george-goh/</link>
		</image>
		<item>
			<title>How to have sles run your own program on installation</title>
			<link>http://www.hpccommunity.org/blogs/george-goh/how-have-sles-run-your-own-program-installation-92/</link>
			<pubDate>Wed, 01 Oct 2008 16:13:00 GMT</pubDate>
			<description>1. Take the root image from a pristine SLES 10.2 repository, and copy 
the contents of the root image to a working location. 
 
*mkdir -p...</description>
			<content:encoded><![CDATA[<blockquote class="blogcontent restore">1. Take the root image from a pristine SLES 10.2 repository, and copy<br />
the contents of the root image to a working location.<br />
<br />
<font face="Courier New"><b>mkdir -p $WORKING_DIR/mnt $WORKING_DIR/rootimg<br />
mount -o loop $REPO_LOCATION/boot/i386/root $WORKING_DIR/mnt<br />
cp -avr $WORKING_DIR/mnt/* $WORKING_DIR/rootimg<br />
umount $WORKING_DIR/mnt</b></font><br />
<br />
2. Replace the original ‘yast’ script with my own script.<br />
<font face="Courier New"><b><br />
mv $WORKING_DIR/rootimg/sbin/yast $WORKING_DIR/rootimg/sbin/yast.real<br />
cp $WORKSPACE/yast.mine $WORKING_DIR/rootimg/sbin/yast</b></font><br />
<br />
3. When desired changes are made(add dependencies in step a), pack up the modified directory tree<br />
into a cramfs image:<br />
<font face="Courier New"><b><br />
mkfs.cramfs $WORKING_DIR/rootimg $REPO_LOCATION/boot/i386/root</b></font><br />
<br />
A. For Kusu dependencies, we need the following packages:<br />
<br />
Available on SLES installation disks:<br />
<b>python-2.4.2-18.13.i586.rpm<br />
slang-2.0.5-14.2.i586.rpm</b><br />
<br />
Available from other sources:<br />
<a href="http://mondorescue.linjection.org/ftp/sles/10/newt-0.52.2-1.2.i586.rpm" target="_blank">http://mondorescue.linjection.org/ft...2-1.2.i586.rpm</a><br />
<br />
To install an rpm in a rootimg, python, for example,<br />
<font face="Courier New"><b>pushd $WORKING_DIR/rootimg<br />
rpm2cpio $RPMDIR/python-2.4.2-18.13.i586.rpm | cpio -idv<br />
popd</b></font></blockquote>

 ]]></content:encoded>
			<dc:creator>George Goh</dc:creator>
			<guid isPermaLink="true">http://www.hpccommunity.org/blogs/george-goh/how-have-sles-run-your-own-program-installation-92/</guid>
		</item>
		<item>
			<title>Partitioning in Kusu</title>
			<link>http://www.hpccommunity.org/blogs/george-goh/partitioning-kusu-68/</link>
			<pubDate>Tue, 10 Jun 2008 16:18:48 GMT</pubDate>
			<description>Partitioning is important in Kusu for the following reasons: 
 
1. On the master node, the disks need to be correctly partitioned, so that...</description>
			<content:encoded><![CDATA[<blockquote class="blogcontent restore">Partitioning is important in Kusu for the following reasons:<br />
<ol class="decimal"><li>On the master node, the disks need to be correctly partitioned, so that repositories can be created on the disk before handing over to the distro's auto-installation mechanism.</li>
<li>On the compute node, partitioning needs to take place unattended, according to a predefined schema in the database, with options to preserve certain types of partitions as well.</li>
</ol><br />
Over the next few blog entries, I will describe the approach taken with the partitioning code in Kusu. To kick off the series, I will start with a high-level overview.<br />
<br />
<b><u><font size="4">Disk States and manipulation</font></u></b><br />
Each machine (whether master or compute) has a 'DiskProfile' object that represents the current/desired state of the system's disks. Generally, there are 3 stages in the disk partitioning process - query, modification, and commission.<br />
<font size="3"><br />
<u>QUERY</u></font><br />
Usually, the machine will start off by querying the current state of the disks - how many disks? partitions on each disk? LVM partitions? Volume groups? and so on... .<br />
<br />
In this stage, tools such as `fdisk`, `lvm vgchange -ay`, and `lvm pvdisplay` are used by the DiskProfile. The benefit of using these tools is the inherent error checking they perform when querying the disks.<br />
<br />
At the end of this query stage, Kusu is left with a precise knowledge of the disks in the system, which is presented to the user(in the case of the master), or the nodeinstaller(compute).<br />
<br />
<font size="3"><u>MODIFICATION</u></font><br />
Next is the modification stage. User(master) or nodeinstaller(compute) manipulates the disk profile to the desired layout. All changes are in memory, but still, all standard rules of partitioning and LVM must be checked in this stage to prevent fatal errors midway through the commission process.<br />
<br />
<font size="3"><u>COMMISSION</u></font><br />
All changes made in the modification process are committed from memory to disk, the relevant volumes are formatted, and repositories are made on these.<br />
<br />
The state of the disks is then passed to anaconda, which installs grub and copies the rest of the operating system to the disk.<br />
<br />
* Important here to note: where does grub install?<br />
<br />
On some systems '/dev/sda' may not be the first disk seen by the BIOS, and thus may not be booted into. See [1] for more details.<br />
<br />
grub must be installed into a place where it can be seen, either by the BIOS, or by a chain loader, which can load grub.<br />
<br />
[1] - <a href="http://linux.dell.com/installermagic.shtml" target="_self">Dell - Dell Linux - Installer Magic</a></blockquote>

 ]]></content:encoded>
			<dc:creator>George Goh</dc:creator>
			<guid isPermaLink="true">http://www.hpccommunity.org/blogs/george-goh/partitioning-kusu-68/</guid>
		</item>
		<item>
			<title>Kusu Installation</title>
			<link>http://www.hpccommunity.org/blogs/george-goh/kusu-installation-9/</link>
			<pubDate>Tue, 08 Apr 2008 09:02:30 GMT</pubDate>
			<description>Overview 
  
The Kusu installer is the first program that is run when the user boots from a Kusu ISO. It is a wizard-style program responsible for...</description>
			<content:encoded><![CDATA[<blockquote class="blogcontent restore"><font size="4">Overview</font><br />
 <br />
The Kusu installer is the first program that is run when the user boots from a Kusu ISO. It is a wizard-style program responsible for collecting the initial information that will describe and set up a Kusu cluster, including the timezone, networks, root password, disk partitioning, and kits available.<br />
 <br />
The Kusu installer is made up of 2 parts: the screens (context-specific info and prompts), and the navigation framework. In this document, I will describe the screens. <br />
 <br />
Note: The installer relies heavily on the python snack module to display its screen elements, so some knowledge of that toolkit is required.<br />
 <br />
<font size="4">Creating the screens</font><br />
 <br />
The standard Kusu installer has a total of 11 screens that are stored in a ScreenFactoryImpl class' attribute called ScreenFactory.screens. Inserting a screen in this list will cause the installer to display it with the other screens in the order defined.<br />
 <br />
A screen is basically described by a subclass of the InstallerScreen. A simple example is the RootPasswordScreen class:<br />
 <br />
<img src="http://www.hpccommunity.org/exdata/kusu/images/11-rootpasswd.png" border="0" alt="" /><br />
 <br />
Most of the elements in this screen are auto-generated by the Kusu Framework, so we concentrate on the specific needs of this screen:<br />
<ul><li>Instruction for the user</li>
<li>Password entry and verification input fields</li>
<li>'Clear All' button for the input fields</li>
</ul>Buttons are defined differently from other elements on the screen, so we define the 'Clear All' button on this screen first.<br />
 <br />
User-defined buttons are defined in the class variable 'buttons', and the callbacks on the buttons are defined in the setCallbacks method:<br />
 <br />
<font size="4">RootPasswordScreen::setCallbacks</font><br />
 <br />
<div class="bbcode_container">
	<div class="bbcode_description">Code:</div>
	<pre class="bbcode_code" style="height:144px;">buttons = [_('Clear All')]
 
def setCallbacks(self):
&quot;&quot;&quot;
 
Implementation of the setCallbacks interface defined in parent class
screenfactory.BaseScreen. Initialise button callbacks here.
 
&quot;&quot;&quot;
self.buttonsDict[_('Clear All')].setCallback_(self.clearAllFields)</pre>
</div> Next are the instruction and entry fields. These are defined and laid out on-screen in the drawImpl method (where self.msg='Please enter a secure root password:'):<br />
 <br />
<font size="4">RootPasswordScreen::drawImpl</font><br />
 <br />
<div class="bbcode_container">
	<div class="bbcode_description">Code:</div>
	<pre class="bbcode_code" style="height:276px;">def drawImpl(self):<blockquote>self.screenGrid = snack.Grid(1, 3)
entryWidth = 20
self.password0 = kusuwidgets.LabelledEntry(<blockquote>labelTxt=_('Enter root password ').rjust(26),
width=entryWidth, password=1
</blockquote>)
 
self.password1 = kusuwidgets.LabelledEntry(<blockquote>labelTxt=_('Verify root password ').rjust(26),
width=entryWidth, password=1
</blockquote>)
 
self.screenGrid.setField(snack.TextboxReflowed(<blockquote>text=self.msg,
width=self.gridWidth),
col=0, row=0, anchorLeft=1
</blockquote>)
self.screenGrid.setField(<blockquote>self.password0, col=0, row=1, anchorLeft=1,
padding=(0,1,0,0)
</blockquote>)
self.screenGrid.setField(<blockquote>self.password1, col=0, row=2, anchorLeft=1,
padding=(0,0,0,1)
</blockquote>)
</blockquote></pre>
</div> Inserting the screen into the display order<br />
 <br />
As mentioned earlier, a screen is inserted into the ScreenFactory.screens attribute of the ScreenFactoryImpl class in the order that it should be displayed.<br />
 <br />
In the following code segment, we see that the root password screen is placed as the 8th screen in the Kusu installation sequence:<br />
 <br />
<font size="4">ScreenFactoryImpl</font><br />
 <br />
<div class="bbcode_container">
	<div class="bbcode_description">Code:</div>
	<pre class="bbcode_code" style="height:264px;">class ScreenFactoryImpl(ScreenFactory):
&quot;&quot;&quot;The ScreenFactory is defined by the programmer, and passed on to the<blockquote>KusuInstaller class.
</blockquote>&quot;&quot;&quot;
 
...
 
ScreenFactory.screens = \<blockquote>[WelcomeScreen(kiprofile=kiprofile),
LanguageSelectionScreen(kiprofile=kiprofile),
KeyboardSelectionScreen(kiprofile=kiprofile),
NetworkScreen(kiprofile=kiprofile),
GatewayDNSSetupScreen(kiprofile=kiprofile),
FQHNScreen(kiprofile=kiprofile),
TZSelectionScreen(kiprofile=kiprofile),
RootPasswordScreen(kiprofile=kiprofile),
PartitionScreen(kiprofile=kiprofile),
ConfirmScreen(kiprofile=kiprofile),
KitsScreen(kiprofile=kiprofile)
</blockquote>]
 
...</pre>
</div> <font size="4">Hooks</font><br />
 <br />
Through examination of the InstallerScreen class, you will find that it is inherited from the BaseScreen class.<br />
 <br />
The BaseScreen class contains the following hooks:<br />
 <br />
[table=&quot;head;width=70%&quot;]<b>Function name</b>|<b>Documentation</b><br />
def drawImpl(self) | Children implement this method to draw their required widgets onscreen. Don't draw the buttons as well, this is already done for you. |<br />
def validate(self) | Validation checks(if any) for user inputs should be here. validate() is called by the framework after the 'Next/Finish' button is pressed on the UI.<br />
def rollback(self) | Rollback method actions called to rollback changes made in this screen. rollback() is called by the framework after the 'Prev' button is pressed on the UI.<br />
def formAction(self) | This method is called by the framework when the 'Next' or 'Finish' button is pressed on this screen.<br />
def executeCallback(self, obj) | Callbacks for objects other than buttons. This is an advanced operation for screens that have widgets that need to handle callbacks.<br />
[/table]<br />
 <br />
The most commonly used methods from this set are: drawImpl, validate, and formAction. drawImpl has already been discussed, so let's move on to validate and formAction.<br />
<br />
<font size="4"><i>validate</i> method</font><br />
 <br />
The validate method contains screen-specific logic to validate the inputs given by the user. The Kusu installer framework expects a tuple to be returned from this method in the form of (boolean, string). The first member of the tuple denotes the success of the validate method, and the second is the error message that will be displayed to the user on validation failure.<br />
<br />
<font size="4"><i>formAction</i> method</font><br />
 <br />
The formAction method is called by the Kusu installer framework when the user clicks on the Next/Finish button of that screen. Typically, this is used to store the values entered by the user to a database.</blockquote>

 ]]></content:encoded>
			<dc:creator>George Goh</dc:creator>
			<guid isPermaLink="true">http://www.hpccommunity.org/blogs/george-goh/kusu-installation-9/</guid>
		</item>
		<item>
			<title>New machines for OSGDC :-)</title>
			<link>http://www.hpccommunity.org/blogs/george-goh/new-machines-osgdc-42/</link>
			<pubDate>Thu, 13 Mar 2008 10:09:00 GMT</pubDate>
			<description>Liming and I took delivery for some shiny new hardware at our data centre today. These are a Dell 1950, and 2950 with dual Quad-core Xeon CPUs and...</description>
			<content:encoded><![CDATA[<blockquote class="blogcontent restore">Liming and I took delivery for some shiny new hardware at our data centre today. These are a Dell 1950, and 2950 with dual Quad-core Xeon CPUs and 8GB of RAM each. The 1950 has two 15k, 300G SAS drives, while the 2950 has three 10k, 400G SAS drives. Very nice!<br />
<br />
<img src="http://www.hpccommunity.org/exdata/kusu/images/blog/2008/03/img013.jpg" border="0" alt="" /><br />
<br />
<i> The 2950: Don’t carry this alone!<br />
<br />
<img src="http://www.hpccommunity.org/exdata/kusu/images/blog/2008/03/img014.jpg" border="0" alt="" /><br />
<br />
</i><i>It was a blur unpacking the machines. We were anxious to get stuff up and running.<br />
<br />
<img src="http://www.hpccommunity.org/exdata/kusu/images/blog/2008/03/img015.jpg" border="0" alt="" /><br />
</i><i><br />
Liming got close and intimate with this 2950.</i><br />
<br />
<img src="http://www.hpccommunity.org/exdata/kusu/images/blog/2008/03/img017.jpg" border="0" alt="" /><br />
<br />
<i>Sexy beast.<br />
<br />
<img src="http://www.hpccommunity.org/exdata/kusu/images/blog/2008/03/img016.jpg" border="0" alt="" /><br />
<br />
</i><i>Yet another intimate shot.</i></blockquote>

 ]]></content:encoded>
			<dc:creator>George Goh</dc:creator>
			<guid isPermaLink="true">http://www.hpccommunity.org/blogs/george-goh/new-machines-osgdc-42/</guid>
		</item>
		<item>
			<title>Major milestone reached</title>
			<link>http://www.hpccommunity.org/blogs/george-goh/major-milestone-reached-40/</link>
			<pubDate>Tue, 15 May 2007 09:48:00 GMT</pubDate>
			<description>Greetings true believers! 
 
I’m George Goh, one of your friendly neighbourhood cluster monkeys. Najib, our lead ape, has granted me access to blog...</description>
			<content:encoded><![CDATA[<blockquote class="blogcontent restore">Greetings true believers!<br />
<br />
I’m George Goh, one of your friendly neighbourhood cluster monkeys. Najib, our lead ape, has granted me access to blog here about general things happening in the OSGDC, and more specifically, Project Kusu and the components that I maintain, so let’s get things rolling… .<br />
<br />
Here at OSGDC, we adopt the SCRUM methodology(<a href="http://en.wikipedia.org/wiki/Scrum_%28development%29" target="_blank">http://en.wikipedia.org/wiki/Scrum_%28development%29</a>) to keep things tight and moving fast. We have recently ended our third full sprint, and we have achieved quite a bit:<br />
<ul><li>Automated build system to build and create ISO images.</li>
<li>Lightweight Textual User Interface(TUI) framework based on Python’s snack module.</li>
<li>Disk/partition/LVM detection, CRUD operations.</li>
<li>Network adapter detection/configuration + DHCP.</li>
<li>Migration of settings to native install script(FC6 kickstart).</li>
</ul>More features are coming up, so watch this space. But in the meantime, here’s a screencast as a taste of things to come:<br />
<br />
<a href="http://www.osgdc.org/pub/html/kusu/screencast/2007-05-11/" target="_blank">http://www.osgdc.org/pub/html/kusu/s...st/2007-05-11/</a><br />
<br />
See ya.swf</blockquote>

 ]]></content:encoded>
			<dc:creator>George Goh</dc:creator>
			<guid isPermaLink="true">http://www.hpccommunity.org/blogs/george-goh/major-milestone-reached-40/</guid>
		</item>
	</channel>
</rss>

