<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>The Gahooa Perspective &#187; AppCove</title>
	<atom:link href="http://blog.gahooa.com/category/appcove/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.gahooa.com</link>
	<description>Thoughts on Life, Engineering, Technology, Business, and more...</description>
	<lastBuildDate>Sun, 11 Dec 2011 19:44:53 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='blog.gahooa.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>The Gahooa Perspective &#187; AppCove</title>
		<link>http://blog.gahooa.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://blog.gahooa.com/osd.xml" title="The Gahooa Perspective" />
	<atom:link rel='hub' href='http://blog.gahooa.com/?pushpress=hub'/>
		<item>
		<title>A brief introduction to AppStruct</title>
		<link>http://blog.gahooa.com/2009/11/21/a-brief-introduction-to-appstruct/</link>
		<comments>http://blog.gahooa.com/2009/11/21/a-brief-introduction-to-appstruct/#comments</comments>
		<pubDate>Sat, 21 Nov 2009 05:26:45 +0000</pubDate>
		<dc:creator>Jason Garber</dc:creator>
				<category><![CDATA[AppCove]]></category>
		<category><![CDATA[AppStruct]]></category>
		<category><![CDATA[Engineering]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[Technique]]></category>
		<category><![CDATA[Apache]]></category>
		<category><![CDATA[mod_wsgi]]></category>
		<category><![CDATA[PostgreSQL]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[Shank]]></category>

		<guid isPermaLink="false">http://blog.gahooa.com/?p=160</guid>
		<description><![CDATA[Have been very busy at work lately.  We made the decision about a month ago to switch (most&#124;all) new projects over to use Python 3 with Apache, mod_wsgi, and AppStruct.  You may know what the first 3 are, but the 4th?? Special thanks goes to Graham Dumpleton behind mod_wsgi, and James William Pye behind Python&#62;&#62;Postgresql. [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.gahooa.com&amp;blog=6218261&amp;post=160&amp;subd=gahooa&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Have been very busy at work lately.  We made the decision about a month ago to switch (most|all) new projects over to use Python 3 with Apache, mod_wsgi, and AppStruct.  You may know what the first 3 are, but the 4th??</p>
<p style="padding-left:30px;"><em>Special thanks goes to </em><strong><em>Graham Dumpleton</em></strong><em> behind mod_wsgi, and </em><strong><em>James William Pye</em></strong><em> behind Python&gt;&gt;Postgresql.   They are not involved or affiliated with AppCove or AppStruct (aside from great mailing list support) <strong>BUT</strong> if it were not for them, this framework would not exist.</em></p>
<p>AppStruct is a component of Shank, a meta-framework.  A stand-alone component in it&#8217;s own right, it represents the AppCove approach to web-application development.  Most of it is in planning, but the parts that have materialized are really, really cool.</p>
<p>Briefly, I&#8217;ll cover the two emerging areas of interest:</p>
<h1><strong>AppStruct.WSGI</strong></h1>
<p>This is a very pythonic (in my opinion) web application framework targeted toward Python 3.1 (a challenge in itself at this point).  We really wanted to base new development on Python 3.1+, as well as PostgreSQL using the excellent Python3/PostgreSQL library at <a href="http://python.projects.postgresql.org/">http://python.projects.postgresql.org/</a>.  However, none of the popular frameworks that I am aware of support Python 3, and most (if not all) of them have a lot of baggage I do not want to bring to the party.</p>
<p><a href="http://werkzeug.pocoo.org/">Werkzeug</a> was the most promising, but alas, I could not find Python 3 support for it either.  In fact, I intend to utilize a good bit of code from Werkzeug in finishing off AppStruct.WSGI.  (Don&#8217;t you just love good OSS licences?  AppStruct will be released under one of those also).</p>
<p>HTTP is just not that complicated.  It dosen&#8217;t need bundled up into n layers of indecipherable framework upon framework layers.   It doesn&#8217;t need abstracted to death.  I just needs to be streamlined a bit (with regard to request routing, reading headers, etc&#8230;).</p>
<p>Python is an amazing OO language.  It&#8217;s object model (or data model) is one of (if not the) most well conceived of any similar language, ever.  I want to use that to our advantage&#8230;</p>
<p>Inheritance, including multiple inheritance, has very simple rules in Python.  Want to use that as well.</p>
<p>Wish to provide developers with access to the low level guts they need for 2% of the requests, but not make them do extra work for the 98% of requests.</p>
<p>Speed is of the essence.  Servers are not cheap, and if you can increase your throughput by 5x, then that&#8217;s a lot less servers you need to pay for.</p>
<p><strong>So, how does it work?</strong></p>
<p>Well, those details can wait for another post.  But at this point the library is &lt; 1000 lines of code, and does a lot of interesting things.</p>
<ul>
<li>A fully compliant WSGI application object</li>
<li>1 to 1 request routing to Python packages/modules/classes</li>
<li>All request classes derived from AppStruct.WSGI.Request</li>
</ul>
<p>The application maps requests like <strong>/some/path/here</strong> to objects, like <strong>Project.WSGI.some.path.here</strong>.  If there is a trailing slash, then the application assumes that the class is named Index.  The object that is found is verified to be a subclass of AppStruct.WSGI.Request, and then&#8230;</p>
<p>Wait!  What about security?</p>
<p>Yes, yes, very important.  A couple things to point out.  First, the URLs are passed through a regular expression that ensures that they adhere to only the characters that may be used in valid python identifiers (not starting with _), delimited by &#8220;/&#8221;.  Second, the import and attribute lookup verify that any object (eg class) found is a subclass of the right thing.  And so on and so forth&#8230;</p>
<p>But you may say &#8220;wait, what about my/fancy-shmancy/urls/that-i-am-used-to-seeing?  Ever hear of mod_rewrite?  Yep.  Not trying to re-invent the wheel.  Use apache for what it was made for, not just a dumb request handler.</p>
<p><strong>What about these request objects?</strong></p>
<p>They are quite straightforward.  There are several attributes which represent request data, the environment, query string variables, post variables, and more.  There is a .Response attribute which maps to a very lightweight response object.</p>
<p>Speaking of it &#8212; it has only 4 attributes:<strong> [Status, Header, Iterator, Length]</strong>.  As you see, it&#8217;s pretty low-level-wsgi-stuff.  But the developer would rarely interact with it, other than to call a method like .Response.Redirect(&#8216;http://somewhere-else.com&#8217;, 302)</p>
<p>Once the application finds the class responsible for handling the URL, it simply does this (sans exception catching code):</p>
<pre style="padding-left:30px;">RequestObject = Request(...)</pre>
<pre style="padding-left:30px;">with RequestObject:
   RequestObject.Code()
   RequestObject.Data()</pre>
<pre style="padding-left:30px;">return RequestObject.Response</pre>
<p>Wow, that&#8217;s simple.  Let me point out one more detail.  The default implementation of Data() does this:</p>
<pre style="padding-left:30px;">def Data(self):
   self.Response.Iterator = [self.Text()]
   self.Response.Length = len(self.Response.Iterator[0])</pre>
<p>So the only thing really required of this Request class is to override Text() and return some text?  Yep, that simple.</p>
<p>But typically, you would at some point mixin a template class that would do something like this:</p>
<pre style="padding-left:30px;">class GoodLookingLayout:
   def Text(self):
      return ( 
         """&lt;html&gt;&lt;head&gt;...&lt;/head&gt;&lt;body&gt;&lt;menu&gt;""" +
         self.Menu() +
         """&lt;/menu&gt;&lt;div&gt;""" +
         self.Body() +
         """&lt;/div&gt;&lt;/body&gt;&lt;/html&gt;"""
         )</pre>
<p>And then it would be up to the developer to override Menu and Body (each returning the appropriate content for the page).</p>
<p><strong>Ohh</strong>, you may say.  What about templating engine X?  Well, it didn&#8217;t support Python 3, and I probabally didn&#8217;t want it anyway (for 9 reasons)&#8230;  If it&#8217;s really, really good and fits this structure, drop me a line, please.</p>
<p><strong>What about that Code() method?</strong></p>
<p>Yeah, that&#8217;s the place that any &#8220;logic&#8221; of UI interaction should go.  I&#8217;m not advocating mixing logic and content here, but you could do that if you wanted.  You will find in our code, a seperate package for application business logic and data access that the request classes will call upon.  But again, if you are writing a one page wonder, why go to all the trouble?</p>
<p>The only requirement for the Code() method is that it calls <strong>super().Code()</strong> at the top.  Since the idea is that the class <strong>.Foo.Bar.Baz.Index</strong> will inherit from the class <strong>.Foo.Bar.Index</strong>, this gives you a very flexible point of creating .htaccess style initialization/access-control code in one place.  So in /Admin/Index, you could put a bit of code in Code() which ensures the user is logged in.  This code will be run by all sub-pages, therefore ensuring that access control is maintained.  Relative imports are important for this task.</p>
<pre style="padding-left:30px;">from .. import Index as <span style="color:#ff0000;">PARENT</span>
from AppStruct.WSGI.Util import *</pre>
<pre style="padding-left:30px;">class Index(<span style="color:#ff0000;">PARENT</span>):
   def Code(self):
      super().Code()
      self.Name = self.Post.FirstName + " " + self.Post.LastName
      # some other init stuff
   def Body(self):
      return "Hello there " + HS(self.Name) + "!"</pre>
<p><strong>Summary of AppStruct.WSGI&#8230;</strong></p>
<p>To get up and running with a web-app using this library:</p>
<ol>
<li>A couple mod_wsgi lines in httpd.conf</li>
<li>A .wsgi file that has 1 import and 1 line of code</li>
<li>A request class in a package that matches an expected URI (myproject.wsgi.admin.foo ==  /admin/foo)</li>
</ol>
<p><strong>Speed?</strong></p>
<p>With no database calls, it&#8217;s pushing over 2,000 requests per second on a dev server.  With a couple PostgreSQL calls, it is pushing out ~ 800 per second.</p>
<h1>AppStruct.Database.PostgreSQL</h1>
<p>This is not nearly as deep as the WSGI side of AppStruct, but still really cool.  To start off, I&#8217;d like to say that James William Pye has created an amazing Postgresql connection library in Python 3.  I mean just amazing.  In fact, almost so amazing that I didn&#8217;t want to change it (but then again&#8230;)</p>
<p>What we did here was subclass the <strong>Connection</strong>, <strong>PreparedStatement</strong>, and <strong>Row </strong>classes.  (well, actually replaced the Row class).</p>
<p>Once these were subclassed, we simply added a couple useful features.  Keep in mind that all of the great functionality of the underlying library is retained.</p>
<p><strong>Connection.CachePrepare(SQL)<br />
Connection._PS_Cache</strong></p>
<p>Simply a dictionary of {SQL: PreparedStatementObject} that resides on the connection object.  When you directly or indirectly invoke CachePrepare, it says &#8220;if this SQL is in the cache, return the associated object.  Otherwise, prepare it, cache it, and return it&#8221;.  This approach really simplifies the storing of prepared statement objects in a multi-threaded environment, where there is really no good place to store them (and be thread safe, connection-failure safe, etc&#8230;)</p>
<p><strong>Connection.Value(SQL, *args, **kwargs)<br />
Connection.Row(SQL, *args, **kwargs)</strong></p>
<p><strong></strong>These simple functions take (SQL, *args, **kwargs) and return either a single value or a single row.  They will raise an exception is != 1 row is found.  They make use of CachePrepare(), so you get the performance benefits of prepared statements without the hassle.  More on *args, **kwargs later under PrePrepare()</p>
<p><strong>Connection.ValueList(SQL, *args, **kwargs)<br />
Connection.RowList(SQL, *args, **kwargs)</strong></p>
<p><strong></strong>Same as above, except returns an iterator (or list, not sure) of  zero or more values or rows.</p>
<p><strong>Row class</strong></p>
<p>Simply a dictionary that also supports attribute style access of items.  After evaluating the Tuple that behaves like a mapping, I decided for our needs, a simple dict would be a better representation of a row.</p>
<p><strong>Connection.PrePreprepare(SQL, args, kwargs) -&gt; (SQL, args)</strong></p>
<p>Ok, so what&#8217;s the big deal?  Well, the big deal is that we don&#8217;t like positional parameters.  They are confusing to write, read, analyze, and see what the heck is going on when you get about 30 fields in an insert statement.  Feel free to argue, but maybe I&#8217;m not as young as I once was.</p>
<p>We do like keyword parameters.  But postgresql prepared statement api uses numeric positional parameters.  Not changing that&#8230;</p>
<p>The most simple use case is to pass SQL and keyword arguments.</p>
<pre style="padding-left:30px;">"SELECT a,b,c FROM table WHERE id = $id AND name = $name"
dict(id=100, name='joe')</pre>
<p>It returns</p>
<pre style="padding-left:30px;">"SELECT a,b,c FROM table WHERE id = $1 AND name = $2"
(100, "joe")</pre>
<p>Which is suitable for passing directly into the Connection.prepare() method that came with the underlying library.</p>
<p>I don&#8217;t know about you, but we find this to be very, very useful.</p>
<p>If you pass tuples of (field, value) as positional arguments, then they will replace <strong>[Field]</strong>, <strong>[Value]</strong>, and <strong>[Field=Value]</strong> (in the SQL) with lists of fields, lists of values (eg $1, $2), or lists of field=values (eg name=$1, age=$2).  That really takes the verbosity out of INSERT and UPDATE statements with long field lists.</p>
<h1>Conclusion</h1>
<p>This is just in the early stages, and has a good deal of polishing to be done (especially on the WSGI side).  My purpose here was to introduce you to what you can expect to get with AppStruct, some of the rationale behind it, and that it&#8217;s really not that hard to take the bull by the horns and make software do what you want it to (especially if you use python).</p>
<p>Feel free to comment.</p>
<br /> Tagged: Apache, AppCove, AppStruct, mod_wsgi, Open Source, PostgreSQL, Python, Shank <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/gahooa.wordpress.com/160/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/gahooa.wordpress.com/160/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/gahooa.wordpress.com/160/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/gahooa.wordpress.com/160/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/gahooa.wordpress.com/160/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/gahooa.wordpress.com/160/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/gahooa.wordpress.com/160/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/gahooa.wordpress.com/160/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/gahooa.wordpress.com/160/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/gahooa.wordpress.com/160/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/gahooa.wordpress.com/160/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/gahooa.wordpress.com/160/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/gahooa.wordpress.com/160/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/gahooa.wordpress.com/160/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.gahooa.com&amp;blog=6218261&amp;post=160&amp;subd=gahooa&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.gahooa.com/2009/11/21/a-brief-introduction-to-appstruct/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">gahooa</media:title>
		</media:content>
	</item>
		<item>
		<title>Python 3.1 and mod_wsgi performance notes</title>
		<link>http://blog.gahooa.com/2009/10/11/python-3-1-and-mod_wsgi-performance-notes/</link>
		<comments>http://blog.gahooa.com/2009/10/11/python-3-1-and-mod_wsgi-performance-notes/#comments</comments>
		<pubDate>Sun, 11 Oct 2009 09:40:31 +0000</pubDate>
		<dc:creator>Jason Garber</dc:creator>
				<category><![CDATA[AppCove]]></category>
		<category><![CDATA[Engineering]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[reSearch]]></category>
		<category><![CDATA[Apache]]></category>
		<category><![CDATA[mod_wsgi]]></category>
		<category><![CDATA[Performance]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[python 3]]></category>

		<guid isPermaLink="false">http://blog.gahooa.com/?p=154</guid>
		<description><![CDATA[We&#8217;re researching the use of Python and mod_wsgi running under apache for developing some extensive web applications.  Here are some notes on a performance test that we recently ran. ================================================================== Server: x86_64 Python 3.1.1 mod_wsgi 3.0c5 apache 2.2 RHEL 5.3 quad core xenon 8 GB ram Development system &#8211; not in production use. ================================================================== Application: [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.gahooa.com&amp;blog=6218261&amp;post=154&amp;subd=gahooa&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>We&#8217;re researching the use of Python and mod_wsgi running under apache for developing some extensive web applications.  Here are some notes on a performance test that we recently ran.<br />
==================================================================<br />
Server:</p>
<p>x86_64<br />
Python 3.1.1<br />
mod_wsgi 3.0c5<br />
apache 2.2<br />
RHEL 5.3<br />
quad core xenon<br />
8 GB ram</p>
<p>Development system &#8211; not in production use.</p>
<p>==================================================================<br />
Application:</p>
<p>1 import time<br />
2<br />
3 def application(environ, start_response):<br />
4     status = &#8217;200 OK&#8217;<br />
5<br />
6     output = &#8220;hello world!&#8221;<br />
7<br />
8     #time.sleep(1)<br />
9<br />
10     response_headers = [<br />
11         ('Content-type', 'text/plain'),<br />
12         ('Content-Length', str(len(output))),<br />
13         ]<br />
14<br />
15     start_response(status, response_headers)<br />
16<br />
17     return [output]</p>
<p>==================================================================<br />
Apache Configuration:</p>
<p>WSGISocketPrefix run/wsgi<br />
&lt;VirtualHost *&gt;<br />
ServerName <a style="color:#2a5db0;" href="http://shankproject.jason.star.ionzoft.net/" target="_blank">shankproject.jason.star.ionzoft.net</a><br />
DocumentRoot /home/jason/Code/ShankProject/Web<br />
WSGIScriptAlias /Admin /home/jason/Code/ShankProject/WSGI/<br />
Admin.wsgi<br />
WSGIDaemonProcess <a style="color:#2a5db0;" href="http://shankproject.jason.star.ionzoft.net/" target="_blank">shankproject.jason.star.ionzoft.net</a> threads=15<br />
WSGIProcessGroup <a style="color:#2a5db0;" href="http://shankproject.jason.star.ionzoft.net/" target="_blank">shankproject.jason.star.ionzoft.net</a><br />
&lt;/VirtualHost&gt;</p>
<p>==================================================================<br />
Tests:</p>
<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<br />
# Baseline with one process and 15 threads<br />
# 15 threads total</p>
<p>threads=15<br />
no process definition</p>
<p>WITHOUT time.sleep(1)<br />
concurrency = 1  &gt;&gt; 1800 / second<br />
concurrency = 100 &gt;&gt; 3900 / second</p>
<p>WITH time.sleep(1)<br />
concurrency = 1  &gt;&gt; 1 / second<br />
concurrency = 100  &gt;&gt; 14 / second</p>
<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<br />
# Get a marginal improvement by doubling the threads to 30<br />
# 30 threads total</p>
<p>threads=30<br />
no process definition</p>
<p>WITHOUT time.sleep(1)<br />
concurrency = 1  &gt;&gt; 1680 / second<br />
concurrency = 100 &gt;&gt; 3500 / second</p>
<p>WITH time.sleep(1)<br />
concurrency = 1  &gt;&gt; 1 / second<br />
concurrency = 100  &gt;&gt; 30 / second</p>
<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<br />
# Take processes from 1 to 3<br />
# 90 threads total</p>
<p>threads=30<br />
processes=3</p>
<p>WITHOUT time.sleep(1)<br />
concurrency = 1  &gt;&gt; 1770 / second<br />
concurrency = 100 &gt;&gt; 3500 / second</p>
<p>WITH time.sleep(1)<br />
concurrency = 1  &gt;&gt; 1 / second<br />
concurrency = 100  &gt;&gt; 88 / second</p>
<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<br />
# Take processes from 3 to 6<br />
# Take threads from 30 to 15<br />
# 90 threads total</p>
<p>threads=30<br />
processes=3</p>
<p>WITHOUT time.sleep(1)<br />
concurrency = 1  &gt;&gt; 1550 / second<br />
concurrency = 100 &gt;&gt; 3300 / second</p>
<p>WITH time.sleep(1)<br />
concurrency = 1  &gt;&gt; 1 / second<br />
concurrency = 100  &gt;&gt; 88 / second</p>
<p>==================================================================<br />
Conclusion:</p>
<p>mod_wsgi performance is outstanding.  Even running slower requests, it<br />
can still handle significant concurrency in daemon mode without any<br />
apparent issues.</p>
<p>Questions:<br />
Is there any information on the balance between more processes less<br />
threads and more threads less processes?</p>
<p>Thanks!</p>
<br /> Tagged: Apache, mod_wsgi, Performance, Python, python 3 <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/gahooa.wordpress.com/154/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/gahooa.wordpress.com/154/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/gahooa.wordpress.com/154/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/gahooa.wordpress.com/154/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/gahooa.wordpress.com/154/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/gahooa.wordpress.com/154/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/gahooa.wordpress.com/154/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/gahooa.wordpress.com/154/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/gahooa.wordpress.com/154/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/gahooa.wordpress.com/154/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/gahooa.wordpress.com/154/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/gahooa.wordpress.com/154/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/gahooa.wordpress.com/154/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/gahooa.wordpress.com/154/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.gahooa.com&amp;blog=6218261&amp;post=154&amp;subd=gahooa&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.gahooa.com/2009/10/11/python-3-1-and-mod_wsgi-performance-notes/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">gahooa</media:title>
		</media:content>
	</item>
		<item>
		<title>Freeky Bug</title>
		<link>http://blog.gahooa.com/2009/08/22/freeky-bug/</link>
		<comments>http://blog.gahooa.com/2009/08/22/freeky-bug/#comments</comments>
		<pubDate>Sun, 23 Aug 2009 03:38:52 +0000</pubDate>
		<dc:creator>Jason Garber</dc:creator>
				<category><![CDATA[AppCove]]></category>
		<category><![CDATA[Engineering]]></category>
		<category><![CDATA[Interesting]]></category>
		<category><![CDATA[System Administration]]></category>
		<category><![CDATA[Fail Bug]]></category>
		<category><![CDATA[Load Balancing]]></category>

		<guid isPermaLink="false">http://blog.gahooa.com/?p=148</guid>
		<description><![CDATA[Ever have one of those bugs that customers complain about, but you just cannot reproduce it? Here is a good one&#8230; Customers were complaining about being logged out when clicking a download link. This particular setup is a Cisco CSS 11501 series load balancer with 2 Dell Poweredge web servers sitting behind it.  Each webserver [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.gahooa.com&amp;blog=6218261&amp;post=148&amp;subd=gahooa&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Ever have one of those bugs that customers complain about, but you <strong>just cannot reproduce it?</strong> Here is a good one&#8230;</p>
<p>Customers were complaining about being logged out when clicking a download link.</p>
<p>This particular setup is a Cisco CSS 11501 series load balancer with 2 Dell Poweredge web servers sitting behind it.  Each webserver is running apache, as well as an application server (python) which handles authentication and processing for THAT server.</p>
<p>For weeks, I <strong>c</strong><strong>ould not</strong> reproduce this bug.  So tonight when I finally got bit by it (at home), I was clueless for a while.  The code is so simple.  A simple key lookup in a simple dictionary, yet it just was not making sense.</p>
<h2>Here is the story:</h2>
<p><em>A while ago, we were having problems with Internet Explorer downloading content over SSL.  This turns out to be a common problem with IE, so to fix it, I caused the downloads to not use SSL, which is more efficient anyway.</p>
<p>We use a cisco hardware load balancer which balances incoming requests to different backend servers.  It has a feature called STICKY SOURCE IP, which means that any connections routed from the same IP to the same site will be delivered to the same backend server.  This is nice, because you are always visiting the same server.</p>
<p>So as it turns out, by turning the download SSL off, the load balancer was using another &#8220;site&#8221; definition to handle the DOWNLOAD request.  STICKY SOURCE IP was out the window, and the request was being passed back to a &#8220;random&#8221; webserver.</p>
<p>About 50% of the time, users (like me tonight) were tossed to the other server, which knew </em><strong><em>nothing</em></strong><em> about the user login. That is why it was complaining about the &#8220;</em><strong><em>WB4_App::$DSEG and/or WB4_App::$AuthToken must be set in order to contact the     applications server.&#8221;</em></strong><em> error message, which is not one that should normally be shown.</p>
<p>To make matters worse, our IP address at work was apparently always using the same server, so I could not reproduce the problem.  I&#8217;m lucky that it happened to me at home, or I would still be banging my head against the desk&#8230;</em></p>
<br /> Tagged: Fail Bug, Load Balancing <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/gahooa.wordpress.com/148/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/gahooa.wordpress.com/148/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/gahooa.wordpress.com/148/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/gahooa.wordpress.com/148/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/gahooa.wordpress.com/148/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/gahooa.wordpress.com/148/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/gahooa.wordpress.com/148/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/gahooa.wordpress.com/148/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/gahooa.wordpress.com/148/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/gahooa.wordpress.com/148/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/gahooa.wordpress.com/148/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/gahooa.wordpress.com/148/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/gahooa.wordpress.com/148/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/gahooa.wordpress.com/148/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.gahooa.com&amp;blog=6218261&amp;post=148&amp;subd=gahooa&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.gahooa.com/2009/08/22/freeky-bug/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">gahooa</media:title>
		</media:content>
	</item>
		<item>
		<title>Updating a cert on the Cisco 11500 Series Content Services Switches (CSS)</title>
		<link>http://blog.gahooa.com/2009/04/06/updating-a-cert-on-the-cisco-11500-series-content-services-switches-css/</link>
		<comments>http://blog.gahooa.com/2009/04/06/updating-a-cert-on-the-cisco-11500-series-content-services-switches-css/#comments</comments>
		<pubDate>Tue, 07 Apr 2009 03:21:52 +0000</pubDate>
		<dc:creator>Jason Garber</dc:creator>
				<category><![CDATA[AppCove]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[System Administration]]></category>
		<category><![CDATA[Technique]]></category>
		<category><![CDATA[Cisco CSS]]></category>
		<category><![CDATA[SSL Certificates]]></category>

		<guid isPermaLink="false">http://blog.gahooa.com/?p=121</guid>
		<description><![CDATA[Upgrading a SSL certificate using the Cisco 11500 Series Content Services Switch (CSS) <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.gahooa.com&amp;blog=6218261&amp;post=121&amp;subd=gahooa&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Having recently moved some of our hosting infrastructure to the excellent <a href="http://www.rackspace.com/solutions/managed_hosting/colocation/index.php">Rackspace Platform group</a>, we inherited the management of the <a href="http://www.cisco.com/en/US/products/hw/contnetw/ps792/">Cisco 11500 Series Content Services Switches (CSS)</a>, which we use for general load balancing + ssl termination.</p>
<blockquote><p>As a side note, it&#8217;s really powerful, fast, and well, plain nice.  Not having to manage SSL certs on each apache instance is really nice, and all the LAN communication is done over plain old HTTP.</p></blockquote>
<p>This blog post is a regurgitation of some notes I took internally.  Perhaps someone who finds themselves managing this device will benefit&#8230;</p>
<hr />The task at hand was re-issuing and updating one of our primary wildcard certificates that powers a lot of subdomains.</p>
<h3>The first step is to generate the key, csr, and crt&#8230;</h3>
<p>All these files should be:</p>
<ul>
<li>Named the same as the domain that SSL is being generated for.</li>
<li>use WILD for a wildcard subdomain</li>
<li>Use this format &#8220;www.domain.com-0810.key&#8221;, where 08 is the from year and 10 is the to year</li>
<li>(the short version is because of name length limits on the CSS)</li>
</ul>
<p><span style="font-weight:bold;">Start by generating the key and csr</span></p>
<p>This should be done in the ciscoftp role under the ~/load directory</p>
<pre># openssl genrsa -out WILD.vosecure.com-0810.key 1024
# openssl req -new -key WILD.vosecure.com-0810.key -out WILD.vosecure.com-0810.csr</pre>
<p><span style="font-weight:bold;">Then get the certificate issued by (global sign)</span></p>
<p>Put the certificate into the the ~/load directory.  When done, it should look like:</p>
<pre>-rw-rw-r-- 1 ciscoftp ciscoftp  3139 Apr  6 15:59 WILD.vosecure.com-0810.crt
-rw-rw-r-- 1 ciscoftp ciscoftp   773 Apr  6 15:49 WILD.vosecure.com-0810.csr
-rw-rw-r-- 1 ciscoftp ciscoftp   883 Apr  6 15:47 WILD.vosecure.com-0810.key</pre>
<p><span style="font-weight:bold;">Put the crt and key onto the load balancer</span></p>
<p>To do this, use the &#8220;copy command&#8221; on the load balancer</p>
<pre>20132-201292# copy ssl ftp base import WILD.vosecure.com-0810.crt PEM "rack"
20132-201292# copy ssl ftp base import WILD.vosecure.com-0810.key PEM "rack"

Then make the associations...

20132-201292# config
20132-201292(config)# ssl associate cert WILD.vosecure.com-0810.crt WILD.vosecure.com-0810.crt
20132-201292(config)# ssl associate cert WILD.vosecure.com-0810.key WILD.vosecure.com-0810.key</pre>
<h3>Now, it&#8217;s time to install it.  <span style="color:#ff0000;">Requires SSL downtime!</span></h3>
<ol>
<li>Suspend the SSL content rule</li>
<li>Suspend the SSL service</li>
<li>Suspend the SSL proxy list</li>
<li>Run the updates</li>
<li>Activate the SSL proxy list</li>
<li>Activate the SSL service</li>
<li>Activate the SSL content rule</li>
</ol>
<p><span style="font-weight:bold;">Here are the exact commands:</span></p>
<pre>20132-201292# config
20132-201292(config)# owner vosecure.com
20132-201292(config-owner[vosecure.com])# content 74.205.111.161-ssl
20132-201292(config-owner-content[vosecure.com-74.205.111.161-ssl])# suspend

20132-201292# config
20132-201292(config)# service ssl-service
20132-201292(config-service[ssl-service])# suspend

20132-201292# config
20132-201292(config)# ssl-proxy-list ssl-proxy</pre>
<p style="color:#f00;">In the following commands, we remove the whole ssl-server so that it shows up at the bottom in one concise unit.  Otherwise, the startup-config and running-config become fragmented.</p>
<pre>20132-201292(config-ssl-proxy-list[ssl-proxy])# suspend
20132-201292(config-ssl-proxy-list[ssl-proxy])# no ssl-server 6
20132-201292(config-ssl-proxy-list[ssl-proxy])# ssl-server 6
20132-201292(config-ssl-proxy-list[ssl-proxy])# ssl-server 6 rsakey WILD.vosecure.com-0810.key
20132-201292(config-ssl-proxy-list[ssl-proxy])# ssl-server 6 rsacert WILD.vosecure.com-0810.crt
20132-201292(config-ssl-proxy-list[ssl-proxy])# ssl-server 6 vip address 192.168.1.161
20132-201292(config-ssl-proxy-list[ssl-proxy])# ssl-server 6 cipher rsa-with-rc4-128-sha 192.168.1.161 81
20132-201292(config-ssl-proxy-list[ssl-proxy])# active

20132-201292# config
20132-201292(config)# service ssl-service
20132-201292(config-service[ssl-service])# active

20132-201292# config
20132-201292(config)# owner vosecure.com
20132-201292(config-owner[vosecure.com])# content 74.205.111.161-ssl
20132-201292(config-owner-content[vosecure.com-74.205.111.161-ssl])# active

<span style="color:#f00;">Test test test.  Firefox, IE, Chrome...</span>

20132-201292# copy running-config ftp base running-config

<span style="color:#f00;">Review changes with git diff</span>

20132-201292# write memory

20132-201292# copy startup-config ftp base startup-config</pre>
<h3>And&#8230; Here is the git diff</h3>
<pre>diff --git a/load/startup-config b/load/startup-config
index 7042490..36fbbaa 100644
--- a/load/startup-config
+++ b/load/startup-config
@@ -1,4 +1,4 @@
-!Generated on 04/06/2009 16:05:48
+!Generated on 04/06/2009 21:51:02
!Active version: sg0810205

@@ -64,6 +64,8 @@ configure
<span style="color:#339966;">+  ssl associate rsakey WILD.vosecure.com-0810.key WILD.vosecure.com-0810.key
+  ssl associate cert WILD.vosecure.com-0810.crt WILD.vosecure.com-0810.crt

</span>!*********************** SSL PROXY LIST ***********************
ssl-proxy-list ssl-proxy
<span style="color:#ff6600;">-  ssl-server 6
-  ssl-server 6 rsakey vosecure.com(080421-04300)-key
-  ssl-server 6 rsacert vosecure.com(080421-04300)-cert
-  ssl-server 6 vip address 192.168.1.161
-  ssl-server 6 cipher rsa-with-rc4-128-sha 192.168.1.161 81</span>
@@ -146,6 +141,11 @@ ssl-proxy-list ssl-proxy
<span style="color:#339966;">+  ssl-server 6
+  ssl-server 6 rsakey WILD.vosecure.com-0810.key
+  ssl-server 6 rsacert WILD.vosecure.com-0810.crt
+  ssl-server 6 vip address 192.168.1.161
+  ssl-server 6 cipher rsa-with-rc4-128-sha 192.168.1.161 81</span>
active</pre>
<br /> Tagged: Cisco CSS, SSL Certificates, System Administration <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/gahooa.wordpress.com/121/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/gahooa.wordpress.com/121/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/gahooa.wordpress.com/121/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/gahooa.wordpress.com/121/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/gahooa.wordpress.com/121/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/gahooa.wordpress.com/121/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/gahooa.wordpress.com/121/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/gahooa.wordpress.com/121/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/gahooa.wordpress.com/121/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/gahooa.wordpress.com/121/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/gahooa.wordpress.com/121/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/gahooa.wordpress.com/121/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/gahooa.wordpress.com/121/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/gahooa.wordpress.com/121/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.gahooa.com&amp;blog=6218261&amp;post=121&amp;subd=gahooa&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.gahooa.com/2009/04/06/updating-a-cert-on-the-cisco-11500-series-content-services-switches-css/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">gahooa</media:title>
		</media:content>
	</item>
		<item>
		<title>I highly recommend yum  + createrepo + rpmbuild</title>
		<link>http://blog.gahooa.com/2009/03/08/i-highly-recommend-yum-createrepo-rpmbuild/</link>
		<comments>http://blog.gahooa.com/2009/03/08/i-highly-recommend-yum-createrepo-rpmbuild/#comments</comments>
		<pubDate>Sun, 08 Mar 2009 05:30:00 +0000</pubDate>
		<dc:creator>Jason Garber</dc:creator>
				<category><![CDATA[AppCove]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[System Administration]]></category>
		<category><![CDATA[Technique]]></category>
		<category><![CDATA[Apache]]></category>
		<category><![CDATA[EPEL]]></category>
		<category><![CDATA[RHEL]]></category>
		<category><![CDATA[RPM]]></category>
		<category><![CDATA[YUM]]></category>

		<guid isPermaLink="false">http://blog.gahooa.com/?p=93</guid>
		<description><![CDATA[As I was discussing lightly before, I have recently been involved in building quite a few RPMs for our server clusters at AppCove. Where we have arrived: Our (new) primary production cluster consists of multiple RedHat Enterprise Linux 5 boxes in different capacities (webserver, appserver, database master, database slave, etc&#8230;). Each machine is registered with [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.gahooa.com&amp;blog=6218261&amp;post=93&amp;subd=gahooa&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>As I was discussing lightly <a href="http://blog.gahooa.com/2009/03/01/installing-source-rpms-to-your-home-directory/">before</a>, I have recently been involved in building quite a few RPMs for our server clusters at <a href="http://www.appcove.com">AppCove</a>.</p>
<hr />
<h2>Where we have arrived:</h2>
<p>Our (new) primary production cluster consists of multiple RedHat Enterprise Linux 5 boxes in different capacities (webserver, appserver, database master, database slave, etc&#8230;).</p>
<p>Each machine is registered with 3 yum repositories:</p>
<ol>
<li>RHEL (RedHat Enterprise Linux)</li>
<li>EPEL (Extra Packages for Enterprise Linux)</li>
<li>ACN (AppCove Network)</li>
</ol>
<p><strong>All</strong> of our custom software packages and custom builds of open source software are placed into individual RPMs, and entered into our ACN repository.</p>
<p>From there, it is a snap to update any given server with the correct version of the software that server needs.</p>
<p>We have a dedicated build area, versioned with <a href="http://git-scm.com/">git</a>, that is used to build and package all of the custom software that is needed.</p>
<p><em>(note, RPMs are not used for web application deployment &#8212; <a href="http://samba.anu.edu.au/rsync/">rsync</a> via <a href="http://en.wikipedia.org/wiki/Secure_Shell">ssh</a> is used for that)</em></p>
<hr />
<h2>Recommendation:</h2>
<p>Having worked through the process from start to finish, I must say that I would <strong>highly</strong> recommend the following tools to anyone who is responsible for <a href="http://www.redhat.com/rhel/">RedHat Enterprise</a>, <a href="http://www.centos.org/">Centos</a>, or <a href="http://fedoraproject.org/">Fedora</a> system administration.</p>
<ul>
<li><a href="http://git-scm.com/">git</a> &#8211; to keep your .spec files versioned</li>
<li><a href="http://www.rpm.org/max-rpm-snapshot/rpmbuild.8.html">rpmbuild</a> &#8211; to build the rpms</li>
<li><a href="http://createrepo.baseurl.org/">createrepo</a> &#8211; to create your very own yum repository</li>
<li><a href="http://www.apache.org/">apache</a> &#8211; to serve the yum repository</li>
<li><a href="http://yum.baseurl.org/">yum</a> &#8211; to obtain, install, and upgrade your rpms</li>
</ul>
<p>Additionally, if you are using RedHat Enterprise or Centos, I would highly recommend using <a href="http://fedoraproject.org/wiki/EPEL">Extra Packages for Enterprise Linux (EPEL)</a> to get a few of those &#8220;other&#8221; packages that don&#8217;t come with your OS (git, for example).</p>
<p>&#8211;<br />
Learning how to build RPMs was a fairly steep curve.  But it wasn&#8217;t long.  It is one of those things that if you know it you say &#8220;<em>that&#8217;s easy</em>&#8221; and if you don&#8217;t you say &#8220;<em>what the ???</em>&#8220;</p>
<p>yum+rpm was invented (I assume) to make life easier for countless system administrators and software publishers.  So it&#8217;s not the kind of thing that everyone is involved in.</p>
<p>I was a bit tough to figure out the caveats of how to <span style="text-decoration:underline;">correctly</span> build RPM&#8217;s <span style="text-decoration:underline;">that work</span>.  The documentation is a bit sparse.  A bit here and a bit there.</p>
<hr />
<h2>What are the benefits?</h2>
<p>Many.  Let me list a few.</p>
<p><strong>Your system stays really clean. </strong> With RPMs, you can uninstall <span style="text-decoration:underline;">everything you installed</span><strong> </strong>without leaving extra files laying around.</p>
<p><strong>Upgrades are a snap. </strong>Once you have registered your own yum repository on a system, you can upgrade a given package by running:</p>
<pre style="padding-left:30px;">yum upgrade your-package</pre>
<p><strong>All your systems can be on the same &#8220;page&#8221;.</strong> It is very easy, using yum, to ensure that all of your systems are using the <strong>exact</strong> same version of software.</p>
<p><strong>Custom builds are super easy to maintain.</strong> We custom-compile php, python, and various other software.  Once the .spec files are in place, <strong>all </strong>of your software can be re-packaged with a single command.</p>
<p>In our specific case, we wanted to have the <a href="http://www.danga.com/memcached/">memcached</a> client statically compiled into <a href="http://www.php.net/">PHP</a>.  With a few extra commands in the .spec file, it was a snap to pull in the source from <a href="http://pecl.php.net/">pecl</a>, and update `configure` to take it into account.</p>
<p><strong>All builds can take place in one place. </strong>With one set of documentation, one consistent set of development tools, etc&#8230;  We have a user called `build` on one of the hosts that is specifically used for building all of the RPMs.</p>
<hr />
<h2>Where to learn?</h2>
<p>The best way to learn, as usual, is to jump in and figure it out.   There is some really good documentation buried in the <a href="http://www.rpm.org">rpm.org</a> site.   It is a book called <strong>Maximum RPM</strong>, origninally published by redhat.  The current snapshot of the book is <a href="http://www.rpm.org/max-rpm-snapshot/">available online</a>.</p>
<p style="padding-left:30px;"><a href="http://www.rpm.org/max-rpm-snapshot/">http://www.rpm.org/max-rpm-snapshot/</a></p>
<p>Google is another good resource, depending on what it is you are looking for.</p>
<br /> Tagged: Apache, EPEL, Linux, RHEL, RPM, System Administration, YUM <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/gahooa.wordpress.com/93/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/gahooa.wordpress.com/93/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/gahooa.wordpress.com/93/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/gahooa.wordpress.com/93/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/gahooa.wordpress.com/93/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/gahooa.wordpress.com/93/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/gahooa.wordpress.com/93/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/gahooa.wordpress.com/93/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/gahooa.wordpress.com/93/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/gahooa.wordpress.com/93/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/gahooa.wordpress.com/93/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/gahooa.wordpress.com/93/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/gahooa.wordpress.com/93/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/gahooa.wordpress.com/93/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.gahooa.com&amp;blog=6218261&amp;post=93&amp;subd=gahooa&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.gahooa.com/2009/03/08/i-highly-recommend-yum-createrepo-rpmbuild/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">gahooa</media:title>
		</media:content>
	</item>
		<item>
		<title>Installing Source RPMs to your home directory</title>
		<link>http://blog.gahooa.com/2009/03/01/installing-source-rpms-to-your-home-directory/</link>
		<comments>http://blog.gahooa.com/2009/03/01/installing-source-rpms-to-your-home-directory/#comments</comments>
		<pubDate>Mon, 02 Mar 2009 02:46:55 +0000</pubDate>
		<dc:creator>Jason Garber</dc:creator>
				<category><![CDATA[AppCove]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[System Administration]]></category>
		<category><![CDATA[Technique]]></category>
		<category><![CDATA[Bloglet]]></category>
		<category><![CDATA[RedHat]]></category>
		<category><![CDATA[RHEL]]></category>
		<category><![CDATA[RPM]]></category>
		<category><![CDATA[SRPM]]></category>

		<guid isPermaLink="false">http://blog.gahooa.com/?p=87</guid>
		<description><![CDATA[I&#8217;ve been involved in an ongoing project to build RPMs for all of the &#8220;custom&#8221; software installs we use on RedHat Enterprise Linux 5 (RHEL5) at AppCove. By default (on RHEL), source RPMs are installed to /usr/src/redhat. This is nice, except that I don&#8217;t want to be running as root when building software. rpm -i [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.gahooa.com&amp;blog=6218261&amp;post=87&amp;subd=gahooa&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been involved in an ongoing project to build <a href="http://www.rpm.org">RPMs</a> for all of the &#8220;custom&#8221; software installs we use on <a href="http://www.redhat.com/rhel/">RedHat Enterprise Linux 5</a> (RHEL5) at <a href="http://appcove.com">AppCove</a>.</p>
<p>By default (on RHEL), source RPMs are installed to /usr/src/redhat.  This is nice, except that I don&#8217;t want to be running as root when building software.</p>
<pre>rpm -i --relocate /usr/src/redhat=/home/build/RPMBUILD setuptools-0.6c9-1.src.rpm</pre>
<p>The previous command will install the specified source rpm to a local directory under the &#8220;build&#8221; user.  That makes it easy to tweak the .spec file, and then build the desired RPM.</p>
<br /> Tagged: Bloglet, RedHat, RHEL, RPM, SRPM <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/gahooa.wordpress.com/87/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/gahooa.wordpress.com/87/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/gahooa.wordpress.com/87/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/gahooa.wordpress.com/87/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/gahooa.wordpress.com/87/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/gahooa.wordpress.com/87/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/gahooa.wordpress.com/87/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/gahooa.wordpress.com/87/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/gahooa.wordpress.com/87/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/gahooa.wordpress.com/87/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/gahooa.wordpress.com/87/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/gahooa.wordpress.com/87/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/gahooa.wordpress.com/87/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/gahooa.wordpress.com/87/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.gahooa.com&amp;blog=6218261&amp;post=87&amp;subd=gahooa&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.gahooa.com/2009/03/01/installing-source-rpms-to-your-home-directory/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">gahooa</media:title>
		</media:content>
	</item>
		<item>
		<title>Update [1] on Fedora vs Redhat Enterprise Linux</title>
		<link>http://blog.gahooa.com/2009/02/08/update-on-fedora-vs-redhat-enterprise-linux/</link>
		<comments>http://blog.gahooa.com/2009/02/08/update-on-fedora-vs-redhat-enterprise-linux/#comments</comments>
		<pubDate>Mon, 09 Feb 2009 01:48:03 +0000</pubDate>
		<dc:creator>Jason Garber</dc:creator>
				<category><![CDATA[AppCove]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[reSearch]]></category>
		<category><![CDATA[EPEL]]></category>
		<category><![CDATA[RPM]]></category>
		<category><![CDATA[YUM]]></category>

		<guid isPermaLink="false">http://blog.gahooa.com/?p=66</guid>
		<description><![CDATA[This is in reference to http://blog.gahooa.com/2009/01/18/fedora-or-redhat-enterprise-linux-in-a-production-environment/. After the excellent comment by Sergio Olivo, I did some heavy looking into the Extra Packages for Enterprise Linux project (EPEL for short).  On a brand-spanking-new RHEL 5 box, I installed the YUM repository for EPEL, and quite immediately had access to tons of extra packages.  Erlang is there.  [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.gahooa.com&amp;blog=6218261&amp;post=66&amp;subd=gahooa&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><strong>This is in reference to <a href="http://blog.gahooa.com/2009/01/18/fedora-or-redhat-enterprise-linux-in-a-production-environment/">http://blog.gahooa.com/2009/01/18/fedora-or-redhat-enterprise-linux-in-a-production-environment/</a>.</strong></p>
<p>After the excellent <a href="http://blog.gahooa.com/2009/01/18/fedora-or-redhat-enterprise-linux-in-a-production-environment/#comment-2">comment</a> by Sergio Olivo, I did some heavy looking into the <a href="http://fedoraproject.org/wiki/EPEL">Extra Packages for Enterprise Linux project</a> (EPEL for short).  On a brand-spanking-new RHEL 5 box, I installed the YUM repository for EPEL, and quite immediately had access to tons of extra packages.  Erlang is there.  Git is there.  Memcached is there.  Sweet!</p>
<p>However, EPEL <a href="http://fedoraproject.org/wiki/EPEL/FAQ#Does_EPEL_replace_packages_provided_within_Red_Hat_Enterprise_Linux_or_layered_products.3F">does not update or replace</a> the version of any packages provided by RHEL.</p>
<p>So the problem of having out of date versions of PHP and Python still remain.  Next I looked into using a third party RPM repository (provided by <a href="http://www.rackspace.com">RackSpace</a>).  They provide updated versions of PHP and a number of PHP modules.  But alas, this created incompatibilities with the EPEL packages for PHP.  This is because EPEL packages are targeted for RHEL versions. Bla&#8230;</p>
<p>So here is what I decided to do (haven&#8217;t done it yet, but will soon).  We will build and package our own custom set of RPMs for RHEL 5, and publish them in an RPM repository.  Then we will simply point each server to that repository in addition to the main RHEL repository, and poof, problem solved.  We may also use EPEL for things like Erlang and git.  Or we may compile from source.  Not sure.</p>
<p>For those of you who are not familiar with YUM RPM repositories, they can be as simple as a specail directory structure served by a webserver.</p>
<p>There are a few items remaining to be concluded, but they should fall into place fairly quickly.</p>
<br /> Tagged: EPEL, Linux, RPM, YUM <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/gahooa.wordpress.com/66/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/gahooa.wordpress.com/66/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/gahooa.wordpress.com/66/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/gahooa.wordpress.com/66/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/gahooa.wordpress.com/66/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/gahooa.wordpress.com/66/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/gahooa.wordpress.com/66/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/gahooa.wordpress.com/66/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/gahooa.wordpress.com/66/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/gahooa.wordpress.com/66/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/gahooa.wordpress.com/66/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/gahooa.wordpress.com/66/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/gahooa.wordpress.com/66/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/gahooa.wordpress.com/66/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.gahooa.com&amp;blog=6218261&amp;post=66&amp;subd=gahooa&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.gahooa.com/2009/02/08/update-on-fedora-vs-redhat-enterprise-linux/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">gahooa</media:title>
		</media:content>
	</item>
		<item>
		<title>Fedora or RedHat Enterprise Linux in a production environment?</title>
		<link>http://blog.gahooa.com/2009/01/18/fedora-or-redhat-enterprise-linux-in-a-production-environment/</link>
		<comments>http://blog.gahooa.com/2009/01/18/fedora-or-redhat-enterprise-linux-in-a-production-environment/#comments</comments>
		<pubDate>Mon, 19 Jan 2009 03:22:49 +0000</pubDate>
		<dc:creator>Jason Garber</dc:creator>
				<category><![CDATA[AppCove]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[reSearch]]></category>

		<guid isPermaLink="false">http://gahooa.wordpress.com/?p=34</guid>
		<description><![CDATA[[UPDATE AT http://blog.gahooa.com/2009/02/08/update-on-fedora-vs-redhat-enterprise-linux/] At AppCove, we run RedHat Enterprise Linux on all of our servers.  RHEL is great, because: It works It still works Automatic security updates Did I mention, it just works? RedHat, as far as I know, takes a very serious perspective on patching all of their RPM&#8217;s and automatically pushing them out [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.gahooa.com&amp;blog=6218261&amp;post=34&amp;subd=gahooa&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><strong>[UPDATE AT <a href="http://blog.gahooa.com/2009/02/08/update-on-fedora-vs-redhat-enterprise-linux/">http://blog.gahooa.com/2009/02/08/update-on-fedora-vs-redhat-enterprise-linux/</a>]</strong></p>
<p>At AppCove, we run RedHat Enterprise Linux on all of our servers.  RHEL is great, because:</p>
<ol>
<li>It works</li>
<li>It still works</li>
<li>Automatic security updates</li>
<li>Did I mention, it just works?</li>
</ol>
<p>RedHat, as far as I know, takes a very serious perspective on patching all of their RPM&#8217;s and automatically pushing them out via the update agent (up2date).  They are <strong>very conservative</strong> on the versions of packages that they publish.  RHEL 4, for example, is still running PHP 4.x.  Python 2.3.  MySQL 4.x&#8230;  I believe that they do this to maintain stability and long term support.</p>
<p>However, for a company like AppCove, those versions are simply <strong>too old.</strong> For years we have hand-compiled about a dozen packages on RHEL 4 in order to be able to take advantage of relevant features in newer software.  PHP, Python, MySQL (from mysql.com supplied RPM), python-mysql, git, erlang, memcached, libmcrypt, and others are part of the growing list of software that we have to install manually.</p>
<p>With this growing list comes a growing issue of security updates and maintainability.  More complicated packages need more updated libraries, creating a chain-reaction of additional packages.  Etc&#8230;</p>
<p>&#8211;<br />
Recently I signed up with a &#8220;slice&#8221; at <a href="http://www.slicehost.com/">SliceHost</a>.  (SliceHost provides virtualized machines for a great price, with lots of scalability available).  I chose <a href="http://fedoraproject.org/">Fedora Core 10</a> for the OS.  I must say I have been very impressed.</p>
<p>All of the packages that I have needed were right there, available by <strong>yum install</strong>.  PHP, Python, python-mysql, erlang, memcached, php-memcached, python-memcached, git, etc&#8230;, etc&#8230;, and did I mention that <span style="text-decoration:underline;">tree</span> was even there?  And it has all &#8220;just worked&#8221;.</p>
<p>&#8211;<br />
In summary, here are the items that I need to resolve:</p>
<ol>
<li>Is fedora considered as &#8220;secure&#8221; as RHEL?  Is there a team dedicated to getting security patches our <em>fast</em> when identified?</li>
<li>Are continuous upgrades in fedora an issue?  Do software packages abruptly get updated without notice?  (this has at times been an issue with RHEL).</li>
<li>Is it possible to run RHEL while also connecting to fedora package repositories to install specific packages?  Desirable?  Undesirable?  Conflicts?</li>
</ol>
<p>The most secure computer is one that is locked in a vault <span style="text-decoration:underline;">and</span> turned off.  Since that won&#8217;t work for most needs, one must find the appropriate balance between <strong>functionality</strong> and <strong>security</strong>.</p>
<p>Comments welcome&#8230;</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/gahooa.wordpress.com/34/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/gahooa.wordpress.com/34/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/gahooa.wordpress.com/34/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/gahooa.wordpress.com/34/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/gahooa.wordpress.com/34/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/gahooa.wordpress.com/34/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/gahooa.wordpress.com/34/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/gahooa.wordpress.com/34/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/gahooa.wordpress.com/34/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/gahooa.wordpress.com/34/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/gahooa.wordpress.com/34/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/gahooa.wordpress.com/34/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/gahooa.wordpress.com/34/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/gahooa.wordpress.com/34/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.gahooa.com&amp;blog=6218261&amp;post=34&amp;subd=gahooa&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.gahooa.com/2009/01/18/fedora-or-redhat-enterprise-linux-in-a-production-environment/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">gahooa</media:title>
		</media:content>
	</item>
		<item>
		<title>New Blog Started</title>
		<link>http://blog.gahooa.com/2009/01/18/new-blog-started/</link>
		<comments>http://blog.gahooa.com/2009/01/18/new-blog-started/#comments</comments>
		<pubDate>Sun, 18 Jan 2009 06:49:09 +0000</pubDate>
		<dc:creator>Jason Garber</dc:creator>
				<category><![CDATA[AppCove]]></category>
		<category><![CDATA[Life]]></category>
		<category><![CDATA[Perspective]]></category>

		<guid isPermaLink="false">http://gahooa.wordpress.com/?p=10</guid>
		<description><![CDATA[Hi, my name is Jason Garber. (Not to be confused with the other Jason Garber in MD, or the other one in DC, I am the one from PA.) Being born and raised by good parents in central Pennsylvania has given me a great appericiation for life, family, and nature. I currently live in Altoona [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.gahooa.com&amp;blog=6218261&amp;post=10&amp;subd=gahooa&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><strong>Hi, my name is Jason Garber.</strong></p>
<p>(Not to be confused with the other <a href="http://www.google.com/search?q=site:jasongarber.com">Jason Garber in MD</a>, or the <a href="http://sixtwothree.org/blog/">other one in DC</a>, I am the one from PA.)</p>
<p>Being born and raised by good parents in central Pennsylvania has given me a great appericiation for life, family, and nature.  I currently live in <a href="http://www.altoonapa.gov">Altoona </a>with my wife and all of our children (&gt;= plural^2).</p>
<p>All of my life I have been very interested in creating.  Creating falls into a number of categories which I will outline here&#8230;</p>
<p><strong><span style="color:#ff0000;">Please read more on the <a href="/about">About Me</a> page&#8230;</span></strong></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/gahooa.wordpress.com/10/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/gahooa.wordpress.com/10/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/gahooa.wordpress.com/10/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/gahooa.wordpress.com/10/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/gahooa.wordpress.com/10/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/gahooa.wordpress.com/10/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/gahooa.wordpress.com/10/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/gahooa.wordpress.com/10/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/gahooa.wordpress.com/10/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/gahooa.wordpress.com/10/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/gahooa.wordpress.com/10/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/gahooa.wordpress.com/10/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/gahooa.wordpress.com/10/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/gahooa.wordpress.com/10/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.gahooa.com&amp;blog=6218261&amp;post=10&amp;subd=gahooa&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.gahooa.com/2009/01/18/new-blog-started/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">gahooa</media:title>
		</media:content>
	</item>
	</channel>
</rss>
