<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
    <title>DOCUNEXT</title>
    <link rel="alternate" type="text/html" href="http://www.docunext.com/" />
    <link rel="self" type="application/atom+xml" href="http://www.docunext.com/atom.xml" />
    <id>tag:www.docunext.com,2008-09-16://250</id>
    <updated>2011-12-25T09:00:47Z</updated>
    
    <generator uri="http://www.sixapart.com/movabletype/">Movable Type 4.35-en</generator>

<entry>
    <title>LXC on Ubuntu 11.10 Looks Good</title>
    <link rel="alternate" type="text/html" href="http://www.docunext.com/blog/2011/12/lxc-on-ubuntu-1110-looks-good.html" />
    <id>tag:www.docunext.com,2011://250.23577</id>

    <published>2011-12-25T15:54:51Z</published>
    <updated>2011-12-25T09:00:47Z</updated>

    <summary>Probably going to stick with csync2, maybe? Actually I&apos;m liking the idea of simply using git more and more. There are actually plenty of folks doing this, and here&apos;s the best example I found:</summary>
    <author>
        <name>Albert</name>
        
    </author>
    
    <category term="git" label="git" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="lxc" label="lxc" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="openvz" label="openvz" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="ubuntu" label="ubuntu" scheme="http://www.sixapart.com/ns/types#tag" />
    
    <content type="html" xml:lang="en" xml:base="http://www.docunext.com/">
        <![CDATA[<p>I upgraded my Lenovo g555 laptop to Ubuntu Oneric Ocelot on Friday and it was a little rocky, but now its working really well.</p>

<p>I have setup a few new / different items:</p>

<ul>
<li>I&#8217;m using the ATI proprietary driver, much to my chagrin solely because it gets less hot than the open source one. As far as performance goes, I don&#8217;t notice a difference, but no doubt - KMS is awesome. The raw terminals look magnificient. Specifically, using this makes all the difference:</li>
</ul>

<pre>
amdconfig --px-igpu
</pre>

<ul>
<li>I am now using ext4 for the /home directory. I was hesitant to use ext4 because ext3 is so reliable, but then I read about some basic performance factors - like extents specifically, so I&#8217;m giving it a go.</li>
<li>While I&#8217;m using OpenVZ extensively these days, I&#8217;m now checking out LXC for a development environment on my laptop. I actually just setup another user account &#8220;app&#8221; that I ssh into (yes, ssh&#8217;ing to the same machine - for ssh forwarding), and that&#8217;s working OK because I&#8217;ve got Ruby installed with rbenv, but I want to encapsulate mysql, and I don&#8217;t want it polluting my base workstation OS.</li>
<li>I&#8217;m also using libnss-extrausers because it is awesome - I&#8217;d rather use something like puppet or csync2 to manage hard files instead of using ldap - maybe even something like git-annex for that, or maybe just plain git.</li>
</ul>

<p>I&#8217;m still doing plenty the same:</p>

<ul>
<li>Gnome + Awesome</li>
<li>Still using rbenv, homesick, and major dotfiles in my home directories (which is why I split my laptop user with the development user)</li>
<li>Still using jEdit, sorta.</li>
</ul>

<p>I&#8217;m no longer using:</p>

<ul>
<li>Picasa3 - see ya! I&#8217;m tired of Wine, and realized I can manage my images better than Picasa can.</li>
<li>No longer bothering with the default folders in my home</li>
</ul>

<p>Other stuff catching my attention:</p>

<ul>
<li>Fuse BindFS</li>
<li>mbr</li>
<li>mr (not related)</li>
<li>caspar ( see <a href="http://www.hoppie.nl/pub/node/79">this</a>)</li>
</ul>

<p>Probably going to stick with csync2, maybe? Actually I&#8217;m liking the idea of simply using git more and more. There are actually plenty of folks doing this, and here&#8217;s the best example I found:</p>

<ul>
<li><a href="http://git.rot13.org/?p=bak-git.git;a=blob;f=bak-git-server.pl;hb=HEAD">http://git.rot13.org/?p=bak-git.git;a=blob;f=bak-git-server.pl;hb=HEAD</a></li>
</ul>
]]>
        

    </content>
</entry>

<entry>
    <title>Gitolite, Git encrypt, Git annex and Bup</title>
    <link rel="alternate" type="text/html" href="http://www.docunext.com/blog/2011/12/gitolite-git-encrypt-git-annex-and-bup.html" />
    <id>tag:www.docunext.com,2011://250.23576</id>

    <published>2011-12-24T02:14:28Z</published>
    <updated>2011-12-24T15:49:33Z</updated>

    <summary>I&apos;ve been using Gitosis for awhile, and its fine. I decided to try Gitolite because it supports git-annex-shell, and I&apos;ve been seriously getting into git annex after realizing it supports bup.
</summary>
    <author>
        <name>Albert</name>
        
    </author>
    
        <category term="Backups" scheme="http://www.sixapart.com/ns/types#category" />
    
    <category term="bup" label="bup" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="git" label="git" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="gitannex" label="git annex" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="gitencrypt" label="git encrypt" scheme="http://www.sixapart.com/ns/types#tag" />
    
    <content type="html" xml:lang="en" xml:base="http://www.docunext.com/">
        <![CDATA[<p>I&#8217;ve been working more git lately, covering at least the following items:</p>

<ul>
<li>Gitolite</li>
<li>Git enrypt</li>
<li>Git annex</li>
<li>Bup</li>
</ul>

<p>Here are my notes on each component:</p>

<h3>Gitolite</h3>

<p>I&#8217;ve been using Gitosis for awhile, and its fine. I decided to try Gitolite because it supports git-annex-shell, and I&#8217;ve been seriously getting into git annex after realizing it supports bup.</p>

<p>I was able to set it up and got it working well, but then I came to realize that git-annex-shell is not compatible with bup:</p>

<blockquote>
&#8220;git-annex-shell does not support bup, due to the wacky way that bup starts its server. So, to use bup, you need full shell access to the server.&#8221;
</blockquote>

<p>So much for reading the manual! :-)</p>

<p>Now I&#8217;ve got both gitosis and gitolite setup. I&#8217;m only actively using gitosis right now - I won&#8217;t switch anytime soon - probably when I have another hankering to use git-annex-shell!</p>

<p>UPDATE: It looks like this isn&#8217;t a show stopper, because apparently git annex repositories can still stored in gitosis or gitolite servers, its just that the annexed contents, cannot. That&#8217;s fine though, in my opinion. I&#8217;ll try it out.</p>

<h3>Git encrypt</h3>

<p>Git encrypt is a really nice script for using git smudge and clean to pretty much transparently encrypt / decrypt git repository data <em>while</em> allowing git to still do its thing.</p>

<p>I&#8217;ve been tinkering with it today while working with homesick - a ruby gem that allows cloning and symlinking dotfiles for home directory configuration. Its really awesome, but I have some additions I&#8217;d like to make, such as the ability to symlink dotfiles <em>within</em> dotfolders, like the .ssh or .config folders.</p>

<p>Anyway, back to git encrypt - given that some dotfiles have some relatively sensitive data (like .s3cfg and the .ssh folder items) - its a perfect combo with homesick.</p>

<p>I&#8217;ve gotten the two to work together, but getting it to work is a very manual process,  since the passphrase must be entered before the repository is checked out. Maybe when I have some free time, I&#8217;ll try smoothing it out.</p>

<h3>Git annex</h3>

<p>This is such an awesome project.</p>

<h3>Other All Stars</h3>

<ul>
<li>bindfs</li>
<li>mkisofs + fuseiso</li>
<li>mr</li>
</ul>
]]>
        

    </content>
</entry>

<entry>
    <title>Where is /usr/lib/gnome-keyring/gnome-keyring-pkcs11.so?</title>
    <link rel="alternate" type="text/html" href="http://www.docunext.com/blog/2011/12/where-is-usrlibgnome-keyringgnome-keyring-pkcs11so.html" />
    <id>tag:www.docunext.com,2011://250.23575</id>

    <published>2011-12-23T16:25:14Z</published>
    <updated>2011-12-23T16:32:41Z</updated>

    <summary>I&apos;ve been wrestling with Gnome Keyring during the transition to Gnome 3 on Debian, and Ubuntu 11 (all with Awesome WM).</summary>
    <author>
        <name>Albert</name>
        
    </author>
    
        <category term="Awesomewm" scheme="http://www.sixapart.com/ns/types#category" />
    
    <category term="debian" label="debian" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="gnome" label="gnome" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="keyring" label="keyring" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="ubuntu" label="ubuntu" scheme="http://www.sixapart.com/ns/types#tag" />
    
    <content type="html" xml:lang="en" xml:base="http://www.docunext.com/">
        <![CDATA[<p>I&#8217;ve been wrestling with Gnome Keyring during the transition to Gnome 3 on Debian, and Ubuntu 11 (all with Awesome WM).</p>

<p>One interesting snag was the relocation of <strong>/usr/lib/gnome-keyring/gnome-keyring-pkcs11.so</strong> to <strong>/usr/lib/pkcs11/gnome-keyring-pkcs11.so</strong>.</p>

<pre>
root@asee-mm-02:/usr/lib/gnome-keyring# ln -s /usr/lib/pkcs11/gnome-keyring-pkcs11.so ./
</pre>

<p>I don&#8217;t like to do these types of workarounds, but a softlink isn&#8217;t too bad.</p>

<p>I got fed up with gnome keyring sufficiently that I again installed keychain. Perhaps its what&#8217;s caused <a href="http://www.docunext.com/blog/2011/12/gnome-keyring-daemon1907-unsupported-key-algorithm-in-certificate-128401004521.html">this</a>?</p>
]]>
        

    </content>
</entry>

<entry>
    <title>gnome-keyring-daemon[1907]: unsupported key algorithm in certificate: 1.2.840.10045.2.1</title>
    <link rel="alternate" type="text/html" href="http://www.docunext.com/blog/2011/12/gnome-keyring-daemon1907-unsupported-key-algorithm-in-certificate-128401004521.html" />
    <id>tag:www.docunext.com,2011://250.23574</id>

    <published>2011-12-22T00:32:47Z</published>
    <updated>2012-01-01T00:20:50Z</updated>

    <summary>gnome-keyring-daemon[1907]: unsupported key algorithm in certificate: 1.2.840.10045.2.1</summary>
    <author>
        <name>Albert</name>
        
    </author>
    
        <category term="openssl" scheme="http://www.sixapart.com/ns/types#category" />
    
    <category term="debian" label="debian" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="gnomekeyringdaemon" label="gnome-keyring-daemon" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="ssh" label="ssh" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="wheezy" label="wheezy" scheme="http://www.sixapart.com/ns/types#tag" />
    
    <content type="html" xml:lang="en" xml:base="http://www.docunext.com/">
        <![CDATA[<p>Yikes! My dsa public keys stopped working today, and I found this murky error message in /var/log/auth.log:</p>

<pre class="terminal">
gnome-keyring-daemon[1907]: unsupported key algorithm in certificate: 1.2.840.10045.2.1
</pre>

<p>Hmmm&#8230; apparently gnome-keyring-daemon doesn&#8217;t like my key! I tried upgrading gnutls in hopes it would pull in some certificates, but that didn&#8217;t work.</p>

<p>I searched the web for some clues, and came up with some bug reports, but no clear solution:</p>

<ul>
<li><a href="https://bugzilla.redhat.com/show_bug.cgi?id=694954">https://bugzilla.redhat.com/show_bug.cgi?id=694954</a></li>
<li><a href="http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=552723">http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=552723</a></li>
</ul>

<p>Now I&#8217;m doing a bold upgrade of gnome-keyring, which is updating a slew of other debian packages.</p>

<p>FYI - I&#8217;m running Debian Wheezy.</p>

<p>UPDATE: I never did figure this one out; instead I just created a new key.</p>
]]>
        

    </content>
</entry>

<entry>
    <title>Backups of OpenVZ Containers with bup</title>
    <link rel="alternate" type="text/html" href="http://www.docunext.com/blog/2011/12/backups-of-openvz-containers-with-bup.html" />
    <id>tag:www.docunext.com,2011://250.23573</id>

    <published>2011-12-21T04:36:53Z</published>
    <updated>2011-12-22T23:01:10Z</updated>

    <summary>I&apos;m planning to use bup to make backups of vzdumps. Bup is a backup utility that build on top of git&apos;s awesomeness, so in some ways, its even *more* awesome.</summary>
    <author>
        <name>Albert</name>
        
    </author>
    
        <category term="Backups" scheme="http://www.sixapart.com/ns/types#category" />
    
    <category term="backups" label="backups" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="bup" label="bup" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="lvm" label="lvm" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="openvz" label="openvz" scheme="http://www.sixapart.com/ns/types#tag" />
    
    <content type="html" xml:lang="en" xml:base="http://www.docunext.com/">
        <![CDATA[<p>I&#8217;m planning to use bup to make backups of vzdumps. Bup is a backup utility that build on top of git&#8217;s awesomeness, so in some ways, its even <em>more</em> awesome.</p>

<p>I&#8217;ve got a couple components in place:</p>

<ul>
<li>LVM2 snapshot powered vzdumps!</li>
<li>An initial bup backup of one of those snapshots.</li>
</ul>

<pre>
root@svx-mm-101:~# vzdump --dumpdir /root/vzsnaps --stdexcludes --compress  --snapshot 1123
INFO: starting new backup job: vzdump --dumpdir /root/vzsnaps --stdexcludes --compress --snapshot 1123
INFO: Starting Backup of VM 1123 (openvz)
INFO: CTID 1123 exist mounted running
INFO: status = CTID 1123 exist mounted running
INFO: backup mode: snapshot
INFO: bandwidth limit: 10240 KB/s
INFO: creating lvm snapshot of /dev/mapper/vgone-lvone ('/dev/vgone/vzsnap-svx-mm-101.savonix.vpn-0')
INFO:   Logical volume "vzsnap-svx-mm-101.savonix.vpn-0" created
INFO: creating archive '/root/vzsnaps/vzdump-openvz-1123-2011_12_20-21_53_10.tgz'
INFO: Total bytes written: 1595801600 (1.5GiB, 3.4MiB/s)
INFO: archive file size: 636MB
INFO:   Logical volume "vzsnap-svx-mm-101.savonix.vpn-0" successfully removed
INFO: Finished Backup of VM 1123 (00:12:31)
INFO: Backup job finished successfuly
</pre>pre>

<pre>
root@svx-mm-101:/mnt/sdb1# ls -lah /mnt/sdb1/bup/
total 40K
drwxr-xr-x  7 root root 4.0K Dec 20 22:16 .
drwxrwxrwx 12 root root 4.0K Dec 20 22:16 ..
drwxr-xr-x  2 root root 4.0K Dec 20 22:16 branches
-rw-r--r--  1 root root   91 Dec 20 22:16 config
-rw-r--r--  1 root root   73 Dec 20 22:16 description
-rw-r--r--  1 root root   23 Dec 20 22:16 HEAD
drwxr-xr-x  2 root root 4.0K Dec 20 22:16 hooks
drwxr-xr-x  2 root root 4.0K Dec 20 22:16 info
drwxr-xr-x  4 root root 4.0K Dec 20 22:20 objects
drwxr-xr-x  4 root root 4.0K Dec 20 22:16 refs
root@svx-mm-101:/mnt/sdb1# du -sh !$
du -sh /mnt/sdb1/bup/
492M  /mnt/sdb1/bup/
</pre>

<p>Wow - bup compressed the file another ~ 200 Mb!</p>

<h3>What&#8217;s Next?</h3>

<p>Make another backup (only some minor changes), so I&#8217;m curious how much additional space backing up this tar file takes.</p>

<pre>
root@svx-mm-101:~# vzdump --dumpdir /root/vzsnaps --stdexcludes --compress  --snapshot 1123
INFO: starting new backup job: vzdump --dumpdir /root/vzsnaps --stdexcludes --compress --snapshot 1123
INFO: Starting Backup of VM 1123 (openvz)
INFO: CTID 1123 exist mounted running
INFO: status = CTID 1123 exist mounted running
INFO: backup mode: snapshot
INFO: bandwidth limit: 10240 KB/s
INFO: creating lvm snapshot of /dev/mapper/vgone-lvone ('/dev/vgone/vzsnap-svx-mm-101.savonix.vpn-0')
INFO:   Logical volume "vzsnap-svx-mm-101.savonix.vpn-0" created
INFO: creating archive '/root/vzsnaps/vzdump-openvz-1123-2011_12_20-22_21_17.tgz'
</pre>

<p>Well, I&#8217;m sold:</p>

<pre>
root@svx-mm-101:/mnt/sdb1# bup split -n vzdump-openvz-1123  vzdumps/vzdump-openvz-1123.tgz 
PackIdxList: using 1 index.
Indexing objects: 100% (3626/3626), done.
root@svx-mm-101:/mnt/sdb1# du -sh bup/
520M  bup/
</pre>

<p>So it only took about 8MB more memory to backup a different version of a ~600MB compressed tarfile. Sweet.</p>

<p>I restored the file and compared checksums of the backup and the original and they matched up - yay!</p>

<h3>Now What&#8217;s Next?</h3>

<p>I plan to automate all this; it will take a bit of shell script writing, but shouldn&#8217;t be a big deal.</p>

<p>This is not very impressive, but its a start:</p>

<pre>
ls -1 vzdumps | awk '{print "bup split -n "$1"z vzdumps/"$1}' | sed "s/\.tgzz//g"
</pre>

<pre>
docunext@vpn-comet:~/vzsnaps$ git annex move vzdump-openvz-230131.tgz --to svxbup                                                                                                                                                            
move vzdump-openvz-230131.tgz (checking svxbup...) (to svxbup...) 
Receiving index from server: 1848232/1848232, done.
Receiving index from server: 960744/960744, done.
bloom: creating from 2 files (100244 objects).
Receiving index from server: 981968/981968, done.
bloom: adding 1 file (35032 objects).
Receiving index from server: 852132/852132, done.
bloom: adding 1 file (30395 objects).
Initialized empty Git repository in /home/albertlash/.bup/
bloom: creating from 14 files (696899 objects).
Receiving index from server: 885928/885928, done.
bloom: adding 1 file (31602 objects).
ok         
</pre>
]]>
        

    </content>
</entry>

<entry>
    <title>Static Blog Publishers and Rails Blog Engines</title>
    <link rel="alternate" type="text/html" href="http://www.docunext.com/blog/2011/11/static-blog-publishers-and-rails-blog-engines.html" />
    <id>tag:www.docunext.com,2011://250.23522</id>

    <published>2011-12-01T03:24:19Z</published>
    <updated>2011-12-01T06:08:39Z</updated>

    <summary>I&apos;ve been doing a lot of work with my blogs lately. Like Docunext, I have many blogs published by MovableType, which I like, but have grown weary of.</summary>
    <author>
        <name>Albert</name>
        
    </author>
    
        <category term="Blogging" scheme="http://www.sixapart.com/ns/types#category" />
    
        <category term="Ruby" scheme="http://www.sixapart.com/ns/types#category" />
    
        <category term="Web Development" scheme="http://www.sixapart.com/ns/types#category" />
    
    <category term="blogging" label="blogging" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="brogue" label="brogue" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="converters" label="converters" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="jekyll" label="jekyll" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="middleman" label="middleman" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="rails3" label="rails3" scheme="http://www.sixapart.com/ns/types#tag" />
    
    <content type="html" xml:lang="en" xml:base="http://www.docunext.com/">
        <![CDATA[<p>I&#8217;ve been doing a lot of work with my blogs lately. Like Docunext, I have many blogs published by MovableType, which I like, but have grown weary of.</p>

<p>There have been some missteps on the part of Six Apart (in my opinion), like the fact that backups cannot be restored by newer versions of Movable Type - argh! Plus, its slow.</p>

<p>However, the data model is awesome, and so are the templating and plugin engines (though I really do not like the custom tagging and non-xml compliant markup), so its a reliable beast. Its done its job well for several years.</p>

<p>The spirit of the times, as they are, have encouraged me to migrate some blogs away from Movable Type. Where am I migrating them to?</p>

<p>I have some blogs on a very old version of Wordpress, and although Wordpress has drastically improved since then, I was looking for something different. Drupal is awesome too, but I feel that is more of a development platform for projects of medium complexity. Just not what I was looking for in a blog engine.</p>

<p>Again, where did I migrate my blogs to? I don&#8217;t have a definite target platform, yet, but here&#8217;s a few that I&#8217;m trying out:</p>

<ul>
<li>For <a href="http://www.neothreadz.com/">NeoThreadz</a>, I&#8217;m trying out Middleman. I like it - although it runs on Sinatra / Padrino, it has a Rails-y feel to it.</li>
<li>For a bunch of sites, including <a href="http://www.informedusability.com/">Informed Usability</a> and <a href="http://www.cyberpulpit.com/">Cyber Pulpit</a>, I&#8217;m using Jekyll. Jekyll rocks, really, but I think I want something a tad more dynamic on the development side. Also - I should mention I use Octopress on top of Jekyll. Octopress is sweet, but it almost does too much. Its also nice that Jekyll has importers to convert from Movable Type. I used it to convert <a href="http://www.neothreadz.com/">NeoThreadz</a> even.</li>
</ul>

<p>N.B. - Both Middleman and Jekyll are static blog compilers, and both run on Ruby - my language of choice these days. Jekyll is very stable and has been around for awhile. Middleman is newer, and is nearing &#8220;1.0&#8221; status. I&#8217;m looking forward to a stable release of Middleman - it will include the blog plugin.</p>

<p>What about <a href="http://www.neocarz.com/">NeoCarz</a>? Glad you asked! It is using Brogue - a Rails 3 blog engine based off of rails_blog_engine. I&#8217;m quite pleased with it so far, but it needs more input from the community to improve.</p>

<p>And for wikis? Thankfully there is a somewhat standard format evolving for git-based wikis, thanks to ikiwiki, git-wiki, and friends, so I built wikee, again a Rails 3 engine, but for wikis! Its mostly based off of the Sinatra app git-wiki, and it works quite nicely, too. There are several things I need to do there, though, like include FrontMatter, use the GitModel ORM, and cache the pages and uncache them with a sweeper or an observer.</p>

<p>I have wikee and brogue plugged into the awesome xapian_db gem, so search is working quite well, too!</p>

<p>If you are interested in Rails 3, wikis, or blogs - check out my projects and let me know what you think of them:</p>

<ul>
<li><a href="https://github.com/docunext/brogue">Brogue</a></li>
<li><a href="https://github.com/docunext/wikee">Wikee</a></li>
</ul>
]]>
        

    </content>
</entry>

<entry>
    <title>Apache and NGINX</title>
    <link rel="alternate" type="text/html" href="http://www.docunext.com/blog/2011/08/apache-and-nginx.html" />
    <id>tag:www.docunext.com,2011://250.22869</id>

    <published>2011-08-06T21:30:00Z</published>
    <updated>2011-08-06T21:42:11Z</updated>

    <summary>For what its worth, having a bit-buffer-bucket-brigade proxy like NGINX in front of Apache is an excellent idea in almost every situation. Apache, and Ruby web applications, are smart, sophisticated, and memory intensive services that should focus entirely on processing, not managing connections. Honestly, I LOVE Apache, but it can manage connections about as well as I can play the violin, which is to say, not very well, at all.</summary>
    <author>
        <name>Albert</name>
        
    </author>
    
        <category term="Apache2" scheme="http://www.sixapart.com/ns/types#category" />
    
        <category term="Webservers" scheme="http://www.sixapart.com/ns/types#category" />
    
    <category term="apache" label="apache" scheme="http://www.sixapart.com/ns/types#tag" />
    
    <content type="html" xml:lang="en" xml:base="http://www.docunext.com/">
        <![CDATA[<p>For what its worth, having a bit-buffer-bucket-brigade proxy like NGINX in front of Apache is an excellent idea in almost every situation. Apache, and Ruby web applications, are smart, sophisticated, and memory intensive services that should focus entirely on processing, not managing connections. Honestly, I LOVE Apache, but it can manage connections about as well as I can play the violin, which is to say, not very well, at all.</p>

<p>NGINX on the other hand can handle tens of thousands of connections without skipping a beat and using hardly any memory at all. In that case, keepalive on NGINX makes perfect sense - it would act as a proxy to Apache and complete the transaction with it about as fast as possible and store the content in its buffer, all the while serving data out to the client at whatever rate they can transfer. Note, the HTTP client for NGINX that makes the connection to Apache uses HTTP 1.0, not 1.1, which does not support keepalive, so again in that scenario keepalive on Apache should be shut off.</p>

<p>This article &#8220;I like Unicorn because its Unix&#8221; is great because it explains how different server types behave:</p>

<ul>
<li><a href="http://tomayko.com/writings/unicorn-is-unix">http://tomayko.com/writings/unicorn-is-unix</a></li>
</ul>
]]>
        

    </content>
</entry>

<entry>
    <title>A GNU/Debian LXC Puppet</title>
    <link rel="alternate" type="text/html" href="http://www.docunext.com/blog/2011/05/an-lxc-puppet.html" />
    <id>tag:www.docunext.com,2011://250.22367</id>

    <published>2011-05-22T15:39:35Z</published>
    <updated>2011-05-22T16:30:33Z</updated>

    <summary>As a continuation to my post on setting up Rails 3 apps via RVM, CentOS on OpenVZ, Mastered by Puppet, this is an entry about doing something similar with LXC.</summary>
    <author>
        <name>Albert</name>
        
    </author>
    
    <category term="lxc" label="lxc" scheme="http://www.sixapart.com/ns/types#tag" />
    
    <content type="html" xml:lang="en" xml:base="http://www.docunext.com/">
        <![CDATA[<p>As a continuation to my post on setting up <a href="http://www.docunext.com/blog/2011/04/rails-3-apps-via-rvm-centos-on-openvz-defined-by-puppet.html">Rails 3 apps via RVM, CentOS on OpenVZ, Mastered by Puppet</a>, this is an entry about doing something similar with <a href="http://www.docunext.com/wiki/LXC">LXC</a>.</p>

<p>I will first mention that the networking configuration I&#8217;m using is sub-optimal. I&#8217;ve setup lxc on my notebook which uses wireless, and bridging doesn&#8217;t like it (in fact, it surprisingly appears that recent updates to the linux kernel do not support bridging with wireless devices). See the <a href="http://www.docunext.com/wiki/LXC">Docunext wiki page about LXC for more information about my LXC networking configuration, as well as building the container itself</a>.</p>

<p>After installing RVM in the container and using it to download, configure, compile, and install Ruby 1.9.2, I then proceeded to use apt-get to install Puppet.</p>

<pre class="terminal">
apt-get install puppet
</pre>

<p>That went fine, but when I tried to check <tt>syslog</tt> for details, I realized I don&#8217;t have a syslogger installed yet. Right - lxc-create installs a minimal debian system. I try to install rsyslog:</p>

<pre class="terminal">
apt-get install rsyslog
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following extra packages will be installed:
  cron exim4 exim4-base exim4-config exim4-daemon-light heirloom-mailx liblockfile1 libpcre3 lockfile-progs logrotate
Suggested packages:
  anacron checksecurity mail-reader eximon4 exim4-doc-html exim4-doc-info spf-tools-perl swaks rsyslog-mysql rsyslog-pgsql rsyslog-doc rsyslog-gnutls rsyslog-gssapi
  rsyslog-relp
Recommended packages:
  mailx
The following NEW packages will be installed:
  cron exim4 exim4-base exim4-config exim4-daemon-light heirloom-mailx liblockfile1 libpcre3 lockfile-progs logrotate rsyslog
0 upgraded, 11 newly installed, 0 to remove and 0 not upgraded.
Need to get 3031 kB of archives.
After this operation, 6713 kB of additional disk space will be used.
Do you want to continue [Y/n]? n
Abort.
</pre>

<p>Argh. It wants to install exim4. For this container I&#8217;d like to use nullmailer:</p>

<pre class="terminal">
apt-get install nullmailer
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following extra packages will be installed:
  klogd sysklogd
The following NEW packages will be installed:
  klogd nullmailer sysklogd
0 upgraded, 3 newly installed, 0 to remove and 0 not upgraded.
Need to get 196 kB of archives.
After this operation, 762 kB of additional disk space will be used.
Do you want to continue [Y/n]? n
Abort.
</pre>

<p>Wait! That wants to install klogd. Ugh. OK, let&#8217;s try again:</p>

<pre class="terminal">
apt-get install nullmailer rsyslog
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following extra packages will be installed:
  cron heirloom-mailx liblockfile1 lockfile-progs logrotate
Suggested packages:
  anacron checksecurity rsyslog-mysql rsyslog-pgsql rsyslog-doc rsyslog-gnutls rsyslog-gssapi rsyslog-relp
Recommended packages:
  exim4 postfix mail-transport-agent mailx sysklogd system-log-daemon
The following NEW packages will be installed:
  cron heirloom-mailx liblockfile1 lockfile-progs logrotate nullmailer rsyslog
0 upgraded, 7 newly installed, 0 to remove and 0 not upgraded.
Need to get 861 kB of archives.
After this operation, 2478 kB of additional disk space will be used.
Do you want to continue [Y/n]?
</pre>

<p><strong>YES!</strong> I am so glad that apt has super cow powers, aren&#8217;t you?</p>
]]>
        

    </content>
</entry>

<entry>
    <title>Metaprogramming with Ruby: method_missing and define_method</title>
    <link rel="alternate" type="text/html" href="http://www.docunext.com/blog/2011/05/metaprogramming-with-ruby.html" />
    <id>tag:www.docunext.com,2011://250.22365</id>

    <published>2011-05-21T13:24:35Z</published>
    <updated>2011-08-27T13:59:34Z</updated>

    <summary>There are many reasons why I love working with Ruby, such as its consistency, its use of natural language, its clean object-oriented paradigm, but one aspect of it is that stands out above the rest: its metaprogramming capabilities.</summary>
    <author>
        <name>Albert</name>
        
    </author>
    
        <category term="Ruby" scheme="http://www.sixapart.com/ns/types#category" />
    
    <category term="metaprogramming" label="metaprogramming" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="ruby" label="ruby" scheme="http://www.sixapart.com/ns/types#tag" />
    
    <content type="html" xml:lang="en" xml:base="http://www.docunext.com/">
        <![CDATA[<p>There are many reasons why I love working with Ruby, such as its consistency, its use of natural language, its clean object-oriented paradigm, but one aspect of it is that stands out above the rest: its metaprogramming capabilities.</p>

<h3>What is &#8220;Metaprogramming&#8221;?</h3>

<p>Metaprogramming is the practice of writing code that generates more code, and then running that code in the same process.</p>

<p>Seen from another angle, it is the practice of writing code that modifies or adds to itself as it runs. As such, in my humble opinion, its a heck of a lot easier to do with an scripting / interpreted language like Ruby than a compiled language like C.</p>

<p>Metaprogramming is also related to domain specific languages. In the case of Ruby, Rake and Sinatra are domain specific languages.</p>

<h3>Examples of Metaprogramming</h3>

<p>There are many different paths to and styles of metaprogramming in other languages; in Ruby, there are built-in hooks to help software engineers build software which will eventually make themselves obsolete! (Just a little humor there for you&#8230; or not?) The hooks are method_missing and define_method.</p>

<p>On their own, they are quite useful tools. Together, they are a powerful combo that are filled me with awe of Ruby - we&#8217;ll touch on that later. First, what are they and what do they do. (Side note: &#8220;Who is your daddy,  and what does he do?&#8221; - Anyone? Anyone?)</p>

<h3>method_missing</h3>

<p>If you&#8217;ve ever had a typo in a method call, you&#8217;ve likely encountered method_missing. It is called when a non-existent method is called, and its included as part of Ruby&#8217;s Kernel class<span class="sup">1</span>. </p>

<p>The general practice is to override method_missing, and do something besides raising an exception. So let&#8217;s get to an example, shall we?</p>

<pre class="sh_ruby">
class Foo

  def method_missing(m, *args, &block)
    if m.to_s.include? 'bar'
      puts "SNAFU"
    else
      super
    end
  end

end

yo = Foo.new
yo.foobar
yo.snafu
</pre>

<p>I&#8217;ve employed some standard best-practices with this example, so it isn&#8217;t the simplest case, but fear not oh loyal reader, I shall explain what&#8217;s going down.</p>

<p>First off, method_missing can take three arguments, and I&#8217;ve included them here. It requires the first one, which is the name of the missing method that is getting called. The next two are the arguments and / or the block that are getting passed to the method.</p>

<p>After that, there is a test to check whether the method name includes &#8220;bar&#8221;. Why? This is a technique to ensure that non-existent methods that really should not exist are not handled. Why? So that bugs like typos can be identified. If you take a moment to ponder, you might agree that&#8217;s its generally not a good idea to try and generate code for every potential method name in existence!</p>

<p>If the calling method&#8217;s name does include the string &#8220;bar&#8221;, we&#8217;ll put &#8220;SNAFU&#8221;, if not, we let the standard method_missing method handle it (and raise an exception). If I run this code, that&#8217;s exactly what will happen:</p>

<pre class="sh_terminal">
?> yo = Foo.new
=> #<Foo:0xb74836c4>
>> yo.foobar
SNAFU
=> nil
>> yo.snafu
NoMethodError: undefined method `snafu' for #<Foo:0xb74836c4>
    from (irb):7:in `method_missing'
    from (irb):15
</pre>

<p>Yay! We&#8217;re already metaprogramming. What happened? When yo called foobar, yo could not find a method with its name, so its version of method_missing created a temporary one on the fly. Cool, huh?</p>

<h3>define_method</h3>

<p>In my humble opinion, define_method is where things really get exciting, because when combined with method_missing, it is possible to start really building code during runtime.</p>

<p>The define_method method is found in the <a href="http://ruby-doc.org/core/classes/Module.html#M000497">Module class</a>. It is private class method, so it is called on its parent object, not on instances.</p>

<p>First let&#8217;s take a look at what define_method can do. Examine these two classes:</p>

<pre class="sh_ruby">
class Foo

  def snafu
    puts "hi"
  end

end

class Bar

  define_method(:snafu) do
    puts "hi"
  end

end
</pre>

<p>In essence, they are identical. So why would we ever want to use something like define_method? Its often used with arrays, like this:</p>

<pre class="sh_ruby">
module Stuff

  MYKEYS = ['date','betterdate']
  MYHASH = {
          't1' => {'date' => '2000', 'betterdate' => '2000', 'dynamicdate' => '2000' },
          't2' => Hash.new('2011')
        }

end

class Test
  include Stuff

  MYKEYS.each do |k|
    define_method(k.to_sym) do |myid|
      MYHASH[myid][k]
    end
  end
end
</pre>

<p>In that example, we&#8217;re creating methods to access values from a hash. This example is futile; hopefully it illustrates how define_method could be used on its own. Handy, right? Not really earth shattering though&#8230; what gives? Its limited by the fact that it is a private class method that creates class methods when its class is defined. In other words, it cannot be called directly during runtime making it a heck of a lot less dynamic than method_missing. Can you tell the difference? Good! Now let&#8217;s talk about the magical combo.</p>

<h3>A Match Made of Rubies: method_missing and define_method</h3>

<p>I employ no hyperbole - this is where the magic happens.</p>

<p>Remember that the problem with method_missing is that it is a private class method, and can&#8217;t be directly called from an instance at runtime. Is there another way??? <strong>Yes!</strong> Here comes method_missing to the rescue.</p>

<p>I&#8217;ll jump right into an example:</p>

<pre class="sh_ruby">
  def method_missing(m, *args, &block)

    if ALLKEYS.include?(m.to_s) 
      # Yes, smarter key
      self.class.send(:define_method, m) do
        MYHASH[name][m.to_s]
      end
      self.send(m)
    else
      super
    end

  end
</pre>

<p>Like the first example of method_missing, I&#8217;ve again employed some standard best-practices to use with method_missing, like the string inclusion check, and the alternate push to super, the rest is much different - what&#8217;s going on with all the sends?</p>

<p>With method_missing, we can tell an instance to ask its parent class to call upon one of its class methods, specifically define_method: <tt>self.class.send(:define_method, m) do</tt>. In doing so, we can pass it the non-existent method&#8217;s name, and whatever the non-existent method is passed. After that, we can actually call the method as an instance method. Sufferin&#8217; succotash! That is inconceivable!</p>

<p>Savvy readers might be wondering:</p>

<blockquote class="svxlb"><pre>
What's the advantage of doing it this way as opposed to simply using method_missing by itself?
</pre></blockquote>

<p>There is a very good reason for using define_method inside of method_missing: performance. Let me elaborate.</p>

<p>Software engineering often involves patterns that slightly or substantially differ from one another, and sometimes those patterns are programmatic. As such,  software engineers can write algorithms to identify and specify those patterns, saving themselves immeasurable time having to manually write code that consists of mostly repetitive logic that slightly differs here and there.</p>

<p>The problem with employing that method at compile time (or in the case of Ruby,  upon instantiation), is that it can take a long time to iterate through all the possible pattern changes and generate code to support it - an issue exacerbated by the likelihood that not all of the pattern differences are significant and will never be used. So why not create a method to catch those patterns during runtime and define real methods to handle them if and when they next needed? I can&#8217;t think of a reason, so let&#8217;s do so. This practice is often referred to as lazy loading, and in my humble opinion, its a <em>very</em> cool way to work.</p>

<p>Other engineers agree - ORM tools like ActiveRecord and DataMapper use lazy loading to dynamically generate methods for object properties based upon characteristics of the data sets. If they created all those methods up front, it would take a much longer for Ruby applications to use them, and if they only used method_missing, they would not be optimizing when they could.</p>

<p>I&#8217;d love to hear your thoughts about Metaprogramming with Ruby, or this post. See any typos or areas of improvement? Use the comment form below to sound off.</p>

<h3>See Also</h3>

<ul>
<li><a href="http://www.docunext.com/wiki/Ruby_Metaprogramming">Metaprogramming with Ruby</a></li>
</ul>

<h3>Footnotes</h3>

<ul>
<li><span class="sup">1</span> - While I was checking on that, I noticed that it is not included in the <a href="http://www.ruby-doc.org/core/classes/Kernel.html">Ruby 1.9.2 API documentation for the Kernel class</a>, though it is of course included in <a href="http://www.ruby-doc.org/core-1.8.7/classes/Kernel.html#M001069">1.8.7</a>. Does anyone know what&#8217;s up with that?</li>
</ul>
]]>
        <![CDATA[<p><center></p>

<iframe src="http://rcm.amazon.com/e/cm?t=inforbanki-20&o=1&p=8&l=as1&asins=1934356476&ref=tf_til&fc1=000000&IS2=1&lt1=_blank&m=amazon&lc1=0000FF&bc1=000000&bg1=FFFFFF&f=ifr" style="width:120px;height:240px;" scrolling="no" marginwidth="0" marginheight="0" frameborder="0"></iframe>

<p></center></p>
]]>
    </content>
</entry>

<entry>
    <title>Spotlight on Packages: tmux and atop</title>
    <link rel="alternate" type="text/html" href="http://www.docunext.com/blog/2011/05/spotlight-on-packages-tmux-and-atop.html" />
    <id>tag:www.docunext.com,2011://250.22363</id>

    <published>2011-05-08T18:19:46Z</published>
    <updated>2011-05-15T14:00:55Z</updated>

    <summary>Today I am writing an article about two packages available for UNIX-like operating systems.</summary>
    <author>
        <name>Albert</name>
        
    </author>
    
        <category term="Packages" scheme="http://www.sixapart.com/ns/types#category" />
    
    <category term="packages" label="packages" scheme="http://www.sixapart.com/ns/types#tag" />
    
    <content type="html" xml:lang="en" xml:base="http://www.docunext.com/">
        <![CDATA[<p>Today I am writing an article about two packages available for UNIX-like operating systems.</p>

<h3>tmux</h3>

<p>Tmux is a <strong>terminal multiplexer</strong>, similar to GNU screen. I&#8217;ve only used a couple of days, but I like it better - though I still have some &#8220;getting used to&#8221; it.</p>

<p>What does it do? It allows a console user to open multiple terminal emulators within one session - quite similar to GNU screen. There is an immediate difference: instead of CTRL-a, the command key sequence starts with CTRL-b, but that can be easily changed.</p>

<p>What is it good for? Many things! I used GNU screen for years simply to detach long running processes over ssh sessions. Then I came to learn it can be used for multiple terminal sessions, so I no longer had to use XFCE4 Terminal tabs. <em>Then</em> I learned that screens could be split, like in Vim!</p>

<p>But in GNU screen, they look lousy - there is a big line dividing the terminals. In researching that factor, I found <strong>tmux</strong>. On a superficial level, the splits are much cleaner.</p>

<p>As a side note, in an effort to keep my laptop cool, I decided to switch from the proprietary fglrx ATI video driver to the open source <strong>radeon</strong> driver. By doing so, I am able to use KMS, or kernel mode setting, which allows the kernel to set the video mode setting on boot. In turn, that makes raw tty terminals look great. Why do I care about that? Well, again on a superficial level, I can switch to a terminal and work directly there, without needing a graphical desktop environment - a raw TTY is <em>seriously</em> faster than an x-terminal-emulator within a graphical desktop environment. :-)</p>

<p>But what about gnome-session, gnome-keyring, and ssh-agent? With tmux, I can open a multiplexed terminal in a desktop environment, detach it, and re-attach from the console with <tt>tmux attach</tt>. SWEET!</p>

<p>One last note about tmux - it took me awhile to figure out how to scroll back, but its simple (and works great!) - its just CTRL-b (or whatever command key sequence), then PgUp.</p>

<h3>atop</h3>

<p>I installed atop awhile back, but I haven&#8217;t used it much. It <em>does</em> provide a plethora of <del>pinatas</del> process information though. Just check out this screenshot of atop:</p>

<p><a href="http://cdn.evenserver.com/s/img/2011/hdrs/atop.png"><img src="http://cdn.evenserver.com/s/img/2011/hdrs/20110508_atop-screen.mini.png"></a></p>

<p>Nice, huh? Looking back, I remember installing it to diagnose what is causing my laptop to heat up. Still haven&#8217;t isolated that issue yet, though&#8230;</p>
]]>
        

    </content>
</entry>

<entry>
    <title>Major Plans, Special Thanks to Debian and Ubuntu</title>
    <link rel="alternate" type="text/html" href="http://www.docunext.com/blog/2011/05/regulary-duty.html" />
    <id>tag:www.docunext.com,2011://250.22357</id>

    <published>2011-05-07T03:57:56Z</published>
    <updated>2011-05-07T04:15:40Z</updated>

    <summary>But guess what? I am thinking of doing a presentation of virtualization one of these days. It will be very good, and will include qemu, kqemu, kvm, xen, hypervisors, para-virtualization, containers openvz, and lxc.</summary>
    <author>
        <name>Albert</name>
        
    </author>
    
        <category term="Virtualization" scheme="http://www.sixapart.com/ns/types#category" />
    
    <category term="virtualization" label="virtualization" scheme="http://www.sixapart.com/ns/types#tag" />
    
    <content type="html" xml:lang="en" xml:base="http://www.docunext.com/">
        <![CDATA[<ol>
<li>Install debian GNU/linux &#8220;squeeze&#8221; on big, BIG, iron.</li>
<li>Refine with a xen kernel and recommended hypervisor tools.</li>
<li>Build a virtual machine that takes advantage of para-virtualization, allowing itself to boot an independent OS, more particularly debian GNU/linux with the custom kernel supporting OpenVZ.</li>
<li>Unleash hordes of OS-podz.</li>
<li>Build well balanced diets, profit, improve, scale; repeat.</li>
</ol>

<p>The above is just an order of random thoughts about how awesome debian GNU/Linux is, as well as Xen, not much more.</p>

<p>But guess what? I am thinking of doing a presentation of virtualization one of these days. It will be very good, and will include qemu, kqemu, kvm, xen, hypervisors, para-virtualization, containers openvz, and lxc.</p>

<p>I&#8217;d also like to do a presentation on GNU/Linux, in general, but with a special focus on debian and ubuntu (in my humble opinion, debian and of course friends have made the impossible more than possible - they have continue to redefine what it means to achieve greatness in the field of computing; ubuntu and of course friends are doing a terrificly remarkable job of letting the world know).</p>

<p>Thanks to all the contributors, seriously.</p>
]]>
        

    </content>
</entry>

<entry>
    <title>Ubuntu 10.10 Is Terrific - WOW!</title>
    <link rel="alternate" type="text/html" href="http://www.docunext.com/blog/2011/05/ubuntu-1010-is-terrific---wow.html" />
    <id>tag:www.docunext.com,2011://250.22356</id>

    <published>2011-05-04T03:36:19Z</published>
    <updated>2011-05-07T03:48:56Z</updated>

    <summary>X11 screen was fuzzy</summary>
    <author>
        <name>Albert</name>
        
    </author>
    
        <category term="Awesome" scheme="http://www.sixapart.com/ns/types#category" />
    
    <category term="ubuntu" label="ubuntu" scheme="http://www.sixapart.com/ns/types#tag" />
    
    <content type="html" xml:lang="en" xml:base="http://www.docunext.com/">
        <![CDATA[<p>As luck would have it, I decided today that I wanted to switch from using the <tt>fgrlx</tt> proprietary ATI video graphics driver to the preferable open source driver <tt>radeon</tt>.</p>

<p>Like most of the luck I&#8217;ve had, it was not without a challenge - or with surprises!</p>

<p>When I switched video drivers, my <strong>X11 screen was fuzzy</strong>. After some research, it appeared that the most appropriate next step was to upgrade the kernel. So I did, and it worked (works). But what about Firefox 4?</p>

<p>Firefox 4 is an amazing upgrade. Little did I know that upgrading to Firefox 4 would transition my state to an X server without any input capabilities - i.e. <strong>UPGRADE TO 10.10 - mouse and keyboard not working</strong>. Right - nowhere and nohow. </p>

<p>What next? A recovery boot - netroot - to upgrade <strong>everything</strong> to the &#8220;N-stage&#8221; of Ubuntu:</p>

<pre class="terminal">
apt-get dist-upgrade
</pre>

<p>A long time later&#8230; my machine boots up&#8230; and works&#8230; but my AWESOME WINDOW MANAGER is GONE!!!!</p>

<p>But wait, this environment is not bad. Wow, its good!</p>

<h3>Update = Not Awesome</h3>

<p>So after enjoying natty for a moment, I found myself wanting AWESOMe back immensely, so I found <a href="http://ubuntuguide.net/ubuntu-11-04-natty-login-to-classic-gnome-2-desktop">this</a>, which brought me back to normal gnome, but no awesome. Ugh.</p>

<h3>Update #2 - Its Not That Hard</h3>

<p>I shouldn&#8217;t have scorned so easily - its actually not that difficult to get the Lua-energized Awesome window manager cooperating with Gnome in ubuntu 11.xometin aka natty the narwhale.</p>

<p>Or at least it wasn&#8217;t too bad for me. Here&#8217;s what I wrote on launchpad:</p>

<blockquote class="svxlb">
Albert Lash wrote 2 hours ago:  #7

Same here&#8230; I upgraded to FF4, then had to upgrade to natty, enjoyed the new GUI for a bit, then needed my awesome wm back, so I logged into Ubuntu Gnome classic from gdm, only to find awesome gone. :-(

Hopefully I can figure it out. If I do, I&#8217;ll post back. If I can&#8217;t, I&#8217;ll check back!
Albert Lash wrote 2 hours ago:  #8

That wasn&#8217;t so bad&#8230; I restarted, chose awesome from the environment menu option list at the bottom of the login screen - that produced awesome, but no gnome, so I restarted, chose Ubuntu Classic - (not the &#8220;no effects&#8221; choice).

Note: I also set awesome as my window manager again with gconf in the midst of all that:

https://awesome.naquadah.org/wiki/Quickly_Setting_up_Awesome_with_Gnome
</blockquote>
]]>
        

    </content>
</entry>

<entry>
    <title>Rails 3 Apps via RVM, CentOS on OpenVZ; Defined by Puppet</title>
    <link rel="alternate" type="text/html" href="http://www.docunext.com/blog/2011/04/rails-3-apps-via-rvm-centos-on-openvz-defined-by-puppet.html" />
    <id>tag:www.docunext.com,2011://250.22342</id>

    <published>2011-04-11T18:13:45Z</published>
    <updated>2011-05-22T15:25:58Z</updated>

    <summary>I&apos;m looking to build lots of Rails apps, and when I do I would like each one to be in its own OpenVZ container, and each container built and managed by puppet.</summary>
    <author>
        <name>Albert</name>
        
    </author>
    
        <category term="Ruby" scheme="http://www.sixapart.com/ns/types#category" />
    
    <category term="rubyonrails" label="ruby on rails" scheme="http://www.sixapart.com/ns/types#tag" />
    
    <content type="html" xml:lang="en" xml:base="http://www.docunext.com/">
        <![CDATA[<p>I&#8217;m looking to build lots of Rails apps, and when I do I would like each one to be in its own OpenVZ container, and each container built and managed by puppet.</p>

<p>To do so, I will need the puppet installed <em>prior</em> to puppet management, so I will install it within the starter image. I&#8217;ve done that, so I&#8217;ll now map out the process for creating a new image from it, whereupon it will automatically ask puppet how to build itself, i.e. puppet needs to be configured! Unfortunately, I forgot about this step, so I have to wait for vzdump to finish&#8230;</p>

<h3>Configuring Puppet on the Base CentOS Container</h3>

<pre class="sh_ruby">
    package { "gcc-c++": ensure => installed }
    package { "patch": ensure => installed }
    package { "readline": ensure => installed }
    package { "readline-devel": ensure => installed }
    package { "zlib": ensure => installed }
    package { "zlib-devel": ensure => installed }
    package { "libyaml-devel": ensure => installed }
    package { "libffi-devel": ensure => installed }
    package { "openssl-devel": ensure => installed }
</pre>

<p>One thing I&#8217;m realizing about puppet is that its modules don&#8217;t have to always deal directly with packages&#8230; it can simply be used for configuration files, like resolv.conf. <strong>That is helpful</strong>.</p>

<h3>What About LXC?</h3>

<p>Lately I&#8217;ve been using lxc (GNU/Linux containers) and am quite pleased with the results. It doesn&#8217;t require a custom kernel (though thanks to the awesomeness of Debian it is easy to obtain), and its easy to build Debian systems.</p>

<p>I&#8217;ll write another article about setting up Puppet within an LXC environment.</p>
]]>
        

    </content>
</entry>

<entry>
    <title>Another Awesome Experience with Debian Squeeze, Xen 4.0, and OpenVZ  (and some Squeeze driver issues)</title>
    <link rel="alternate" type="text/html" href="http://www.docunext.com/blog/2011/04/another-awesome-experience-with-debian-squeeze-xen-40-and-openvz-and-some-squeeze-driver-issues.html" />
    <id>tag:www.docunext.com,2011://250.22340</id>

    <published>2011-04-11T03:58:21Z</published>
    <updated>2011-04-11T16:56:59Z</updated>

    <summary>I am so utterly impressed with Debian. They are pushing the envelope - seriously! The remarkable factor with Debian, Xen, and OpenVZ is simply that: the stable version of Debian supports a Xen 4.0 (a very modern impelementation) kernel, and...</summary>
    <author>
        <name>Albert</name>
        
    </author>
    
    <category term="xbox" label="xbox" scheme="http://www.sixapart.com/ns/types#tag" />
    
    <content type="html" xml:lang="en" xml:base="http://www.docunext.com/">
        <![CDATA[<p>I am so utterly impressed with Debian. They are pushing the envelope - seriously!</p>

<p>The remarkable factor with Debian, Xen, and OpenVZ is simply that: the stable version of Debian supports a Xen 4.0 (a <strong>very modern</strong> impelementation) kernel, and with the help of pygrub, all different kernels can be used within the virtual machines.</p>
]]>
        

    </content>
</entry>

<entry>
    <title>Debian Wheezy Rocks Drupal6! </title>
    <link rel="alternate" type="text/html" href="http://www.docunext.com/blog/2011/04/debian-wheezy-rocks-drupal6.html" />
    <id>tag:www.docunext.com,2011://250.22337</id>

    <published>2011-04-02T17:17:41Z</published>
    <updated>2011-04-04T01:51:59Z</updated>

    <summary>Drupal6 has been available within Debian for quite some time, and has even had a couple modules available as debian packages, such as **drush**. Its no surprise to me - Debian and Drupal are both open source projects with guidance and support from *Software in the Public Interest*, a non-profit group dedicated to lots of awesome stuff!</summary>
    <author>
        <name>Albert</name>
        
    </author>
    
        <category term="Debian" scheme="http://www.sixapart.com/ns/types#category" />
    
    <category term="cck" label="cck" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="debian" label="debian" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="drupal" label="drupal" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="drush" label="drush" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="views" label="views" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="wheezy" label="wheezy" scheme="http://www.sixapart.com/ns/types#tag" />
    
    <content type="html" xml:lang="en" xml:base="http://www.docunext.com/">
        <![CDATA[<p>Drupal6 has been available within Debian for quite some time, and has even had a couple modules available as debian packages, such as <strong>drush</strong>. Its no surprise to me - Debian and Drupal are both open source projects with guidance and support from <em>Software in the Public Interest</em>, a non-profit group dedicated to lots of awesome stuff!</p>

<p>In researching Drupal6 on Debian, I noticed that there was even a helper debian package to create debian packages from drupal6 modules! So I wondered&#8230; &#8220;Why are there so few drupal modules in the debian repository?&#8221;</p>

<p>The current testing version of debian, Wheezy, changes all that. Let&#8217;s take a look:</p>

<pre class="sh_desktop">
root@pro-77-gl:/# apt-cache search drupal6
drupal6-mod-addtoany - addtoany module for Drupal 6
drupal6-mod-cck - cck module for Drupal 6
drupal6-mod-commentrss - commentrss modules for Drupal 6
drupal6-mod-contemplate - contemplate module for Drupal 6
drupal6-mod-filefield - filefield module for Drupal 6
drupal6-mod-i18n - i18n module for Drupal 6
drupal6-mod-imageapi - imageapi module for Drupal 6
drupal6-mod-imagecache-actions - imagecache_actions module for Drupal 6
drupal6-mod-imagecache - imagecache module for Drupal 6
drupal6-mod-imagefield-assist - imagefield_assist module for Drupal 6
drupal6-mod-imagefield - imagefield module for Drupal 6
drupal6-mod-inline - inline module for Drupal 6
drupal6-mod-ldap-integration - ldap_integration module for Drupal 6
drupal6-mod-lightbox2 - lightbox2 module for Drupal 6
drupal6-mod-masquerade - masquerade module for Drupal 6
drupal6-mod-openid-provider - openid_provider modules for Drupal 6
drupal6-mod-pingback - pingback modules for Drupal 6
drupal6-mod-site-verify - site_verify module for Drupal 6
drupal6-mod-tagadelic - tagadelic module for Drupal 6
drupal6-mod-trackback - trackback module for Drupal 6
drupal6-mod-views-groupby - views_groupby modules for Drupal 6
drupal6-mod-views - views modules for Drupal 6
drupal6-mod-xmlsitemap - xmlsitemap module for Drupal 6
drupal6-mod-xrds-simple - xrds_simple modules for Drupal 6
drupal6-thm-arthemia - arthemia theme for Drupal 6
drupal6-trans-ru - Russian translation for Drupal 6
drupal6 - a fully-featured content management framework
</pre>

<p>Sweet, huh? In particular, Debian has packages for cck and views, arguably the most powerful drupal6 modules (they are even included in the core of drupal7). There is one popular package that seems to be missing though: admin views - it adds a handy drop down menu to the top of the page. I&#8217;d also like to see the <em>&#8220;basic&#8221;</em> theme added as a debian package.</p>

<p>Its not too tough to add though, thanks to drush:</p>

<pre class="sh_desktop">
drush -l http://www.drupal.code-experiments.com/ dl admin_menu
drush -l http://www.drupal.code-experiments.com/ en admin_menu
drush -l http://www.drupal.code-experiments.com/ dl basic
drush -l http://www.drupal.code-experiments.com/ en pathauto
The following projects have unmet dependencies:
pathauto requires token
Would you like to download them? (y/n): y
Project token (6.x-1.15) downloaded to /usr/share/drupal6/sites/www.drupal.code-experiments.com/modules/token.                                                 [success]
Project token contains 3 modules: token, tokenSTARTER, token_actions.
The following extensions will be enabled: token, pathauto
Do you really want to continue? (y/n): y
pathauto was enabled successfully.                                                                                                                             [ok]
token was enabled successfully.  
</pre>

<p>Seriously, how cool is it that drush handles dependencies like that? Does it remind you of anything? Hint hint&#8230; apt-get?</p>

<p>Other modules I&#8217;m interested in using include:</p>

<ul>
<li>Panels</li>
<li>Backup &amp; Migrate</li>
<li>Services</li>
<li>Views Datasource</li>
<li>Pathauto</li>
</ul>

<p>Not to complain, but it does get a little annoying for me when there are <em>some</em>, but not <em>enough</em> plugins / modules / gems / pears or whatever in the debian repositories. I end up having a mixed system - some from debian, and some from the external package system. Except for rubygems, I haven&#8217;t run into too significant of a problem, but it is something that I find a little uncomfortable.</p>

<p>Nevertheless, I&#8217;m obviously very pleased to see that Debian is paving the way for a multitude of Drupal packages to be utilized on their platform!</p>

<p>There are more details about my setup that I feel are worth mentioning:</p>

<ul>
<li>I&#8217;m running drupal6 inside of an openVZ container, so that I can move it around more easily, if I need to.</li>
<li>I&#8217;m not running the database from the same container, and to prevent debian from automatically installing mysql-server, I added <tt>APT::Install-Recommends &#8220;0&#8221;;</tt> to /etc/apt/apt.conf.d/70debconf.</li>
<li>I am using a multi-site install, though I do not plan to have multiple sites share a single database at this time.</li>
<li>My focus is on using CCK and Views to build really basic applications, in addition to creating and managing content.</li>
</ul>

<p>If you are interested, check out the &#8220;book&#8221; I&#8217;m starting that will <a href="http://www.drupal.code-experiments.com/content/getting-started-cck-and-views">document my foray into drupal6, cck, and views</a>.</p>
]]>
        

    </content>
</entry>

</feed>

