<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="wordpress/2.3.3" -->
<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/"
	>

<channel>
	<title>BetterWebApp</title>
	<link>http://betterwebapp.com/wordpress</link>
	<description>The mostly objective thoughts of a Betterwebapp.com founder.</description>
	<pubDate>Fri, 02 Jan 2009 18:59:09 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.3.3</generator>
	<language>en</language>
			<item>
		<title>Hudson Service script</title>
		<link>http://betterwebapp.com/wordpress/?p=7</link>
		<comments>http://betterwebapp.com/wordpress/?p=7#comments</comments>
		<pubDate>Fri, 02 Jan 2009 18:59:09 +0000</pubDate>
		<dc:creator>anpark</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://betterwebapp.com/wordpress/?p=7</guid>
		<description><![CDATA[Below is the code for startHudson.sh
#!/usr/bin/env bash
# Uncomment the following line if you have OutOfMemoryError errors
# HUDSON_OPTS=&#8221;-Xms128m -Xmx256m&#8221;
export JAVA_HOME=/usr/java/default
LAUNCHER=hudson.war
EXEC=&#8221;$JAVA_HOME/bin/java $HUDSON_OPTS -jar $LAUNCHER $@ &#8221;
echo $EXEC
$JAVA_HOME/bin/java $HUDSON_OPTS -jar &#8220;$LAUNCHER&#8221; $@ &#38;
echo $! &#62; hudson.pid
Below this is the code for hudson.sh which should then be symlinked into /etc/init.d/hudson  , then it should be chkconfig &#8211;add hudson [...]]]></description>
			<content:encoded><![CDATA[<p>Below is the code for startHudson.sh</p>
<blockquote><p>#!/usr/bin/env bash<br />
# Uncomment the following line if you have OutOfMemoryError errors<br />
# HUDSON_OPTS=&#8221;-Xms128m -Xmx256m&#8221;</p>
<p>export JAVA_HOME=/usr/java/default<br />
LAUNCHER=hudson.war</p>
<p>EXEC=&#8221;$JAVA_HOME/bin/java $HUDSON_OPTS -jar $LAUNCHER $@ &#8221;<br />
echo $EXEC<br />
$JAVA_HOME/bin/java $HUDSON_OPTS -jar &#8220;$LAUNCHER&#8221; $@ &amp;<br />
echo $! &gt; hudson.pid</p></blockquote>
<p>Below this is the code for hudson.sh which should then be symlinked into /etc/init.d/hudson  , then it should be chkconfig &#8211;add hudson  to make it a service.</p>
<blockquote><p>#!/bin/sh<br />
#content of /opt/hudson/default/hudson.sh script<br />
# chkconfig: 345 99 05<br />
# description: Hudson build loop</p>
<p># Hudson Unix Startup Script Version 1.0<br />
#<br />
# based on http://confluence.public.thoughtworks.org/display/CC/UnixStartupScriptVersion1.x<br />
# adapted for multiple projects<br />
# also based on the file attached to the above page created by Jerome Lacoste</p>
<p>#<br />
# Hudson startup: Startup and kill script for Hudson<br />
#<br />
###################################################################################################<br />
# USER CONFIGURATION<br />
#<br />
# Fill in these values for your Hudson setup</p>
<p># What user will Hudson run as?  The user will need permission to write and modify files<br />
# in the next entries.<br />
HUDSON_USER=hudson</p>
<p># Where is the HUDSON startup script located?<br />
HUDSON_INSTALL_DIR=/opt/hudson/default</p>
<p># In what directory is the config.xml file located for HUDSON?<br />
# default: HUDSON_WORK_DIR=$HUDSON_INSTALL_DIR<br />
HUDSON_WORK_DIR=$HUDSON_INSTALL_DIR</p>
<p># Where will the hudson.log file be located?<br />
# default: HUDSON_LOGFILE_DIR=$HUDSON_INSTALL_DIR<br />
HUDSON_LOGFILE_DIR=$HUDSON_INSTALL_DIR</p>
<p>#######################<br />
# ENVIRONMENT ADDITIONS</p>
<p># Add environement variables here that are needed<br />
# example:<br />
#  export JAVA_HOME=/usr/local/java<br />
#<br />
export JAVA_HOME=/usr/java/default<br />
export JDK_HOME=/usr/java/default<br />
export ANT_HOME=/opt/ant/default<br />
export M2_HOME=/opt/maven/default<br />
export M2=$M2_HOME/bin<br />
export GROOVY_HOME=/opt/groovy/default<br />
export HUDSON_HOME=/opt/hudson/default</p>
<p># Add path to additional executables needed for project build.  See PATH entry below for base config.<br />
# No additional action taken when blank.<br />
PATH_ADDITIONS=</p>
<p>##############################<br />
# Hudson PORT SETTINGS</p>
<p># Port for application.  You can access it by going to http://localhost:8080<br />
# Specify only one either Webport or Securewebport if you want to use https<br />
# default HUDSON_WEBPORT=8080<br />
HUDSON_WEBPORT=8080<br />
HUDSON_SECURE_WEBPORT=</p>
<p>###################################################################################################<br />
# DO NOT MODIFY ENTRIES BELOW THIS LINE</p>
<p>NAME=hudson<br />
DESC=&#8221;Hudson - continuous integration build loop&#8221;</p>
<p>PATH=/sbin:/usr/sbin:/usr/bin:/bin<br />
# add additions if variable has text defined<br />
if [ -n &#8220;$PATH_ADDITIONS&#8221; ]; then<br />
PATH=$PATH_ADDITIONS:$PATH<br />
fi<br />
export PATH</p>
<p>HUDSON_DAEMON=$HUDSON_INSTALL_DIR/startHudson.sh</p>
<p>HUDSON_LOG_FILE=$HUDSON_LOGFILE_DIR/hudson.log</p>
<p>if [ -n &#8220;$HUDSON_SECURE_WEBPORT&#8221; ]; then<br />
HUDSON_COMMAND=&#8221;$HUDSON_DAEMON &#8211;httpsPort=$HUDSON_SECURE_WEBPORT &#8211;webroot=/opt/hudson/default/hudson &#8221;<br />
fi</p>
<p>if [ -n &#8220;$HUDSON_WEBPORT&#8221; ]; then<br />
HUDSON_COMMAND=&#8221;$HUDSON_DAEMON &#8211;httpPort=$HUDSON_WEBPORT &#8211;webroot=/opt/hudson/default/hudson &#8221;<br />
fi</p>
<p># does the executable exist?<br />
test -f $HUDSON_DAEMON || (echo &#8220;The executable $HUDSON_DAEMON does not exist!&#8221; &amp;&amp; exit 0)</p>
<p>if [ `id -u` -ne 0 ]; then<br />
echo &#8220;Not starting/stopping $DESC, you are not root.&#8221;<br />
exit 4<br />
fi</p>
<p># Get the PID output from the startup script<br />
if [ -f $HUDSON_INSTALL_DIR/hudson.pid ]; then<br />
HUDSON_PID=`cat $HUDSON_INSTALL_DIR/hudson.pid`<br />
else<br />
echo &#8220;No hudson.pid file found.  HUDSON process may not be controllable from this script!&#8221;<br />
fi</p>
<p>case &#8220;$1&#8243; in</p>
<p>&#8217;start&#8217;)<br />
cd $HUDSON_INSTALL_DIR<br />
#echo &#8220;HUDSON environtment at startup&#8221; &gt; hudson.startup.env<br />
#env &gt;&gt; hudson.startup.env<br />
su $HUDSON_USER -c &#8220;/bin/sh -c \&#8221;$HUDSON_COMMAND &gt;&gt; $HUDSON_LOG_FILE 2&gt;&amp;1\&#8221;" &amp; RETVAL=$?<br />
echo &#8220;$NAME started on port ${HUDSON_WEBPORT}&#8221;<br />
;;</p>
<p>&#8217;stop&#8217;)<br />
if [ -n &#8220;$HUDSON_PID&#8221; ] &amp;&amp; ps -p ${HUDSON_PID} &gt; /dev/null ; then<br />
kill -9 ${HUDSON_PID}<br />
$0 status<br />
RETVAL=$?<br />
else<br />
echo &#8220;$NAME is not running&#8221;<br />
RETVAL=1<br />
fi<br />
;;</p>
<p>&#8217;status&#8217;)<br />
if [ -n &#8220;$HUDSON_PID&#8221; ] &amp;&amp; ps -p ${HUDSON_PID} &gt; /dev/null ; then<br />
echo $NAME \(pids $HUDSON_PID\) is running<br />
RETVAL=0<br />
else<br />
echo &#8220;$NAME is stopped&#8221;<br />
RETVAL=1<br />
fi<br />
;;</p>
<p>&#8216;restart&#8217;)<br />
$0 stop &amp;&amp; $0 start<br />
RETVAL=$?<br />
;;</p>
<p>*)<br />
echo &#8220;Usage: $0 { start | stop | status | restart }&#8221;<br />
exit 1<br />
;;<br />
esac<br />
#echo ending $0 $$&#8230;.<br />
exit 0;</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://betterwebapp.com/wordpress/?feed=rss2&amp;p=7</wfw:commentRss>
		</item>
		<item>
		<title>Groovy Grails REST service helper</title>
		<link>http://betterwebapp.com/wordpress/?p=5</link>
		<comments>http://betterwebapp.com/wordpress/?p=5#comments</comments>
		<pubDate>Sun, 24 Aug 2008 00:20:52 +0000</pubDate>
		<dc:creator>anpark</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://betterwebapp.com/wordpress/?p=5</guid>
		<description><![CDATA[h4. Quick Tip on Markup Builder example is from a Domain object (Book) that contains enum&#8217;s if you have only simple datatypes then &#8220;render as XML&#8221; works just fine
 String toXML() {
StringWriter buffer = new StringWriter()
def xml = new MarkupBuilder(buffer)
xml.book() {
id(this.id)
author(this.authorName)
pagecount(pagecount:this.pagecount)
}
return buffer.toString() + &#8220;\\n&#8221;
}
Keep in mind that the difference between author and pagecount looks like [...]]]></description>
			<content:encoded><![CDATA[<p>h4. Quick Tip on Markup Builder example is from a Domain object (Book) that contains enum&#8217;s if you have only simple datatypes then &#8220;render as XML&#8221; works just fine</p>
<blockquote><p> String toXML() {<br />
StringWriter buffer = new StringWriter()<br />
def xml = new MarkupBuilder(buffer)<br />
xml.book() {<br />
id(this.id)<br />
author(this.authorName)<br />
pagecount(pagecount:this.pagecount)<br />
}<br />
return buffer.toString() + &#8220;\\n&#8221;<br />
}</p></blockquote>
<p>Keep in mind that the difference between author and pagecount looks like this in the xml</p>
<blockquote><p><book><br />
<id>222</id><br />
<author>Toddecus</author></book></p>
<pagecount pagecount="99"></pagecount></blockquote>
<p>You can see that the pagecount is much more terse but may present challenges on parsing.h4. Quick Tip on parsing say a Rest service that returns the XML above: This assumes you used an XMLSlurper to parse the text into a GPathResult<br />
{code}<br />
static Book fromXML(GPathResult bookXML)<br />
{<br />
def book = new Book()<br />
book.id = Integer.parseInt(bookXML.id.text())<br />
book.author = bookXML.author.text()<br />
book.pagecount = Integer.parseInt(bookXML.pagecount.@pagecount.text())<br />
return book<br />
}<br />
{code}Pay special attention to the use of the &#8220;at&#8221; symbol to get access to the property on the field as opposed to the field contents.</p>
<p>h4. If you really cared about terse XML in your REST service you might even do this:<br />
{code}<br />
String toXML() {<br />
StringWriter buffer = new StringWriter()<br />
def xml = new MarkupBuilder(buffer)<br />
xml.book(id: this.id, author:this.authorName, pagecount:this.pagecount){}<br />
return buffer.toString() + &#8220;\\n&#8221;<br />
}<br />
{code}<br />
Which would result in XML like this:<br />
{code}<br />
<book id="222" author="Toddecus" pagecount="99"></book><br />
{code}<br />
doesn&#8217;t help much if your domain object contains a set of sub elements though <img src='http://betterwebapp.com/wordpress/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /></p>
]]></content:encoded>
			<wfw:commentRss>http://betterwebapp.com/wordpress/?feed=rss2&amp;p=5</wfw:commentRss>
		</item>
		<item>
		<title>Progression from Jr. Desktop Support to Senior Systems Administrator</title>
		<link>http://betterwebapp.com/wordpress/?p=6</link>
		<comments>http://betterwebapp.com/wordpress/?p=6#comments</comments>
		<pubDate>Sun, 24 Aug 2008 00:20:40 +0000</pubDate>
		<dc:creator>anpark</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://betterwebapp.com/wordpress/?p=6</guid>
		<description><![CDATA[The progression in the IT world looks like this for a system administrator
Desktop Support or Help Desk moving to &#62; Jr. System Administrator   - Great
place to take this step is at a hosting company working in the NOC or a
large university or large corporation that have subtle nuances of levels of
sytem administrators.  [...]]]></description>
			<content:encoded><![CDATA[<p>The progression in the IT world looks like this for a <span style="border-bottom: 1px dashed #0066cc; cursor: pointer" class="yshortcuts" id="lw_1219534484_0">system administrator</span></p>
<p>Desktop Support or Help Desk moving to &gt; Jr. System Administrator   - Great<br />
place to take this step is at a hosting company working in the NOC or a<br />
large university or large corporation that have subtle nuances of levels of<br />
sytem administrators.  Together with installing Linux and configuring it at<br />
home Red Hat and at least One OTHER distribution. RHT is a great starter<br />
certification on the UNIX path.   MCSE is good on the windows path (easier<br />
but will pay less in the long run).  Master an Editor on UNIX (VI or don&#8217;t<br />
do UNIX!)  either textpad or Ultraedit on windows. Learn how HTML, HTTP,<br />
SSL, printers, WiFi, ping, traceroute, nslookup (dig), ifconfig or win<br />
equivalent. Master TCP/IP, DHCP, and</p>
<p>Jr. Systems moving to &gt;&gt; Mid Systems<br />
Must learn at least competent level on the OTHER flavor for example if you<br />
are now a UNIX guy, then learn how to make it talk to windows. Add to that<br />
at least all the basic configurations of a Mail program (Exchage or<br />
Postfix/Qmail).  Know backwards and forwards DNS, HTTP, and learn a SHELL<br />
scripting language. (KSH, SH,  <span style="border-bottom: medium none; background: transparent none repeat scroll 0% 50%; cursor: pointer; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial" class="yshortcuts" id="lw_1219534484_1">Windows PowerShell</span>), learn to setup backups<br />
and <span style="border-bottom: 1px dashed #0066cc; cursor: pointer" class="yshortcuts" id="lw_1219534484_2">cron jobs</span>. Learn how to read logs. Know Syslog and setup at least one<br />
monitoring system. Learn file sharing Samba, NFS, windows etc&#8230; And how to<br />
manage this. (<span style="border-bottom: 1px dashed #0066cc; cursor: pointer" class="yshortcuts" id="lw_1219534484_3">Active Directory</span> or Open Directory, or LDAP)  Implement a<br />
single sign on.  SSH Keys &amp; other two factor authentication. Learn VOIP and<br />
setup and configure phones.  MUST master time management, organization, and<br />
prioritization to make it to the Mid level of <span class="yshortcuts" id="lw_1219534484_4">systems administration</span>.</p>
<p>Mid &gt;&gt; Senior Systems<br />
Must setup and configure at least one flavor of SAN, must learn CISCO IOS at<br />
a basic level, configure a firewall, know what a VLAN is, and master a<br />
scripting language. Must be able to configure either IIS or Apache.  Must<br />
Learn basic SQL. Learn a second more advanced scripting language ( Perl,<br />
Groovy, Ruby) Support one Major application server, database or ERP server.<br />
Must learn to ment</p>
]]></content:encoded>
			<wfw:commentRss>http://betterwebapp.com/wordpress/?feed=rss2&amp;p=6</wfw:commentRss>
		</item>
		<item>
		<title>Off Topic How to use LVM in CENTOS to add a second hard drive</title>
		<link>http://betterwebapp.com/wordpress/?p=4</link>
		<comments>http://betterwebapp.com/wordpress/?p=4#comments</comments>
		<pubDate>Thu, 01 May 2008 22:12:44 +0000</pubDate>
		<dc:creator>anpark</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://betterwebapp.com/todd/?p=4</guid>
		<description><![CDATA[The current instructions on LVM howto are sparse and generally suck. So after some figuring here are the steps to add a second hard drive.  (Not doing anything complicated like striping or adding to volume groups, etc..) Just plain old vanilla add a second hard drive to my server.
You&#8217;ll find this command handy to [...]]]></description>
			<content:encoded><![CDATA[<p>The current instructions on LVM howto are sparse and generally suck. So after some figuring here are the steps to add a second hard drive.  (Not doing anything complicated like striping or adding to volume groups, etc..) Just plain old vanilla add a second hard drive to my server.</p>
<p>You&#8217;ll find this command handy to see what your current boot drive is setup for:</p>
<blockquote><p><em>pvdisplay </em></p></blockquote>
<p>The newDrive is not there!  Ok how do I get it there?</p>
<p>Run :</p>
<blockquote><p><em>lvmdiskscan</em></p></blockquote>
<p>I see it but it does not say &#8220;LVM Physical volume&#8221; the way my boot drive does.   How do I know which one is the new drive?  (I don&#8217;t have a precise answer but I can say that /dev/hd?? and the size of the drive should help. Remember 200 GB for me looked like [186.31 GB] example of my boot drive results below</p>
<p>/dev/hda2                [       74.43 GB] LVM physical volume</p>
<p>/dev/hdd1                [     186.31 GB]</p>
<p>Now I found mine was named /dev/hdd1 so do the next two commands</p>
<blockquote><p><em>pvcreate /dev/hdd1</em></p></blockquote>
<blockquote><p><em>dd if=/dev/zero of=/dev/diskname bs=1k count=1</em></p></blockquote>
<p>Now lets see where we are at:</p>
<blockquote><p><em>pvdisplay</em></p></blockquote>
<p>Drive now there but no Volume Group or size information</p>
<p>next step is to create the Physical Volume Group possible names: testvg, vg, or in my case VolGroup01</p>
<blockquote><p><em>vgcreate VolGroup01 /dev/hdd1</em></p></blockquote>
<p>Now how are we doing:</p>
<blockquote><p><em>pvdisplay   </em></p></blockquote>
<p>Now all the information is there and in volume group!</p>
<p>Now to create one of these Logical Volume things.   Where did the -l size come from? Read &#8220;Total PE&#8221; from pvdisplay.  Now choose  a Logical Volume arbitrary name  e.g. LogVol01, or lvg, or data. I chose opt because that was where I was going to mount it.</p>
<blockquote><p><em>lvcreate -l 47694 </em><em>VolGroup01</em><em> -n opt</em></p></blockquote>
<p>Now we have a Logical volume group, lets format the disk and lay down a file system.  I am assuming you would like some form of journaled file system for example ext3 <img src='http://betterwebapp.com/wordpress/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />   the -j means journal it, without the -j you get an ext2.</p>
<blockquote><p><em> mke2fs -j /dev/</em><em>VolGroup01/opt</em></p></blockquote>
<p>Now that the filesystem is in place lets try mounting the logical volume. Be sure to choose a place that doesn&#8217;t have data in it.  I like /opt  or /data for example</p>
<blockquote><p><em>mount /dev/</em><em>VolGroup01/opt /opt</em></p></blockquote>
<blockquote><p>df -k</p></blockquote>
<p>Whahoo! Victory! now I can set /opt as the directory for mysql or Oracle to dump it&#8217;s data and go to town. One last thing.  So I can shut the machine down and have it mount automagically when it comes back up. Go add the following line to /etc/fstab</p>
<blockquote><p> <em>vi /etc/fstab<br />
/dev/</em><em>VolGroup01/opt     /opt                     ext3    defaults       1 1<br />
</em></p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://betterwebapp.com/wordpress/?feed=rss2&amp;p=4</wfw:commentRss>
		</item>
		<item>
		<title>Better Web App &#8212; Better Late than Never</title>
		<link>http://betterwebapp.com/wordpress/?p=3</link>
		<comments>http://betterwebapp.com/wordpress/?p=3#comments</comments>
		<pubDate>Fri, 04 Apr 2008 00:35:41 +0000</pubDate>
		<dc:creator>anpark</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<category><![CDATA[Betterwebapp Web Application Technology platforms progr]]></category>

		<guid isPermaLink="false">http://betterwebapp.com/blog/?p=3</guid>
		<description><![CDATA[18 months ago Mr. Park, Mr. Bukoski and I were faced with the task of a software engineering capstone project.  Foolishly, I enrolled these two fine gentlemen in the idea that we might write a simple, 3 Tier, and Enterprise class website in all of the currently available Web Application Technology Platforms, and if [...]]]></description>
			<content:encoded><![CDATA[<p>18 months ago Mr. Park, Mr. Bukoski and I were faced with the task of a software engineering capstone project.  Foolishly, I enrolled these two fine gentlemen in the idea that we might write a simple, 3 Tier, and Enterprise class website in all of the currently available Web Application Technology Platforms, and if we did all this painstaking work, we might get published therefore setting us up for future academic success.  Alas, after 6 months of hard work and 9 months of waiting for me to get this published, I have surrendered to the call of modern publishing: a CMS&#8217;ed website and Blog.  This site represents an earnest, fraught with peril and assumptions attempt to create an objective tool to evaluate Web Application Technology Platforms. You will have to be the judge of our success or failure.  We graduated from Arizona State University W.P. Carey School of Business with our MBA&#8217;s and Ed and Anthony even went on to complete their Master&#8217;s in Engineering.  If you ever have an opportunity to work with these two unassuming and brilliant individuals I highly recommend it!</p>
<p>Sincerely,</p>
<p>Todd R. Ellermann, MBA</p>
]]></content:encoded>
			<wfw:commentRss>http://betterwebapp.com/wordpress/?feed=rss2&amp;p=3</wfw:commentRss>
		</item>
	</channel>
</rss>

