Changes between Version 7 and Version 8 of dasscm


Ignore:
Timestamp:
May 10, 2010, 2:37:16 PM (14 years ago)
Author:
joergs
Comment:

translated

Legend:

Unmodified
Added
Removed
Modified
  • dasscm

    v7 v8  
     1
     2[[PageOutline]]
     3
    14= dasscm =
    25
    36'''dass''' '''c'''onfiguration '''m'''anagment (dasscm) is a simple solution for managing system configuration file with Subversion. It is favored because of its easy setup and low footsprint. It can be easily integrated into Nagios monitoring.
     7
     8[[TitleIndex(dasscm)]]
    49
    510== Naming ==
     
    8489All configuration changes have to be done in the file {{{/etc/dasscm.conf}}}
    8590
    86 {{{
    87 #
    88 # dasscm configuration
    89 #
    90 
    91 #
    92 # TODO:
    93 # - set unique DASSCM_REPOSITORY_NAME.
    94 #   Normally use the full qualified hostname
    95 # - for security reasons, it is recommended
    96 #   to set DASSCM_CHECKOUT_USERNAME and DASSCM_CHECKOUT_PASSWORD
    97 #   individually (maybe host specific)
    98 #
    99 
    100 #
    101 # host specific name
    102 # it is required, to set this unique
    103 # normally, use the result of `hostname -f`
    104 #
    105 DASSCM_REPOSITORY_NAME=
    106 
    107 #
    108 # local base directory
    109 #
    110 DASSCM_LOCAL_REPOSITORY_BASE=/var/lib/dasscm/
    111 
    112 #
    113 # subversion server settings
    114 #
    115 #DASSCM_SVN_REPOSITORY_BASE=https://svn.dass-it/svn/internal-dasscm/
    116 #DASSCM_CHECKOUT_USERNAME=dasscm
    117 #DASSCM_CHECKOUT_PASSWORD=
    118 
    119 #
    120 # file to store the permissions of the checked-in file
    121 #
    122 DASSCM_PERMISSION_FILE="/etc/permissions.d/dasscm.permission_backup"
    123 }}}
     91[[Include(source:dasscm/trunk/dasscm.conf, text/plain)]]
    12492
    12593Set the following variables according to your needs:
     
    202170}}}
    203171
     172
    204173==== help ====
     174
     175for online-help type
    205176
    206177{{{
     
    219190=== why sudo? ===
    220191
    221 Ohne **sudo** läßt sich nicht sicherstellen,
    222 dass der Benutzer Zugriff auf alle Dateien erhält,
    223 die sich im Produktivsystem befinden.
    224 
    225 Falls eine Datei keine Leserechte für Other besitzt,
    226 kann beim //status// keine Differenz zwischen dieser Datei und dem Repository ermittelt werden.
    227 
    228 === Konfiguration ===
    229 
    230 {{{
     192{{{sudo}}} is required to gurantie that the user has access to all files on the target system.
     193
     194=== configure dasscm for non-root users ===
     195
     196{{{
     197# check if group dasscm is defined (GID 4199 is default)
     198# The group must contain all users that should use dasscm
    231199getent group dasscm
    232 # 4199:*:dasscm:joergs,maik
    233 
    234 # Leserechte für die Gruppe dasscm
     200
     201# read permission on config file
    235202chgrp dasscm /etc/dasscm.conf
    236203
    237 # der Gruppe dasscm die Benutzung von dasscm erlauben
     204# add sudo rule
    238205echo "
    239206Defaults env_keep+=DASSCM_USERNAME
     
    242209}}}
    243210
     211Also check, that {{{requiretty}}} is disabled.
     212On SUSE, this is the default, on RedHat it requires modifying the /etc/sudoers.
     213
     214
     215
    244216=== usage (non-root) ===
    245217
    246218{{{
    247 # Anmelden
     219# login
    248220dasscm login
    249221
     
    258230== Nagios/NRPE Check ==
    259231
    260 Client-seitige Konfiguration für NRPE
     232Client-side configuration for NRPE
    261233
    262234{{{
     
    264236CFG=/etc/nagios/nrpe.cfg
    265237
    266 # überprüfen als welcher Benutzer nrpe läuft
     238# get NRPE user
    267239NRPE_USER=`sed -n 's/nrpe_user=//p' $CFG`
    268240echo "NRPE_USER: $NRPE_USER"
    269241
    270242
    271 # zu sudoers hinzufügen
     243# add NRPE_USER sudo rule for dasscm
    272244grep -q "dasscm check" /etc/sudoers || echo "$NRPE_USER ALL=(ALL) NOPASSWD:/usr/bin/dasscm check" >> /etc/sudoers
    273245
    274 # sicherstellen, dass check_dasscm für nrpe definiert ist
     246# add check_dasscm to NRPE config
    275247grep -q dasscm $CFG || echo "command[check_dasscm]=sudo dasscm check" >> $CFG
    276248
    277 # nrpe neu starten
     249# restart nrpe
    278250/etc/init.d/nrpe restart
    279251}}}
    280252
    281 Wie schon bei Benutzern beschrieben, wäre der Zugriff auch ohne **sudo** denkbar.
    282 Dann würden aber ggf. nicht alle veränderten Dateien erkannt.
    283 
    284 === Besonderheit auf RedHat / CentOS ===
    285 Damit Sudo über nrpe oder ssh funktioniert muss folgende Option in ///etc/sudoers/// auskommentiert werden:
    286    # Defaults    requiretty
    287 Unter Suse Systemen ist das  bereits voreingestellt.
    288 
    289 
    290 == usage (German) ==
     253It is possible to user the dasscm nrpe check without sudo,
     254that file without read-permissions will not be checked
     255
     256
     257
     258== addititional info ==
    291259
    292260from [source:dasscm/trunk/doc/dasscm_howto.txt]:
    293 
    294261[[Include(source:dasscm/trunk/doc/dasscm_howto.txt, text/plain)]]
     262
     263= similar projects =
     264
     265  * asvn
     266  * fsvs