.. -*- mode: rst -*-

.. _server-admin-init:

init
====

Interactively initialize a new repository.  Most values are automatically
detected or a default value is provided. ::

    bcfg2-admin init
    Store bcfg2 configuration in [/etc/bcfg2.conf]:
    Location of bcfg2 repository [/var/lib/bcfg2]:
    Input password used for communication verification (without echoing; leave blank for a random):
    What is the server's hostname [conf01.example.com]:
    Input the server location [https://conf01.example.com:6789]:
    Input base Operating System for clients:
    1: Red Hat/Fedora/RHEL/RHAS/Centos
    2: SUSE/SLES
    3: Mandrake
    4: Debian
    5: Ubuntu
    6: Gentoo
    7: FreeBSD
    : 1

    Generating a 2048 bit RSA private key
    .....................+++
    .....................+++
    writing new private key to '/etc/bcfg2.key'
    -----
    Signature ok
    subject=/C=US/ST=Illinois/L=Argonne/CN=conf01.example.com
    Getting Private key

A toplevel repository structure was created under the provided path. ::

    /var/lib/bcfg2
    |-- Base
    |-- Bundler
    |-- Cfg
    |-- etc
    |-- Metadata
    |-- Pkgmgr
    |-- Rules
    `-- SSHbase

