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 usage

3 Copyright, 2006 Dipl. Inform. Uwe Satthoff WHY ? WHY ClearCase ?

4 Copyright, 2006 Dipl. Inform. Uwe Satthoff WHY ? WHY Configuration Management ?

5 Copyright, 2006 Dipl. Inform. Uwe Satthoff The real world

6 Copyright, 2006 Dipl. Inform. Uwe Satthoff The real world Project A Project B Project C Project D

7 Copyright, 2006 Dipl. Inform. Uwe Satthoff The real world Project A Project B Project C Project D DeploymentDeployment

8 Copyright, 2006 Dipl. Inform. Uwe Satthoff The real world Project A Project B Project C Project D DeploymentDeployment CostumerCostumer

9 Copyright, 2006 Dipl. Inform. Uwe Satthoff The real world Project A Project B Project C Project D DeploymentDeployment CostumerCostumer problem tracking

10 Copyright, 2006 Dipl. Inform. Uwe Satthoff The real world Project A Project B Project C Project D DeploymentDeployment CostumerCostumer problem tracking change tracking parallel development/maintenance

11 Copyright, 2006 Dipl. Inform. Uwe Satthoff The real world Project A Project B Project C Project D DeploymentDeployment CostumerCostumer problem tracking change tracking parallel development/maintenance configuration management

12 Copyright, 2006 Dipl. Inform. Uwe Satthoff Outcome: What do we need for Configuration Management ? object management version control system history management rich branching, labeling, merging workspace management independent work areas for different roles like developer, integrator, tester, release manager,.... transparent access to different system configurations build management process management

13 Copyright, 2006 Dipl. Inform. Uwe Satthoff Basic rules for Configuration Management unique identification of all artifacts (readable by humans) software product versions (configurations) parallel workstreams software builds single source principle each object exists once, keeping all evaluation history in itself redundancy has to be avoided at all insulated but not isolated working environments

14 Copyright, 2006 Dipl. Inform. Uwe Satthoff cc.c cc.h Xy.so 1 2 cc Unique named configurations

15 Copyright, 2006 Dipl. Inform. Uwe Satthoff cc.c cc.h Xy.so 1 2 cc Unique named configurations Product-V1 Product-V2

16 Copyright, 2006 Dipl. Inform. Uwe Satthoff cc.c cc.h Xy.so 1 2 cc Unique named configurations Product-V1 Product-V2

17 Copyright, 2006 Dipl. Inform. Uwe Satthoff WHAT offers ? WHAT offers ClearCase ?

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

19 Copyright, 2006 Dipl. Inform. Uwe Satthoff What is a VOB? V ersioned O bject Data B ase container for all sort of data in different versions (elements with versions) identified through unique name ( VOB-tag) metadata used to organize changes tracks all changes in history ElementsMetadataHistory cc. c produktion testet CREATE user

20 Copyright, 2006 Dipl. Inform. Uwe Satthoff What is a view? a user work area is the interface to VOBs VOB contents can only be accessed via views maps dynamically exactly one version of each element to the users work area, like a filter, defined by the configuration specification (config spec) users can have as many views as they like cc.c cc. h src Configuration specification cc.c cc. h src

21 Copyright, 2006 Dipl. Inform. Uwe Satthoff VOBs, views, M ulti V ersion F ile S ystem

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

23 Copyright, 2006 Dipl. Inform. Uwe Satthoff virtual work area: view private data in VOB directory

24 Copyright, 2006 Dipl. Inform. Uwe Satthoff checkout, edit, checkin model

25 Copyright, 2006 Dipl. Inform. Uwe Satthoff Exercises: create a VOB cleartool mkvob -tag /vobs/name -public / /vobstore/name.vbs mount the VOB cleartool mount /vobs/name create a view cleartool mkview -tag name / /viewstore/name.vws start the view cleartool setview name what is your current view ? -> cleartool pwv list existing VOBs and views, show properties of VOBs and views cleartool lsvob [-long] [VOB-tag] cleartool lsview [-long] [view-tag] cleartool describe [-long] vob:VOB-tag

26 Copyright, 2006 Dipl. Inform. Uwe Satthoff What is an element ? a version controlled directory or file of any type (e.g. source, binary, object library, document) file type is automatically determined by ClearCase at element creation time identified by pathname in the VOB a container for all versions of the directory or file Elements cc. c xy. c lib.o

27 Copyright, 2006 Dipl. Inform. Uwe Satthoff ClearCase element permissions permission system is based on operating system permissions owner, group, other e.g. drwxrwxr-x admvob vobgroup /vobs/myVob/a_vob_directory ClearCase VOB group(s) each VOB is owned by one account and one group each VOB may have a list of additional groups user process settings & membership of groups determines access primary group of accessing process must be in VOBs group list to be permitted to create new elements existing element can be checked out, if owned by user or user belongs to the elements group or element has write access for others

28 Copyright, 2006 Dipl. Inform. Uwe Satthoff What is a version ? a version identifies the contents of a file or directory at a certain point of time each modification of an element is mapped to a new version a delta storage in the data container of the element Elements cc. c xy. c lib.o

29 Copyright, 2006 Dipl. Inform. Uwe Satthoff Exercises: Change working directory, step into the VOB cd /vobs/name root element permissions ls -lad. What is your current view ? : cleartool pwv which version of the root directory do you see cleartool ls -l -d. which versions of the root directory exist cleartool lsvtree.

30 Copyright, 2006 Dipl. Inform. Uwe Satthoff An elements version tree (default cspec) branch version label

31 Copyright, 2006 Dipl. Inform. Uwe Satthoff An elements version tree (UNIX style) branch merge arrow label many labels on one version

32 Copyright, 2006 Dipl. Inform. Uwe Satthoff What is meta data? data objects to organize elements and versions most commonly used: label type, branch type, attribute type others: element type, hyperlink type, trigger type Metadata cc.c produktion testet cc.h depends

33 Copyright, 2006 Dipl. Inform. Uwe Satthoff What is a config spec? a sequence of version selection rules interpreted from top to bottom by the views view server process for each element accessed by the user process interpretation stops at the first rule, which selects a version, and this version is mapped to the users workspace the rules are based on meta data like labels, branches and even on time stamps users can change the cspec cc.c cc. h src Config spec :... element * TESTED... element * /main/LATEST cc.c cc. h src

34 Copyright, 2006 Dipl. Inform. Uwe Satthoff The default config spec element*CHECKEDOUT element*/main/LATEST new ClearCase views gets first the default config spec assigned The rule key word The rule path The version selection: the LATEST version on branch main The version selection: the CHECKEDOUT version in the current view

35 Copyright, 2006 Dipl. Inform. Uwe Satthoff Exercises: have a look to your views config spec cleartool catcs have a look to another views config spec cleartool catcs -tag another_view have a look to the VOB contents selected by your view cd VOB-tag, e.g. cd /vobs/myvob modify the VOB contents, create new elements view private : echo hallo moin > moin.txt; vi newFile; cp /file myFile checkout directory: cleartool co -c comment. create element: cleartool mkelem -nc moin.txt checkin version: cleartool ci -nc moin.txt checkin directory: cleartool ci -nc. create VOB directoy: cleartool co -nc.; cleartool mkdir newDir

36 Copyright, 2006 Dipl. Inform. Uwe Satthoff Exercises: How to import many objects, i.e. a complete subtree, into a ClearCase VOB ? Use the import utility clearfsimport: clearfsimport [-r] [-mklabel ] e.g.: clearfsimport -r /home/me /vobs/myvob/subdir imports the complete subtree /home/me into the VOB myvob at location /vobs/myvob/subdir/me different usage for VOB owner and other users: option -nsetevent if the VOB owner uses the command, it is breakable and re-startable at any point in time

37 Copyright, 2006 Dipl. Inform. Uwe Satthoff again : meta data branch type=>branches label type=>labels attribute type=>attributes hyperlink type=>hyperlinks trigger type=>triggers element type=>elements

38 Copyright, 2006 Dipl. Inform. Uwe Satthoff Exercises: create a new label type cleartool mklbtype -c comment label_type_name attach label to version of an element cleartool mklabel label_type_name element_name attach labels to versions of elements in a subtree cleartool mklabel -r label_type_name pathname attach label to a specific version of an element cleartool mklabel label_type_name moin.txt /main/4 == version extended pathname move an existing label to another version of the same element cleartool mklabel -replace label_type_name element_name have a look to the version tree of an element cleartool lsvtree [-graphical] element_name

39 Copyright, 2006 Dipl. Inform. Uwe Satthoff example config spec element*CHECKEDOUT element*RELEASE_V1 element*.docDOC_V1 element*/main/LATEST Select version labeled RELEASE_V1 Select version of files *.doc labeled DOC_V1 Config specs are interpreted from TOP to BOTTOM, finding the first matching rule Discussion: file element A.doc has one version labeled RELEASE_V1. Which rule matches ?

40 Copyright, 2006 Dipl. Inform. Uwe Satthoff example config spec element*CHECKEDOUT element -directory */main/LATEST element*.../my_branch/LATEST element*/main/LATEST Select LATEST version on branch /main for directories If element has branch my_branch, select LATEST version on this branch Otherwise select LATEST version on branch /main

41 Copyright, 2006 Dipl. Inform. Uwe Satthoff Exercises: create a new branch type cleartool mkbrtype -c comment branch_type_name list existing types cleartool lstype [-long] -kind lbtype | brtype |attype|hltype|eltype|trtype modify your config spec cleartool edcs [-tag viewname] vi cspec.file; cleartool setcs cspec.file see the effects of config spec change cleartool ls -long # again modify config spec cleartool ls -long lets play with views, labels, cleartool commands

42 Copyright, 2006 Dipl. Inform. Uwe Satthoff A auto branch config spec element*CHECKEDOUT element*.../bugfix_4711/LATEST mkbranch bugfix_4711 element*INTEG_PRODUCT_0 element */main/0 end mkbranch bugfix_4711 mkbranch keyword: branch block defines baseline of branch Select version labeled INTEG_PRODUCT_0 the LATEST version on branch bugfix_4711 mkbranch keyword: branch block defines baseline of branch For new elements,which do not have the baseline label

43 Copyright, 2006 Dipl. Inform. Uwe Satthoff An elements version tree (auto branch cspec) (auto) branch

44 Copyright, 2006 Dipl. Inform. Uwe Satthoff Exercise: a more real problem Task description Our customer reported a bug in the last delivered version = P-31 of our product. This bug is tracked in our problem tracking system as problem number We know, that the software configuration which existed at creation time of product version P-31 is identified by the label type INTEG_PRODUCT_0 in our ClearCase VOB /vobs/project-p. We have to fix the problem without hindering the further development of our product. The implementation of the fix has to be identified as P-31.P After patch delivery we have to check, whether the implementation can be integrated in the latest version of our product, which has been further developed in the meantime.

45 Copyright, 2006 Dipl. Inform. Uwe Satthoff Exercise: a more real problem Setup of the environment - what do we need ? Independent work space ct mkview -tag Enable work in parallel to ongoing development ct mkbrtype -nc Ensure that all changes are performed on seperate branch ct edcs (use the automatic branching in config specs) After implementation identify patch as requested ct mklbtype -nc.....; ct mklabel -r..... After patch delivery, integrate with ongoing development ?? Again new work space, or use patch work space ?? ?? How to integrate : new commands for merging ct merge.... ct findmerge....

46 Copyright, 2006 Dipl. Inform. Uwe Satthoff Most important commands: Create new elements cleartool mkelem...; cleartool mkdir... Change existing elements cleartool co; cleartool ci Merge contents from other versions cleartool merge -to -version cleartool findmerge -fve -merge | -print List existing checkouts cleartool lsco [-r] [-cview] [-short] [ ] List view privates cleartool lspriv View man pages cleartool man ; cleartool apropose

47 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