Sophie

Sophie

distrib > Fedora > 17 > i386 > media > updates > by-pkgid > b50d8ee6d7871fcc13c0677a9364ed59 > files > 327

bcfg2-doc-1.3.0-1.fc17.noarch.rpm



<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">


<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    
    <title>Version control systems &mdash; Bcfg2 1.3.0 documentation</title>
    
    <link rel="stylesheet" href="../../_static/default.css" type="text/css" />
    <link rel="stylesheet" href="../../_static/pygments.css" type="text/css" />
    
    <script type="text/javascript">
      var DOCUMENTATION_OPTIONS = {
        URL_ROOT:    '../../',
        VERSION:     '1.3.0',
        COLLAPSE_INDEX: false,
        FILE_SUFFIX: '.html',
        HAS_SOURCE:  true
      };
    </script>
    <script type="text/javascript" src="../../_static/jquery.js"></script>
    <script type="text/javascript" src="../../_static/underscore.js"></script>
    <script type="text/javascript" src="../../_static/doctools.js"></script>
    <script type="text/javascript" src="../../_static/sidebar.js"></script>
    <link rel="shortcut icon" href="../../_static/favicon.ico"/>
    <link rel="top" title="Bcfg2 1.3.0 documentation" href="../../index.html" />
    <link rel="up" title="Guides" href="../guides.html" />
    <link rel="next" title="Web Reporting Quickstart" href="web-reports-install.html" />
    <link rel="prev" title="Using Bcfg2 With CentOS" href="using-bcfg2-with-centos.html" />
 
<link rel="stylesheet" href="../../_static/bcfg2.css" type=""/>

  </head>
  <body>

<div style="text-align: left; padding: 10px 10px 15px 15px">
<a href="../../index.html"><img src="../../_static/bcfg2_logo.png" border="0" alt="sampledoc"/></a>
</div>

    <div class="related">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="../../genindex.html" title="General Index"
             accesskey="I">index</a></li>
        <li class="right" >
          <a href="../../py-modindex.html" title="Python Module Index"
             >modules</a> |</li>
        <li class="right" >
          <a href="web-reports-install.html" title="Web Reporting Quickstart"
             accesskey="N">next</a> |</li>
        <li class="right" >
          <a href="using-bcfg2-with-centos.html" title="Using Bcfg2 With CentOS"
             accesskey="P">previous</a> |</li>
	<li><a href="../../index.html">home</a> |&nbsp;</li>
	<!--<li><a href="../../search.html">search</a> |&nbsp;</li>-->
	<li><a href="../../help/index.html">help</a> |&nbsp;</li>
	<li><a href="../../contents.html">documentation </a> &raquo;</li>

          <li><a href="../../contents.html" >Bcfg2 documentation 1.3.0</a> &raquo;</li>
          <li><a href="../index.html" >Appendix</a> &raquo;</li>
          <li><a href="../guides.html" accesskey="U">Guides</a> &raquo;</li> 
      </ul>
    </div>
  

    <div class="document">
      <div class="documentwrapper">
        <div class="bodywrapper">
          <div class="body">
            
  <div class="section" id="version-control-systems">
<span id="appendix-guides-vcs"></span><h1>Version control systems<a class="headerlink" href="#version-control-systems" title="Permalink to this headline">¶</a></h1>
<p>The sections in this guide only cover the basics steps in the setup of
the different version control systems for usage with the Bcfg2.</p>
<div class="section" id="git">
<h2>Git<a class="headerlink" href="#git" title="Permalink to this headline">¶</a></h2>
<p>Adding the <a class="reference internal" href="../../server/plugins/version/git.html#server-plugins-version-git"><em>Git</em></a> plugin will allow you to
store version information in the statistics database. For tracking the
configuration files in the <tt class="docutils literal"><span class="pre">/var/lib/bcfg2</span></tt> directory a git repository
needs to be established:</p>
<div class="highlight-python"><pre>git init</pre>
</div>
<p>For more detail about the setup of git please refer to a <a class="reference external" href="http://www.kernel.org/pub/software/scm/git/docs/gittutorial.html">git tutorial</a>.
The first commit can be the empty or the already populated directory:</p>
<div class="highlight-python"><pre>git add . &amp;&amp; git commit -a</pre>
</div>
<p>While running <tt class="docutils literal"><span class="pre">bcfg2-info</span></tt> the following line will show up:</p>
<div class="highlight-python"><pre>Initialized git plugin with git directory = /var/lib/bcfg2/.git</pre>
</div>
</div>
<div class="section" id="mercurial">
<h2>Mercurial<a class="headerlink" href="#mercurial" title="Permalink to this headline">¶</a></h2>
<p>The <a class="reference internal" href="../../server/plugins/version/hg.html#server-plugins-version-hg"><em>Mercurial (Hg)</em></a> plugin also allows you to store
version information in the statistics database.</p>
<p>To use mercurial to track your configuration files, the repository must
be initialized:</p>
<div class="highlight-python"><pre>hg init</pre>
</div>
<p>Mercurial will not commit the files to the repository until a user name
is defined in <tt class="docutils literal"><span class="pre">/var/lib/bcfg2/.hg/</span></tt></p>
<div class="highlight-sh"><div class="highlight"><pre>cat <span class="s">&lt;&lt;END_ENTRY &gt;&gt; /var/lib/bcfg2/.hg/hgrc</span>
<span class="s">[ui]</span>
<span class="s">username = Yor name &lt;you@example.com&gt;</span>
<span class="s">END_ENTRY</span>
</pre></div>
</div>
<p>Now you are able to make submissions to the repository:</p>
<div class="highlight-python"><pre>hg commit</pre>
</div>
<p>While running <tt class="docutils literal"><span class="pre">bcfg2-info</span></tt> the following line will show up:</p>
<div class="highlight-python"><pre>Initialized hg plugin with hg directory = /var/lib/bcfg2/.hg</pre>
</div>
</div>
<div class="section" id="darcs">
<h2>Darcs<a class="headerlink" href="#darcs" title="Permalink to this headline">¶</a></h2>
<p>The <a class="reference internal" href="../../server/plugins/version/darcs.html#server-plugins-version-darcs"><em>Darcs</em></a> plugin also allows you to store
version information in the statistics database.</p>
<p>To use darcs to track your configuration files, the repository must
be initialized:</p>
<div class="highlight-python"><pre>darcs initialize</pre>
</div>
<p>To commit to the darcs repository an author must be added to the
<tt class="docutils literal"><span class="pre">_darcs/prefs/author</span></tt> file.  If the <tt class="docutils literal"><span class="pre">author</span></tt> file is missing,
darcs will ask you to enter your e-mail address.</p>
<div class="highlight-sh"><div class="highlight"><pre>cat <span class="s">&lt;&lt;END_ENTRY &gt;&gt; /var/lib/bcfg2/_darcs/prefs/author</span>
<span class="s">you@example.com</span>
<span class="s">END_ENTRY</span>
</pre></div>
</div>
<p>All files in the <tt class="docutils literal"><span class="pre">/var/lib/bcfg2</span></tt> directory should be added to darcs
now:</p>
<div class="highlight-python"><pre>darcs add *</pre>
</div>
<p>After that you can submit them to the repository:</p>
<div class="highlight-python"><pre>darcs record</pre>
</div>
<p>While running <tt class="docutils literal"><span class="pre">bcfg2-info</span></tt> the following line will show up:</p>
<div class="highlight-python"><pre>Initialized Darcs plugin with darcs directory = /var/lib/bcfg2/_darcs</pre>
</div>
</div>
<div class="section" id="cvs">
<h2>Cvs<a class="headerlink" href="#cvs" title="Permalink to this headline">¶</a></h2>
<p>The <a class="reference internal" href="../../server/plugins/version/cvs.html#server-plugins-version-cvs"><em>CVS</em></a> plugin also allows you to store
version information in the statistics database.</p>
<blockquote>
<div>plugins = Base,Bundler,Cfg,...,Cvs</div></blockquote>
<p>The CVS repository must be initialized:</p>
<div class="highlight-python"><pre>cvs -d /var/lib/bcfg2 init</pre>
</div>
</div>
</div>


          </div>
        </div>
      </div>
      <div class="sphinxsidebar">
        <div class="sphinxsidebarwrapper">
  <h3><a href="../../index.html">Table Of Contents</a></h3>
  <ul>
<li><a class="reference internal" href="#">Version control systems</a><ul>
<li><a class="reference internal" href="#git">Git</a></li>
<li><a class="reference internal" href="#mercurial">Mercurial</a></li>
<li><a class="reference internal" href="#darcs">Darcs</a></li>
<li><a class="reference internal" href="#cvs">Cvs</a></li>
</ul>
</li>
</ul>

  <h4>Previous topic</h4>
  <p class="topless"><a href="using-bcfg2-with-centos.html"
                        title="previous chapter">Using Bcfg2 With CentOS</a></p>
  <h4>Next topic</h4>
  <p class="topless"><a href="web-reports-install.html"
                        title="next chapter">Web Reporting Quickstart</a></p>
  <h3>This Page</h3>
  <ul class="this-page-menu">
    <li><a href="../../_sources/appendix/guides/vcs.txt"
           rel="nofollow">Show Source</a></li>
  </ul>
<div id="searchbox" style="display: none">
  <h3>Quick search</h3>
    <form class="search" action="../../search.html" method="get">
      <input type="text" name="q" />
      <input type="submit" value="Go" />
      <input type="hidden" name="check_keywords" value="yes" />
      <input type="hidden" name="area" value="default" />
    </form>
    <p class="searchtip" style="font-size: 90%">
    Enter search terms or a module, class or function name.
    </p>
</div>
<script type="text/javascript">$('#searchbox').show(0);</script>
        </div>
      </div>
      <div class="clearer"></div>
    </div>
    <div class="related">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="../../genindex.html" title="General Index"
             >index</a></li>
        <li class="right" >
          <a href="../../py-modindex.html" title="Python Module Index"
             >modules</a> |</li>
        <li class="right" >
          <a href="web-reports-install.html" title="Web Reporting Quickstart"
             >next</a> |</li>
        <li class="right" >
          <a href="using-bcfg2-with-centos.html" title="Using Bcfg2 With CentOS"
             >previous</a> |</li>
	<li><a href="../../index.html">home</a> |&nbsp;</li>
	<!--<li><a href="../../search.html">search</a> |&nbsp;</li>-->
	<li><a href="../../help/index.html">help</a> |&nbsp;</li>
	<li><a href="../../contents.html">documentation </a> &raquo;</li>

          <li><a href="../../contents.html" >Bcfg2 documentation 1.3.0</a> &raquo;</li>
          <li><a href="../index.html" >Appendix</a> &raquo;</li>
          <li><a href="../guides.html" >Guides</a> &raquo;</li> 
      </ul>
    </div>
    <div class="footer">
        &copy; Copyright 2009-2013, Narayan Desai.
      Last updated on Mar 20, 2013.
      Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.1.3.
    </div>
  </body>
</html>