<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/css" href="/stylesheets/rss.css"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/">
  <channel>
    <title>Segment7: Version Control and Sysadmin</title>
    <link>http://blog.segment7.net/articles/2006/03/21/version-control-and-sysadmin</link>
    <language>en-us</language>
    <ttl>40</ttl>
    <description>The Blog</description>
    <item>
      <title>Version Control and Sysadmin</title>
      <description>&lt;p&gt;Every part of the system configuration you change belongs under version control (with a few exceptions).  If you&amp;#8217;re going to be making changes to your configuration you might do something wrong and need to roll back.  You might wonder why or who made a change in the future.  Version control will perform &lt;abbr title="Cover Your Ass"&gt;&lt;span class="caps"&gt;CYA&lt;/span&gt;&lt;/abbr&gt; duties for you.&lt;/p&gt;


	&lt;p&gt;There are a few things you probably don&amp;#8217;t want under version control.  /etc/master.passwd shouldn&amp;#8217;t be flying across the wire (and &lt;a href="http://segment7.net/projects/FreeBSD/kerberos.html"&gt;Kerberization&lt;/a&gt; or similar works much better for distributing passwords).  Sudo will get mad if you go and touch /usr/local/etc/sudoers inappropriately, especially if it has the wrong owners.&lt;/p&gt;


	&lt;p&gt;Configuration files in /etc, /usr/local/etc, /boot, custom rc.d and periodic scripts, anything you&amp;#8217;re going to change, add or even break needs to be under version control.  (I haven&amp;#8217;t figured out a good way of putting crontabs under version control, ideas?)&lt;/p&gt;


	&lt;p&gt;For The Robot Co-op, each machine&amp;#8217;s configuration is in its own branch in a subversion repository to allow care-free copying of changes between machines.  A change to the httpd.conf on one machine is a commit and a couple of merges away from being accurately changed on all the machines.  No typos from multiple manual changes.&lt;/p&gt;
</description>
      <pubDate>Tue, 21 Mar 2006 10:19:00 -0800</pubDate>
      <guid isPermaLink="false">urn:uuid:a2e29d4f-b99e-45ee-902a-dd7d8257df8b</guid>
      <author>drbrain@segment7.net (Eric Hodel)</author>
      <link>http://blog.segment7.net/articles/2006/03/21/version-control-and-sysadmin</link>
      <category>Robot Co-op</category>
    </item>
    <item>
      <title>"Version Control and Sysadmin" by Doug</title>
      <description>&lt;p&gt;Eric, I&amp;#8217;m looking at /etc/crontab on a FreeBSD-6.0 Release box, and the sixth field in the line for each job is the user name of the account that the command should run under. Will this not let you consolidate your cron schedules in that one file for revision control?&lt;/p&gt;</description>
      <pubDate>Wed, 22 Mar 2006 15:05:19 -0800</pubDate>
      <guid isPermaLink="false">urn:uuid:7411b18e-dbce-4a51-ad0f-08a7b3ff28fb</guid>
      <link>http://blog.segment7.net/articles/2006/03/21/version-control-and-sysadmin#comment-132</link>
    </item>
    <item>
      <title>"Version Control and Sysadmin" by Eric Hodel</title>
      <description>&lt;p&gt;cfengine sounds like something I really need to use.  It would be great if you&amp;#8217;d write up the version control integration.&lt;/p&gt;</description>
      <pubDate>Wed, 22 Mar 2006 10:01:40 -0800</pubDate>
      <guid isPermaLink="false">urn:uuid:6048940e-be12-49f8-a597-6c27a5a6c165</guid>
      <link>http://blog.segment7.net/articles/2006/03/21/version-control-and-sysadmin#comment-128</link>
    </item>
    <item>
      <title>"Version Control and Sysadmin" by Scott Woods</title>
      <description>&lt;p&gt;While it&amp;#8217;s a bit heavier-handed, if you have the desire to do this on more than a couple machines, you can combine version control with cfengine to get a very organized and powerful system (and scratch the common crontab issue itch).&lt;/p&gt;


	&lt;p&gt;You can keep the master set of files under version control, and cfengine handles the distribution and comparisons on various machines. When a file goes out of sync and needs to be updated, you get notified.&lt;/p&gt;


	&lt;p&gt;cfengine only uses the files that are committed to the repository, so you&amp;#8217;re free to test and experiment with your local copy.&lt;/p&gt;


	&lt;p&gt;If a set of machines have the same file in common, they can all just belong to the same class, and you only need one copy the file in version control.&lt;/p&gt;


	&lt;p&gt;Furthermore, you can define actions to perform after a certain file has been updated, such as &amp;#8220;crontab /var/spool/cron/root&amp;#8221;, or &amp;#8220;service httpd reload&amp;#8221;.&lt;/p&gt;


	&lt;p&gt;The standard cfengine setup doesn&amp;#8217;t typically integrate the version control, but I&amp;#8217;d be happy to put a page up somewhere describing the method that we use.&lt;/p&gt;</description>
      <pubDate>Wed, 22 Mar 2006 07:05:01 -0800</pubDate>
      <guid isPermaLink="false">urn:uuid:576d1f8c-504d-4e82-9cbd-264e46d50633</guid>
      <link>http://blog.segment7.net/articles/2006/03/21/version-control-and-sysadmin#comment-127</link>
    </item>
    <item>
      <title>"Version Control and Sysadmin" by Eric Hodel</title>
      <description>&lt;p&gt;I like to use version control as a log system rather than a backup system so meaningful commit messages are more important.  I don&amp;#8217;t want something automatically checking in to subversion, I find that too scary and not useful enough for tracing changes to meaningful messages.  (Who added this job 3 weeks ago?)&lt;/p&gt;


	&lt;p&gt;Wrapping up crontab with a forced commit would be too annoying, especially if you get it wrong and have to go back in and change it.&lt;/p&gt;</description>
      <pubDate>Tue, 21 Mar 2006 21:00:13 -0800</pubDate>
      <guid isPermaLink="false">urn:uuid:d69dd821-a5ce-406b-be51-2a8099dcbb04</guid>
      <link>http://blog.segment7.net/articles/2006/03/21/version-control-and-sysadmin#comment-126</link>
    </item>
    <item>
      <title>"Version Control and Sysadmin" by Larry Wright</title>
      <description>&lt;p&gt;You can add a cron job to the users whose crontabs you want backed up to do the &amp;#8216;crontab -l | &amp;gt;&amp;gt; jobs.list&amp;#8217; and then automatically check it in if &amp;#8216;svn diff&amp;#8217; shows a difference.&lt;/p&gt;


	&lt;p&gt;I&amp;#8217;m not entirely sure what you mean by &amp;#8220;automatic&amp;#8221;. Unless you&amp;#8217;re scheduling your svn commits (in the manner I just described), then it still involves a manual step.&lt;/p&gt;


	&lt;p&gt;I do agree with your advice though. This is one of the big advantages of having plain-text configuration files. Try doing this with the Windows registry&amp;#8230;.&lt;/p&gt;</description>
      <pubDate>Tue, 21 Mar 2006 20:01:30 -0800</pubDate>
      <guid isPermaLink="false">urn:uuid:966bcde7-becd-43fe-b55d-b74b93ff2cef</guid>
      <link>http://blog.segment7.net/articles/2006/03/21/version-control-and-sysadmin#comment-125</link>
    </item>
    <item>
      <title>"Version Control and Sysadmin" by Eric Hodel</title>
      <description>&lt;p&gt;Larry: Right, but its not automatic.  I&amp;#8217;d like something that won&amp;#8217;t involve extra work.&lt;/p&gt;</description>
      <pubDate>Tue, 21 Mar 2006 19:16:59 -0800</pubDate>
      <guid isPermaLink="false">urn:uuid:3983c161-a36a-4642-963d-0eb9d950c8ea</guid>
      <link>http://blog.segment7.net/articles/2006/03/21/version-control-and-sysadmin#comment-124</link>
    </item>
    <item>
      <title>"Version Control and Sysadmin" by Larry Wright</title>
      <description>&lt;p&gt;You can always just &amp;#8216;crontab -l &amp;gt;&amp;gt; jobs.list&amp;#8217; and version that file (at least under linux, it&amp;#8217;s been a while since I&amp;#8217;ve used a BSD).&lt;/p&gt;</description>
      <pubDate>Tue, 21 Mar 2006 19:00:23 -0800</pubDate>
      <guid isPermaLink="false">urn:uuid:d15d22a3-ede6-40a2-a0fc-a0140c3b26f4</guid>
      <link>http://blog.segment7.net/articles/2006/03/21/version-control-and-sysadmin#comment-123</link>
    </item>
    <item>
      <title>"Version Control and Sysadmin" by Eric Hodel</title>
      <description>&lt;p&gt;FreeBSD doesn&amp;#8217;t have a cron.d equivalent.  There is a /etc/crontab, but that gets run as root and there&amp;#8217;s several jobs that I&amp;#8217;d rather have run as a non-root user.&lt;/p&gt;


	&lt;p&gt;Fortunately /var gets backed up by amanda so I don&amp;#8217;t have to worry about a total loss of the crontabs.&lt;/p&gt;</description>
      <pubDate>Tue, 21 Mar 2006 13:48:38 -0800</pubDate>
      <guid isPermaLink="false">urn:uuid:89de056a-d33b-40a2-a865-a3cac21fbeaf</guid>
      <link>http://blog.segment7.net/articles/2006/03/21/version-control-and-sysadmin#comment-122</link>
    </item>
    <item>
      <title>"Version Control and Sysadmin" by Adam Keys</title>
      <description>&lt;p&gt;A few years ago I admin&amp;#8217;d some systems (Redhat Enterprise I think) that had an /etc/cron.d/ directory.  Any file you dropped in there was treated as a crontab.  So I was able to put cronjobs for separate tasks in separate files.  Maybe that would make it easier to version control cronjobs?&lt;/p&gt;</description>
      <pubDate>Tue, 21 Mar 2006 12:40:43 -0800</pubDate>
      <guid isPermaLink="false">urn:uuid:3434326d-1ecb-4786-b7af-695bdca2233b</guid>
      <link>http://blog.segment7.net/articles/2006/03/21/version-control-and-sysadmin#comment-121</link>
    </item>
  </channel>
</rss>
