<?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>Ball Dawg! &#187; Server Management</title>
	<atom:link href="http://www.balldawg.net/index.php/category/server-management/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.balldawg.net</link>
	<description>Just some ninja monkeys, nothing to see here.  Move along.</description>
	<lastBuildDate>Fri, 13 Jan 2012 02:02:53 +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 HAProxy and Keepalived for HA Puppet</title>
		<link>http://www.balldawg.net/index.php/2010/12/haproxy-keepalived-puppet/</link>
		<comments>http://www.balldawg.net/index.php/2010/12/haproxy-keepalived-puppet/#comments</comments>
		<pubDate>Thu, 02 Dec 2010 19:30:43 +0000</pubDate>
		<dc:creator>Andrew Rankin</dc:creator>
				<category><![CDATA[Server Management]]></category>
		<category><![CDATA[Server Monitoring]]></category>
		<category><![CDATA[HAProxy]]></category>
		<category><![CDATA[keepalived]]></category>
		<category><![CDATA[Puppet]]></category>

		<guid isPermaLink="false">http://www.balldawg.net/?p=359</guid>
		<description><![CDATA[I&#8217;ve had a &#8220;backup&#8221; puppet server for some time now, but the fail-over was completely manual. Meaning if the main puppet server failed, I&#8217;d actually need to change DNS to point to the other server. This if fine for environments where a bit of downtime does not hurt, but in a production environment it&#8217;s less [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve had a &#8220;backup&#8221; puppet server for some time now, but the fail-over was completely manual.  Meaning if the main puppet server failed, I&#8217;d actually need to change DNS to point to the other server.  This if fine for environments where a bit of downtime does not hurt, but in a production environment it&#8217;s less than ideal.   When I had a bit of spare time recently I decided to implement an automatic fail over for our environment.  To do this I decided to use HAProxy for the load balancing and keepalived to manage a virtual IP.<br />
<img alt="" src="http://www.balldawg.net/files/diagram_vip.png" title="Network Layout" class="aligncenter" width="628" height="203" /><br />
<span id="more-359"></span><br />
This setup assumes that when you setup your puppet master you didn&#8217;t use the actual machine name as the puppet server name in your puppet.conf.  For example, in my case I used puppet.domain.com, as apposed to the actual DNS name of the machine it lives on.  puppet.domain.com is just a CNAME to the machines DNS name, but since web based SSL is based off the DNS name you are connecting too I can float different machines behind puppet.domain.com and the client is none the wiser.  To do it you&#8217;ll need to sign puppet.machine.com with puppetca and mirror your CA to your backup machine.  </p>
<p>To make this setup work, first you&#8217;ll need a virtual IP to point puppet.machine.com at and setup keepalived to manage it.  The keepalived setup was fairly straight forward, both machines were on the same network so I just picked an IP and configured keepalived on each machine.  In my case the configurations were as follows:</p>
<pre class="brush: php">
vrrp_instance VI_1 {
        interface bond0
        state MASTER
        virtual_router_id 51
        priority 101
        authentication {
            auth_type PASS
            auth_pass PASSWORD
        }
        virtual_ipaddress {
                192.168.33.61/26 dev bond0
        }
        notify_master /sw/keepalived/scripts/notify_master.sh
        notify_backup /sw/keepalived/scripts/notify_backup.sh
        notify_fault /sw/keepalived/scripts/notify_backup.sh
}
</pre>
<p>Basically for bonded interface 0, add the virtual interface of 192.168.33.61/26, and this machine has a priority of 101, or master.  The three entries at the bottom are what to run if the machine should fail over or fail back.  The other machine has a similar setup, except it has the priority of 100, or backup.</p>
<p>After starting up keepalived on both machines, they negotiate and the machine with the higher priority ends up with the IP enabled on bond0 as a secondary address.</p>
<p>Next I needed something to manage fail-over of the puppet &#8220;service&#8221; should the interface/IP stay up and just the puppet service fail.  For this I decided to use HAProxy.  It&#8217;s configuration is, again, fairly straight forward.  You need to setup a front end to listen on the default puppet master port, and a back end that has both your puppet master machines in it.  The configuration is as follows:</p>
<pre class="brush: php">
global
    log         127.0.0.1 local2
    chroot      /var/lib/haproxy
    pidfile     /var/run/haproxy.pid
    maxconn     10000
    user        haproxy
    group       haproxy
    daemon
    stats socket /var/lib/haproxy/stats

defaults
    log                     global
    option                  redispatch
    retries                 3
    timeout http-request    10s
    timeout queue           1m
    timeout connect         10s
    timeout client          1m
    timeout server          1m
    timeout http-keep-alive 10s
    timeout check           10s
    maxconn                 8000

frontend        puppet 192.168.33.61:8140
    mode tcp
    default_backend     puppet0

backend puppet0
    mode        tcp
    option      ssl-hello-chk
    balance     roundrobin
    server      server1 192.168.33.17:8140 check
    server      server2 192.168.33.27:8140 check backup
</pre>
<p>This configuration and the installation of haproxy is mirrored on the second server.  </p>
<p>Now if you recall I had some scripts that were to run should keepalived feel the need to fail to/from the backup server.  Because haproxy binds to the address on start up, you can&#8217;t have it running on your backup server.  To work around the script is run upon keepalived starting that IP on the system, the script starts haproxy.</p>
<p>With the complicated part done, it was just a matter of mirroring my puppet manifests and files between the two machines, and making sure they stay up to date.  Ideally you&#8217;d have them on some sort of NAS which is just mounted on both machines which would make them being out of date impossible.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.balldawg.net/index.php/2010/12/haproxy-keepalived-puppet/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Parallel BZIP2: pbzip2</title>
		<link>http://www.balldawg.net/index.php/2010/07/parallel-bzip2-pbzip2/</link>
		<comments>http://www.balldawg.net/index.php/2010/07/parallel-bzip2-pbzip2/#comments</comments>
		<pubDate>Wed, 07 Jul 2010 18:53:22 +0000</pubDate>
		<dc:creator>Andrew Rankin</dc:creator>
				<category><![CDATA[Server Management]]></category>
		<category><![CDATA[bzip2]]></category>
		<category><![CDATA[compression]]></category>

		<guid isPermaLink="false">http://www.balldawg.net/?p=321</guid>
		<description><![CDATA[I find myself compressing files for archival purposes constantly &#8211; today I was sitting, waiting on one such compression on a SMP box and thought it seems silly that bzip2 does not use more than one CPU. After a quick flip through the man page for bzip2 I found no way to force it to [...]]]></description>
			<content:encoded><![CDATA[<p>I find myself compressing files for archival purposes constantly &#8211; today I was sitting, waiting on one such compression on a SMP box and thought it seems silly that bzip2 does not use more than one CPU.  After a quick flip through the man page for bzip2 I found no way to force it to use more than one core.  A quick web search yielded pbzip2 (<a href="http://compression.ca/pbzip2/">http://compression.ca/pbzip2/</a>) &#8211; another project that does indeed allow you to use more than one CPU for compress and decompression of bzip2 files.  A quick test showed a huge reduction in compression time:<span id="more-321"></span></p>
<p>Using 1 Core:</p>
<pre class="brush: sh">
[user@server source]$ pbzip2 -p1 -v -m1000 source.tar
Parallel BZIP2 v1.1.1 - by: Jeff Gilchrist [http://compression.ca]
[Apr. 17, 2010]             (uses libbzip2 by Julian Seward)

# CPUs: 1
BWT Block Size: 900 KB
File Block Size: 900 KB
Maximum Memory: 1000 MB
-------------------------------------------
File: 1 of 1
Input Name: source.tar
Output Name: source.tar.bz2

Input Size: 445163520 bytes
Compressing data (no threads)...
Output Size: 80063773 bytes
-------------------------------------------

Wall Clock: 95.100318 seconds
</pre>
<p>Using 64 Cores:</p>
<pre class="brush: sh">
[user@server source]$ pbzip2 -p64 -v -m1000 source.tar
Parallel BZIP2 v1.1.1 - by: Jeff Gilchrist [http://compression.ca]
[Apr. 17, 2010]             (uses libbzip2 by Julian Seward)

# CPUs: 64
BWT Block Size: 900 KB
File Block Size: 900 KB
Maximum Memory: 1000 MB
-------------------------------------------
File: 1 of 1
Input Name: source.tar
Output Name: source.tar.bz2

Input Size: 445163520 bytes
Compressing data...
Output Size: 80063773 bytes
-------------------------------------------

Wall Clock: 3.795763 seconds
</pre>
<p>Needless to say I&#8217;ve found a new utility for my compression needs.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.balldawg.net/index.php/2010/07/parallel-bzip2-pbzip2/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Puppet Dashboard with Multiple Puppet Masters</title>
		<link>http://www.balldawg.net/index.php/2010/05/puppet-dashboard-with-multiple-puppet-masters/</link>
		<comments>http://www.balldawg.net/index.php/2010/05/puppet-dashboard-with-multiple-puppet-masters/#comments</comments>
		<pubDate>Wed, 26 May 2010 14:38:02 +0000</pubDate>
		<dc:creator>Andrew Rankin</dc:creator>
				<category><![CDATA[Server Management]]></category>
		<category><![CDATA[Server Monitoring]]></category>
		<category><![CDATA[Puppet]]></category>

		<guid isPermaLink="false">http://www.balldawg.net/?p=310</guid>
		<description><![CDATA[Mike Zupan&#8217;s blog has a nice how to on installing puppet&#8217;s dashboard on CentOS 5, following it I was able to get the dashboard up and running with ease.  Since I have two puppet master&#8217;s that I&#8217;d like to report to the dashboard I found you can easily accomplish this without a full dashboard install [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://zcentric.com/2010/03/11/install-puppet-dashboard-on-redhatcentos-5/">Mike Zupan&#8217;s blog</a> has a nice how to on installing puppet&#8217;s dashboard on CentOS 5, following it I was able to get the dashboard up and running with ease.   Since I have two puppet master&#8217;s that I&#8217;d like to report to the dashboard I found you can easily accomplish this without a full dashboard install on each master.</p>
<p>You just need to:</p>
<ol>
<li>Copy over &#8216;puppet_dashboard.rb&#8217; with a modified HOST line to the other host.</li>
<li>Modify /etc/sysconfig/puppetmaster.</li>
<li>Turn on reporting on the clients.</li>
<li>Restart puppetmaster.</li>
</ol>
<p>Since the puppet_dashboard.rb is just making an HTTP post to the dashboard server, it can be coming from anywhere.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.balldawg.net/index.php/2010/05/puppet-dashboard-with-multiple-puppet-masters/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Breaking out of a HTTP proxy enviroment</title>
		<link>http://www.balldawg.net/index.php/2010/02/breaking-out-of-a-http-proxy-enviroment/</link>
		<comments>http://www.balldawg.net/index.php/2010/02/breaking-out-of-a-http-proxy-enviroment/#comments</comments>
		<pubDate>Tue, 09 Feb 2010 18:24:47 +0000</pubDate>
		<dc:creator>Andrew Rankin</dc:creator>
				<category><![CDATA[Server Management]]></category>
		<category><![CDATA[Server Monitoring]]></category>
		<category><![CDATA[corkscrew]]></category>
		<category><![CDATA[proxy]]></category>
		<category><![CDATA[Security]]></category>

		<guid isPermaLink="false">http://www.balldawg.net/?p=302</guid>
		<description><![CDATA[Being in a large corporate environment has positives and negatives, one of those negatives is that many companies use HTTP proxies to control and track internet usage from your work machines.  While in most cases this is very important from the HR and workplace productivity side, it can become a headache if you actually need [...]]]></description>
			<content:encoded><![CDATA[<p>Being in a large corporate environment has positives and negatives, one of those negatives is that many companies use HTTP proxies to control and track internet usage from your work machines.  While in most cases this is very important from the HR and workplace productivity side, it can become a headache if you actually need something outside your companies firewalls that is blocked.  In my case I wanted to backup some configurations and code to my home machine.  To do this I&#8217;d generally just rsync over ssh or scp the files over to an off site machine.   Sadly with a full firewall up and all traffic required to go through HTTP proxies, I had to find a different solution.  In my case, I decided to use &#8216;corkscrew&#8217;.<br />
<span id="more-302"></span><br />
Corkscrew tunnels SSH connections through HTTP proxies, you can find it at <a title="agroman.net/corkscrew/" href="http://www.agroman.net/corkscrew/">agroman.net/corkscrew/</a>.  It was quite easy to setup, and with some tweaks to your ssh config you can seamlessly use it.</p>
<p>My next trick is useful for getting around having your HTTP usage tracked and filtered, this is just taking advantage of the &#8220;-D&#8221; option within the &#8216;ssh&#8217; program.  When you invoke the -D option, followed with a port number you not only connect to the remote machine via SSH, but you also create a SOCKS proxy server on the port specified.  Setting up your browser&#8217;s proxy settings to point at that port on your local machine will securely forward any requests over to the remote machine, where they will then go out to their final destination.</p>
<p>When you combine corkscrew with ssh -D, you end up with a single, secure connection through the HTTP proxy to your remote machine with a SOCKS proxy through it.  This effectively gives you an easy unfiltered hole through to the outside.</p>
<p>You can also use this trick for getting rsync through a http firewall that might otherwise block it.  To accomplish this you just have setup your RSYNC_CONNECT_PROG environment variable to &#8220;/path/to/corkscrew &lt;proxy&gt; &lt;proxy_port&gt; %H 873 &lt;auth_file&gt;&#8221;.</p>
<p>Disclaimer: Check with your IT policies before attempting any of the above to make sure its allowed!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.balldawg.net/index.php/2010/02/breaking-out-of-a-http-proxy-enviroment/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Setting Blade Type &amp; Serial on IBM HS22</title>
		<link>http://www.balldawg.net/index.php/2009/09/setting-blade-type-serial-on-ibm-hs22/</link>
		<comments>http://www.balldawg.net/index.php/2009/09/setting-blade-type-serial-on-ibm-hs22/#comments</comments>
		<pubDate>Tue, 22 Sep 2009 18:35:20 +0000</pubDate>
		<dc:creator>Andrew Rankin</dc:creator>
				<category><![CDATA[Remote Lights Out]]></category>
		<category><![CDATA[Server Management]]></category>
		<category><![CDATA[Bladecenter]]></category>
		<category><![CDATA[IBM]]></category>

		<guid isPermaLink="false">http://www.balldawg.net/?p=290</guid>
		<description><![CDATA[So you&#8217;ve had to replace a main board in your IBM blade, we&#8217;ve all been there.  Generally, should you have asked for your friendly neighborhood tech to come out, he will kindly update your fresh motherboard with the original machines serial number and machine type/model number.  If you&#8217;ve ever watched him do his work, you [...]]]></description>
			<content:encoded><![CDATA[<p>So you&#8217;ve had to replace a main board in your IBM blade, we&#8217;ve all been there.  Generally, should you have asked for your friendly neighborhood tech to come out, he will kindly update your fresh motherboard with the original machines serial number and machine type/model number.  If you&#8217;ve ever watched him do his work, you know on earlier blades he used the BIOs update utility from IBMs website to update that information.  Well times have changed, this is no longer an option on UEFI and IMM based blades.   Before you go and call IBM, you can use IBM&#8217;s ASU utility to update them.   When I called they actually sent me an in house bootable ISO, which ended up just booting Linux and running a shell script that ran the following two commands:<br />
<span id="more-290"></span></p>
<pre class="brush: php">
./asu64 set SYSTEM_PROD_DATA.SysInfoSerialNum serial_number
./asu64 set SYSTEM_PROD_DATA.SysInfoProdName type_model
</pre>
<p>Now obviously you&#8217;ll be replacing serial_number and type_model with what you want to update the machine too, so don&#8217;t just run those commands outright. <img src='http://www.balldawg.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Another note of interest was that the machine originally did not have the latest UEFI or IMM firmware on them &#8211; and the update would not take &#8211; so update everything before attempting this.</p>
<p>For those interested you can also run a &#8216;show&#8217; on the above information to get the serial and model &#8211; I mention this because it does not look like dmidecode works for reading that information any longer.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.balldawg.net/index.php/2009/09/setting-blade-type-serial-on-ibm-hs22/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>A Simple Puppet Recipe for Tripwire</title>
		<link>http://www.balldawg.net/index.php/2009/08/puppetizing-tripwire/</link>
		<comments>http://www.balldawg.net/index.php/2009/08/puppetizing-tripwire/#comments</comments>
		<pubDate>Wed, 12 Aug 2009 13:43:40 +0000</pubDate>
		<dc:creator>Andrew Rankin</dc:creator>
				<category><![CDATA[Server Management]]></category>
		<category><![CDATA[Server Monitoring]]></category>
		<category><![CDATA[Tripwire]]></category>
		<category><![CDATA[Puppet]]></category>

		<guid isPermaLink="false">http://www.balldawg.net/?p=262</guid>
		<description><![CDATA[Since I failed to find a good description of how to do this on the web, I thought I&#8217;d share my recipe for using puppet to manage tripwire. This method will take care of running the initialization on the first puppetd run on a new machine, and update the policy file if its changed. It [...]]]></description>
			<content:encoded><![CDATA[<p>Since I failed to find a good description of how to do this on the web, I thought I&#8217;d share my recipe for using puppet to manage tripwire.   This method will take care of running the initialization on the first puppetd run on a new machine, and update the policy file if its changed.  It also has puppet managing your site.key, twcfg.txt, twpol.txt, and the daily cron to run the checks.  Its an extremely simple setup, but gets the job done.</p>
<p>I&#8217;ll start with the tripwire.pp file for puppet, in this file you&#8217;ll define your tripwire class and associated files and packages:<br />
<span id="more-262"></span></p>
<pre class="brush: perl">
class tripwire {
        file { &quot;/etc/tripwire/Makefile&quot;:
                owner =&gt; root,
                group =&gt; root,
                mode =&gt; 440,
                source =&gt; &quot;puppet:///etc/tripwire/Makefile&quot;,
                require =&gt; Package[tripwire],
        }
        file { &quot;/etc/tripwire/site.key&quot;:
                owner =&gt; root,
                group =&gt; root,
                mode =&gt; 440,
                source =&gt; &quot;puppet:///etc/tripwire/site.key&quot;,
                require =&gt; Package[tripwire],
        }
        file { &quot;/etc/tripwire/twcfg.txt&quot;:
                owner =&gt; root,
                group =&gt; root,
                mode =&gt; 440,
                source =&gt; &quot;puppet:///etc/tripwire/twcfg.txt&quot;,
                require =&gt; Package[tripwire],
        }
        file { &quot;/etc/tripwire/twpol.txt&quot;:
                owner =&gt; root,
                group =&gt; root,
                mode =&gt; 440,
                source =&gt; &quot;puppet:///etc/tripwire/twpol.txt&quot;,
                require =&gt; Package[tripwire],
        }

        file { &quot;/etc/cron.daily/tripwire-check&quot;:
                owner =&gt; root,
                group =&gt; root,
                mode =&gt; 755,
                source =&gt; &quot;puppet:///etc/cron.daily/tripwire-check&quot;,
                require =&gt; Package[tripwire],
        }

        file { &quot;/var/lib/tripwire/tripwire.twd&quot;:
                owner =&gt; root,
                group =&gt; root,
                mode =&gt; 440,
        }

        package {
                &quot;tripwire&quot;:
                        ensure =&gt; &quot;installed&quot;,
        }

        exec {
                &quot;make -C /etc/tripwire&quot;:
                        cwd =&gt; &quot;/etc/tripwire&quot;,
                        path =&gt; [&quot;/bin&quot;, &quot;/usr/bin&quot; ],
                        creates =&gt; &quot;/var/lib/tripwire/tripwire.twd&quot;,
                        timeout =&gt; 10000
        }

        exec {
                &quot;tripwire --update-policy -Z low --local-passphrase &#039;&#039; --site-passphrase &#039;&#039; --quiet /etc/tripwire/twpol.txt&quot;:
                        cwd =&gt; &quot;/etc/tripwire&quot;,
                        path =&gt; [&quot;/sbin&quot;, &quot;/usr/sbin&quot; ],
                        timeout =&gt; 10000,
                        refreshonly =&gt; &quot;true&quot;,
                        subscribe =&gt; File[&quot;/etc/tripwire/twpol.txt&quot;],

        }
}
</pre>
<p>You&#8217;ll notice there is a Makefile defined, this will make remote management much simpler, it contains some simple house keeping items.  I do not use all these within my puppet implementation, however:</p>
<pre class="brush: perl">
all: tw.cfg tw.pol /var/lib/tripwire/tripwire.twd

clean:
        /bin/rm -f /etc/tripwire/local.key /etc/tripwire/tw.cfg /etc/tripwire/tw.pol /var/lib/tripwire/tripwire.twd

init: clean /var/lib/tripwire/tripwire.twd

local.key:
        /usr/sbin/twadmin --generate-keys --local-keyfile local.key --local-passphrase &#039;&#039;

tw.cfg: site.key twcfg.txt
        /usr/sbin/twadmin --create-cfgfile --site-keyfile site.key --site-passphrase &#039;&#039; twcfg.txt

tw.pol: tw.cfg twpol.txt
        if [ -f tw.pol -a -f /var/lib/tripwire/tripwire.twd ]; \
        then /usr/sbin/tripwire --update-policy --local-passphrase &#039;&#039; --quiet --secure-mode low --site-passphrase &#039;&#039; twpol.txt; \
        else /usr/sbin/twadmin --create-polfile --site-passphrase &#039;&#039; twpol.txt; \
        fi

/var/lib/tripwire/tripwire.twd: local.key site.key
        /usr/sbin/tripwire --init --local-passphrase &#039;&#039;
</pre>
<p>My twcfg.txt is very simple:</p>
<pre class="brush: perl">
# required
DBFILE                 = /var/lib/tripwire/tripwire.twd
LOCALKEYFILE           = /etc/tripwire/local.key
POLFILE                = /etc/tripwire/tw.pol
REPORTFILE             = /var/lib/tripwire/report/$(DATE).twr
SITEKEYFILE            = /etc/tripwire/site.key

# e-mail notification
EMAILREPORTLEVEL       = 3
GLOBALEMAIL            = email@domain.tld
MAILMETHOD             = SENDMAIL
MAILNOVIOLATIONS       = false
MAILPROGRAM            = /usr/sbin/sendmail -oi -t

# other
EDITOR                 = /usr/bin/vim
LATEPROMPTING          = false
LOOSEDIRECTORYCHECKING = false
REPORTLEVEL            = 4
SYSLOGREPORTING        = true
TEMPDIRECTORY          = /var/tmp
</pre>
<p>Other than including the tripwire class within your site.pp file, thats about it.</p>
<p><em>Credit: The makefile was created by Steve Coile.</em></p>
]]></content:encoded>
			<wfw:commentRss>http://www.balldawg.net/index.php/2009/08/puppetizing-tripwire/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Glovebox v0.2.1 Released</title>
		<link>http://www.balldawg.net/index.php/2009/06/glovebox-v0-2-released/</link>
		<comments>http://www.balldawg.net/index.php/2009/06/glovebox-v0-2-released/#comments</comments>
		<pubDate>Sat, 13 Jun 2009 23:06:02 +0000</pubDate>
		<dc:creator>Andrew Rankin</dc:creator>
				<category><![CDATA[Glovebox]]></category>
		<category><![CDATA[Server Management]]></category>
		<category><![CDATA[Perl]]></category>

		<guid isPermaLink="false">http://www.balldawg.net/?p=219</guid>
		<description><![CDATA[I&#8217;ve released Glovebox Version 0.2.1 on Sourceforge.  It has a few bug fixes as well as the correct database schema included. Other changes include: Modified JavaScript so it would load &#38; function in IE Changed &#8220;class&#8221; to &#8220;clas&#8221; within JS, Perl, and the database. IE didn&#8217;t like using the word &#8220;class&#8221; as a variable name, [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve released <a href="https://sourceforge.net/projects/glovebox/" target="_blank">Glovebox Version 0.2.1 on Sourceforge</a>.  It has a few bug fixes as well as the correct database schema included.  Other changes include:</p>
<ul>
<li>Modified JavaScript so it would load &amp; function in IE</li>
<li>Changed &#8220;class&#8221; to &#8220;clas&#8221; within JS, Perl, and the database.  IE didn&#8217;t like using the word &#8220;class&#8221; as a variable name, changed else where for consistency.</li>
<li>Stopped opening of &#8220;right-click&#8221; menu when pressed on an interface folder</li>
<li>Fixed DB Schema to include basic information for default OIDs and Interfaces.</li>
<li>Modified Apache configuration so SSIs would work correctly in Apache 2, changed the SSIs to only execute on .shtml files</li>
<li>Renamed index.html to index.shtml</li>
</ul>
<p>There is a database change, so you must run the sql file located in the upgrade folder!</p>
<p>You can download it <a href="https://sourceforge.net/project/showfiles.php?group_id=262902" target="_blank">here</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.balldawg.net/index.php/2009/06/glovebox-v0-2-released/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Glovebox Released on SourceForge</title>
		<link>http://www.balldawg.net/index.php/2009/05/glovebox-released-on-sourceforge/</link>
		<comments>http://www.balldawg.net/index.php/2009/05/glovebox-released-on-sourceforge/#comments</comments>
		<pubDate>Tue, 19 May 2009 22:16:16 +0000</pubDate>
		<dc:creator>Andrew Rankin</dc:creator>
				<category><![CDATA[ExtJS]]></category>
		<category><![CDATA[Glovebox]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[Perl]]></category>
		<category><![CDATA[Server Management]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[Server]]></category>
		<category><![CDATA[SourceForge]]></category>

		<guid isPermaLink="false">http://www.balldawg.net/?p=122</guid>
		<description><![CDATA[On the request of my Manager, I have released Glovebox under a GPL license on Sourceforge.  I have yet to update the site with instructions but hope to soon.  I&#8217;ve included a tar ball of the current version as well as imported the full source code in Sourceforge&#8217;s SVN repo. The SourceForge project page is [...]]]></description>
			<content:encoded><![CDATA[<p>On the request of my Manager, I have released Glovebox under a GPL license on <a href="http://sourceforge.net/" target="_blank">Sourceforge</a>.  I have yet to update the site with instructions but hope to soon.  I&#8217;ve included a tar ball of the current version as well as imported the full source code in <a href="http://glovebox.svn.sourceforge.net/viewvc/glovebox/" target="_blank">Sourceforge&#8217;s SVN repo</a>.</p>
<p>The SourceForge project page is located <a href="http://sourceforge.net/projects/glovebox/" target="_blank">here</a>.<br />
The project home page is located <a href="http://www.balldawg.net/index.php/glovebox/" target="_self">here</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.balldawg.net/index.php/2009/05/glovebox-released-on-sourceforge/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Setting up SSL on Remote Lights Out Cards</title>
		<link>http://www.balldawg.net/index.php/2009/05/setting-up-ssl-on-remote-lights-out-cards/</link>
		<comments>http://www.balldawg.net/index.php/2009/05/setting-up-ssl-on-remote-lights-out-cards/#comments</comments>
		<pubDate>Tue, 19 May 2009 22:07:21 +0000</pubDate>
		<dc:creator>Andrew Rankin</dc:creator>
				<category><![CDATA[Remote Lights Out]]></category>
		<category><![CDATA[Server Management]]></category>
		<category><![CDATA[Bladecenter]]></category>
		<category><![CDATA[CA]]></category>
		<category><![CDATA[Certificate Authority]]></category>
		<category><![CDATA[Dell]]></category>
		<category><![CDATA[Drac]]></category>
		<category><![CDATA[elom]]></category>
		<category><![CDATA[HP]]></category>
		<category><![CDATA[https]]></category>
		<category><![CDATA[IBM]]></category>
		<category><![CDATA[iLo]]></category>
		<category><![CDATA[RSA II]]></category>
		<category><![CDATA[SSL]]></category>
		<category><![CDATA[Sun]]></category>

		<guid isPermaLink="false">http://www.balldawg.net/?p=123</guid>
		<description><![CDATA[In an attempt to up security and stop sending our passwords over clear text, I recently setup an in house certificate authority at work. While I&#8217;m not going to go through setting up the actual CA (see g-loaded.eu), I am going to go through the steps of how to set up a few different hardware [...]]]></description>
			<content:encoded><![CDATA[<p>In an attempt to up security and stop sending our passwords over clear text, I recently setup an in house certificate authority at work.   While I&#8217;m not going to go through setting up the actual CA (see <a href="http://www.g-loaded.eu/2005/11/10/be-your-own-ca/" target="_blank">g-loaded.eu</a>), I am going to go through the steps of how to set up a few different hardware vendor/types to work with a signed certificate.  One thing I learned during this process is that almost every single product, even made by the same company, is different.<br />
<span id="more-123"></span></p>
<p><strong>IBM BladeCenters</strong></p>
<p>&gt; Get the key from the BladeCenter</p>
<ol>
<li> Login to the BladeCenter</li>
<li>Expand &#8220;MM Control&#8221;</li>
<li>Click &#8220;Network Protocols&#8221;</li>
<li>Click &#8220;Secure Shell (SSH) Server&#8221;</li>
<li>Under the SSL for &#8220;Web Server click Generate&#8221; a &#8220;Generate a New Server Key and Certificate Signing Request (CSR)&#8221;</li>
<li>You&#8217;ll need to fill out the requested information down to SurName, then click &#8220;Generate CSR&#8221;</li>
<li>Save the key to your machine, prepend machine. (bladecenter.) to the beginning of the file name to denote where it came from</li>
</ol>
<p>&gt; SCP the file to root@server:/path/to/your/CA/requests/<br />
&gt; To convert the DER encoded CSR to a PEM encoded CSR, within the above folder, run:</p>
<pre class="brush: sh">
cd /path/to/your/CA/requests
openssl req -inform DER -in bladecenter.csr_server.der -out bladecenter.csr.pem -outform PEM
</pre>
<p>&gt; To sign the key, run:</p>
<pre class="brush: sh">
cd /path/to/your/CA
openssl ca -config openssl.cnf -policy policy_anything -out certs/bladecenter.crt -infiles requests/bladecenter.csr.pem
</pre>
<p>&gt; Convert the created .crt file to a .der file, run:</p>
<pre class="brush: sh">
cd /path/to/your/CA/certs
openssl x509 -in bladecenter.crt -inform PEM -out bladecenter.crt.der -outform DER
</pre>
<p>&gt; SCP the cert file (/path/to/your/CA/certs/bladecenter.crt.der) back to your system<br />
&gt; Import the cert into the AMM</p>
<ol>
<li>Click &#8220;Import a Signed Certificate to the Server&#8221;</li>
<li>Browse for the file you just copied back from server (bladecenter.crt.der)</li>
<li>Click &#8220;Import Server Certificate&#8221;</li>
</ol>
<p><strong>IBM RSA II</strong></p>
<p>&gt; Get the key from the RSA II Controller</p>
<ol>
<li>Login to the RSA II Controller</li>
<li>Click &#8220;Security&#8221;</li>
<li>Under the SSL for &#8220;Web Server click Generate&#8221; a &#8220;Generate a New Server Key and Certificate Signing Request (CSR)&#8221;</li>
<li>You&#8217;ll need to fill out the requested information down to SurName, then click &#8220;Generate CSR&#8221;</li>
</ol>
<p>&gt; Save the key to your machine, prepend machine. (rsa.) to the beginning of the file name to denote where it came from<br />
&gt; SCP the file to root@server:/path/to/your/CA/requests/<br />
&gt; To convert the DER encoded CSR to a PEM encoded CSR, within the above folder, run:</p>
<pre class="brush: sh">
cd /path/to/your/CA/requests
openssl req -inform DER -in rsa.csr_server.der -out rsa.csr.pem -outform PEM
</pre>
<p>&gt; To sign the key, run:</p>
<pre class="brush: sh">
cd /path/to/your/CA
openssl ca -config openssl.cnf -policy policy_anything -out certs/rsa.crt -infiles requests/rsa.csr.pem
</pre>
<p>&gt; Convert the created .crt file to a .der file, run:</p>
<pre class="brush: sh">
cd /path/to/your/CA/certs
openssl x509 -in rsa.crt -inform PEM -out rsa.crt.der -outform DER
</pre>
<p>&gt; SCP the cert file (/path/to/your/CA/rsa.crt.der) back to your system<br />
&gt; Import the cert into the RSA II Controller</p>
<ol>
<li> Click &#8220;Import a Signed Certificate to the Server&#8221;</li>
<li>Browse for the file you just copied back from server (rsa.crt.der)</li>
<li>Click &#8220;Import Server Certificate&#8221;</li>
</ol>
<p><strong>HP iLO</strong></p>
<p>&gt; Get the Signing Request from the iLO</p>
<ol>
<li>Login to the iLO</li>
<li>Hover over &#8220;Administration&#8221;</li>
<li>Select &#8220;Certificate Administration&#8221;</li>
<li>Click &#8220;Create Certificate Request&#8221;</li>
<li>Copy and paste the request from the box and into server:/path/to/your/CA/requests/ilo.csr.pem</li>
</ol>
<p>&gt; To sign the key, run:</p>
<pre class="brush: sh">
cd /path/to/your/CA
openssl ca -config openssl.cnf -policy policy_anything -out certs/ilo.crt -infiles requests/ilo.csr.pem
</pre>
<p>&gt; Import the cert into the iLO</p>
<ol>
<li>Click &#8220;Import Certificate&#8221;</li>
<li>Enter the contents of /path/to/your/CA/certs/ilo.crt into the provided box</li>
<li>Click &#8220;Next&#8221;</li>
</ol>
<p><strong>Sun eLOM</strong></p>
<p>&gt; Get the Signing Request from the eLOM</p>
<ol>
<li> Login to the eLOM</li>
<li>Click &#8220;Configuration&#8221;</li>
<li>Click &#8220;System Management Access&#8221;</li>
<li>Click &#8220;SSL Certificate&#8221;</li>
<li>Select &#8220;Certificate&#8221; and click &#8220;Select&#8221;</li>
</ol>
<p>&gt; Generate the request:</p>
<pre class="brush: sh">
cd /path/to/your/CA
openssl req -config openssl.cnf -new -nodes -keyout private/elom.key -out requests/elom.csr -days 365
</pre>
<p><strong>You&#8217;ll be asked specific questions about the servers location, most of the defaults have been set in openssl.cnf, however you&#8217;ll need to make sure the domain name (CN) is correct.</strong></p>
<p>&gt; Sign the key:</p>
<pre class="brush: sh">
cd /path/to/your/CA
openssl ca -config openssl.cnf -policy policy_anything -out certs/elom.crt -infiles requests/elom.csr
</pre>
<p>&gt; Import the Key on the eLOM</p>
<ol>
<li> Upload the generated Certificate first (server:/path/to/your/CA/certs/elom.crt)</li>
<li>Upload the generated Key Second (server:/path/to/your/CA/private/elom.key)</li>
</ol>
<p><strong>Dell DRAC</strong></p>
<p>&gt; Get the Signing Request from the DRAC</p>
<ol>
<li> Login to the DRAC</li>
<li>Click the &#8220;Configuration&#8221; tab</li>
<li>Click the &#8220;Security&#8221; tab</li>
<li>Select &#8220;Generate a new Certificate Signing Request (CSR)&#8221;</li>
<li>Click &#8220;Next&#8221;</li>
<li>Complete the listed fields making sure that the &#8220;Common Name&#8221; (CN) is the full host name of the console</li>
<li>Click &#8220;Generate&#8221;, wait for it to generate the request.  It will pop up with a download for &#8220;csr.txt&#8221; when it is complete.  Save the file.</li>
<li>Rename csr.txt to include the hostname of the box, EX: drac.csr.txt</li>
<li>SCP the file to root@server:/path/to/your/CA/requests</li>
</ol>
<p>&gt; To sign the key, run:</p>
<pre class="brush: sh">
cd /path/to/your/CA
openssl ca -config openssl.cnf -policy policy_anything -out certs/drac.crt -infiles requests/drac.csr.txt
</pre>
<p>&gt; Edit the crt file to remove everything above the &#8220;&#8212;&#8211;BEGIN CERTIFICATE&#8212;&#8211;&#8221; line<br />
<strong> &gt; Save the File with DOS-style Line-Ending CR-LF (:set ff=dos in vi)</strong><br />
&gt; Import the cert into the DRAC</p>
<ol>
<li> Return to &#8220;Certificate Management&#8221;</li>
<li>Select &#8220;Upload DRAC 4 server certificate&#8221;</li>
<li>Click &#8220;Next&#8221;</li>
<li>Select the certificate you just signed</li>
<li>Click &#8220;Upload&#8221;</li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://www.balldawg.net/index.php/2009/05/setting-up-ssl-on-remote-lights-out-cards/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Glovebox: My Solution to Managing Servers</title>
		<link>http://www.balldawg.net/index.php/2009/05/glovebox-my-solution-to-managing-servers/</link>
		<comments>http://www.balldawg.net/index.php/2009/05/glovebox-my-solution-to-managing-servers/#comments</comments>
		<pubDate>Sat, 09 May 2009 01:39:05 +0000</pubDate>
		<dc:creator>Andrew Rankin</dc:creator>
				<category><![CDATA[Glovebox]]></category>
		<category><![CDATA[Perl]]></category>
		<category><![CDATA[Server Management]]></category>
		<category><![CDATA[libvirt]]></category>

		<guid isPermaLink="false">http://www.balldawg.net/?p=58</guid>
		<description><![CDATA[When I started in the &#8220;Technology&#8221; department at my current employer, I found myself apart of a team that was tasked with taking care of hundreds of IBM blade servers, and tens of other IBM system x servers.  For the most part we could keep up with our servers by where they were in our [...]]]></description>
			<content:encoded><![CDATA[<p>When I started in the &#8220;Technology&#8221; department at my current employer, I found myself apart of a team that was tasked with taking care of hundreds of IBM blade servers, and tens of other IBM system x servers.  For the most part we could keep up with our servers by where they were in our monitoring software, but if we needed to know exactly where they were in either a blade center, by remote console name, or what Domain-0 they lived on for our Xen based virtual machines &#8211; we had to relate back to a usually out of date spreadsheet that showed where to go.</p>
<p><span id="more-58"></span></p>
<p>After a year of this mess I decided to go a different route &#8211; a dynamic web application that would update it self based on data pulled from the blade centers via SNMP.  Glovebox was born.  Well, actually it was called &#8220;the dashboard&#8221; in the beginning &#8211; unfortunately for me my co-workers have no issue pointing out when things aren&#8217;t named quite right, a sarcastic &#8220;well it ain&#8217;t a dashboard&#8230; how about Glovebox!&#8221; decided the name fate of it.   The product took almost a year to get to its current self, but manages to keep track of all our blades, IBM RSA II consoles and our Xen virtual machines without the input from anyone on staff.</p>
<p>For the IBM blades and RSA II cards it uses a set of OIDs I gathered from sifting through their respective snmp output.  In the case of the blades, those OIDs are:</p>
<pre class="brush: sql">
| 1.3.6.1.4.1.2.3.51.2.2.21.1.1.3    | bladecenters | serial          |
| 1.3.6.1.4.1.2.3.51.2.2.8.1.1       | bladecenters | error           |
| 1.3.6.1.4.1.2.3.51.2.2.21.1.1.2    | bladecenters | family          |
| 1.3.6.1.4.1.2.3.51.2.2.21.1.1.1    | bladecenters | model           |
| 1.3.6.1.4.1.2.3.51.2.22.3.1.1.1.15 | switches     | error           |
| 1.3.6.1.4.1.2.3.51.2.22.3.1.7.1.6  | switches     | address         |
| 1.3.6.1.4.1.2.3.51.2.2.21.5.1.1.6  | servers      | bios            |
| 1.3.6.1.4.1.2.3.51.2.2.21.4.1.1.6  | servers      | serial          |
| 1.3.6.1.4.1.2.3.51.2.2.21.4.1.1.7  | servers      | model           |
| 1.3.6.1.4.1.2.3.51.2.22.1.5.1.1.6  | servers      | hostname        |
| 1.3.6.1.4.1.2.3.51.2.2.21.5.3.1.6  | servers      | bsmp            |
| 1.3.6.1.4.1.2.3.51.2.2.8.2.1.1.7   | servers      | error           |
| 1.3.6.1.4.1.2.3.51.2.2.8.2.1.1.4   | servers      | power           |
| 1.3.6.1.4.1.2.3.51.2.2.21.4.1.1.20 | servers      | storage         |
| 1.3.6.1.4.1.2.3.51.2.2.21.4.1.1.12 | servers      | family          |
| 1.3.6.1.4.1.2.3.51.2.22.3.1.7.1.5  | switches     | serial          |
| 1.3.6.1.4.1.2.3.51.2.3.4.2.1.2     | bladecenters | eventlog        |
| 1.3.6.1.4.1.2.3.51.2.4.5.1         | bladecenters | name            |
| 1.3.6.1.4.1.2.3.51.2.2.10.5.1.2    | bladecenters | watts           |
| 1.3.6.1.4.1.2.3.51.2.2.10.5.1.3    | bladecenters | btus            |
| 1.3.6.1.4.1.2.3.51.2.4.9.1.1.3     | bladecenters | hostname        |
| 1.3.6.1.4.1.2.3.51.2.2.8.1.2       | bladecenters | infoled         |
| 1.3.6.1.4.1.2.3.51.2.2.8.1.3       | bladecenters | templed         |
| 1.3.6.1.4.1.2.3.51.2.2.8.1.4       | bladecenters | identled        |
| 1.3.6.1.4.1.2.3.51.2.22.4.25       | bladecenters | installedblades |
| 1.3.6.1.4.1.2.3.51.2.2.21.3.1.1.3  | mm           | firmware        |
| 1.3.6.1.4.1.2.3.51.2.22.4.30       | bladecenters | installedmms    |
| 1.3.6.1.4.1.2.3.51.2.2.21.2.1.1.9  | mm           | serial          |
| 1.3.6.1.4.1.2.3.51.2.2.21.3.1.1.6  | mm           | firmware_date   |
| 1.3.6.1.4.1.2.3.51.2.2.21.3.1.1.2  | mm           | name            |
| 1.3.6.1.4.1.2.3.51.2.22.5.1.1.3    | mm           | address         |
| 1.3.6.1.4.1.2.3.51.2.22.5.1.1.5    | mm           | error           |
| 1.3.6.1.4.1.2.3.51.2.22.5.1.1.4    | mm           | primary         |
</pre>
<p>From the list you can see I monitor not just the blades but also the management modules, the chassis, and the blade switches.  The snmp output on the IBM Advanced Management Modules is quite complete and they provide good MIBs to be able to decipher the information.</p>
<p>I have a similar list for the RSA II cards which was added after a re-write of the initial version of Glovebox mid last year, the re-write was to make the software be able to use &#8220;modules&#8221; for each device, this was so adding future additions was easy.   The Xen virtual machines are added via libvirt and its associated Perl module, I have setup keys between the server that this application runs on and each Domain-0, allowing it connection and figure out whats running on there.   Since it based off modules you very well could add anything you wanted &#8211; it even has a shared development libary that allows for easy additions without re-inventing the wheel.</p>
<p>So whats it look like?  Well it looks like any application written with ExtJS as the front end &#8211; quite good.  I&#8217;m not a designer, I can&#8217;t do graphics, but with the help of ExtJS it came out quite nicely.  How about a peak:</p>
<p>
<a href='http://www.balldawg.net/index.php/2009/05/glovebox-my-solution-to-managing-servers/eventlog/' title='Blade Center Event Log'><img width="150" height="115" src="http://www.balldawg.net/wp-content/uploads/2009/05/eventlog.jpg" class="attachment-thumbnail" alt="Blade Center Event Log" title="Blade Center Event Log" /></a>
<a href='http://www.balldawg.net/index.php/2009/05/glovebox-my-solution-to-managing-servers/list_bc_opt/' title='Blade Center Options: Open Slots'><img width="150" height="115" src="http://www.balldawg.net/wp-content/uploads/2009/05/list_bc_opt.jpg" class="attachment-thumbnail" alt="Blade Center Options: Open Slots" title="Blade Center Options: Open Slots" /></a>
<a href='http://www.balldawg.net/index.php/2009/05/glovebox-my-solution-to-managing-servers/plugins/' title='Container Plugins Menu'><img width="150" height="115" src="http://www.balldawg.net/wp-content/uploads/2009/05/plugins.jpg" class="attachment-thumbnail" alt="Container Plugins Menu" title="Container Plugins Menu" /></a>
<a href='http://www.balldawg.net/index.php/2009/05/glovebox-my-solution-to-managing-servers/updating/' title='Updating From Devices'><img width="150" height="115" src="http://www.balldawg.net/wp-content/uploads/2009/05/updating.jpg" class="attachment-thumbnail" alt="Updating From Devices" title="Updating From Devices" /></a>
<br />
Sorry for blocking out some of the data, but some of the info needs to stay in house. The back end is entirely Perl and all data is kept in a MySQL database.  It ended up being a rather larger application in the end, but really makes life quite a bit easier.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.balldawg.net/index.php/2009/05/glovebox-my-solution-to-managing-servers/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

