<!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>Setting up Bcfg2 From Scratch — 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="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><a href="../../index.html">home</a> | </li> <!--<li><a href="../../search.html">search</a> | </li>--> <li><a href="../../help/index.html">help</a> | </li> <li><a href="../../contents.html">documentation </a> »</li> </ul> </div> <div class="document"> <div class="documentwrapper"> <div class="bodywrapper"> <div class="body"> <div class="section" id="setting-up-bcfg2-from-scratch"> <span id="getting-started-macosx-notes"></span><h1>Setting up Bcfg2 From Scratch<a class="headerlink" href="#setting-up-bcfg2-from-scratch" title="Permalink to this headline">¶</a></h1> <p>Ala <a class="reference external" href="http://blog.conpocococo.org/post/6079832974/managing-etc-motd-with-bcfg2-starting-from-an-empty-vm">Managing /etc/motd with Bcfg2 Starting From an Empty VM</a>, I’ll be setting up a fresh OS X 10.6 machine to be managed by Bcfg2.</p> <div class="section" id="get-os-x-10-6-running"> <h2>Get OS X 10.6 Running<a class="headerlink" href="#get-os-x-10-6-running" title="Permalink to this headline">¶</a></h2> <p>Use your favorite provisioning method to get your operating system running and fully patched.</p> <p>For this hands on, I’m running OS X 10.6.8 (Build 10K540) with the supplied python 2.6.1. I’ve also turned on Remote Login (i.e. ssh) so I can use my client to write this document going through the steps; having ssh on is not a requirement for this howto.</p> </div> <div class="section" id="get-bcfg2-server-working"> <h2>Get bcfg2-server Working<a class="headerlink" href="#get-bcfg2-server-working" title="Permalink to this headline">¶</a></h2> <div class="section" id="get-bcfg2-package"> <h3>Get bcfg2 package<a class="headerlink" href="#get-bcfg2-package" title="Permalink to this headline">¶</a></h3> <p>You might be able to get a package already built for you, but it is not hard to build it from the source. You’ll need git (via <a class="reference external" href="https://code.google.com/p/git-osx-installer">git-osx-installer</a> or <a class="reference external" href="https://github.com/mxcl/homebrew|homebrew">homebrew</a>; the former is easier, the later more developer friendly) and Apple’s <a class="reference external" href="http://developer.apple.com/xcode/">XCode</a>.</p> <p>The first step is to clone the bcfg2 repository into a working directory:</p> <p>At this point you will probably want to checkout a release tag (<cite>git tag -l</cite> to see a list of them). This test is using v1.2.0pre4. Once you’ve done that you can build the server.</p> <p>The server package contains both the client and the server. The package is located at <tt class="docutils literal"><span class="pre">./osx/bcfg2-VERSION.pkg</span></tt>. Copy it to the machine you want to set up from scratch and install it.</p> <p>THIS NEEDS TO VERIFIED</p> <p>Some of the differences between bcfg2 on Mac OS X and Debian is that the libraries are stored at <cite>/Library/Frameworks/Python.framework/Versions/Current/share/bcfg2/</cite> <cite>/Library/Python/site-packages/Bcfg2/</cite> instead of <cite>/usr/lib/pymodules/</cite> and <cite>/usr/share/pyshare/Bcfg2. Also, instead of cron and init.d, `/Library/LaunchDaemons/gov.anl.mcs.bcfg2-daily.plist</cite> controls peridic runs and starts and stops. The runtime files are stored in <cite>/usr/local/bin</cite> under Mac OS X instead of /usr/sbin/ for Debian.</p> <p>VERIFY:</p> <div class="highlight-python"><pre>10.6_client :~ user$ sudo /usr/local/bin/bcfg2-admin init Failed to import lxml dependency. Shutting down server.</pre> </div> <p>Try: sudo easy_install lxml. If you don’t have gcc-4.2 installed, you’ll need to install it on a machine that does. Then move <cite>/Library/Python/2.6/sites-packages/lxml-2.3-py2.6-macosx-10.6-universal.egg</cite> to the client and add the line ”./lxml-2.3-py2.6-macosx-10.6-universal.egg” to <cite>/Library/Python/2.6/site-packages/easy-install.pth</cite>.</p> <p>Getting a new error:</p> <div class="highlight-python"><pre>$ sudo /usr/local/bin/bcfg2-admin init Interactively initialize a new repository. bcfg2-admin init $</pre> </div> <p>So what is lxml easy_install fully installing? Need to make a package (Lettuce to the rescue!)</p> </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="#">Setting up Bcfg2 From Scratch</a><ul> <li><a class="reference internal" href="#get-os-x-10-6-running">Get OS X 10.6 Running</a></li> <li><a class="reference internal" href="#get-bcfg2-server-working">Get bcfg2-server Working</a><ul> <li><a class="reference internal" href="#get-bcfg2-package">Get bcfg2 package</a></li> </ul> </li> </ul> </li> </ul> <h3>This Page</h3> <ul class="this-page-menu"> <li><a href="../../_sources/getting_started/macosx/notes.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><a href="../../index.html">home</a> | </li> <!--<li><a href="../../search.html">search</a> | </li>--> <li><a href="../../help/index.html">help</a> | </li> <li><a href="../../contents.html">documentation </a> »</li> </ul> </div> <div class="footer"> © 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>