Changes between Initial Version and Version 1 of Web/QuattorClientUsage


Ignore:
Timestamp:
Mar 20, 2010, 10:17:43 PM (16 years ago)
Author:
loomis
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Web/QuattorClientUsage

    v1 v1  
     1[[TravNav]]
     2
     3This page explains some of the basic Quattor commands needed to configure a client node. Command examples generally assume that you are logged on to the node as root (or have equivalent access using sudo).
     4
     5= Fetching profiles =
     6Quattor configuration information is stored in configuration profiles, which are XML files retrieved from a server (normally over HTTP/S). Profiles are usually fetched at regular intervals from the server. If you want to manually pull down a profile on a node, use the following command:
     7
     8 [root@client-node root]# ccm-fetch
     9
     10
     11If this command returns almost immediately, then the profile is up to date. If it takes a little longer, then a new profile is being fetched. To force the profile to be retrieved from the server, use the -f flag to ccm-fetch.
     12
     13= Configuring a node =
     14Quattor configuration is performed by '''components''' which are named ncm-<component-name>. Examples are ncm-accounts which configures the user accounts on the system. Components are configured like this:
     15
     16 ncm-ncd --co accounts
     17
     18This will also configure any components defined as pre- or post-dependencies. For example, the package manager spma is normally defined as a pre-dependency.
     19
     20== Configuring all components ==
     21To configure all components defined in the profile, use the <tt>-all</tt> flag to ncm-ncd:
     22
     23 ncm-ncd --co -all
     24
     25== Configuring a single component ==
     26To prevent pre- and post-dependencies from being configured:
     27
     28  ncm-ncd --co accounts --nodeps --autodeps no
     29
     30= Query configuration =
     31To find out what the currently-active profile contains, use the ncm-query command. You can either query by component name, or by path in the tree. Here's an example of querying the configuration of a component:
     32
     33 [root@client-node root]# ncm-query --co ccm
     34 
     35 [INFO] Subtree: /software/components/ccm
     36 
     37 +-ccm
     38   $ active : (boolean) 'true'
     39   $ cache_root : (string) '/var/lib/ccm'
     40   $ configFile : (string) '/etc/ccm.conf'
     41   $ debug : (long) '0'
     42   +-dependencies
     43     +-pre
     44       $ 0 : (string) 'spma'
     45   $ dispatch : (boolean) 'true'
     46   $ force : (long) '0'
     47   $ get_timeout : (long) '30'
     48   $ lock_retries : (long) '3'
     49   $ lock_wait : (long) '30'
     50   $ profile : (string) 'http://gridinstall02.testgrid/profiles/mpiws/profile_lcg-rb.xml'
     51   $ retrieve_retries : (long) '3'
     52   $ retrieve_wait : (long) '30'
     53   $ world_readable : (long) '1'
     54
     55And here's an example of querying a specific path:
     56
     57 [root@client-node root]# ncm-query --dump /hardware/harddisks/hda
     58 
     59 [INFO] Subtree: /hardware/harddisks/hda
     60 
     61 +-hda
     62   $ capacity : (long) '40960'
     63   $ interface : (string) 'ide'
     64   $ model : (string) 'Generic IDE disk'
     65
     66= Package management =
     67
     68The native quattor package manager is called spma. spma reads a list
     69of packages from the XML profile, generates a file containing the
     70desired package list for the node, and then calls the native packager
     71(usually rpm) to bring the node state up to date.
     72
     73spma is normally invoked via its controlling component:
     74
     75 [root@client-node root]# ncm-ncd --co spma
     76 
     77 [INFO] NCM-NCD version 1.2.14 started by root at: Tue Feb 5 08:19:37 2008
     78 [INFO] executing configure on components....
     79 [INFO] running component: spma
     80 [OK] updated SPMA target configuration file in /var/lib/spma-target.cf
     81 running the SPMA: /usr/bin/spma --quiet
     82 [OK] /usr/bin/spma --quiet finished succesfully (please check spma.log)
     83 [INFO] configure on component spma executed, 0 errors, 0 warnings
     84
     85This will (re)generate the package list (/var/lib/spma-target.cf) from
     86the profile and run spma. If this procedure fails, you can see why by
     87inspecting spma's log file at /var/log/spma.log. SPMA runs may fail
     88due to dependency problems as it is very difficult to check
     89dependencies at the time the node templates are compiled. (You may
     90want to look at the [https://trac.lal.in2p3.fr/LCGQWG/wiki/Development/Templates/ClientSideDepsCheck checkdeps tool])