From 533ccb512e5902e653ae1fccca7af3edec3d7a84 Mon Sep 17 00:00:00 2001 From: Sol Jerome Date: Tue, 27 Apr 2010 02:33:17 +0000 Subject: doc: Add quickstart updates from Fabian Affolter Signed-off-by: Sol Jerome git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@5840 ce84e21b-d406-0410-9b95-82705330c041 --- doc/quickstart/centos.txt | 147 ++++++++++++---------------------------------- doc/quickstart/index.txt | 11 ++-- doc/quickstart/ubuntu.txt | 118 +++++++------------------------------ 3 files changed, 64 insertions(+), 212 deletions(-) (limited to 'doc/quickstart') diff --git a/doc/quickstart/centos.txt b/doc/quickstart/centos.txt index 6d9846332..5dca23f9f 100644 --- a/doc/quickstart/centos.txt +++ b/doc/quickstart/centos.txt @@ -1,39 +1,47 @@ .. -*- mode: rst -*- -.. _quickstart-centos: .. _EPEL: http://fedoraproject.org/wiki/EPEL +.. _quickstart-centos: + ===================== Quickstart for CentOS ===================== -This is a complete getting started guide for CentOS. With this document you should be able to install a Bcfg2 server, a Bcfg2 client, and change the ``/etc/motd`` file on the client. +This is a complete getting started guide for CentOS. With this document +you should be able to install a Bcfg2 server and a Bcfg2 client. -Install Bcfg2 From RPM -====================== +Install Bcfg2 +============= -The fastest way to get Bcfg2 onto your system is to get a RPM someone else has already made. We'll be using the ones that are distributed through EPEL_, but depending on your aversion to risk you could download an RPM from other places as well. See :ref:`using_bcfg2-with-centos` for information about building Bcfg2 from source and making your own packages. +The fastest way to get Bcfg2 onto your system is to use Yum or +your preferred package management tool. We'll be using the ones +that are distributed through EPEL_, but depending on your aversion +to risk you could download an RPM from other places as well. See +:ref:`getting_started-using_bcfg2-with-centos` for information about +building Bcfg2 from source and making your own packages. Using EPEL ---------- - * Make sure EPEL is a valid repository on your server. The `instructions `_ on how to do this basically say:: +Make sure EPEL_ is a valid repository on your server. The `instructions +`_ on how to do this +basically say:: - # su -c 'rpm -Uvh http://download.fedora.redhat.com/pub/epel/5/i386/epel-release-5-3.noarch.rpm' - ...lot's of output... + [root@centos ~]# rpm -Uvh http://download.fedora.redhat.com/pub/epel/5/i386/epel-release-5-3.noarch.rpm +Install the bcfg2-server and bcfg2 RPMs:: - * Install the bcfg2-server and bcfg2 RPMs :: + [root@centos ~]# yum install bcfg2-server bcfg2 - $ sudo yum install bcfg2-server bcfg2 - -Your system should now have the necessary software to use Bcfg2. The next step is to set up your Bcfg2 :term:`repository`. +Your system should now have the necessary software to use Bcfg2. The +next step is to set up your Bcfg2 :term:`repository`. Initialize your repository ========================== -Now that you're done with the install, you need to initialize your -repository and setup your ``/etc/bcfg2.conf``. ``bcfg2-admin init`` +Now that you're done with the install, you need to initialize your +repository and setup your ``/etc/bcfg2.conf``. ``bcfg2-admin init`` is a tool which allows you to automate this:: [root@centos ~]# bcfg2-admin init @@ -68,12 +76,12 @@ Start the server You are now ready to start your bcfg2 server for the first time:: - $ sudo /sbin/service bcfg2-server start + [root@centos ~]# /sbin/service bcfg2-server start To verify that everything started ok, look for the running daemon and check the logs:: - $ sudo /sbin/service bcfg2-server status - $ sudo tail /var/log/messages + [root@centos ~]# /etc/init.d/service bcfg2-server status + [root@centos ~]# tail /var/log/messages Mar 29 12:42:26 centos bcfg2-server[5093]: service available at https://centos:6789 Mar 29 12:42:26 centos bcfg2-server[5093]: serving bcfg2-server at https://centos:6789 Mar 29 12:42:26 centos bcfg2-server[5093]: serve_forever() [start] @@ -150,14 +158,14 @@ Now if you run the client, no more warning:: Unmanaged entries: 208 Bring your first machine under Bcfg2 control --------------------------------------------- +============================================ Now it is time to get your first machine's configuration into your -Bcfg2 repository. Let's start with the server itself. +Bcfg2 :term:`repository`. Let's start with the server itself. Setup the `Packages`_ plugin -++++++++++++++++++++++++++++ +---------------------------- .. _Packages: http://trac.mcs.anl.gov/projects/bcfg2/wiki/Plugins/Packages @@ -237,13 +245,13 @@ Probes to your plugins line in ``bcfg2.conf`` and create the Probe.:: Now we restart the bcfg2-server:: - /etc/init.d/bcfg2-server restart + [root@centos ~]# /etc/init.d/bcfg2-server restart If you tail ``/var/log/syslog`` now, you will see the Packages plugin in action, updating the cache. Start managing packages -+++++++++++++++++++++++ +----------------------- Add a base-packages bundle. Let's see what happens when we just populate it with the *yum* package. @@ -472,10 +480,10 @@ Then add the files to Cfg:: Now, running the client shows only unmanaged Service entries. Woohoo! Manage services -+++++++++++++++ +--------------- Now let's clear up the unmanaged service entries by adding the following -entries to our bundle... +entries to our bundle. .. code-block:: xml @@ -546,90 +554,7 @@ Now we run the client and see there are no more unmanaged entries! :: Total managed entries: 205 Unmanaged entries: 0 -Dynamic (web) Reports ---------------------- - -Download the `Django`_ rpm and install it. I was able to find an RPM at -ftp://ftp.pbone.net/mirror/download.fedora.redhat.com/pub/fedora/epel/5/x86_64/Django-1.1.1-2.el5.noarch.rpm. You will also need to ``yum install httpd``. - -.. _Django: http://www.djangoproject.com/ - -.. note:: I also had to grab the following RPMs - - * ftp://ftp.pbone.net/mirror/ftp.freshrpms.net/pub/freshrpms/pub/dag/redhat/el5/en/x86_64/dag/RPMS/python-simplejson-2.0.5-1.el5.rf.x86_64.rpm - * ftp://ftp.pbone.net/mirror/atrpms.net/el5-x86_64/atrpms/stable/python-sqlite2-2.3.3-3_0.1.el5.x86_64.rpm - -* Now we need to create the sqlite database:: - - [root@centos ~]# python /usr/lib/python2.4/site-packages/Bcfg2/Server/Reports/manage.py syncdb - Creating table auth_permission - Creating table auth_group - Creating table auth_user - Creating table auth_message - Creating table django_content_type - Creating table django_session - Creating table django_site - Creating table django_admin_log - Creating table reports_client - Creating table reports_ping - Creating table reports_interaction - Creating table reports_reason - Creating table reports_entries - Creating table reports_entries_interactions - Creating table reports_performance - Creating table reports_internaldatabaseversion - - You just installed Django's auth system, which means you don't have any superusers defined. - Would you like to create one now? (yes/no): no - Installing index for auth.Permission model - Installing index for auth.Message model - Installing index for admin.LogEntry model - Installing index for reports.Client model - Installing index for reports.Ping model - Installing index for reports.Interaction model - Installing index for reports.Entries model - Installing index for reports.Entries_interactions model - -* Add DBStats to the plugins line of bcfg2.conf. The resulting - **[server]** section should look something like this:: - - [server] - repository = /var/lib/bcfg2 - plugins = Base,Bundler,Cfg,DBStats,Metadata,Packages,Probes,Rules,SSHbase - -* Start/restart the bcfg2 server -* Run the bcfg2 client in order to populate the statistics database - (this run should take a bit longer since you are uploading the client - statistics to the database). -* Download the static reports content:: - - root@lucid:~# cd /var/www/ - root@lucid:/var/www# svn co https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2/reports - -* Configure Apache using :ref:`dynamic-http-install` as a guide -* Copy server/statistics sections of bcfg2.conf to - ``/etc/bcfg2-web.conf`` (make sure it is world-readable). You should - then have something like this:: - - [server] - repository = /var/lib/bcfg2 - plugins = Base,Bundler,Cfg,DBStats,Metadata,Packages,Probes,Rules,SSHbase - - [statistics] - sendmailpath = /usr/lib/sendmail - database_engine = sqlite3 - # 'postgresql', 'mysql', 'mysql_old', 'sqlite3' or 'ado_mssql'. - database_name = - # Or path to database file if using sqlite3. - #/etc/brpt.sqlite is default path if left empty - database_user = - # Not used with sqlite3. - database_password = - # Not used with sqlite3. - database_host = - # Not used with sqlite3. - database_port = - # Set to empty string for default. Not used with sqlite3. - web_debug = True - -* Restart apache and point a browser to your bcfg2 server +Dynamic (web) reports +===================== + +See installation instructions at :ref:`server-reports-install` diff --git a/doc/quickstart/index.txt b/doc/quickstart/index.txt index 29ea8f27b..a544d0786 100644 --- a/doc/quickstart/index.txt +++ b/doc/quickstart/index.txt @@ -65,8 +65,9 @@ acting like it is your first client. you are done. Don't run this command on a production system if you don't know what it does and aren't prepared for the consequences. We don't know of anybody having problems with it - before, but it is better to be safe than sorry. And now for the - command:: + before, but it is better to be safe than sorry. + +And now for the command:: bcfg2 -q -v -n @@ -241,9 +242,9 @@ Several other utilities can help from this point on: core (minus the networking code) for examination. From this, you can directly query: - * Client Metadata - * Which entries are provided by particular plugins - * Client Configurations +* Client Metadata +* Which entries are provided by particular plugins +* Client Configurations Run ``bcfg2-info``, and type help and the prompt when it comes up. diff --git a/doc/quickstart/ubuntu.txt b/doc/quickstart/ubuntu.txt index a45d6744d..db9719739 100644 --- a/doc/quickstart/ubuntu.txt +++ b/doc/quickstart/ubuntu.txt @@ -2,16 +2,19 @@ .. _quickstart-ubuntu: +===================== Quickstart for Ubuntu -=================================================== +===================== .. note:: - This particular how to was done on lucid, but should apply to any other `recent`_ version of Ubuntu. -.. _recent: http://www.ubuntu.com/products/ubuntu/release-cycle + This particular how to was done on lucid, but should apply to any + other `recent-ubuntu-release`_ version of Ubuntu. + +.. _recent-ubuntu-release: http://www.ubuntu.com/products/ubuntu/release-cycle Install Bcfg2 -------------- +============= We first need to install the server. For this example, we will use the bcfg2 server package from the bcfg2 `PPA`_ (note that there is also a @@ -20,12 +23,12 @@ version available in the ubuntu archives, but it is not as up to date). .. _PPA: https://launchpad.net/~bcfg2/+archive/ppa Add the Ubuntu PPA listing to your APT sources -++++++++++++++++++++++++++++++++++++++++++++++ +---------------------------------------------- See http://trac.mcs.anl.gov/projects/bcfg2/wiki/PrecompiledPackages#UbuntuLucid Install bcfg2-server -++++++++++++++++++++ +-------------------- :: aptitude install bcfg2-server @@ -35,18 +38,18 @@ Remove the default configuration preseeded by the ubuntu package:: root@lucid:~# rm -rf /etc/bcfg2* /var/lib/bcfg2 Initialize your repository --------------------------- +========================== Now that you're done with the install, you need to intialize your repository and setup your bcfg2.conf. bcfg2-admin init is a tool which allows you to automate this process.:: root@lucid:~# bcfg2-admin init - Store bcfg2 configuration in [/etc/bcfg2.conf]: - Location of bcfg2 repository [/var/lib/bcfg2]: + 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: [lucid] - Input the server location [https://lucid:6789]: + Input the server location [https://lucid:6789]: Input base Operating System for clients: 1: Redhat/Fedora/RHEL/RHAS/Centos 2: SUSE/SLES @@ -70,7 +73,7 @@ allows you to automate this process.:: Of course, change responses as necessary. Start the server ----------------- +================ You are now ready to start your bcfg2 server for the first time.:: @@ -100,13 +103,13 @@ Run bcfg2 to be sure you are able to communicate with the server:: Unmanaged entries: 382 Bring your first machine under Bcfg2 control --------------------------------------------- +============================================ Now it is time to get your first machine's configuration into your Bcfg2 repository. Let's start with the server itself. Setup the `Packages`_ plugin -++++++++++++++++++++++++++++ +---------------------------- .. _Packages: http://trac.mcs.anl.gov/projects/bcfg2/wiki/Plugins/Packages @@ -238,7 +241,7 @@ Now we restart the bcfg2-server:: Dec 17 22:37:28 lucid bcfg2-server[17937]: Processed 17 fam events in 0.502 seconds. 0 coalesced Start managing packages -+++++++++++++++++++++++ +----------------------- Add a base-packages bundle. Let's see what happens when we just populate it with the ubuntu-standard package. @@ -405,7 +408,7 @@ As you can see below, I no longer have any unmanaged packages. :: Service:bcfg2-server Service:grub-common Service:ondemand Service:rsync Service:ssh Manage services -+++++++++++++++ +--------------- Now let's clear up the unmanaged service entries by adding the following entries to our bundle... @@ -469,84 +472,7 @@ Now we run the client and see there are no more unmanaged entries! :: All entries correct. -Dynamic (web) Reports ---------------------- - -First, run ``aptitude install python-django apache2 -libapache2-mod-python``. - -* Now we need to create the sqlite database:: - - root@lucid:~# python /usr/share/pyshared/Bcfg2/Server/Reports/manage.py syncdb - Creating table auth_permission - Creating table auth_group - Creating table auth_user - Creating table auth_message - Creating table django_content_type - Creating table django_session - Creating table django_site - Creating table django_admin_log - Creating table reports_client - Creating table reports_ping - Creating table reports_interaction - Creating table reports_reason - Creating table reports_entries - Creating table reports_entries_interactions - Creating table reports_performance - Creating table reports_internaldatabaseversion - - You just installed Django's auth system, which means you don't have any superusers defined. - Would you like to create one now? (yes/no): no - Installing index for auth.Permission model - Installing index for auth.Message model - Installing index for admin.LogEntry model - Installing index for reports.Client model - Installing index for reports.Ping model - Installing index for reports.Interaction model - Installing index for reports.Entries model - Installing index for reports.Entries_interactions model - -* Add DBStats to the plugins line of bcfg2.conf. The resulting [server] - section should look something like this:: - - [server] - repository = /var/lib/bcfg2 - plugins = Base,Bundler,Cfg,DBStats,Metadata,Packages,Probes,Rules,SSHbase - -* Start/restart the bcfg2 server -* Run the bcfg2 client in order to populate the statistics database - (this run should take a bit longer since you are uploading the client - statistics to the database). -* Download the static reports content:: - - root@lucid:~# cd /var/www/ - root@lucid:/var/www# svn co https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2/reports - -* Configure Apache using -* :ref:`dynamic-http-install` as a guide -* Copy server/statistics sections of bcfg2.conf to - ``/etc/bcfg2-web.conf`` (make sure it is world-readable). You should - then have something like this:: - - [server] - repository = /var/lib/bcfg2 - plugins = Base,Bundler,Cfg,DBStats,Metadata,Packages,Probes,Rules,SSHbase - - [statistics] - sendmailpath = /usr/lib/sendmail - database_engine = sqlite3 - # 'postgresql', 'mysql', 'mysql_old', 'sqlite3' or 'ado_mssql'. - database_name = - # Or path to database file if using sqlite3. - #/etc/brpt.sqlite is default path if left empty - database_user = - # Not used with sqlite3. - database_password = - # Not used with sqlite3. - database_host = - # Not used with sqlite3. - database_port = - # Set to empty string for default. Not used with sqlite3. - web_debug = True - -* Restart apache and point a browser to your bcfg2 server +Dynamic (web) reports +===================== + +See installation instructions at :ref:`server-reports-install` -- cgit v1.2.3-1-g7c22