wiki:Install

Version 16 (modified by lueningh, 15 years ago) (diff)

--

Installation and Configuration

TracNav

Installation

  1. Install Prerequisites
    • Install the prerequisite libraries. See the Prereqs? page for more information.
  2. Install Bcfg2
    • From packages: The easiest way to install Bcfg2 is from packages for your operating system. You can grab packages (and source packages) for various OSes from the Downloads? page. Install them as you would any other packages. The server package only needs to be installed on your designated Bcfg2 server machine; the clients package needs to be installed on any machine you plan to manage by Bcfg2.
    • From source: The Bcfg2 source tarball can also be grabbed from the Downloads? page. After untarring the file, you can build Bcfg2 with python setup.py install --prefix=/install/prefix This will install both the client and server on that machine.

Configuration

Both the client and server read their configuration information from /etc/bcfg2.conf. If you installed from a package, you should have a default version of this file installed. If not, or if you installed from source, you can find one in the examples/ directory of the Bcfg2 source distribution.

  1. The [server] section
    • Point repository at the location of your Bcfg2 repository (where all of you configuratione elements will live). You can start out with example repository if you need some inspiration.
      • repository = /var/lib/bcfg2
    • Choose the structures you want to make use of. The selection in the example configuration file should work fine until you have a complete repository set up.
      • structures = Bundler,Base
    • Choose the generators you want to use. Again, keeping the defaults is appropriate for a new installation.
      • generators = SSHbase,Cfg,Pkgmgr,Svcmgr
  2. The [statistics] section
    • This section controls how statistics information is sent out. Set sendmailpath to the location of your sendmail binary
      • sendmailpath = /usr/sbin/sendmail
  3. The [communication] section
    • Set the protocol you wish to use. The currently recommended choice is xmlrpc/ssl.
      • protocol = xmlrpc/ssl
    • Select a shared secret password for use between your clients and server
      • password = roboconfig
    • Generate an ssl certificate for client/server communication and set its location
      • openssl req -x509 -nodes -days 1000 -newkey rsa:1024 -out bcfg2cert.pem -keyout bcfg2cert.pem
      • key = /etc/bcfg2cert.pem
  4. The [components] section
    • Set the URL for your Bcfg2 server. This tells clients where to find the server and tells the server what port to listen on.
      • bcfg2 = https://config.example.com:6789

Once your bcfg2.conf file is complete and either the example repository or an empty skeleton repository are in place, you can start up the bcfg2 server:

  • /etc/init.d/bcfg2-server start

Copy the config files out to the clients, and you are installed! Next step: get that repository working for your particular environment.