<?xml version="1.0"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
<channel>
<title>About System Administration</title>
<link>http://mixinet.net/~sto/blog/sysadmin/</link>
<description>StoWiki</description>
<item>
	
	<title>Redmine</title>
	
	<guid>http://mixinet.net/~sto/blog/sysadmin/20080301_redmine/</guid>
	<link>http://mixinet.net/~sto/blog/sysadmin/20080301_redmine/</link>
	
	<pubDate></pubDate>
	<description><![CDATA[<p>I've been using <a href="http://subversion.tigris.org/">Subversion</a> and
<a href="http://trac.edgewall.org/">Trac</a> for some years now, and I have encouraged
its use at work since the last couple of years, with the undesired effect of
having to maintain four different <code>Trac</code> installations with different database
systems (<code>SQLite3</code> and <code>PostgreSQL</code>), plugins (more than 15 on the big
servers), authentication systems (<code>htpass</code> files, <code>LDAP</code> and a database based
system) and tons of projects published (two internal servers have 64 and 16
projects, one of the client system has 33 projects and there is only one
single project installation, but it is living at a client's system).</p>

<p>Yesterday night, while reading <a href="http://planet.debian.org/">Planet Debian</a> I
found a <a href="http://changelog.complete.org/posts/694-Trac-Git.html">post</a> from
John Goerzen about tools to replace <a href="http://trac.edgewall.org/">Trac</a>,
including the option to use <a href="http://git.or.cz/">Git</a> as the project
<a href="http://en.wikipedia.org/wiki/Version_control_system">VCS</a>.</p>

<p>In the post he talks about different options, mainly projects that I would
categorize as <em>issue tracking systems</em> (<em>mantis</em>, <em>roundup</em>, etc.), but it
also talks about <a href="http://www.redmine.org/">Redmine</a>, a project management
system implemented using the <a href="http://www.rubyonrails.org/">Ruby on Rails</a>
framework that is similar to <code>Trac</code>.</p>

<p>As it looked interesting I downloaded, installed and executed an instance in
about 15 minutes (I love the systems that support
<a href="http://www.sqlite.org/">sqlite3</a> for this quick tests, not having to touch
real database servers speeds up simple tests a lot).</p>

<p>I played a little bit with the system and I believe that I will spend some
more time testing it at work next week, as it looks quite promising; the
standard version has almost all the features I'm interested in without the
need to install additional plugins and it can do most of the things I was
missing from <code>Trac</code> to do lightweight <em>project management</em>.</p>

<p>I evaluated <a href="http://project-open.org">]project-open[</a> to use it together with
<code>Trac</code> for our internal <em>project management</em> tasks, mainly because we miss
important features from <code>Trac</code>, like having clean systems to view the tasks of
a user in all projects or a clean way to do the project planning using
<em>tickets</em> and <em>gantt charts</em>. Of course there are ways to do it, but the
plugins I've tried are not as good and simple as I would like.</p>

<p>The problem with the use of <code>]project-open[</code> is that I don't really like it
for us, as it has tons of features that I feel we don't need nor will use and,
on a first try, the system seemed difficult to deploy and maintain, probably
because my lack of knowledge about <a href="http://openacs.org/">OpenACS</a> and
<a href="http://www.tcl.tk/">TCL</a>.</p>

<p>In fact we still don't have <code>]po[</code> running at work because I was unable to to
integrate the authentication system with our LDAP server on my first tries
and have had no time to investigate further since then.</p>

<p>The good thing about trying <code>Redmine</code> is that if we don't end up using it at
least I can take the most of this opportunity by looking at <code>Ruby on Rails</code>
and the <a href="http://www.ruby-lang.org/en/">Ruby Programming Language</a>, at least
from the administration side, as I have never looked at it seriously.</p>
]]></description>
</item>
<item>
	
	<title>Tips &amp;#x26; Tricks: plone, nginx and path rewriting</title>
	
	<guid>http://mixinet.net/~sto/blog/sysadmin/20080228_tandt_-_plone__nginx_and_path_rewriting/</guid>
	<link>http://mixinet.net/~sto/blog/sysadmin/20080228_tandt_-_plone__nginx_and_path_rewriting/</link>
	
	<pubDate></pubDate>
	<description><![CDATA[<h2>The problem</h2>

<p>On a couple of Debian Etch systems we have a
<a href="http://packages.debian.org/plone-site">plone-site</a> that is published using a
backport of the <a href="http://packages.debian.org/nginx">nginx</a> web server.</p>

<p>The <strong>Zope</strong> instance is running on the standard port and serves the <strong>Plone</strong>
contents under the <code>/plone</code> path.</p>

<p>Initially we were publishing the site to the external world using an https
site served by <code>nginx</code> using the following entry on the configuration:</p>

<pre><code>  location /plone/ {
    proxy_pass http://plone:9673;
    include    /etc/nginx/proxy.conf;
  }
</code></pre>

<p>The <code>proxy.conf</code> contents are quite standard:</p>

<pre><code>  # proxy.conf
  proxy_redirect                  off;
  proxy_set_header                Host &#036;host;
  proxy_set_header                X-Real-IP &#036;remote_addr;
  proxy_set_header                X-Forwarded-For &#036;proxy_add_x_forwarded_for;
  client_max_body_size            0;
  client_body_buffer_size         128k;
  proxy_connect_timeout           90;
  proxy_send_timeout              90;
  proxy_read_timeout              90;
  proxy_buffer_size               4k;
  proxy_buffers                   4 32k;
  proxy_busy_buffers_size         64k;
  proxy_temp_file_write_size      64k;
</code></pre>

<p>With this settings we see the <code>/plone</code> contents using the same path that is
used by the <em>Zope</em> instance, but after testing we have decided to change the
<code>/plone</code> path and server the contents under the <code>/web</code> path.</p>

<h2>The Wrong Solution</h2>

<p>The fist option I though about was quite simple, rename the <strong>Zope</strong>'s
<strong>plone</strong> object to <strong>web</strong>.</p>

<p>Seems reasonable and simple for someone without <strong>Zope</strong> experience (I don't
administer the internals of the <strong>Zope/Plone</strong> site), but now I know that it
is a very big mistake, because renaming objects in Zope in not cheap, as it
implies that the server has to modify all the contents of the renamed object
and the operation can take a very long time.</p>

<p>With my ignorance I tried to rename the plone object using the <code>Zope
administrative interface</code> and after a minute or so I cancelled the page
loading that was running on my browser, thinking that I had cancelled the
rename operation.</p>

<p>To make a long story short I'll tell you that the operation was still running
and after several hours the folder was renamed (in fact I noticed when the
good solution broke, as I had already solved the problem using the next
method), but something went wrong and part of the site functionality was
broken... the final solution to the debacle has been to recover a backup of
the Zope instance older than the rename operation and continue from that copy.</p>

<h2>The Right Solution (TM)</h2>

<p>It seems that <code>Zope</code> has a couple of systems to do <a href="http://www.zope.org/Documentation/Books/ZopeBook/2_6Edition/VirtualHosting.stx">Virtual
Hosting</a>
and the best option is the use of the product called <strong>Virtual Host Monster</strong>,
a weird and confusing system (IMHO, of course), that does the job once the
right configuration settings are in place.</p>

<p>The best solution to our problem was to modify the requests done by the
reverse proxy without touching anything on the <code>Plone</code> site (the original one
already had a <strong>Virtual Host Monster</strong> object installed and that was the only
thing that we needed to add).</p>

<p>The <code>nginx</code> configuration for the new <code>/web</code> path is the following:</p>

<pre><code>  location /web/ {
    proxy_pass http://plone:9673/plone/VirtualHostRoot/_vh_web/;
    include    /etc/nginx/proxy.conf;
  }
</code></pre>

<p>With this change, when the user asks for anything under the /web/ path the
<code>Zope</code> server gets the contents traversing the <code>/plone</code> object and adding to
it the elements that appear after the <code>VirtualHostRoot</code> component, ignoring
components that start with the <code>_vh_</code> prefix (the protocol and host name of
the requests are not modified, as we did not touched that).</p>

<p>Once the object is found, the server rewrites the URLs included on the HTML
files using the path components that appear after the <code>VirtualHostRoot</code> one,
including the suffix of the components that start with the prefix <code>_vh_</code>.</p>

<p>For example, when the <code>Zope</code> server receives a request for an URL like:</p>

<pre><code>  http://plone:9673/plone/VirtualHostRoot/_vh_web/home
</code></pre>

<p>it publishes the content found on:</p>

<pre><code>  http://plone:9673/plone/home
</code></pre>

<p>but the HTML files returned assume that their base URL is:</p>

<pre><code>  http://plone:9673/web/home
</code></pre>
]]></description>
</item>
<item>
	
	<title>Pending sysadmin posts</title>
	
	<guid>http://mixinet.net/~sto/blog/sysadmin/20070615_pending_sysadmin_posts/</guid>
	<link>http://mixinet.net/~sto/blog/sysadmin/20070615_pending_sysadmin_posts/</link>
	
	<pubDate></pubDate>
	<description><![CDATA[<p>Since some weeks ago I've been thinking that I'm not writing on my Blog for
long periods, mainly because I don't have too much free time and generally I
don't have interesting things to say.</p>

<p>Anyway now I'm starting to believe that I should write more, at least about
technical matters; I've been doing a lot of system administration tasks lately
and probably it is a good idea to keep a log of the things I've tried and
learnt on this Blog, as my notes can be useful to others or at least for
myself.</p>

<p>I'm going to bed now, but lets start by enumerating some of the things I
must Blog about:</p>

<ul>
<li><p>Virtualization using the <a href="http://linux-vserver.org/">Linux-VServer</a>
technology.</p></li>
<li><p><a href="http://www.postfix.org/">Postfix</a> configurations for the virtual hosts.</p></li>
<li><p><a href="http://trac.edgewall.org/">Trac</a> installations.</p></li>
<li><p><a href="http://mixinet.net/~sto/blog/sysadmin/www.tildeslash.com/monit/">Monit</a> for local monitorization.</p></li>
<li><p>HTTP servers and reverse proxies: <a href="http://www.apsis.ch/pound/">Pound</a>,
<a href="http://www.lighttpd.net/">Lighttpd</a>, <a href="http://nginx.net/">Nginx</a>,
<a href="http://httpd.apache.org/">Apache2</a>.</p></li>
<li><p>... probably a lot of other things I don't remember now ...</p></li>
</ul>

<p>The things I would like to look into, if I find the time:</p>

<ul>
<li><p>Other virtualization technologies like <a href="http://openvz.org/">OpenVZ</a> and
<a href="http://www.xensource.com/">Xen</a>.</p></li>
<li><p>Distributed Version Control Systems like <a href="http://bazaar-vcs.org/">Bazaar</a>,
<a href="http://www.darcs.net/">Darcs</a>, <a href="http://git.or.cz/">GIT</a> or
<a href="http://selenic.com/mercurial/">Mercurial</a>.</p></li>
<li><p>Firewalling and VPN software like <a href="http://mixinet.net/~sto/blog/sysadmin/www.shorewall.net/">Shorewall</a> and
<a href="http://openvpn.net/">OpenVPN</a>.</p></li>
<li><p>... and again, another big list of things I don't remember now ...</p></li>
</ul>

<p>And the Operating System I'm using to test all those programs:</p>

<ul>
<li><a href="http://www.debian.org/">Debian</a></li>
</ul>
]]></description>
</item>
<item>
	
	<title>Spammers</title>
	
	<guid>http://mixinet.net/~sto/blog/sysadmin/20060811_spammers/</guid>
	<link>http://mixinet.net/~sto/blog/sysadmin/20060811_spammers/</link>
	
	<pubDate></pubDate>
	<description><![CDATA[<p>Woah, they are really fast, yesterday I included an e-mail address I've never
used before on this blog and I've already received SPAM on it.</p>

<p>I've changed my address at the page templates by a <code>tr</code> command:</p>

<pre><code>`echo -n abweqsq@@@uqfqvmb.vmb | tr -s @a-z@ @s-za-r@`
</code></pre>

<p>I don't know if it will be useful, but at least it looks a lot more freaky ;).</p>
]]></description>
</item>
<item>
	
	<title>Moved to ikiwiki</title>
	
	<guid>http://mixinet.net/~sto/blog/sysadmin/20060809_moved_to_ikiwiki/</guid>
	<link>http://mixinet.net/~sto/blog/sysadmin/20060809_moved_to_ikiwiki/</link>
	
	<pubDate></pubDate>
	<description><![CDATA[<p>After some time thinking about <a href="http://mixinet.net/~sto/blog/sysadmin/20060515_ikiwiki.html">it</a> I've moved my blog from <a href="http://pyblosxom.sf.net/">PyBloxsom</a> to
<a href="http://ikiwiki.kitenet.net/">ikiwiki</a>; I'm still playing with it and the site needs some work, but it
seems to work ok and the default look and feel is good enough for me.</p>

<p>This post is written using <a href="http://daringfireball.net/projects/markdown/">Markdown</a> to give it a try, but I wrote a simple
<a href="http://mixinet.net/~sto/files/rst.pm">plugin</a> to add (<em>partial</em>) support for <a href="http://docutils.sf.net/rst.html" title="reStructuredText">rst</a> to be able to keep all my
old entries without additional editing. I've sent the file to <a href="http://kitenet.net/~joey/">joeyh</a> and I
hope it gets into the upstream code (improved, if possible), as that will
remove the need to keep my local changes in sync with the debian package.</p>

<p>I have not enabled the <code>ikiwiki.cgi</code> because the machine I'm running it is
quite slow and anyway I only need it for comments, and I usually don't have
many of them. Instead of enabling comments I've added a footer asking people
to send comments to <code>echo -n klgoaca@@@eapafwl.fwl | tr -s @a-z@ @i-za-h@</code>
instead.</p>

<p>To avoid flooding planet I've used the <a href="http://kitenet.net/~joey/blog/entry/ikiwiki_flood_prevention.html">ikiwiki flood prevention</a> mechanism,
previous posts can be reached through the categories and/or using the full
<a href="http://mixinet.net/~sto/blog/sysadmin/../index/">Blog</a> index.</p>

<h2>Update</h2>

<p>I've been told that there is a <code>Perl</code> library to parse <a href="http://docutils.sf.net/rst.html" title="reStructuredText">rst</a>.</p>

<p>I knew someone was working on it, but have not seen code until now; the
package is called <strong>Text-Restructured</strong> and it is available from the URL
<a href="http://search.cpan.org/dist/Text-Restructured/">http://search.cpan.org/dist/Text-Restructured/</a>.</p>

<p>Probably my hack could be replaced by code that uses this module instead of
calling <code>python</code> to parse the files...  any volunteers?</p>
]]></description>
</item>

</channel>
</rss>
