<?xml version="1.0"?>
<rss version="2.0"
     xmlns:dc="http://purl.org/dc/elements/1.1/"
     xmlns:dcterms="http://purl.org/dc/terms/" >
<channel>
<title>blog</title>
<link>http://www.lunix.com.au/blog/</link>
<description>lunix</description>
<item>

	<title>Connecting a SIP Trunk to a Remote SIP Extension</title>


	<guid>http://www.lunix.com.au/blog/freepbx-sip-trunk-to-sip-extension/</guid>

	<link>http://www.lunix.com.au/blog/freepbx-sip-trunk-to-sip-extension/</link>


	<category>tags/general</category>

	<category>tags/sysadmin</category>


	<pubDate>Sun, 04 Sep 2011 14:51:47 +1000</pubDate>
	<dcterms:modified>2011-09-16T13:32:02Z</dcterms:modified>

	<description>&lt;h1&gt;Connecting a SIP Trunk to a Remote SIP Extension&lt;/h1&gt;

&lt;p&gt;$WORK gives me a SIP extension on their Asterisk server for when I work from home. &lt;br /&gt;
I have an Asterisk + FreePBX box at home. &lt;br /&gt;
I wanted to be able to make/receive $WORK calls from home with my existing hard phones. &lt;br /&gt;
I didn&#39;t want to make any changes to $WORK&#39;s Asterisk server.  &lt;/p&gt;

&lt;p&gt;The SIP Extension at $WORK has the following settings:  &lt;/p&gt;

&lt;pre class=&quot;hl&quot;&gt;          name&lt;span class=&quot;hl sym&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;hl num&quot;&gt;1234&lt;/span&gt;
      callerid&lt;span class=&quot;hl sym&quot;&gt;:&lt;/span&gt; Mick Pollard
   canreinvite&lt;span class=&quot;hl sym&quot;&gt;:&lt;/span&gt; No
       context&lt;span class=&quot;hl sym&quot;&gt;:&lt;/span&gt; default
      dtmfmode&lt;span class=&quot;hl sym&quot;&gt;:&lt;/span&gt; rfc2833
          &lt;span class=&quot;hl kwc&quot;&gt;host&lt;/span&gt;&lt;span class=&quot;hl sym&quot;&gt;:&lt;/span&gt; dynamic
      insecure&lt;span class=&quot;hl sym&quot;&gt;:&lt;/span&gt; No
           nat&lt;span class=&quot;hl sym&quot;&gt;:&lt;/span&gt; Yes
          port&lt;span class=&quot;hl sym&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;hl num&quot;&gt;5060&lt;/span&gt;
       qualify&lt;span class=&quot;hl sym&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;hl kwc&quot;&gt;yes&lt;/span&gt;
        secret&lt;span class=&quot;hl sym&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;hl num&quot;&gt;1234&lt;/span&gt;
          &lt;span class=&quot;hl kwb&quot;&gt;type&lt;/span&gt;&lt;span class=&quot;hl sym&quot;&gt;:&lt;/span&gt; friend
      username&lt;span class=&quot;hl sym&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;hl num&quot;&gt;1234&lt;/span&gt;
&lt;/pre&gt;

&lt;p&gt;After some time researching it turns out this is not actually that hard. &lt;br /&gt;
The following is to be all done within FreePBX at home.  &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Add a SIP trunk (use the details of your SIP extension on the office asterisk server)  &lt;/li&gt;
&lt;li&gt;Add an outbound route  &lt;/li&gt;
&lt;li&gt;add an inbound route  &lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;Add a SIP Trunk&lt;/h2&gt;

&lt;p&gt;The main difference here is you should leave &quot;USER Context&quot; &amp;amp; &quot;USER Details&quot; blank.  &lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;http://www.lunix.com.au/blog/../images/siptrunk1.jpg&quot;&gt;&lt;img src=&quot;http://www.lunix.com.au/blog/../images/siptrunk1.jpg&quot; width=&quot;594&quot; height=&quot;1043&quot; alt=&quot;SIP Trunk to remote SIP Extension&quot; class=&quot;imgleft&quot; /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;Add an outbound route:&lt;/h2&gt;

&lt;p&gt;The dial rules used here should be tuned to match the extension prefixes in use at your $WORK. &lt;br /&gt;
We have 4 digit extensions starting with either a 12 or a 22. I have also add a special prefix of &lt;code&gt;9|.&lt;/code&gt; &lt;br /&gt;
which allows me to route a call via $WORK. This is important so that clients get $WORK&#39;s callerID and not my home number !  &lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;http://www.lunix.com.au/blog/../images/outboundroute1.jpg&quot;&gt;&lt;img src=&quot;http://www.lunix.com.au/blog/../images/outboundroute1.jpg&quot; width=&quot;699&quot; height=&quot;510&quot; alt=&quot;Outbound Route for WORK calls&quot; class=&quot;imgleft&quot; /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;Add an Inbound Route (optional)&lt;/h2&gt;

&lt;p&gt;I currently have an inbound route that allows any calls to go straight to a queue but you may want to change this. &lt;br /&gt;
You just need to create an inbound route that will match your WORK extension.  &lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;http://www.lunix.com.au/blog/../images/inboundroute1.jpg&quot;&gt;&lt;img src=&quot;http://www.lunix.com.au/blog/../images/inboundroute1.jpg&quot; width=&quot;477&quot; height=&quot;937&quot; alt=&quot;Inbound Route for WORK calls&quot; class=&quot;imgleft&quot; /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;You should now be abe to make and receive work calls on your existing phones at home.  &lt;/p&gt;
</description>


	<comments>http://www.lunix.com.au/blog/freepbx-sip-trunk-to-sip-extension/#comments</comments>

</item>
<item>

	<title>Share any website in Google Reader</title>


	<guid>http://www.lunix.com.au/blog/google-reader-chrome-bookmarklet/</guid>

	<link>http://www.lunix.com.au/blog/google-reader-chrome-bookmarklet/</link>


	<category>tags/general</category>

	<category>tags/tips</category>


	<pubDate>Sun, 04 Sep 2011 13:53:31 +1000</pubDate>
	<dcterms:modified>2011-09-04T03:53:31Z</dcterms:modified>

	<description>&lt;h1&gt;Share any website in Google Reader&lt;/h1&gt;

&lt;p&gt;I read a lot of feeds and Google reader makes this easier. &lt;br /&gt;
It also allows me to &#39;share&#39; the ones I find useful/interesting as an RSS feed for others to read. &lt;br /&gt;
One thing I found is that I sometimes come across a great site or blog post from a source other than Google Reader &lt;br /&gt;
that I want to share. This small Chrome/chromium bookmarklet allows you to share any website you visit. &lt;br /&gt;
You just create a bookmark on the Chrome toolbar with the URL set to the following javascript snippet.&lt;/p&gt;

&lt;pre&gt;
javascript:var%20b=document.body;var%20GR________bookmarklet_domain=&#39;http://www.google.com&#39;;if(b&amp;&amp;!document.xmlVersion){void(z=document.createElement(&#39;script&#39;));void(z.src=&#39;http://www.google.com/reader/ui/link-bookmarklet.js&#39;);void(b.appendChild(z));}else{}
&lt;/pre&gt;
</description>


	<comments>http://www.lunix.com.au/blog/google-reader-chrome-bookmarklet/#comments</comments>

</item>
<item>

	<title>Installing Graylog2 on Ubuntu Lucid</title>


	<guid>http://www.lunix.com.au/blog/graylog2/</guid>

	<link>http://www.lunix.com.au/blog/graylog2/</link>


	<category>tags/general</category>

	<category>tags/sysadmin</category>


	<pubDate>Sat, 25 Jun 2011 23:56:19 +1000</pubDate>
	<dcterms:modified>2011-10-15T00:52:36Z</dcterms:modified>

	<description>&lt;h1&gt;Installing Graylog2 via Ubuntu Packages&lt;/h1&gt;

&lt;p&gt;These packages and docs are currently beta. &lt;br /&gt;
The deb&#39;s are built on Ubuntu Lucid amd64 however should work on both i386 &amp;amp; amd64.  &lt;/p&gt;

&lt;p&gt;Please report bugs in this HOWTO or the packaging to me at aussielunix &lt;em&gt;at&lt;/em&gt; gmail &lt;em&gt;dot&lt;/em&gt; com.  &lt;/p&gt;

&lt;h2&gt;graylog2-server&lt;/h2&gt;

&lt;p&gt;This installs graylog2-server and it&#39;s dependencies (mongodb-stable from 10gen) etc. &lt;br /&gt;
The graylog2-server will install all files to  /opt/graylog2-server &amp;amp; a config file at /etc/graylog2..conf. &lt;br /&gt;
Be prepared as the java stuff drags in a lot of deps on a clean minimal Lucid install. (176 packages for me)  &lt;/p&gt;

&lt;p&gt;1) add public key for the 10gen mongo repository  &lt;/p&gt;

&lt;pre class=&quot;hl&quot;&gt;sudo apt&lt;span class=&quot;hl sym&quot;&gt;-&lt;/span&gt;key adv &lt;span class=&quot;hl sym&quot;&gt;--&lt;/span&gt;keyserver keyserver.ubuntu.com &lt;span class=&quot;hl sym&quot;&gt;--&lt;/span&gt;recv &lt;span class=&quot;hl num&quot;&gt;7&lt;/span&gt;F0CEB10
&lt;/pre&gt;

&lt;p&gt;2) add public key for the aussielunix (Mick Pollard) PPA&lt;/p&gt;

&lt;pre class=&quot;hl&quot;&gt;sudo apt&lt;span class=&quot;hl sym&quot;&gt;-&lt;/span&gt;key adv &lt;span class=&quot;hl sym&quot;&gt;--&lt;/span&gt;keyserver keyserver.ubuntu.com &lt;span class=&quot;hl sym&quot;&gt;--&lt;/span&gt;recv D77A4DCC
&lt;/pre&gt;

&lt;p&gt;3) add the following four lines to /etc/apt/sources.list  &lt;/p&gt;

&lt;pre class=&quot;hl&quot;&gt;&lt;span class=&quot;hl slc&quot;&gt;# 10-gen&#39;s mongodb repos&lt;/span&gt;
deb http&lt;span class=&quot;hl sym&quot;&gt;://&lt;/span&gt;downloads.mongodb.org&lt;span class=&quot;hl sym&quot;&gt;/&lt;/span&gt;distros&lt;span class=&quot;hl sym&quot;&gt;/&lt;/span&gt;ubuntu &lt;span class=&quot;hl num&quot;&gt;10.4 10&lt;/span&gt;gen
&lt;span class=&quot;hl slc&quot;&gt;# lunix&#39;s graylog2 debs&lt;/span&gt;
deb http&lt;span class=&quot;hl sym&quot;&gt;://&lt;/span&gt;ppa.lunix.com.au&lt;span class=&quot;hl sym&quot;&gt;/&lt;/span&gt;ubuntu&lt;span class=&quot;hl sym&quot;&gt;/&lt;/span&gt; lucid main
&lt;/pre&gt;

&lt;p&gt;4) let apt see the new repositories  &lt;/p&gt;

&lt;pre class=&quot;hl&quot;&gt;sudo apt&lt;span class=&quot;hl sym&quot;&gt;-&lt;/span&gt;get update
&lt;/pre&gt;

&lt;p&gt;5) install graylog2-server plus its deps - including java and mongodb  &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;This will take a while - go make coffee  &lt;/li&gt;
&lt;/ul&gt;

&lt;pre class=&quot;hl&quot;&gt;sudo apt&lt;span class=&quot;hl sym&quot;&gt;-&lt;/span&gt;get &lt;span class=&quot;hl kwc&quot;&gt;install&lt;/span&gt; mongodb&lt;span class=&quot;hl sym&quot;&gt;-&lt;/span&gt;stable graylog2&lt;span class=&quot;hl sym&quot;&gt;-&lt;/span&gt;server
&lt;/pre&gt;

&lt;p&gt;6) secure mongo - add authentication  &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;add an admin user  &lt;/li&gt;
&lt;li&gt;add a user to mongo for collection &#39;graylog2&#39;  &lt;/li&gt;
&lt;/ul&gt;

&lt;pre class=&quot;hl&quot;&gt;lunix&amp;#64;ubuntu&lt;span class=&quot;hl sym&quot;&gt;-&lt;/span&gt;dev01&lt;span class=&quot;hl sym&quot;&gt;:&lt;/span&gt;~&lt;span class=&quot;hl sym&quot;&gt;/&lt;/span&gt;$ mongo
use admin
db.addUser&lt;span class=&quot;hl sym&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;hl str&quot;&gt;&#39;admin&#39;&lt;/span&gt;&lt;span class=&quot;hl sym&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;hl str&quot;&gt;&#39;admin-mongo-passwd&#39;&lt;/span&gt;&lt;span class=&quot;hl sym&quot;&gt;)&lt;/span&gt;
db.auth&lt;span class=&quot;hl sym&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;hl str&quot;&gt;&#39;admin&#39;&lt;/span&gt;&lt;span class=&quot;hl sym&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;hl str&quot;&gt;&#39;admin-mongo-passwd&#39;&lt;/span&gt;&lt;span class=&quot;hl sym&quot;&gt;)&lt;/span&gt;
use graylog2
db.addUser&lt;span class=&quot;hl sym&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;hl str&quot;&gt;&#39;grayloguser&#39;&lt;/span&gt;&lt;span class=&quot;hl sym&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;hl str&quot;&gt;&#39;grayloguser-mongo-passwd&#39;&lt;/span&gt;&lt;span class=&quot;hl sym&quot;&gt;)&lt;/span&gt;
&lt;/pre&gt;

&lt;p&gt;7) tell graylog2-server about the mongo auth  &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;edit /etc/graylog2.conf&lt;/li&gt;
&lt;/ul&gt;

&lt;pre class=&quot;hl&quot;&gt;mongodb_useauth &lt;span class=&quot;hl sym&quot;&gt;=&lt;/span&gt; true
mongodb_user &lt;span class=&quot;hl sym&quot;&gt;=&lt;/span&gt; grayloguser
mongodb_password &lt;span class=&quot;hl sym&quot;&gt;=&lt;/span&gt; p4ssw0rd
&lt;/pre&gt;

&lt;p&gt;8) turn mongo security on - it&#39;s off by default  &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;edit &lt;em&gt;/etc/mongodb.conf&lt;/em&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;pre class=&quot;hl&quot;&gt;auth &lt;span class=&quot;hl sym&quot;&gt;=&lt;/span&gt; true
&lt;/pre&gt;

&lt;p&gt;9) restart mongo&lt;/p&gt;

&lt;pre class=&quot;hl&quot;&gt;sudo service mongodb restart
&lt;/pre&gt;

&lt;p&gt;10)  start graylog2-server  &lt;/p&gt;

&lt;pre class=&quot;hl&quot;&gt;sudo service graylog2&lt;span class=&quot;hl sym&quot;&gt;-&lt;/span&gt;server start
&lt;/pre&gt;

&lt;h3&gt;Conclusion&lt;/h3&gt;

&lt;p&gt;You should now have a working graylog2-server. &lt;br /&gt;
You can check the process tree for a mongodb instance and a java instance and that port UDP/514 is open. &lt;br /&gt;
You can now modify the syslog config on the graylog2-server host to send its data to 127.0.0.1:514 &lt;br /&gt;
Move on to graylog2-web install/configure now.  &lt;/p&gt;

&lt;h2&gt;graylog2-web&lt;/h2&gt;

&lt;p&gt;This installs graylog2-web and some of it&#39;s dependencies. &lt;br /&gt;
The graylog2-web package will install all of it&#39;s files to /opt/graylog2-web. &lt;br /&gt;
All of the gem dependencies have been vendored in. &lt;br /&gt;
The version of rubygems is too old in the Lucid repositories so I make use of a thirdparty PPA. &lt;br /&gt;
This PPA is from Mackenzie Morgan - a Ubuntu Developer - https://launchpad.net/~maco.m/+archive/ruby  &lt;/p&gt;

&lt;p&gt;1) add Mackenzie&#39;s PPA  &lt;/p&gt;

&lt;pre class=&quot;hl&quot;&gt;sudo apt&lt;span class=&quot;hl sym&quot;&gt;-&lt;/span&gt;get &lt;span class=&quot;hl kwc&quot;&gt;install&lt;/span&gt; python&lt;span class=&quot;hl sym&quot;&gt;-&lt;/span&gt;software&lt;span class=&quot;hl sym&quot;&gt;-&lt;/span&gt;properties
sudo add&lt;span class=&quot;hl sym&quot;&gt;-&lt;/span&gt;apt&lt;span class=&quot;hl sym&quot;&gt;-&lt;/span&gt;repository ppa&lt;span class=&quot;hl sym&quot;&gt;:&lt;/span&gt;maco.m&lt;span class=&quot;hl sym&quot;&gt;/&lt;/span&gt;ruby
&lt;/pre&gt;

&lt;p&gt;2) let apt see the new repositories  &lt;/p&gt;

&lt;pre class=&quot;hl&quot;&gt;sudo apt&lt;span class=&quot;hl sym&quot;&gt;-&lt;/span&gt;get update
&lt;/pre&gt;

&lt;p&gt;3) install graylog2-web  &lt;/p&gt;

&lt;pre class=&quot;hl&quot;&gt;sudo apt&lt;span class=&quot;hl sym&quot;&gt;-&lt;/span&gt;get &lt;span class=&quot;hl kwc&quot;&gt;install&lt;/span&gt; graylog2&lt;span class=&quot;hl sym&quot;&gt;-&lt;/span&gt;web
&lt;/pre&gt;

&lt;p&gt;4) install budler  &lt;/p&gt;

&lt;pre class=&quot;hl&quot;&gt;sudo gem &lt;span class=&quot;hl kwc&quot;&gt;install&lt;/span&gt; bundler
&lt;/pre&gt;

&lt;p&gt;5) review/edit some rails configs:  &lt;/p&gt;

&lt;pre class=&quot;hl&quot;&gt;config&lt;span class=&quot;hl sym&quot;&gt;/&lt;/span&gt;mongoid.yml
confg&lt;span class=&quot;hl sym&quot;&gt;/&lt;/span&gt;email.yml
config&lt;span class=&quot;hl sym&quot;&gt;/&lt;/span&gt;general.yml
&lt;/pre&gt;

&lt;p&gt;6) start graylog2-web as a daemon  &lt;/p&gt;

&lt;pre class=&quot;hl&quot;&gt;&lt;span class=&quot;hl kwc&quot;&gt;script&lt;/span&gt;&lt;span class=&quot;hl sym&quot;&gt;/&lt;/span&gt;rails server &lt;span class=&quot;hl sym&quot;&gt;-&lt;/span&gt;eproduction &lt;span class=&quot;hl sym&quot;&gt;-&lt;/span&gt;d &lt;span class=&quot;hl sym&quot;&gt;-&lt;/span&gt;p3000
&lt;/pre&gt;

&lt;h3&gt;Conclusion&lt;/h3&gt;

&lt;p&gt;You should now have a working graylog2 server &amp;amp; web.  &lt;/p&gt;
</description>


	<comments>http://www.lunix.com.au/blog/graylog2/#comments</comments>

</item>
<item>

	<title>A sane Varnish version for Ubuntu Hardy</title>


	<guid>http://www.lunix.com.au/blog/sane_varnish_on_hardy/</guid>

	<link>http://www.lunix.com.au/blog/sane_varnish_on_hardy/</link>


	<category>tags/general</category>

	<category>tags/sysadmin</category>


	<pubDate>Sat, 18 Sep 2010 10:51:10 +1000</pubDate>
	<dcterms:modified>2010-09-18T00:51:10Z</dcterms:modified>

	<description>&lt;p&gt;With Hardy getting a bit long in the tooth so are the versions of software. &lt;br /&gt;
Recently a client has tasked me to add varnish to their existing wordpress cluster. &lt;br /&gt;
The servers they are using are all Ubuntu Hardy and the version of Varnish in the repos is ancient (1.0.3-2) &lt;br /&gt;
It turns out it&#39;s not that hard to build a .deb of a more modern version of Varnish. &lt;br /&gt;
The following GIST shows the simple steps I used to build a Ubuntu package of Varnish 2.0.6.  &lt;/p&gt;

&lt;script src=&quot;http://gist.github.com/585194.js&quot;&gt;&lt;/script&gt;
</description>


	<comments>http://www.lunix.com.au/blog/sane_varnish_on_hardy/#comments</comments>

</item>
<item>

	<title>Funny tech support email No.1</title>


	<guid>http://www.lunix.com.au/blog/Funny_tech_support_email_No.1/</guid>

	<link>http://www.lunix.com.au/blog/Funny_tech_support_email_No.1/</link>


	<category>tags/general</category>

	<category>tags/humour</category>

	<category>tags/sysadmin</category>


	<pubDate>Fri, 30 Jul 2010 08:34:15 +1000</pubDate>
	<dcterms:modified>2010-07-29T23:37:27Z</dcterms:modified>

	<description>&lt;h2&gt;Funny Tech Support Email Number 1&lt;/h2&gt;

&lt;p&gt;In the late 1990&#39;s we purchased a few small ISP&#39;s and whilst auditing their old servers (terrible mess) I come across this beauty. &lt;br /&gt;
I thought I&#39;d share this, plus &lt;a href=&quot;http://www.lunix.com.au/blog/./Funny_tech_support_email_No.2/&quot;&gt;one&lt;/a&gt; other, from another ISP, I found for this years System Administrator&#39;s Appreciation Day. &lt;br /&gt;
They both made me laugh back then and still make me laugh today. Oh how I miss the days of ISP land.  &lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;http://www.lunix.com.au/blog/../images/dear_root.jpg&quot;&gt;&lt;img src=&quot;http://www.lunix.com.au/blog/./Funny_tech_support_email_No.1/800x600-dear_root.jpg&quot; width=&quot;612&quot; height=&quot;600&quot; alt=&quot;dear root&quot; class=&quot;imgleft&quot; /&gt;&lt;/a&gt;&lt;/p&gt;
</description>


	<comments>http://www.lunix.com.au/blog/Funny_tech_support_email_No.1/#comments</comments>

</item>
<item>

	<title>Funny tech support email No.2</title>


	<guid>http://www.lunix.com.au/blog/Funny_tech_support_email_No.2/</guid>

	<link>http://www.lunix.com.au/blog/Funny_tech_support_email_No.2/</link>


	<category>tags/general</category>

	<category>tags/humour</category>

	<category>tags/sysadmin</category>


	<pubDate>Fri, 30 Jul 2010 08:34:15 +1000</pubDate>
	<dcterms:modified>2010-07-29T23:34:52Z</dcterms:modified>

	<description>&lt;h2&gt;Funny Tech Support Email Number 2&lt;/h2&gt;

&lt;p&gt;In the mid 2000&#39;s whilst working at an ISP the following email arrived. &lt;br /&gt;
It gave us all a good laugh at the time and today I share with you all for System&#39;s Administrator Appreciation Day.  &lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;http://www.lunix.com.au/blog/../images/dear_hackers.jpg&quot;&gt;&lt;img src=&quot;http://www.lunix.com.au/blog/./Funny_tech_support_email_No.2/800x600-dear_hackers.jpg&quot; width=&quot;446&quot; height=&quot;600&quot; alt=&quot;dear hacker&quot; class=&quot;imgleft&quot; /&gt;&lt;/a&gt;&lt;/p&gt;
</description>


	<comments>http://www.lunix.com.au/blog/Funny_tech_support_email_No.2/#comments</comments>

</item>
<item>

	<title>Self Serve Dev Environment</title>


	<guid>http://www.lunix.com.au/blog/SelfServeDevEnvironment/</guid>

	<link>http://www.lunix.com.au/blog/SelfServeDevEnvironment/</link>


	<category>tags/devops</category>

	<category>tags/general</category>

	<category>tags/sysadmin</category>


	<pubDate>Sat, 24 Jul 2010 17:12:11 +1000</pubDate>
	<dcterms:modified>2010-07-24T07:37:30Z</dcterms:modified>

	<description>&lt;h1&gt;Introduction&lt;/h1&gt;

&lt;p&gt;I am currently working in a web development shop. We develop and maintain a range of websites/webapps for customers. &lt;br /&gt;
At $WORK we have many varied customers each with their own unique Production Environments (&lt;em&gt;PE from here on in&lt;/em&gt;). &lt;br /&gt;
Our $DEVs are also free to run any *nix based OS on their workstations. &lt;br /&gt;
One of the challeges we have had in the past is making a copy of a customer&#39;s PE easily available to our $DEVS. &lt;br /&gt;
This used to require lodging a task in Redmine and waiting for a Systems Admin to build you a VM on a central VM server. &lt;br /&gt;
This post will show how we are now using common FOSS tools to give enable to $DEVS to have VM&#39;s on their own workstations that mimick a customer&#39;s PE.  &lt;/p&gt;

&lt;p&gt;&lt;em&gt;Whilst I make mention of some specific tools in this post they can be swapped out in most places for alternates however I have not tested the &lt;br /&gt;
alternatives yet. ie: puppet/chef, mercurial/git, centos/ubuntu.&lt;/em&gt;&lt;/p&gt;

&lt;h1&gt;Notes on the Challenge&lt;/h1&gt;

&lt;ul&gt;
&lt;li&gt;needs to be simple not an obsticle - if it&#39;s slower than just getting a sysadmin to build it for you then its a fail  &lt;/li&gt;
&lt;li&gt;simplicity generally means easy to fix when something goes wrong in the wheel.&lt;/li&gt;
&lt;li&gt;self-serve - no waiting for sysadmins &lt;/li&gt;
&lt;li&gt;visability - everything in DVCS and &lt;a href=&quot;http://redmine.org&quot;&gt;Redmine&lt;/a&gt; (project managent software)  &lt;/li&gt;
&lt;li&gt;needed to be repeatable - $DEVs needed to easily be able to build, destroy and build again  &lt;/li&gt;
&lt;li&gt;relatively self documenting - read the kickstart or puppet manifests  &lt;/li&gt;
&lt;li&gt;I hate OS images - They&#39;re big, cumbersome and pain in my..err..storage  &lt;a href=&quot;http://madstop.com/2009/02/04/golden-image-or-foil-ball/&quot; title=&quot;Luke Kanies&quot;&gt;See - Golden Image or Foil Ball?&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;After spending a fair amount of time on this and looking at many of the VM/cloud management solutions out there I have decided that while some are very nice and useful I do not believe they are suiteable for our situation. Most VM/cloud management tools are built around the &quot;OS Image&quot; and require each workstation to &#39;register&#39; as a &lt;em&gt;node&lt;/em&gt;.    &lt;/p&gt;

&lt;h1&gt;Current solution&lt;/h1&gt;

&lt;p&gt;After doing the full circle of research we are now using a simple collection of existing tools. &lt;br /&gt;
It was all there staring me in the face all along. &lt;em&gt;Libvirt, virt-install kickstart puppet, mercurial and a wiki entry.&lt;/em&gt; 
A $DEV just needs to make sure he/she has libvirt, virt-install, virt-viewer installed. &lt;br /&gt;
We are using KVM to provide the virtualisation layer but through the use of libvirt you should be able to use any libvirt compatible virtualisation provider.(virtual box etc)  &lt;/p&gt;

&lt;h2&gt;Technologies used&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;a httpd server (nginx, apache etc) - to serve kickstart + yum repos/mirror  &lt;/li&gt;
&lt;li&gt;Own yum repos + centos mirror ( again ubuntu mirror etc )  &lt;/li&gt;
&lt;li&gt;puppetmasterd ( or other CF tool ie: chef etc )  with autosign turned on (we have a separate puppetmaser for the $DEVS)  &lt;/li&gt;
&lt;li&gt;some kickstart files - I use one per customer and bootstrap puppet from the %POST section  &lt;/li&gt;
&lt;li&gt;libvirtd + KVM/qemu - could be any supported virtualisation software supported by libvirt  &lt;/li&gt;
&lt;li&gt;python-virtinst + virt-viewer&lt;/li&gt;
&lt;li&gt;dhcpd  &lt;/li&gt;
&lt;li&gt;forward and reverse dns - puppet will fail to work as expected without it  ( I use powerdns-recursor for demos as it exports /etc/hosts )&lt;/li&gt;
&lt;li&gt;redmine - we make use of Redmine&#39;s ACL&#39;s to visualize the repos for puppet and kickstart files per customer&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;Devs&lt;/h2&gt;

&lt;p&gt;The following is the steps needed for a $DEV to deploy a customer&#39;s &lt;em&gt;PE&lt;/em&gt;.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Check &lt;a href=&quot;http://www.lunix.com.au/blog/../SelfServeDevEnvironment/network/&quot;&gt;network&lt;/a&gt; page and grab an available network &lt;em&gt;mac&lt;/em&gt; to use (this is used for dhcp &amp;amp; dns so puppet works properly) &lt;br /&gt;
and the name of the customers kickstart file.  &lt;/li&gt;
&lt;li&gt;update wiki page to say that &lt;em&gt;network mac&lt;/em&gt; is in use.&lt;/li&gt;
&lt;li&gt;&lt;p&gt;deploy a VM on their workstation. - See &lt;a href=&quot;http://www.lunix.com.au/blog/../SelfServeDevEnvironment/libvirt/&quot;&gt;Libvirt tips&lt;/a&gt;  &lt;/p&gt;

&lt;p&gt;virt-install --connect qemu:///system --accelerate -n  virt01 -m 54:52:00:37:2E:B9 -r 1024 --vcpus=1 --disk pool=lvm,bus=virtio,size=20 --vnc --os-type linux --os-variant=rhel5 --network=network:default -l http://192.168.1.250/os/CentOS/5.5/os/x86_64/ -x &quot;ks=http://192.168.1.250/ks/project_customer1.ks&quot;&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;em&gt;This will take advantage of the fact that both CentOS and Ubuntu have the necessary PXE files stored in their mirrors for booting the installer.&lt;/em&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;wait approx 10 or so minutes and they have a clone of the customer&#39;s &lt;em&gt;PE&lt;/em&gt; on their workstation ready to deploy to and hack on.  &lt;em&gt;see notes in conclusion below&lt;/em&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;New customers&lt;/h2&gt;

&lt;p&gt;The following is what&#39;s involved in preparing for a new customer:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;A new customer has a VM/server provisioned in a DC by a hosting company.&lt;/li&gt;
&lt;li&gt;I grab the current package list and make a &lt;a href=&quot;http://www.lunix.com.au/blog/../SelfServeDevEnvironment/ExampleKickstartFile/&quot;&gt;kickstart&lt;/a&gt; file to replicate the install locally&lt;/li&gt;
&lt;li&gt;Create a new &lt;code&gt;project_customer3&lt;/code&gt; in puppet and add details to bottom of the new kickstart file.&lt;/li&gt;
&lt;li&gt;publish new kickstart file and update wiki entry&lt;/li&gt;
&lt;/ul&gt;

&lt;h1&gt;Conclusion&lt;/h1&gt;

&lt;p&gt;I have reduced the time it takes for a dev to get a copy of a customers &lt;em&gt;PE&lt;/em&gt; down from days to minutes and its now a self serve solution. &lt;br /&gt;
There is still more to refine in this but it&#39;s already full of win as I now get to do more of &#39;stuff that matters&#39;  &lt;/p&gt;

&lt;p&gt;It&#39;s early days for us using this new setup and I am yet to work out an easy, effective way of notifying a $DEV when puppet has finished the buildout. Suggestions welcome.  &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;cucumber tests ?&lt;/li&gt;
&lt;li&gt;using libnotify via Dbus ? ( suggestion made at a recent &lt;a href=&quot;http://groups.google.com/group/devops-aus&quot; title=&quot;DevOps Sydney&quot;&gt;DevOps Sydney&lt;/a&gt; meetup )&lt;/li&gt;
&lt;li&gt;??&lt;/li&gt;
&lt;/ul&gt;
</description>


	<comments>http://www.lunix.com.au/blog/SelfServeDevEnvironment/#comments</comments>

</item>
<item>

	<title>migrating drupal6 to mercury</title>


	<guid>http://www.lunix.com.au/blog/migrating_drupal6_to_mercury/</guid>

	<link>http://www.lunix.com.au/blog/migrating_drupal6_to_mercury/</link>


	<category>tags/drupal</category>

	<category>tags/general</category>


	<pubDate>Wed, 14 Jul 2010 09:37:54 +1000</pubDate>
	<dcterms:modified>2010-07-14T00:00:41Z</dcterms:modified>

	<description>&lt;h1&gt;Migrating an existing Drupal6 site to Mercury&lt;/h1&gt;

&lt;p&gt;&lt;a href=&quot;http://www.lunix.com.au/blog/../images/mercury-logo.jpg&quot;&gt;&lt;img src=&quot;http://www.lunix.com.au/blog/./migrating_drupal6_to_mercury/250x-mercury-logo.jpg&quot; width=&quot;250&quot; height=&quot;82&quot; alt=&quot;Mercury&quot; class=&quot;imgleft&quot; /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;Introduction&lt;/h2&gt;

&lt;p&gt;Mercury is a very fast hosting solution for hosting Drupal sites. &lt;br /&gt;
The following quote from &lt;code&gt;http://getpantheon.com/mercury/what-is-mercury&lt;/code&gt; describes it perfectly.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;Mercury is a drop-in replacement for your Drupal website hosting service that  
delivers break-through performance. Mercury can serve two-hundred times more  
pages per second and generate pages three times faster than standard hosting  
services.  
How is this possible?  
By standing on the shoulders of giants.  
We&#39;ve integrated, borrowed, tuned and tweaked the fastest open-source hosting  
technologies available so that they can at last work perfectly with Drupal at  
the click of a button.  
You can read all of the technical details here.  
The tools and techniques available in Mercury have been around for some time,  
but were expensive and tricky to integrate with Drupal in the past.  
Now, finally, they are available for everyone.  
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;The following is a post on how I migrate my sites from a standard Drupal6 hosting server to a Mercury based hosting server. &lt;br /&gt;
We manage all our sites in GIT. You can read more about how we are doing it in another post - &lt;a href=&quot;http://www.lunix.com.au/blog/./drupal-git-workflow-pt1/&quot;&gt;drupal-git-workflow-pt1&lt;/a&gt; &lt;br /&gt;
One thing to mention here is that when we build a new Mercury server there is only 3 modules placed into &lt;code&gt;sites/all/modules&lt;/code&gt; &lt;br /&gt;
&lt;em&gt;cacherouter  memcache  varnish&lt;/em&gt;. The rest are kept as part of a sites individual repository. &lt;br /&gt;
This allows a site to be able to easily migrated between a Mercury and non-Mercury server.  &lt;/p&gt;

&lt;h2&gt;HOWTO&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Clone the site&#39;s repository into the sites/ folder: &lt;/li&gt;
&lt;/ul&gt;

&lt;pre&gt;git clone gitosis@gitserver:example.com.au.git&lt;/pre&gt;

&lt;ul&gt;
&lt;li&gt;Initialize submodules: &lt;/li&gt;
&lt;/ul&gt;

&lt;pre&gt;git submodule init&lt;/pre&gt;

&lt;ul&gt;
&lt;li&gt;Update submodules: &lt;/li&gt;
&lt;/ul&gt;

&lt;pre&gt;git submodule update&lt;/pre&gt;

&lt;ul&gt;
&lt;li&gt;Place existing site offline (on Drupal6 server) to stop any new changes to database happening (use drush)&lt;/li&gt;
&lt;li&gt;Dump the database and load up on Mercury server&lt;/li&gt;
&lt;li&gt;Copy &lt;code&gt;sites/example.com.au/files&lt;/code&gt; to the new Mercury server.(rsync or scp -r)&lt;/li&gt;
&lt;li&gt;Configure the settings.php file to point to the right database. (if necessary)&lt;/li&gt;
&lt;li&gt;add the following to the bottom of settings.php&lt;/li&gt;
&lt;/ul&gt;

&lt;pre&gt;
    ##########################
    #
    # Mercury Settings
    #
    # Alter With Caution :)
    #
    ##########################
    # Varnish reverse proxy on localhost
    $conf[&#39;reverse_proxy&#39;] = TRUE;           
    $conf[&#39;reverse_proxy_addresses&#39;] = array(&#39;127.0.0.1&#39;); 
    # Memcached configuration
    $conf[&#39;cache_inc&#39;] = &#39;./sites/all/modules/memcache/memcache.inc&#39;;
    $conf[&#39;memcache_servers&#39;] = array(
      &#39;127.0.0.1:11211&#39; =&gt; &#39;default&#39;,
    );
    $conf[&#39;memcache_key_prefix&#39;] = &#39;example.com.au&#39;;
    ### END Mercury settings
&lt;/pre&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Create an Apache vhost and restart apache  &lt;strong&gt;should already be done by &lt;a href=&quot;http://www.puppetlabs.com/&quot;&gt;puppet&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Setup caching modules for site&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;pre&gt;
    DSITE=&quot;example.com.au&quot;
    drush -l $DSITE en cacherouter
    drush -l $DSITE vset --yes cache 3
    drush -l $DSITE vset --yes cache_lifetime 0
    drush -l $DSITE vset --yes page_cache_max_age 600
    drush -l $DSITE vset --yes block_cache 1
    drush -l $DSITE vset --yes preprocess_css 1
    drush -l $DSITE vset --yes preprocess_js 1
    drush -l $DSITE vset --yes page_compression 0
&lt;/pre&gt;

&lt;ul&gt;
&lt;li&gt;clear any Drupal cache entries &lt;/li&gt;
&lt;/ul&gt;

&lt;pre&gt;
drush -l $DSITE cache-clear all
&lt;/pre&gt;

&lt;ul&gt;
&lt;li&gt;test on port 9880 first then port 80 if successfull.&lt;/li&gt;
&lt;li&gt;install cron&lt;/li&gt;
&lt;/ul&gt;

&lt;pre&gt;
    0 * * * * /usr/bin/wget -O - -q -t 1 http://example.com.au:9880/cron.php
&lt;/pre&gt;

&lt;h2&gt;Conclusion&lt;/h2&gt;

&lt;p&gt;Please note that this is how we do the migration onto our own servers built following the Mercury install documents minus the Solr-search. Some adjustments may be necessary by you to follow these on a complete Mercury platform.  &lt;/p&gt;
</description>


	<comments>http://www.lunix.com.au/blog/migrating_drupal6_to_mercury/#comments</comments>

</item>
<item>

	<title>drupal-git-workflow-pt1</title>


	<guid>http://www.lunix.com.au/blog/drupal-git-workflow-pt1/</guid>

	<link>http://www.lunix.com.au/blog/drupal-git-workflow-pt1/</link>


	<category>tags/drupal</category>

	<category>tags/general</category>


	<pubDate>Thu, 01 Jul 2010 16:34:25 +1000</pubDate>
	<dcterms:modified>2010-08-16T23:10:39Z</dcterms:modified>

	<description>&lt;h2&gt;Managing Drupal sites with git - Part 1&lt;/h2&gt;

&lt;p&gt;&lt;a href=&quot;http://www.lunix.com.au/blog/../images/drupal_logo.jpg&quot;&gt;&lt;img src=&quot;http://www.lunix.com.au/blog/./drupal-git-workflow-pt1/250x-drupal_logo.jpg&quot; width=&quot;250&quot; height=&quot;287&quot; alt=&quot;Drupal&quot; class=&quot;imgleft&quot; /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;At $WORK we build and manage quite a few Drupal sites. &lt;br /&gt;
In an effort to streamline things we are trialling a new workflow when working on Drupal sites. &lt;br /&gt;
The goals we wanted to achieve was to have everything in GIT and to have each customers site &lt;em&gt;portable&lt;/em&gt;. &lt;br /&gt;
By &lt;em&gt;portable&lt;/em&gt; I mean that it can easily be moved between our different drupal servers and also between Drupal multisite and dedicated Drupal hosting. &lt;br /&gt;
We have GIT repos of all the Drupal modules we use and use GIT submodules to drag these modules in for a site. &lt;br /&gt;
Each night a tarball of the sites mysql and sites/example.com/files/ is sent to a central server that serves these out via HTTPS (with AUTH of course). &lt;br /&gt;
This makes it very easy for a developer to grab production data to develop with. &lt;br /&gt;
Below is an example of our current workflow. This is only a day old and not really been put to a lot of use but in testing it seems to flow ok. Time will tell.  &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Setup a Drupal install if you don&#39;t have one: &lt;code&gt;git clone gitosis@gitserver:drupal6.git /var/www/drupal&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Clone the site&#39;s repository into the sites/ folder: &lt;code&gt;git clone gitosis@gitserver:example.com.au.git /var/www/drupal/sites/example.com&lt;/code&gt;
&lt;ul&gt;
&lt;li&gt;Change into freshly cloned sites folder &lt;code&gt;cd /var/www/drupal/sites/example.com&lt;/code&gt;  &lt;/li&gt;
&lt;li&gt;Initialize submodules: &lt;code&gt;git submodule init&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Update submodules: &lt;code&gt;git submodule update&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;/li&gt;
&lt;li&gt;Download and install the latest database backup. Take care to remove the contained email addresses.&lt;/li&gt;
&lt;li&gt;Download the latest files folder backup and extract into the site&#39;s folder.&lt;/li&gt;
&lt;li&gt;Configure the settings.php file to point to the right database.&lt;/li&gt;
&lt;li&gt;Create an Apache vhost and /etc/hosts entry to point traffic to your local installation&lt;/li&gt;
&lt;li&gt;Make your modifications.&lt;/li&gt;
&lt;li&gt;Commit to your Git repository.&lt;/li&gt;
&lt;li&gt;Push to the main repository if you have write access, otherwise notify someone who does.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;Notes&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Everything is kept in the domains site folder(sites/example.com) and nothing goes in sites/all or sites/default  &lt;/li&gt;
&lt;li&gt;Sites must be self contained, i.e., they should not make reference to anything from another sites folder, including &lt;em&gt;sites/all&lt;/em&gt;.  &lt;/li&gt;
&lt;li&gt;All modules must be added as Git submodules.  &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;It&#39;s very early days using this new workflow so I am not sure how well it will go but so far it appears to be a big step in the right direction. &lt;br /&gt;
Once we have mastered this and converted all our sites over to GIT we will then look to finding a better way to handle sql changes progressing through the dev,test,staging,production lifecycle.  &lt;/p&gt;
</description>


	<comments>http://www.lunix.com.au/blog/drupal-git-workflow-pt1/#comments</comments>

</item>
<item>

	<title>install-gitosis-on-centos5</title>


	<guid>http://www.lunix.com.au/blog/install-gitosis-on-centos5/</guid>

	<link>http://www.lunix.com.au/blog/install-gitosis-on-centos5/</link>


	<category>tags/general</category>

	<category>tags/git</category>


	<pubDate>Tue, 11 May 2010 09:51:46 +1000</pubDate>
	<dcterms:modified>2010-07-01T07:23:49Z</dcterms:modified>

	<description>&lt;h1&gt;Howto: Install git, gitosis &amp;amp; gitweb on CentOS 5&lt;/h1&gt;

&lt;h2&gt;Introduction&lt;/h2&gt;

&lt;p&gt;GIT is a powerful DVCS system. Gitweb is a Web-UI to visualize the repos. Gitosis takes the pain out of managing multiple GIT repos and all the ACL&#39;s. &lt;br /&gt;
It uses a git repos to manage the git repos with all connections done via a shared ssh/shell account and authentication is done via ssh private/public keys.&lt;/p&gt;

&lt;h2&gt;Installation&lt;/h2&gt;

&lt;p&gt;In order to install git, gitweb &amp;amp; gitosis we need to add the &lt;a href=&quot;http://fedoraproject.org/wiki/EPEL/FAQ#howtouse&quot;&gt;EPEL&lt;/a&gt; yum repository:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;rpm -Uvh http://download.fedora.redhat.com/pub/epel/5/i386/epel-release-5-3.noarch.rpm
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Once that is done we install git, git-web and gitosis:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;yum install git gitweb gitosis
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;If all went well you should now have all three things installed. Now to setup gitosis to manage our repos. &lt;br /&gt;
At the core of gitosis is a &lt;em&gt;special&lt;/em&gt; git repos called &lt;strong&gt;gitosis-admin&lt;/strong&gt;  The contents of this will be explained soon.  &lt;/p&gt;

&lt;p&gt;To get started you will want to copy your ssh public key to a tmp place on the server &lt;em&gt;tmp/user.pub&lt;/em&gt; and then issue the following command:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;sudo -H -u gitosis gitosis-init &amp;lt; /tmp/user.pub  
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;This will setup gitosis ready to serve git repos from &lt;em&gt;/var/lib/gitosis/&lt;/em&gt; &lt;br /&gt;
On your local machine, you&#39;ll now be able to clone the gitosis admin repository with the following command:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;git clone gitosis@example.com:gitosis-admin.git
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;The gitosis-admin repository contains a directory named keydir/ and a file named gitosis.conf.&lt;/p&gt;

&lt;p&gt;The &lt;em&gt;keydir/&lt;/em&gt; contains the SSH public keys for your users in files named in the convention of [username].pub. Each user of your git repositories will have their own file in &lt;em&gt;keydir/&lt;/em&gt; the username is for internal gitosis use, and needn&#39;t correspond with any shell username.  &lt;/p&gt;

&lt;p&gt;The &lt;em&gt;gitosis.conf&lt;/em&gt; file contains a set of access control rules that can be used to provide people access to a particular repository. An access control block looks like this:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;[group devs-rw]
    writable = iphone-project wiki drupal7
    members = mick alex adam mary

[group devs-ro]
    readonly = iphone-project wiki drupal7
    members = john
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;This block gives the users (e.g. keys in the keydir/) &quot;mick&quot;, &quot;alex&quot;, &quot;adam&quot; and &quot;mary&quot; write(push) access to the iphone-project, wiki &amp;amp; drupal repositories. Note that repositories in the &quot;writable&quot; list needn&#39;t exist before a user pushes to them, as &lt;em&gt;gitosis&lt;/em&gt; will create the new repositories if needed.
Also the user &quot;john&quot; has readonly(clone) access to the same 3 repos. He is not allowed to push.&lt;/p&gt;

&lt;p&gt;To create a new repository, just add it to the writable list of a gitosis group. All repositories will have &quot;clone&quot; or &quot;remote&quot; URLs in the following form:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;gitosis@example.com:&amp;#036;reponame.git
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;You may have as many &quot;groups&quot; as you need to support your workflow.  &lt;/p&gt;

&lt;p&gt;You should now have a fully working gitosis &lt;em&gt;server&lt;/em&gt;. All that is left to do is to enable &lt;em&gt;gitweb&lt;/em&gt; so that you can visualize all of the repos in one place. &lt;br /&gt;
Lucky for us this is almost completely done with the yum install earlier. A simple apache restart and that&#39;s it. &lt;br /&gt;
The following URL should bring up a working gitweb instance. Of course it will be empty to start with.  &lt;/p&gt;

&lt;pre&gt;&lt;code&gt;http://example.com/git/gitweb.cgi
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;&lt;strong&gt;Note&lt;/strong&gt;: &lt;em&gt;A repos created with gitosis above will not be visible by default in gitweb. A simple file permission change will take care of this.&lt;/em&gt;&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;chmod 755 /var/lib/gitosis/repositories/&amp;#036;REPOSNAME
&lt;/code&gt;&lt;/pre&gt;

&lt;h2&gt;Conclusion&lt;/h2&gt;

&lt;p&gt;You should now have a fully working central &lt;em&gt;git&lt;/em&gt; server managed by gitosis and visualised by gitweb.&lt;/p&gt;

&lt;p&gt;Cheers
Mick&lt;/p&gt;
</description>


	<comments>http://www.lunix.com.au/blog/install-gitosis-on-centos5/#comments</comments>

</item>

</channel>
</rss>

