<?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>the second phase</title>
	<atom:link href="http://www.phase2.net/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.phase2.net</link>
	<description>confessions of a geek</description>
	<lastBuildDate>Wed, 04 Aug 2010 07:11:44 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>What would it take&#8230;</title>
		<link>http://www.phase2.net/2010/08/04/what-would-it-take/</link>
		<comments>http://www.phase2.net/2010/08/04/what-would-it-take/#comments</comments>
		<pubDate>Wed, 04 Aug 2010 07:11:44 +0000</pubDate>
		<dc:creator>steve</dc:creator>
				<category><![CDATA[Thoughts]]></category>
		<category><![CDATA[school]]></category>

		<guid isPermaLink="false">http://www.phase2.net/?p=1148</guid>
		<description><![CDATA[to get into MIT?
As an adult, that is.  I&#8217;m not posing this question for high school students looking to get into the university, but rather as a question to myself.  I suppose with Marielle&#8217;s recent foray back to school to get her MBA, I look back at my college career and the phrase [...]]]></description>
			<content:encoded><![CDATA[<p>to get into MIT?</p>
<p>As an adult, that is.  I&#8217;m not posing this question for high school students looking to get into the university, but rather as a question to myself.  I suppose with Marielle&#8217;s recent foray back to school to get her MBA, I look back at my college career and the phrase &#8216;meh&#8217; comes to mind.  I see my cousin Pat graduating from Art Center as valedictorian and I find myself jealous.  I read and see the great things around me that people are creating, whether it be with their hands or their minds and it&#8217;s something I want to be apart of and yet, because of my educational background ( I have an associate degree in architecture.. :/ ) and my brain forgetting all the math that I was ever taught, I find it to be an uphill battle.  In the snow.  5 feet deep.   Backwards.   Being chased by dinosaurs.</p>
<p>I wish that when I was younger that I had the motivation I have now, the yearning to learn and understand the most complicated of math problems and logic puzzles.  ( Well, I was always in love with logic puzzles ).  But I can&#8217;t sit here and wish.  So I did take the first step.  The first step in what may be the longest journey of my life.  I&#8217;m going back to school.  It&#8217;s a small step, maybe all I can afford right now to take, with everything else going on in my life ( house, work, etc ), but it&#8217;s a step in the right direction.  I&#8217;m starting slow and just getting some math refreshers under my belt, get myself back up to speed.</p>
<p>I&#8217;ve also started watching the MIT CS department&#8217;s online courses at <a href="http://ocw.mit.edu/">MIT&#8217;s OpenCourseWare</a>.  As I watch them, I ponder the question that started this topic &#8211; how does an adult, an old(er) person like me get into something like MIT?  Do they even take out-of-practice students?  I&#8217;m not naive enough to think I&#8217;d get in right now, but I&#8217;m curious as what it would take to be able to transfer to the school, undergraduate, graduate, whatever.  If you know, please, enlighten me or is it really just too late for me to ever consider something like that?</p>
<p>In any case, MIT possible or not, I will walk the road I&#8217;ve set myself upon.  The end goal?  At least a bachelor&#8217;s degree in Computer Science.  The goal, if I push myself?  Well.. Dr. Hajducko has a nice ring to it. <img src='http://www.phase2.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.phase2.net/2010/08/04/what-would-it-take/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Goals updated, thoughts</title>
		<link>http://www.phase2.net/2010/07/28/goals-updated-thoughts/</link>
		<comments>http://www.phase2.net/2010/07/28/goals-updated-thoughts/#comments</comments>
		<pubDate>Thu, 29 Jul 2010 01:32:51 +0000</pubDate>
		<dc:creator>steve</dc:creator>
				<category><![CDATA[Emo]]></category>
		<category><![CDATA[Thoughts]]></category>
		<category><![CDATA[goals]]></category>

		<guid isPermaLink="false">http://www.phase2.net/?p=1142</guid>
		<description><![CDATA[I updated the Goals page with some new goals that have come into my life, as well as some of the ones I&#8217;ve accomplished recently.
Which brings me to another subject &#8211; how do I concentrate on getting some of these goals down?  People who know me know that my personality is best described as [...]]]></description>
			<content:encoded><![CDATA[<p>I updated the <a href="/goals/">Goals</a> page with some new goals that have come into my life, as well as some of the ones I&#8217;ve accomplished recently.</p>
<p>Which brings me to another subject &#8211; how do I concentrate on getting some of these goals down?  People who know me know that my personality is best described as &#8217;scattered&#8217;.  I know a little about alot and it&#8217;s something I&#8217;ve always regretted.  When I have kids, I will be teaching them the exact opposite &#8211; know alot about a little.  In other words, it&#8217;s great to be good at alot of things, but it&#8217;s very special to be the best at one thing.</p>
<p>The truth in that statement is easily supported by looking at our society.  Are famous people those who are good at lots of little things or are the people that we know and respect in our communities those who excelled at one specific thing?  People are famous because they are the best at a small subset of things that they do. They are the people we look up to and strive to imitate.</p>
<p>The sad part is, my lack of being great at any one specific thing comes not from a lack of drive or a doldrum interest in any specific category, but rather from being too interested in too many things that I don&#8217;t have enough time to dedicate to any one thing.  Also, the occasional WoW gaming spree of a few months to a year effectively kills any drive to do anything else besides get more purpz and up the deepz.</p>
<p>Now that I&#8217;ve kicked the WoW habit again, I find myself in the sore situation of having to decide on those goals I do wish to focus on.  The more I learn every day however, the more I find other subjects that interest me.  One fault of mine would to be to have a lack of decision making when it comes to concentrating and driving towards some of these goals.  How do I decide which ones I wish to focus on? Which ones are the most important to me?</p>
<p>Some of the issues I have with deciding on the goals to pursue have to deal with pressure from outside influences, such as my personal and professional life.  They are rather opposing forces, as obviously a night of coding does not a &#8216;date night&#8217; make.</p>
<p>Maybe I should go see a therapist. :/  I guess I should add that one to the goals.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.phase2.net/2010/07/28/goals-updated-thoughts/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How&#8217;s your PAM -fu?</title>
		<link>http://www.phase2.net/2010/06/17/hows-your-pam-fu/</link>
		<comments>http://www.phase2.net/2010/06/17/hows-your-pam-fu/#comments</comments>
		<pubDate>Thu, 17 Jun 2010 23:15:56 +0000</pubDate>
		<dc:creator>steve</dc:creator>
				<category><![CDATA[Unix]]></category>

		<guid isPermaLink="false">http://www.phase2.net/?p=1126</guid>
		<description><![CDATA[I&#8217;m hoping someone can explain this one to me.
The default RHEL system-auth for PAM includes the following for the &#8216;auth&#8217; stack.

auth        required      pam_env.so
auth        sufficient    pam_unix.so nullok try_first_pass
auth       [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m hoping someone can explain this one to me.</p>
<p>The default RHEL system-auth for PAM includes the following for the &#8216;auth&#8217; stack.</p>
<blockquote class='terminal'><p>
auth        required      pam_env.so<br />
auth        sufficient    pam_unix.so nullok try_first_pass<br />
auth        requisite     pam_succeed_if.so uid >= 500 quiet<br />
auth        required      pam_deny.so
</p></blockquote>
<p>Let&#8217;s try and step through this.</p>
<blockquote class='terminal'><p>auth        required      pam_env.so</p></blockquote>
<p>This module basically loads up the /etc/security/pam_env.conf file and sets a bunch of environment variables.  Nothing fancy.</p>
<p>Our second line:</p>
<blockquote class='terminal'><p>
auth        sufficient    pam_unix.so nullok try_first_pass
</p></blockquote>
<p>This is where we test their password.  It&#8217;s given to the pam_unix.so module to test.  Null passwords are ok, and the try_first_pass tries the password from the previous module.  If pam_unix.so returns success, we stop here and state that the user is authenticated.  But what happens if they are not authenticated?  Well, it&#8217;s not enough to fail them, so we go to the next line.</p>
<blockquote class='terminal'><p>
auth        requisite     pam_succeed_if.so uid >= 500 quiet
</p></blockquote>
<p>This line tests whether the user is a system account or not ( system accounts usually have a UID below 500 ).  If this fails ( it IS a system account ) &#8211; then fail immediately.  However, let&#8217;s say it&#8217;s a normal system account, which means it succeeds.  Which means it goes to the next line and it&#8217;s here where I&#8217;m becoming confused.</p>
<p>Our last line is simply:</p>
<blockquote class='terminal'><p>
auth        required      pam_deny.so
</p></blockquote>
<p>This basically returns a failure, straight-out.  It doesn&#8217;t take any options, it doesn&#8217;t log anything, it just denies you.  That&#8217;s all fine and dandy &#8211; but what the hell is the point of the line above it then?  Why are we even bothering to test if they&#8217;re a system account or not, if we&#8217;re just going to deny them anyways?</p>
<p>The basic flow for a user account typing in the wrong password:</p>
<ul>
<li>Load PAM environment</li>
<li>Test password</li>
<li>Password failed, is UID above 500?</li>
<li>Success! UID is above 500</li>
<li>Hit pam_deny, required.  Deny user</li>
</ul>
<p>Compared to the wrong password for a system account:</p>
<ul>
<li>Load PAM environment</li>
<li>Test password</li>
<li>Password fail, is UID above 500?</li>
<li>Failure! UID is below 500.  Fail immediately</li>
</ul>
<p>So again, what&#8217;s the point?  Both pam_deny and pam_succeed_if return PAM_AUTH_ERR if they fail &#8211; so it&#8217;s not like we&#8217;re trying to give a different response.  Also, the quiet on pam_succeed_if makes it so we don&#8217;t log for failure or successes for our requisite line. ( I could understand if this was quiet_success, to record a system user login attempt ).</p>
<p>I&#8217;m sure I&#8217;m missing something here but I don&#8217;t understand the logic behind why the &#8216;requisite&#8217; line exists in this stack and I&#8217;m hoping someone can shed some light on it.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.phase2.net/2010/06/17/hows-your-pam-fu/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Back from Hawaii</title>
		<link>http://www.phase2.net/2010/03/29/back-from-hawaii/</link>
		<comments>http://www.phase2.net/2010/03/29/back-from-hawaii/#comments</comments>
		<pubDate>Mon, 29 Mar 2010 05:50:57 +0000</pubDate>
		<dc:creator>steve</dc:creator>
				<category><![CDATA[Photography]]></category>

		<guid isPermaLink="false">http://www.phase2.net/?p=1109</guid>
		<description><![CDATA[We&#8217;re back from Hawaii and I&#8217;ve uploaded the photos.  You can take a peek on Flickr
]]></description>
			<content:encoded><![CDATA[<p>We&#8217;re back from Hawaii and I&#8217;ve uploaded the photos.  You can take a peek on <a href="http://www.flickr.com/photos/sjmh/sets/72157623725008830/">Flickr</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.phase2.net/2010/03/29/back-from-hawaii/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>New wheels</title>
		<link>http://www.phase2.net/2010/03/16/new-wheels/</link>
		<comments>http://www.phase2.net/2010/03/16/new-wheels/#comments</comments>
		<pubDate>Wed, 17 Mar 2010 03:33:30 +0000</pubDate>
		<dc:creator>steve</dc:creator>
				<category><![CDATA[Photography]]></category>
		<category><![CDATA[Random]]></category>

		<guid isPermaLink="false">http://www.phase2.net/?p=1092</guid>
		<description><![CDATA[So I bought a new ( well, used ) motorcycle on Monday evening &#8211; a 2003 Yamaha V-Star Classic.  I had to purchase something since I returned my truck to the dealership as my lease had ended.  For the past few days I&#8217;d been sharing my girlfriend&#8217;s car but that quickly became old.
Took [...]]]></description>
			<content:encoded><![CDATA[<p>So I bought a new ( well, used ) motorcycle on Monday evening &#8211; a 2003 Yamaha V-Star Classic.  I had to purchase something since I returned my truck to the dealership as my lease had ended.  For the past few days I&#8217;d been sharing my girlfriend&#8217;s car but that quickly became old.</p>
<p>Took some quick pics &#8211; I thought they were good until I realized my ISO was set extremely high &#8211; you can see alot of noise if you look close.  By the time I realized it though, the sun was already going down &#8211; I&#8217;ll just have to wait till a weekend and snap some better photos.</p>

<a href='http://www.phase2.net/2010/03/16/new-wheels/bike2/' ><img width="99" height="150" src="http://www.phase2.net/wp-content/uploads/bike2-99x150.jpg" class="attachment-thumbnail" alt="" title="bike2" /></a>
<a href='http://www.phase2.net/2010/03/16/new-wheels/bike3/' ><img width="99" height="150" src="http://www.phase2.net/wp-content/uploads/bike3-99x150.jpg" class="attachment-thumbnail" alt="" title="bike3" /></a>
<a href='http://www.phase2.net/2010/03/16/new-wheels/bike4/' ><img width="150" height="99" src="http://www.phase2.net/wp-content/uploads/bike4-150x99.jpg" class="attachment-thumbnail" alt="" title="bike4" /></a>
<a href='http://www.phase2.net/2010/03/16/new-wheels/bike5/' ><img width="150" height="99" src="http://www.phase2.net/wp-content/uploads/bike5-150x99.jpg" class="attachment-thumbnail" alt="" title="bike5" /></a>
<a href='http://www.phase2.net/2010/03/16/new-wheels/bike6/' ><img width="150" height="99" src="http://www.phase2.net/wp-content/uploads/bike6-150x99.jpg" class="attachment-thumbnail" alt="" title="bike6" /></a>
<a href='http://www.phase2.net/2010/03/16/new-wheels/motorcycle-2/' ><img width="150" height="99" src="http://www.phase2.net/wp-content/uploads/motorcycle1-150x99.jpg" class="attachment-thumbnail" alt="" title="motorcycle" /></a>

]]></content:encoded>
			<wfw:commentRss>http://www.phase2.net/2010/03/16/new-wheels/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Thoughts on configuration management</title>
		<link>http://www.phase2.net/2010/03/05/thoughts-on-configuration-management/</link>
		<comments>http://www.phase2.net/2010/03/05/thoughts-on-configuration-management/#comments</comments>
		<pubDate>Sat, 06 Mar 2010 01:06:02 +0000</pubDate>
		<dc:creator>steve</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[Unix]]></category>
		<category><![CDATA[Windows]]></category>
		<category><![CDATA[Work]]></category>
		<category><![CDATA[config management]]></category>
		<category><![CDATA[opsware]]></category>

		<guid isPermaLink="false">http://www.phase2.net/?p=1076</guid>
		<description><![CDATA[Someone recently asked me &#8211; &#8216;What would your perfect configuration management tool look like?&#8217;.  It took awhile to come up with the answer for the question; after all, configuration management is a large and complex subject.  On top of that, who can ever really say what the perfect anything would be?  I [...]]]></description>
			<content:encoded><![CDATA[<p>Someone recently asked me &#8211; &#8216;What would your perfect configuration management tool look like?&#8217;.  It took awhile to come up with the answer for the question; after all, configuration management is a large and complex subject.  On top of that, who can ever really say what the perfect anything would be?  I can ask you to describe the perfect girl and you&#8217;d probably list off a bunch of traits but you would always fail to name everything.</p>
<p>In any case, I thought I&#8217;d go ahead and share what I told the person who asked.</p>
<h2>Philosophy</h2>
<p>The first thing behind a configuration management needs to be the thought of how it is supposed to interact with the admin.  Is the admin supposed to be using this tool everyday? Once a week?  Do they login just to check their compliance or do they login to perform tasks, modifications and installs with the tool?  The answer for me is obvious &#8211; the tool needs to take over how I do my job.  Let&#8217;s face it, half the day of a normal admin is fixing stuff that other people have mucked with, adding users, installing software, building systems &#8211; all that jazz.</p>
<p>In order to take over my job, the tool needs to be able to accomplish the things I can do on a terminal in a simple manner.  If I need to install a package, the tool needs to know how to do that.  If I want to add a user, it needs to know how to do that.  Add a route or cronjob, edit host files or configurations, the list goes on and on.  However, you can break it down, for 90% of the use cases, to two simple things &#8211; interacting with files and issuing commands.  Windows is a little more difficult, because of its registry and .COM objects and other hidden magic, but in the world of unix derivatives, it largely holds true.</p>
<p>The second part of the philosophy is that no matter what I do in the tool, the tool knows how to make sure my changes stay.  Just like a source version control system, changes that are made outside of the tool are invalid.  If I edit a piece of code and forget to submit it into the SVC system, the next time I sync out the code, my changes are gone.  The same should hold true for any configuration management system &#8211; if I add a user, the tool needs to make sure that user stays.  If I remove a user, it should make sure that user stays deleted.  Any change I would make through the tool would follow suit.  The perfect tool does this automatically; by telling the tool to make a change, it automatically starts checking for and verifying that the change is in place and stays in place.  I shouldn&#8217;t have to tell the tool to always check for my changes or write extra scripts and schedule them to verify my changes still exist.  It&#8217;d be nice if the tool allowed me to detail how it should verify the change still exists but it should have default methods as well.</p>
<p>By enforcing the concept that changes done outside of the tool are invalid and will be removed, you force the admin into using the tool to make his changes, which I stated before, should be the goal of every configuration management system. </p>
<h2>Abstraction</h2>
<p>The next important part a configuration management tool needs to bring to the table is the idea of abstracting the change from the implementation of the change.   The idea of the change, or the resource if you will, needs to be free from how it is implemented on the operating system.  Face it, every OS we deal with does something in a different way &#8211; but why should I need to care about that?  My task is to get the change on the system &#8211; not deal with the different flags and commands each system wants to force me to use.  If I want to add a user, I just want to say &#8216;Add this user to this system&#8217;.  I don&#8217;t want to have to tell the tool &#8216;Well for Linux, use the useradd command.  For AIX, use the mkuser command.  For Windows, do it through this COM object&#8217;.  The same goes for things like packages, scheduled tasks, routes, network mounts, directories, files and many more.</p>
<p>Sure, there will be cases where a resource is OS specific ( again, Windows registry ), but for the most part, the change ( the resource I want configured on the system ) needs to be presented to the user of the tool as a singular entity and method.  To do that, it needs to be abstracted from how the resource is actually configured on the system.  An additional plus would be an API or plugin architecture that allows the admin to develop his own implementations of resources if he needs to.</p>
<h2>Node Hierarchy</h2>
<p>The next goal a configuration management tool needs to strive towards is some type of modularization or node hierarchy.  Every system ever built can be broken into smaller pieces.  The main advantage of this concept is that by breaking a system into smaller pieces, those pieces become units that you can reuse to build other hosts.</p>
<p>With the ability to reuse configured units ( or resources ) and by combining them into bigger units that can also be reused, you create a wonderful opportunity for a sys admin to customize and endless combinations to configure hosts with.  My configuration management tool becomes a big box of legos that I can quickly use to build my systems with.  And hey, every admin loves to play with legos. <img src='http://www.phase2.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<h2>Automatic Assignment and Grouping</h2>
<p>The last tool I used accomplished this task well and it&#8217;s something that I think every configuration management tool would benefit greatly from.  The idea behind this is the creation of groups that have a set of criteria defined.  These criteria are used to match against nodes and if a node matches it is automatically assigned as a member to the group.</p>
<p>While this isn&#8217;t anything special in and of itself, when you combine the ability to assign resources and static information to the group, you instantly create a useful way of quickly getting the right resources onto the right systems.  Imagine a group that pulls in all your web servers and makes sure they have the right httpd package or apache user.  It&#8217;s undeniably useful.</p>
<h2>Templating</h2>
<p>One of the main goals of a configuration management system is just that &#8211; manage configurations.  In order to do that, it needs to be able to modify the contents of files in a smart manner.  Being able to create a template of a configuration file gets rid of the horror of duplication.</p>
<p>Imagine a scenario where you have 20 different networks to administer.  That&#8217;s possibly 20 different /etc/resolv.confs to administer.  I don&#8217;t want to keep 20 separate and distinct versions of the file laying around that get deployed ( do you? ) &#8211; instead, a template is a great idea.  What&#8217;s even better is the idea of being able to fill in the variables of the template with information that&#8217;s stored in the management server.  Imagine if I defined a group for each network ( a dynamic one that&#8217;s auto-populated! ) and attached some variables to the group, such as my DNS servers, NTP servers, file server hostnames and other such goodness.  I could then have the agent deploy the template and generate the real config files based off the templates and the variables assigned to the system and/or groups the system belongs to.  I&#8217;m simply providing the recipe that bakes in all my configs.</p>
<h2>Always More!</h2>
<p>I could go on and on and describe each of these things in detail but to sum up the rest of what I would consider necessary in a great configuration management tool, here&#8217;s a list of mostly self-explanatory items.</p>
<ul>
<li>A software repository for storing packages/files to deploy</li>
<li>Good reporting mechanisms to detect drift and keep your manager happy</li>
<li>The ability to quickly deploy/run/schedule scripts and obtain output for certain tasks across your systems</li>
<li>Support for multiple platforms ( read: Windows &#038; Unix )
<li>An API and plugin architecture</li>
</ul>
<p>Additionally, here are some things that I think of &#8216;Nice to Have&#8217; in a tool but not completely necessary.  Why? Because they&#8217;re getting away from the main goal &#8211; management of configurations.</p>
<ul>
<li>Snapshots &#8211; good for comparison of systems</li>
<li>Patching</li>
<li>Build Infrastructure ( running your PXE/DHCP/BOOTP/GHOST systems out of the tool )</li>
<li>Non-java based agents</li>
</ul>
<h2>Perfect? Not quite</h2>
<p>Like I said, there&#8217;s always more that the perfect configuration management tool could use and more specific details for actual implementation of some of the goals and philosophies I&#8217;ve described that I feel are the most important.</p>
<p>I do think many of the tools out there are well on their way to accomplishing these goals &#8211; I just don&#8217;t think any are quite there yet.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.phase2.net/2010/03/05/thoughts-on-configuration-management/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>New theme</title>
		<link>http://www.phase2.net/2010/03/04/new-theme/</link>
		<comments>http://www.phase2.net/2010/03/04/new-theme/#comments</comments>
		<pubDate>Thu, 04 Mar 2010 08:49:51 +0000</pubDate>
		<dc:creator>steve</dc:creator>
				<category><![CDATA[Website]]></category>

		<guid isPermaLink="false">http://www.phase2.net/?p=1062</guid>
		<description><![CDATA[I grabbed a new theme over at ThemeForest, created by the extremely talented Matt Brett.  I was over at his site and was checking out his current design and saw some elements that I liked, but weren&#8217;t included in the theme I just purchased.
I&#8217;ve spent most of today getting one of those elements in [...]]]></description>
			<content:encoded><![CDATA[<p>I grabbed a new theme over at <a href="http://www.themeforest.com">ThemeForest</a>, created by the extremely talented <a href="http://www.mattbrett.com">Matt Brett</a>.  I was over at his site and was checking out his current design and saw some elements that I liked, but weren&#8217;t included in the theme I just purchased.</p>
<p>I&#8217;ve spent most of today getting one of those elements in and it&#8217;s working now &#8211; I had to rip some images from his current site but I&#8217;ll replace them in the next day or so &#8211; while reverse engineering code is one thing, I don&#8217;t condone shameless image ripping.  So, Matt, if you&#8217;re reading this &#8211; I only used your images for testing because I&#8217;m truly, truly awful at divs and floats.</p>
<p>Anyways, enjoy the new theme and I apologize if you visit in some of those rare moments where I&#8217;ve entirely borked the CSS and everything looks entirely out of whack.</p>
<p>( I&#8217;ve replaced the image I was borrowing and I&#8217;ll probably change the overlay image as well, the &#8217;shiny&#8217; look doesn&#8217;t mesh with the theme as well as I thought it would )</p>
]]></content:encoded>
			<wfw:commentRss>http://www.phase2.net/2010/03/04/new-theme/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Opsware Custom Attributes and You.</title>
		<link>http://www.phase2.net/2010/03/03/opsware-custom-attributes-and-you/</link>
		<comments>http://www.phase2.net/2010/03/03/opsware-custom-attributes-and-you/#comments</comments>
		<pubDate>Wed, 03 Mar 2010 22:01:36 +0000</pubDate>
		<dc:creator>steve</dc:creator>
				<category><![CDATA[Work]]></category>
		<category><![CDATA[opsware]]></category>
		<category><![CDATA[scripting]]></category>

		<guid isPermaLink="false">http://www.phase2.net/?p=1027</guid>
		<description><![CDATA[I realize most of the time I end up complaining about Opsware &#8211; that&#8217;s generally because it&#8217;s part of the human condition.  We say stuff when we&#8217;re upset or angry or don&#8217;t like something.  How many times have you ever called up the phone company to tell them &#8216;Great job!&#8217;
Yeah, I thought so.
So I figured [...]]]></description>
			<content:encoded><![CDATA[<p>I realize most of the time I end up complaining about Opsware &#8211; that&#8217;s generally because it&#8217;s part of the human condition.  We say stuff when we&#8217;re upset or angry or don&#8217;t like something.  How many times have you ever called up the phone company to tell them &#8216;Great job!&#8217;</p>
<p>Yeah, I thought so.</p>
<p>So I figured I&#8217;d write an article on one of the great things I love about Opsware &#8211; Custom Attributes! Combined with Dynamic Groups, these puppies provide the ability to create scripts that I don&#8217;t have to duplicate for different hosts.  </p>
<p>First, however, I should explain what Dynamic Groups are.  Dynamic Groups allow the user to group systems based on certain criteria.  For instance, you want all the systems in a certain network to be grouped together.  Whenever you add a system from that network into Opsware, it automatically becomes a member of that group.  Neat by itself but nothing extraordinary.</p>
<p>However, you can assign Custom Attributes ( further known as CAs ) to the Dynamic Group.  So for my new dynamic group that I created ( for example, a group that pulls in all hosts in the 192.168.0.0/24 network ), I can assign some CAs to the group and the CAs get assigned to each host within the group.</p>
<p>You may ask yourself, &#8216;Why is this useful?&#8217;.  It&#8217;s not yet.  There&#8217;s one more piece that&#8217;s missing from the puzzle.  The piece that is missing is a software package that Opsware comes with &#8211; Agent Tools.  When you install the Agent Tools, it comes with a set of python Opsware APIs and small scripts that use the API to make calls back to the master Opsware system and get information &#8211; including those CAs!</p>
<p>Armed with these 3 pieces, it becomes easy to create a script that uses the CAs that are dynamically assigned to your host to do all sorts of things.  For example, let&#8217;s say you want to create a script that checks your /etc/resolv.conf on any system in that 192.168.0.0/24 network.  First, we&#8217;ll create the dynamic group and assign it the correct device membership.</p>
<p>Next, edit the group and add a CA named something like &#8216;DNS_SERVERS&#8217;.  For the value, put in a DNS server on separate lines and then save your group.  Make sure you&#8217;ve got the agent tools package installed and we can run a simple test.</p>
<blockquote class='terminal'><p>
[root@frenzy1a.star.dev:~]# /opt/opsware/agent_tools/get_cust_attr.sh DNS_SERVERS<br />
192.168.0.20<br />
192.168.0.21
</p></blockquote>
<p>With that information, we can create a pretty simple shell or python script ( pick your poison ) to make sure that our /etc/resolv.conf has those servers defined.  For kicks, here&#8217;s an example script that checks to make sure the IPs in the DNS_SERVER CA are set in /etc/resolv.conf.  You could easily modify this so that it actually inserts the values.</p>
<pre class="brush: python;">
#!/opt/opsware/agent/bin/python
import sys
import re
from string import split

sys.path.append('/opt/opsware/agent_tools/')
import agenttools_common
from pytwist.com.opsware.custattr import NoSuchFieldException

def searchFile(file,pattern):
	found = 0
	search = re.compile(pattern)
	try:
		f = open(file, &quot;r&quot;)
	except IOError:
		sys.stderr.write(&quot;Could not open file %s.\n&quot; % (file))
		sys.exit(3)

	for line in f.readlines():
		if search.match(line):
			found = 1
			break
	return found

def main(args):
	ts = agenttools_common.ts
	servers = {}
	result = 0
	hostref = agenttools_common.getServerRef()

	try:
		custattr = ts.server.ServerService.getCustAttr(hostref, &quot;DNS_SERVERS&quot;, 1)
	except NoSuchFieldException:
		sys.stderr.write(&quot;Could not find custom attribute DNS_SERVERS.\n&quot;)
		sys.exit(3)

	servers = split(custattr)
	for s in servers:
		found = searchFile(&quot;/etc/resolv.conf&quot;,&quot;^nameserver\s+&quot; + s)
		if not found:
			sys.stderr.write(&quot;The server %s was not configured in /etc/resolv.conf\n&quot; % (s))
			result = 1

	return result

if __name__ == '__main__':
	sys.exit(main(sys.argv[1:]))
</pre>
<p>Now if I have another network, say, 192.168.120.0/24, I can do the same thing.  Make the group, assign the membership, create the DNS_SERVERS CA and assign the script and presto &#8211; it&#8217;s done! No duplication of work involved here and I can control the contents of the file from the Opsware console.</p>
<p>One last thing about CAs &#8211; they do support overrides.  For instance, I can override the CA by creating the same named CA on the host itself.  This will override the CA at the group level.  One thing you need to be careful, however, is that you don&#8217;t assign a host into two groups that define the same CA &#8211; there&#8217;s no priority between the groups and they don&#8217;t combine the contents of the CA to make one CA, so you&#8217;ll get random results.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.phase2.net/2010/03/03/opsware-custom-attributes-and-you/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Back to work! Opsware and other things.</title>
		<link>http://www.phase2.net/2010/03/02/back-to-work-opsware-and-other-things/</link>
		<comments>http://www.phase2.net/2010/03/02/back-to-work-opsware-and-other-things/#comments</comments>
		<pubDate>Wed, 03 Mar 2010 00:30:08 +0000</pubDate>
		<dc:creator>steve</dc:creator>
				<category><![CDATA[Unix]]></category>
		<category><![CDATA[Work]]></category>
		<category><![CDATA[opsware]]></category>

		<guid isPermaLink="false">http://www.phase2.net/?p=1019</guid>
		<description><![CDATA[I&#8217;ve been getting back into the swing of things and trying to organize my life in an effort to regain my sanity.  One of those things that I&#8217;ve been trying to do is get back into Opsware.  You can find a couple articles of mine where I express my.. dislike.. for certain aspects [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been getting back into the swing of things and trying to organize my life in an effort to regain my sanity.  One of those things that I&#8217;ve been trying to do is get back into Opsware.  You can find a couple articles of mine where I express my.. dislike.. for certain aspects of the product.</p>
<p>I had forgotten about those dislikes and while I&#8217;ve got a much cooler head on now, there are a few things I really would like to see Opsware implement.</p>
<p><strong>#1. The option to remediate an audit by applying/remediating a software policy</strong></p>
<p>Let&#8217;s say I want to install a piece of software called &#8216;p4&#8242;.  I package p4 up into a zip file and create a script that creates the proper p4.sh file.  All is wonderful.  I can apply the software package and remediate it and presto, a system has p4 installed.</p>
<p>However, I want to make sure that p4 file stays in compliance, so I create an audit to check on that.  I create a little script that verifies p4.sh is set correctly and the p4 binary exists.  I have to use an audit because the software compliance only uses the system&#8217;s default package management software ( RPM for RedHat, for example ) to verify that the package is installed.  I&#8217;ve got my audit working and again, all is well.</p>
<p>Well, let&#8217;s say I run my audit and find that on a system I installed p4 on, someone changed the p4.sh.  I want to fix that!  The problem is, the audit has no knowledge of the software policy that can do just that.  Instead, I either need to know ( ie &#8211; have knowledge that the policy exists ) or I have to duplicate the scripts that are in the software policy and put them in the audit, creating a management headache if the script were ever to change.</p>
<p>So, please implement the ability to remediate an audit by attaching and remediating a software policy.</p>
<p><strong>#2. The option to attach an audit from a software policy</strong></p>
<p>Along the lines of #1, once I install that piece of software, I want to make sure that it stays compliant.  To do this, I&#8217;d like to attach an audit.  I can&#8217;t depend on the software policy to determine compliance because, again, it only uses the package manager on the system.  However, in order to do this, I have to manually attach the audit.</p>
<p><strong>#3. Provide the ability to customize how the software policy determines compliance.</strong></p>
<p>Some of these complaints would go away if the software policy module had a more robust way of determining compliance.  In essence, the module simply does a package check to see if the package exists.  If someone removed the binary or changed something else underneath the package manager, the software policy module has no way of determining that.  It&#8217;d be nice if you could specify certain scripts that would enable the software policy to determine it&#8217;s compliance and not just depend on such a blanket statement.</p>
<p>Those 3 things have to be, at the moment, my biggest complaints.  I still don&#8217;t like the CML language and I think they should have gone with just a normal templating system, but that&#8217;s a future discussion.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.phase2.net/2010/03/02/back-to-work-opsware-and-other-things/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>More Opsware joys and headaches</title>
		<link>http://www.phase2.net/2009/06/23/more-opsware-joys-and-headaches/</link>
		<comments>http://www.phase2.net/2009/06/23/more-opsware-joys-and-headaches/#comments</comments>
		<pubDate>Tue, 23 Jun 2009 22:51:50 +0000</pubDate>
		<dc:creator>steve</dc:creator>
				<category><![CDATA[Reviews]]></category>
		<category><![CDATA[Work]]></category>

		<guid isPermaLink="false">http://www.phase2.net/?p=1017</guid>
		<description><![CDATA[The more I work with Opsware, the more I think the tool was just designed with a much different philosophy than my own.  To translate &#8211; the product isn&#8217;t bad, I just don&#8217;t agree with it ( I didn&#8217;t agree with BMC alot more tho&#8217; ).  I&#8217;m much more of a hardcore Puppet [...]]]></description>
			<content:encoded><![CDATA[<p>The more I work with Opsware, the more I think the tool was just designed with a much different philosophy than my own.  To translate &#8211; the product isn&#8217;t bad, I just don&#8217;t agree with it ( I didn&#8217;t agree with BMC alot more tho&#8217; ).  I&#8217;m much more of a hardcore Puppet user than I am anything and while Puppet has it&#8217;s problems, I believe in it&#8217;s methodology completely and I think that is causing some issues as I try and implement Opsware in a more &#8216;puppet&#8217;-ish way.</p>
<p>For instance, OS installs.  Opsware has some OS installation/sequence stuff that&#8217;s neat but nothing that we are seriously looking at using ( for many reasons, such as source control of the ks files and more complicated scripting ).  Instead, we are trying to implement in such a manner that we can do the following:</p>
<p>* Install minimal OS<br />
* Install Opsware agent<br />
* Remediate policies</p>
<p>Once the opsware agent is installed, the system will automatically be put into some dynamic device groups.  These dynamic groups have membership based off certain criteria; they also have software policies attached to them.  That way, when a system is placed into a group or meets a certain criteria and automatically becomes a member of a group, it automatically is assigned to certain software policies that need to be remediated.  This is really cool and can be extremely helpful for organizing your hosts.</p>
<p>The problem here is that the software policies have subpar methods for checking whether the policy is compliant or not.  You can add quite a few items to software policies ( scripts, other policies, packages, app configs ) &#8211; but it basically only checks whether a package is installed ( and it doesn&#8217;t even do that in a satisfactory manner ).  Therefore, you have to take any work that you&#8217;ve done via your software policy and then duplicate that work into an Audit that can check and verify that the work stays in place ( or is in fact, needed at all ).</p>
<p>This brings you to the next issue &#8211; that once an audit figures out that something is wrong, it can&#8217;t fix it by applying the software policy, so once again, you have to duplicate the software policy script into the remediation section of the audit &#8211; that or document the audit somehow to inform the operator to fix the issues by remediating a software policy onto the host.</p>
<p>In the Puppet world, this is an example of *one* thing.  You have a resource.  If you assign that resource to a host, it checks to see if that resource exists.  If it doesn&#8217;t, it adds it.  If someone changes the resource on the host ( not thru Puppet ), then Puppet changes it back.  I don&#8217;t need to define my resource 3 times &#8211; once to install it, once to verify it and once to fix any changes; it&#8217;s all taken care of by the one resource.</p>
<p>I&#8217;ve heard through the rumor-mill that the new 7.8 release of Opsware SA is supposed to have a much better A&#038;R module for auditing and remediating, so I&#8217;m eager to see what changes it brings along.  Hopefully, it and I will agree with each other a little better on how things should be done in the world of configuration management. <img src='http://www.phase2.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Till then, I&#8217;ll keep on truckin&#8217; on.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.phase2.net/2009/06/23/more-opsware-joys-and-headaches/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
