Presentation is loading. Please wait.

Presentation is loading. Please wait.

Copyright, 2006 Dipl. Inform. Uwe Satthoff 1. Basic concepts for usage 2. Basic concepts for administration 3. Setup of example environment 27.09.2006.

Similar presentations


Presentation on theme: "Copyright, 2006 Dipl. Inform. Uwe Satthoff 1. Basic concepts for usage 2. Basic concepts for administration 3. Setup of example environment 27.09.2006."— Presentation transcript:

1 Copyright, 2006 Dipl. Inform. Uwe Satthoff 1. Basic concepts for usage 2. Basic concepts for administration 3. Setup of example environment Configuration Management with ClearCase

2 Copyright, 2006 Dipl. Inform. Uwe Satthoff Configuration Management with ClearCase Basic concepts for administration

3 Copyright, 2006 Dipl. Inform. Uwe Satthoff ClearCase environment

4 Copyright, 2006 Dipl. Inform. Uwe Satthoff VOBs appear in views as ordinary directory trees

5 Copyright, 2006 Dipl. Inform. Uwe Satthoff ClearCase client server system Registry host (registers view, vobs, clients,...) License host (floating user lics) Backup registry host VOB host View host (optional WEB server) Client host Release host most often on same host avoid same host !! host at different location !! same host, different hosts, central view server host ClearCase installation NOT required

6 Copyright, 2006 Dipl. Inform. Uwe Satthoff ClearCase network cleartool hostinfo -long

7 Copyright, 2006 Dipl. Inform. Uwe Satthoff Exercises: Planning first : naming conventions, storage locations, accounts, groups,... create a VOB cleartool mkvob -tag /vobs/name -public / /vobstore/name.vbs cleartool mkvob -tag /vobs/priv / /vobstore/priv.vbs mount the VOB cleartool mount /vobs/name what is difference between public and private VOB ? create a view cleartool mkview -tag name / /viewstore/name.vws start the view cleartool setview name list existing processes serving VOBs and Views ps -ef | grep server list the /view directory (ls -la /view) list VOB and view storage directories

8 Copyright, 2006 Dipl. Inform. Uwe Satthoff ClearCase server processes albd (Atria Location Broker Daemon) runs on each ClearCase host, starts on ClearCase startup (root) the master server process (lic manager on license host) lockmgr (lock manager) runs on each VOB host, starts on ClearCase startup (root) grant access to VOBs for db_server and vobrpc_server processes db_server (database server) process VOB db transactions (started by albd on request) vobrpc_server (remote procedure call server) handle requests from view_server processes forward pool access to vob_server view_server (for each view on host of view storage) started by albd, remains active until endview / rmview vob_server (one for each VOB)

9 Copyright, 2006 Dipl. Inform. Uwe Satthoff ClearCase host configuration /opt/rational/clearcase/... /usr/atria -> /opt/rational/clearcase /var/adm/rational/clearcase/... /var/adm/atria -> /var/adm/rational/clearcase /var/adm/rational/clearcase/rgy/... /var/adm/rational/clearcase/config/... /var/adm/rational/clearcase/schedule/...

10 Copyright, 2006 Dipl. Inform. Uwe Satthoff Exercises: host configuration Examine the /opt/rational/clearcase/... Directories etc, config subdirectories Examine the /var/adm/rational/clearcase/... Directories rgy, config, schedule, log subdirectories Discussion: How to protect /var/adm directories and files to permit other users than root to administer ClearCase ? Use a special group, e.g. ccadmin Include /var/adm/rational/clearcase in the backup of ClearCase !!, because ClearCase installation may overwrite your settings.

11 Copyright, 2006 Dipl. Inform. Uwe Satthoff ClearCase VOB parameter VOB tag VOB storage db database s file storage d derived objects c text cache mount point access meta data versions containers access cache

12 Copyright, 2006 Dipl. Inform. Uwe Satthoff ClearCase View parameter View storage db database.s view privates config spec access filter View tag view reference access internal admin checkouts, temporary data The most important part

13 Copyright, 2006 Dipl. Inform. Uwe Satthoff ClearCase registry Region 1 VOB tag View tag View storage Region 2 VOB tag View tag Region n VOB tag View tag VOB storage View storage VOB storage

14 Copyright, 2006 Dipl. Inform. Uwe Satthoff Exercises: VOB and View parameter list existing regions cleartool lsreg create a new region cleartool mkregion why multiple regions ? register Vobs and Views in new region cleartool mktag -vob... cleartool mktag -view... multiple registries with their regions why / when multiple registries ? how to organize ClearCase environment with registry / regions ?

15 Copyright, 2006 Dipl. Inform. Uwe Satthoff ClearCase permission levels ClearCase implements a multi level permission system. From outer level to inner level this are: VOB storage directory (the.identity directory = VOB groups) cleartool protectvob.... VOB element access (rwx modes on VOB elements) cleartool protect.... view protections (rwx of view storage directory) depends on umask settings at view creation time view access mode (read/write, read-only) cleartool chview....

16 Copyright, 2006 Dipl. Inform. Uwe Satthoff ClearCase hierarchy of command permissions ClearCase uses a hierarchy of users for individual command permissions: superuser (root) VOB owner element owner owner of meta data type object creator of version or derived object members of an elements group anyone for example, the cleartool rmelem command can be executed by the element owner and anyone higher in the hierarchy

17 Copyright, 2006 Dipl. Inform. Uwe Satthoff Exercises: Maintain VOB owner, groups change VOB owner, add, delete groups cleartool protectvob.... Maintain VOB elements change elements owner, group, permission cleartool protect.... change elements type cleartool chtype.... Maintain other VOB objects like, types, branches rename a type object -> what really happens ? cleartool rename..... Change owner, group of types, branches, cleartool protect..... Combine all changes with the find command cleartool find.... -exec cleartool protect...

18 Copyright, 2006 Dipl. Inform. Uwe Satthoff ClearCase VOB maintenance VOB physical storage VOB real contents A VOB is like a ballon. VOB scrubber deletes unnecessary contents, but physical storage remains allocated - until physical size is reduced by reformatvob to the real size which again will grow on request real contents physical storage periodically running by CC scheduler

19 Copyright, 2006 Dipl. Inform. Uwe Satthoff ClearCase VOB maintenance create a VOB cleartool mkvob -tag cleartool mkvob -tag -host... -hpath... -gpath... before deleting, moving a VOB ALWAYS UNMOUNT it everywhere delete a VOB cleartool rmvob [-force] NEVER use rm -rf !!!!! But anyhow :-) in case of.... cleartool unregister -vob -uuid cleartool rmtag -vob ; and dont forget to kill the processes move a VOB reformatvob -dump...; cleartool unregister -vob....; ct rmtag -vob reformatvob -load....; cleartool register -vob....; ct mktag -vob...

20 Copyright, 2006 Dipl. Inform. Uwe Satthoff ClearCase View maintenance create a View cleartool mkview -tag cleartool mkview -tag -host... -gpath... before moving a View stop the view (cleartool endview -server...) delete a View cleartool rmview [-force] | -tag NEVER use rm -rf !!!!! But anyhow :-) in case of.... cleartool unregister -view -uuid cleartool rmtag -view ; and dont forget to kill the view process move a View cleartool endview....; cleartool unregister -view...; cleartool rmtag -view cleartool register -view....; cleartool mktag -view...

21 Copyright, 2006 Dipl. Inform. Uwe Satthoff ClearCase View maintenance Always have in mind: except checked out data, a view is a temporary storage of data (often mis-used as permanent storage) cleartool lsview -properties [ -full | -age ].... Never delete a view with checkouts !!! A view with checkouts has been deleted the VOB still references the checkouts ! - how to get rid of it ? => cleartool rmview -uuid where view uuid is retrieved by cleartool describe -long vob: a view can be moved even in case it has checkouts (same to VOBs) because checkouts are tracked by VOB/View uuids and NOT pathnames

22 Copyright, 2006 Dipl. Inform. Uwe Satthoff ClearCase backup VOB backup before backing up a VOB, LOCK it with command cleartool lock vob: !!!! To copy the VOB storage directory NEVER use copy commands, which modifies the access time !!!! this would disable a correct VOB scrubbing -> VOB size increases ! E.g. gtar --atime-preserve.... Steps for backup: cleartool lock vob: cleartool unmount kill -9 vob_server; kill -9 vobrpc_server; kill -9 db_server copy vob storage directory (before check for remote pools) cleartool mount cleartool unlock vob:

23 Copyright, 2006 Dipl. Inform. Uwe Satthoff ClearCase backup VOB backup - another procedure using VOB snapshots reduces the time of the VOB lock a VOB has to be prepared for snapshot backup with command /etc/vob_snapshot_setup -snap_to... it has to be scheduled in the CC scheduler command is vob_snapshot it locks the VOB; copies the database (the db directory) to the snap_dir (but it uses tar - BAD); unlocks the VOB; afterwards the VOB pools are copied to the snap_dir make sure, that the snap_dir is backed up by normal backup procedures.....

24 Copyright, 2006 Dipl. Inform. Uwe Satthoff ClearCase backup VOB backup - another procedure using VOB snapshots reduces the time of the VOB lock a VOB has to be prepared for snapshot backup with command /etc/vob_snapshot_setup -snap_to... it has to be scheduled in the CC scheduler command is vob_snapshot it locks the VOB; copies the database (the db directory) to the snap_dir (but it uses tar - BAD); unlocks the VOB; afterwards the VOB pools are copied to the snap_dir make sure, that the snap_dir is backed up by normal backup procedures..... The VOB snapshot backup is only listed for completness The author does NOT recommend to use it !!

25 Copyright, 2006 Dipl. Inform. Uwe Satthoff ClearCase backup VOB restore of a complete VOB cleartool umount on all hosts kill the vob_server, vobrpc_server, db_server processes save the current VOB storage to some place; after that DELETE original restore the VOB storage from backup to ist original location cleartool mount on hosts where needed Hint: Try to establish backup via file system snapshot utilities, e.g. Veritas netbackup.

26 Copyright, 2006 Dipl. Inform. Uwe Satthoff ClearCase backup VOB restore of only some elements you can NEVER have a copy of a VOB in the same registry therefore: use a different host with a different CC registry restore VOB from backup cleartool register -vob...; cleartool mktag -vob...; cleartool mount... create a temporary VOB: cleartool mkvob -tag....; relocate needed elements from restored VOB to temporary VOB cleartool relocate cleartool umount ; kill vob_server,.... copy temporary VOB storage to host of target registry cleartool register -vob ; cleartool mktag.... Use again cleartool relocate from temporary VOB to original target VOB to restore requested elements to their original location

27 Copyright, 2006 Dipl. Inform. Uwe Satthoff ClearCase backup View backup before you copy the view storage directory the view_server should be stopped to avoid further changes during the backup cleartool endview -server use any backup utility to copy the view storage after backup start the view_server process cleartool startview REMARK: if ClearCase is used the right way view backups shouldnt be necessary. Only the importance of view private files determine the necessity of view backups. Discussion: What does this mean for checkouts ?

28 Copyright, 2006 Dipl. Inform. Uwe Satthoff ClearCase backup View restore before you restore the view storage directory: stop the view: cleartool endview -server save the current view storage to some place; after that DELETE original restore the view storage from backup start the view : cleartool startview IMPORTANT: A restored view may not be in sync with the existing VOBs, e.g. regarding checkouts (references to/from VOBs) use cleartool recoverview -tag for database recovery use cleartool recoverview -synchronize -tag to synchronize the view with all VOBs, in which this view has created view private files

29 Copyright, 2006 Dipl. Inform. Uwe Satthoff ClearCase desaster recovery Use the ClearCase backup registry server as your backup host ClearCase must be installed on this host have a subset of your ClearCase licenses assigned to your backup host in case of recovery: try to use hostname of original VOB host for your backup host -> re-registering of VOBs not necessary store the latest backup of your VOBs in the same structure as the VOBs are stored on the original VOB host(s) in case of desaster recovery - do NOT use view backups, but let users create new views

30 Copyright, 2006 Dipl. Inform. Uwe Satthoff The ClearCase scheduler The central schedule command cleartool schedule -get | -edit [ -schedule | -tasks | -acl ] A job is a task that has been scheduled to run one or more times with a set of arguments The scheduler is available on any host that runs the albd server The scheduler relies on two data repositories: a database of tasks available for scheduling /var/adm/rational/clearcase/scheduler/tasks/task_repository (a file editable with any editor) a database of jobs, or scheduled tasks /var/adm/rational/clearcase/scheduler/db (a db file only accessible via cleartool schedule) predefined tasks have task ids less 100 user defined tasks start with task id 100

31 Copyright, 2006 Dipl. Inform. Uwe Satthoff Exercises: ClearCase scheduler cleartool schedule -get -acl cleartool schedule -edit -acl cleartool schedule -get -schedule cleartool schedule -edit -schedule cleartool schedule -get -tasks cleartool schedule -edit -tasks the last two command invocations can be replaced by vi /var/adm/rational/clearcase/scheduler/tasks/task_registry how to integrate the CC backup in the scheduler ??

32 Copyright, 2006 Dipl. Inform. Uwe Satthoff ClearCase customization by triggers Trigger types in ClearCase element trigger: attached to specific elements all element trigger: attached to ALL elements in a VOB, existing elements and newly created elements Triggers fire on ClearCase commands post operation: trigger fires after command execution pre operation: trigger fires before command execution, with exit != 0 it refuses command execution Triggers can be restricted by restriction list of types (element types, branch types,...) by inclusion list of types (element types, branch types,...) by excluded user list: trigger does not fire for specific users Trigger action => cleartool command or script

33 Copyright, 2006 Dipl. Inform. Uwe Satthoff Exercises: ClearCase triggers Have a look to the manual page cleartool man mktrtype a pre checkin all element trigger type named PreCheckin cleartool mktrtype -all -element -pre checkin -nuser ccadmin -exec exit 1 PreCheckin what does it do ? Create your own trigger types and test them do not permit anybody to remove elements with command rmelem attach label IN_WORK to new version after checkin Two triggers recommended as standard in all VOBs remove_empty_branch avoid_evil_twin

34 Copyright, 2006 Dipl. Inform. Uwe Satthoff QUESTIONS & ANSWERS


Download ppt "Copyright, 2006 Dipl. Inform. Uwe Satthoff 1. Basic concepts for usage 2. Basic concepts for administration 3. Setup of example environment 27.09.2006."

Similar presentations


Ads by Google