Sophie

Sophie

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

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>Bcfg2 Snapshots &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="The Bcfg2 Server" href="../index.html" />
    <link rel="next" title="Using bcfg2-info" href="../bcfg2-info.html" />
    <link rel="prev" title="info.xml" href="../info.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="../bcfg2-info.html" title="Using bcfg2-info"
             accesskey="N">next</a> |</li>
        <li class="right" >
          <a href="../info.html" title="info.xml"
             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" accesskey="U">The Bcfg2 Server</a> &raquo;</li> 
      </ul>
    </div>
  

    <div class="document">
      <div class="documentwrapper">
        <div class="bodywrapper">
          <div class="body">
            
  <div class="section" id="bcfg2-snapshots">
<span id="server-snapshots-index"></span><h1>Bcfg2 Snapshots<a class="headerlink" href="#bcfg2-snapshots" title="Permalink to this headline">¶</a></h1>
<p class="versionadded">
<span class="versionmodified">New in version 1.0.0.</span></p>
<p>This page describes the Snapshots plugin. This plugin is meant to replace
the older <a class="reference internal" href="../../reports/dynamic.html#reports-dynamic"><em>Bcfg2 Web Reporting System</em></a>. It stores various aspects of a client&#8217;s
state when the client checks into the server.</p>
<div class="section" id="before-you-begin">
<h2>Before you begin<a class="headerlink" href="#before-you-begin" title="Permalink to this headline">¶</a></h2>
<p>Make sure you have version 0.5 or greater of sqlalchemy.</p>
<div class="section" id="on-centos-rhel-5">
<h3>On CentOS/RHEL 5<a class="headerlink" href="#on-centos-rhel-5" title="Permalink to this headline">¶</a></h3>
<ul>
<li><p class="first">Download a tarball of SQLAlchemy.</p>
</li>
<li><p class="first">Extract and build the RPM:</p>
<div class="highlight-python"><pre>tar xzf SQLAlchemy-0.5.6.tar.gz
cd SQLAlchemy-0.5.6
python setup.py bdist_rpm</pre>
</div>
</li>
<li><p class="first">Copy the RPM in <tt class="docutils literal"><span class="pre">SQLAlchemy-0.5.6/dist/</span></tt> to your Yum repository,
and rebuild the repository using <tt class="docutils literal"><span class="pre">createrepo</span></tt>.</p>
</li>
<li><p class="first">Clear the Yum cache:</p>
<div class="highlight-python"><pre>sudo yum clean all</pre>
</div>
</li>
<li><p class="first">Install SQLAlchemy:</p>
<div class="highlight-python"><pre>sudo yum install SQLAlchemy</pre>
</div>
</li>
<li><p class="first">Manage the package in Bcfg2 as you would any other package.</p>
</li>
</ul>
</div>
</div>
<div class="section" id="configuration">
<h2>Configuration<a class="headerlink" href="#configuration" title="Permalink to this headline">¶</a></h2>
<ul>
<li><p class="first">A database location needs to be added to <tt class="docutils literal"><span class="pre">bcfg2.conf</span></tt>. Three drivers
are currently supported; mysql, postgres, and sqlite. When using the
sqlite driver, only the driver and database lines are required.</p>
<ul>
<li><p class="first">For MySQL:</p>
<div class="highlight-python"><div class="highlight"><pre><span class="p">[</span><span class="n">snapshots</span><span class="p">]</span>
<span class="n">driver</span> <span class="o">=</span> <span class="n">mysql</span>
<span class="n">database</span> <span class="o">=</span> <span class="n">snapshots</span>
<span class="n">user</span> <span class="o">=</span> <span class="n">snapshots</span>
<span class="n">password</span> <span class="o">=</span> <span class="n">snapshots</span>
<span class="n">host</span> <span class="o">=</span> <span class="n">dbserver</span>
</pre></div>
</div>
</li>
<li><p class="first">For SQLite:</p>
<div class="highlight-python"><pre>[snapshots]
driver = sqlite
database = /var/lib/bcfg2/var/snapshots.sqlite</pre>
</div>
</li>
</ul>
</li>
<li><p class="first">The database needs to be initialized.:</p>
<div class="highlight-python"><pre>$ bcfg2-admin snapshots init
2009-03-22 21:40:24,683 INFO sqlalchemy.engine.base.Engine.0x...3e2c PRAGMA table_info("connkeyval")
PRAGMA table_info("connkeyval")
2009-03-22 21:40:24,684 INFO sqlalchemy.engine.base.Engine.0x...3e2c ()
()
2009-03-22 21:40:24,686 INFO sqlalchemy.engine.base.Engine.0x...3e2c PRAGMA table_info("package")
PRAGMA table_info("package")
2009-03-22 21:40:24,687 INFO sqlalchemy.engine.base.Engine.0x...3e2c ()
()
.....
COMMIT</pre>
</div>
</li>
<li><p class="first">The Snapshots plugin needs to be enabled for the bcfg2-server (by adding
Snapshots to the plugins line in <tt class="docutils literal"><span class="pre">/etc/bcfg2.conf</span></tt>). Once done,
this will cause the the server to store statistics information when
clients run.</p>
</li>
</ul>
</div>
<div class="section" id="using-the-reports-interface">
<h2>Using the reports interface<a class="headerlink" href="#using-the-reports-interface" title="Permalink to this headline">¶</a></h2>
<p>All hosts:</p>
<div class="highlight-python"><pre>$ bcfg2-admin snapshots reports -a

============= ========= ========================================== ============================
Client        Correct   Revision                                   Time
============= ========= ========================================== ============================
bcfg2client   True      f46ac7773712bd3c3cfb765ae5d2a3b2a37ac9b7   2009-04-23 11:27:54.378941
============= ========= ========================================== ============================</pre>
</div>
<p>List bad entries for a single host:</p>
<div class="highlight-python"><pre>$ bcfg2-admin snapshots reports -b bcfg2client
Bad entries:
 Package:nscd
 Package:cupsys
 File:/etc/ldap.conf</pre>
</div>
<p>List extra entries for a single host:</p>
<div class="highlight-python"><pre>$ bcfg2-admin snapshots reports -e bcfg2client
Extra entries:
 Package:python-pyxattr
 Package:librsync1
 Package:python-pylibacl
 Package:gcc-4.2-multilib
 Package:nxlibs
 Package:freenx-session-launcher
 Package:dx-doc
 Package:dirdiff
 Package:libhdf4g
 Package:nxclient
 Package:freenx-rdp
 Package:freenx-vnc
 Package:libxml2-dev
 Package:mysql-client
 Package:mysql-client-5.0
 Package:libxcompext3
 Package:lib32gomp1
 Package:dx
 Package:freenx-media
 Package:dxsamples
 Package:gcc-multilib
 Package:rdiff-backup
 Package:libdbd-mysql-perl
 Package:libxcomp3
 Package:freenx-server
 Package:smbfs
 Package:planner
 Package:nxagent
 Package:libc6-dev-i386
 Package:libfltk1.1-dev
 Package:freenx
 Package:libdx4
 Package:libxcompshad3
 Service:freenx-server</pre>
</div>
<p>Detailed view of hosts for a particular date:</p>
<div class="highlight-python"><pre>$ bcfg2-admin snapshots reports --date 2009 5 30
============= ========= ========================================== ============================
Client        Correct   Revision                                   Time
============= ========= ========================================== ============================
bcfg2client   False     10c1a12c62c57c0861cc453b8d2640c4839a7357   2009-05-29 10:52:34.701056</pre>
</div>
</div>
<div class="section" id="todo-wishlist">
<h2>TODO/Wishlist<a class="headerlink" href="#todo-wishlist" title="Permalink to this headline">¶</a></h2>
<ul class="simple">
<li>Identify per-client changes in correctness over time</li>
<li>Detailed view for a particular date</li>
<li>Track entry changes over time (glibc updated on these dates to these versions)</li>
</ul>
</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="#">Bcfg2 Snapshots</a><ul>
<li><a class="reference internal" href="#before-you-begin">Before you begin</a><ul>
<li><a class="reference internal" href="#on-centos-rhel-5">On CentOS/RHEL 5</a></li>
</ul>
</li>
<li><a class="reference internal" href="#configuration">Configuration</a></li>
<li><a class="reference internal" href="#using-the-reports-interface">Using the reports interface</a></li>
<li><a class="reference internal" href="#todo-wishlist">TODO/Wishlist</a></li>
</ul>
</li>
</ul>

  <h4>Previous topic</h4>
  <p class="topless"><a href="../info.html"
                        title="previous chapter">info.xml</a></p>
  <h4>Next topic</h4>
  <p class="topless"><a href="../bcfg2-info.html"
                        title="next chapter">Using bcfg2-info</a></p>
  <h3>This Page</h3>
  <ul class="this-page-menu">
    <li><a href="../../_sources/server/snapshots/index.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="../bcfg2-info.html" title="Using bcfg2-info"
             >next</a> |</li>
        <li class="right" >
          <a href="../info.html" title="info.xml"
             >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" >The Bcfg2 Server</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>