How to Use clear case?

Source: Internet
Author: User
Tags multisite
How to Use clear case?

Rousau Studio (http://www.roarsoft.net) added by: iwgh join time: 16:11:00

1clearcase Introduction

 

Clearcase is a configuration management tool developed by rational. It is a configuration management system used by development teams to track and manage various artifacts in the software development process, clearcase can help the Development Organization better manage the software development process.
Clearcase can be closely integrated with other software of rational, such as UCM and ClearQuest.
There are two sets of clearcase: clearcaselt and clearcase (multisite ). The former can be used in development teams on the same LAN and is suitable for small and medium-sized development organizations. The clearcase (multisite) is applicable to development groups distributed in different geographical locations and different LAN, suitable for large development organizations.
Therefore, it is sufficient for general companies to use clearcaselt.
Note: in subsequent articles, clearcase is often referred to as CC.

2clearcaselt Working Principle

2.1 system composition

Clearcaselt consists of clearcaseltserver and clearcaseltclient. The server is responsible for centralized data management, and the client is installed on the machines on which the clearcase service is required and on the computers of major developers, A typical Client/Server structure.
Clearcaseltserver uses vob (versionedobjectbase) to store configuration management data. You can use view to obtain the data stored in vob. In the UCM mode (see project management, it mainly manages projects through stream and activity.

2.2vob, View

Vob is the repository of all version data of each component of the clearcase storage software system. A version contains a specific file or directory; view is a set of specific versions of each element selected by certain rules. You can access and modify each element through view.
Shows the relationship between vob and view:
There are two types of views: snapshotview and dynamicview ). The snapshot view copies the View content on the CC server to the developer's machine. Developers often need to synchronize with the server to maintain data consistency, the advantage of the snapshot view is that developers do not have to keep connected to the CC server through the network. The dynamic view dynamically synchronizes content from the CC server to the developer's machine, this requires developers to maintain a network connection with the server. Generally, the Administrator decides which view to choose.
Developer development involves two views: development view and integration view. If the user's name is Pat and the project involved is test, the default names of the two views are pat_test and pat_test_integration.
The development view is used for the developer's development process. The developer completes software development, modification, and submission in the development view. The purpose of the integrated view is to store the work completed by the developer, this allows developers to verify their development through the content in this view.

2.3check-In & check-out

Like other configuration management tools, clearcaselt implements configuration management through check-in and check-out. When you check-out a file, clearcase creates an editable version of the file in the view, which can be modified. When you check-in a file, clearcase creates a new permanent version of the file in vob. The file in the local view becomes a read-only attribute and cannot be modified.

2.4 baseline)

Different versions of each element can be combined into a baseline during software development. Baseline indicates that software project development has met certain requirements and is also a milestone.
The project administrator can set a baseline based on the actual situation and set a new baseline as the project progresses.

2.5 Activity)

An activity is created by a developer to complete or submit a development task. It is an object used to record the file set (Change set) created or modified by the developer, as shown in the bug modification. An activity contains multiple versions of one component, two or more elements.
Activity is the basic object of UCM.
Through activities, developers can perform operations on multiple files at a time without having to process them one by one, which greatly improves work efficiency.

2.6 stream)

The stream records all activity history in the private and shared workspace of the project. The stream also defines which version of the corresponding component (such as file Foo. c) can be accessed by the developer through the private workspace.

3clearcaselt settings

3.1 install clearcaseltserver

For instructions on how to install clearcaseltserver, see the clearcase installation section in the subsequent sections.
After clearcaseltserver is installed, You need to perform some settings, including data preparation, environment variable settings, and permission settings.

3.2 generate basic vob

After the clearcase server is installed, the clearcase server setting wizard is automatically started to set the initial vob.
You can also run the wizard separately later.
If you need additional vob data, you must use the clearcase console.

3.3 set Environment Variables

Due to a bug in WindowsNT/2000, to normally complete authorization management in clearcase, you must set the environment variable:
A. Open the control panel and select system to go to system features settings.
B. Select the "advanced" Page and click the "environment variables" button to enter the environment variable settings. In the "user variables" column, click the "new" button and enter the variable name: clearcase_primary_group. The variable value is set to the user group to access clearcase. For example, clearcase_users indicates that the clearcase_users group can access clearcase. (Set clearcase_primary_group In the Windows2000/NT machine where clearcaseclient is installed. For the method, refer to B. For windows98, set this environment variable in the autoexec. BAT file)

3.4 permission management

Permission management is very important in the Use Management of clearcase. You must set the permissions correctly to use the various functions of clearcase normally.

3.4.1clearcaselt server-side permission settings

Clearcase manages user logon through user groups provided by windows. Therefore, you must set a user group that can access the clearcase function.
The data provided in the preceding section is used as an example. The clearcase administrator needs to generate a user group clearcase_users on the clearcase server, and then generate the user account to use clearcase for software development, and specify these accounts to the clearcase_users group.
Note: The name of the specified user group must be the same as that in the environment variable clearcase_primary_group!

3.4.2clearcase client settings

The clearcase client must use an account provided on the server to log on to the server domain before using clearcase.

3.5 Other matters

If a problem occurs, you can use the "rationalclearcaseltdoctor" provided by clearcase to check the problem and solve the problem according to the method provided by it.
This tool is available on both the clearcaselt server and client.

4clearcaseclient installation and configuration

4.1 configure licenseserver)

Run the clearcase installer and follow the prompts to install it gradually. Select client to install the client and select server to install the server.
After the installation is complete, execute the rationallicensekeyadministrator in the Start Menu Bar on the target machine. Click "cancel", and then click "Settings". In the displayed dialog box, click "licensefiles" to set the software authorization.
Click "OK" to complete the configuration.

4.2 install clearcaselt Software

To install clearcaseltserver, select "rationalclearcaseltserver" with the mouse, and click "Next" to install the server.
To install clearcaseltclient, select "rationalclearcaseltclient" with the mouse, and click "Next" to install the client software.
Follow the prompts to continue the installation to complete the installation of the server or client.

4.3clientcase client Configuration

After installing the client software, you must set the client system.
Configure the user group first. The specific method is incorrect! The reference source is not found. For how to set environment variables in Windows 98, refer to the relevant documentation.
Next, set Network Properties and the client's network ID and login domain. Note: Enter the domain name of the computer where clearcaseltserver is located in the domain.
In Windows, open the "System" function on the control panel, go to the "Network ID" page, and click "properties" to set the computer name and domain.
Each time you log on to your computer, you must select to log on to the domain. Enter the user name and password on the clearcaseltserver computer to use the service provided by clearcase.

5. Project Management

CC can be used for project management in two ways: baseclearcase and UCM (unifiedchangemanagement.
The baseclearcase method is file-based management, while the UCM method mainly uses the activity Method for project management. Compared with the baseclearcase method, the UCM method has the following advantages:
UCM is more effective than baseclearcase
UCM uses stream to manage projects, which reduces configuration work compared with baseclearcase's branch method to manage projects.
The UCM method automates baseline management and provides additional execution operations.
UCM is easier to use to manage projects with activities and provides functions integrated with ClearQuest tools.
The UCM mode is more conducive to the parallel development mode.
The following discussions on project management are mainly based on the UCM method.

5.1ucm Basics

UCM adopts an iterative development process. Developers work in the same UCM project.
The project manager is responsible for creating a project and maintaining the public area of the project.
A project includes public areas and multiple private work areas. Private work areas allow developers to work independently at activities.
The process is as follows:
The project manager creates a project and determines the initial baseline set for the components in the project;
The developer creates a private work area and obtains the baseline content of the project;
A developer creates an activity and works on one activity at a time. A collection of activity-related files is called a change set;
After a developer completes the activity and tests his/her work in his/her private workspace, the developer shares his/her work with the development team by performing the delivery. The delivery operation combines the work in the developer's private region to the project sharing region.
Project managers integrate the work delivered by developers in the project sharing area.
The Project Manager regularly creates new baselines in the project shared domain to integrate the work of developers.
The project manager performs a quick verification test to ensure that the new baseline works properly. The software quality engineer will perform more extension tests.
The Project Manager regularly adjusts the maximum promotion level (such as creation, testing, and release) after the baseline quality and stability are improved to reflect appropriate milestones. When a new baseline is tested, the Project Manager can specify it as a recommendation baseline.
The developer executes the rebase operation to modify its private workspace so that it contains the new version set determined by the new Recommendation baseline.
Developers continue with the following development cycle: develop activities based on activities, Publish completed activities, and modify their private work areas based on the new baseline.
The preceding tasks can be divided into two cycles: project management and development.

5.2 create a project

To create and configure a project, follow these steps:
Create a warehouse for storing project information
Create a file set component for developers
Create a baseline so that developers can determine the file version to start working on.
Select the desired development policy
Note: to create a new project, you must log on to the project as the user used to install cc. Only other users can use the project normally.
Procedure:
A. Run "rationalclearcaseltadministrationconsole" on the computer that has been installed with ccltserver to add the vob required to save the new project data.
The vob created here is test (whether or not to create vob depends on actual needs ).
B. Open "rationalclearcaseltprojectexplorer" in the running rationalclearcase Program Group, enter the project Browser: Create a new project, follow the prompts, select the default option, until Step 3: NewProject-Step3
C. Add a baseline for the project
Click "add:
Select the specified component from the component list. Here, select the created component test. The baseline related to the component is displayed in the baseline list. Select a baseline, the new component has only one baseline: xxxx_initial. test_initial baseline is selected here. Click OK to select the initial baseline for the project to be created. Click Next To Go To step 4.
D. Set modifiable components and adjust project policies
Select the component to be modified in the project, and select test here. In actual application, you need to make a selection based on the actual situation.
Click "policies ies" to adjust the project policy. The specific project policy should be adjusted according to the actual situation. Generally, the "foralldeliveries" policy is set to enabled.
E. Continue to select the default configuration to complete project creation. In this way, a new project based on the default vob is generated, and a default integration_stream: testa_integration is generated for the new project (the name of the newly generated project is assumed to be Testa)

5.3 notify developers to join a new project

After creating a new project, you need to notify and instruct developers to join the newly created project. For details, see the development section.

5.4 manage projects

After notifying developers to join the new project development process, the Project Administrator is responsible for constantly monitoring the progress of the project development and managing and verifying the source code submitted by different developers; after the development progresses to a certain degree, a new baseline is generated for the project; a new Recommendation baseline is specified until the project development is complete. (See basic section of UCM)

5.4.1 generate a new baseline

The Administrator often generates new baselines for the current development based on the development status of the developer, so as to better save the development process of the project.
The procedure is as follows:
(1) Start "rationalclearcaseltprojectexplorer", select the current project, select the integration view of the Project, right-click the project, select the "properties" function, modify properties: Enter the lock page, change the status to locked. Locks the integrationstream to prevent users from submitting new data.
(2) Right-click the integration view of the project and select makebaseline ..." Function. In the makebaseline dialog box that appears, enter the baseline name, description, and type, and select the corresponding integration view in viewcontext. The incremental type view is selected, and the jim_testa_integration view is used as the basis.
(3) change the status of integrationstream to unlocked according to the method in (1.

5.4.2 manage baselines

Many baselines are generated during project development. administrators need to manage baselines based on the project development progress, such as changing the baseline attributes and improving the baseline.
The following example shows how to improve the baseline. This mainly involves modifying the attributes of the baseline. (You can modify the attributes of a baseline in multiple places. The following is only one of them)
A. Enter the integrationstream attribute function
B. Select a baseline.
C. Adjust baseline attributes
In the promotion drop-down box, the default promotion level is listed. Select one based on the progress of the current project and click "OK.
Rejected indicates that the content of the baseline is rejected; initial indicates that the baseline is the initial baseline; built indicates that the content of the baseline has been created as an application; tested indicates that the baseline has been tested; released indicates that the baseline has been released.

5.4.3 specify the recommendation baseline

In the process of a development team's parallel development project, it is likely that the changes made by each developer are not synchronized, sometimes resulting in different versions of the same file, this requires the Administrator to track and manage this, and the main method used is to recommend baselines.
To use a recommendation baseline, each developer is required to keep the content in his development view consistent with the content represented by the baseline to avoid conflicts.
For the development data submitted by each developer, the Administrator reviews and tests the data and creates a baseline. When the submitted code has reached a certain degree of stability or scale, the Administrator may think that all developers must be consistent with the current Code, so that he can set the baseline that is considered feasible as a recommendation baseline, then, developers are required to rebase their development view to be consistent with the content in the recommendation baseline, and continue development on this basis.
During the development of a project, the Administrator continuously generates new baselines and recommends baselines based on actual changes to ensure the consistency of the Work of developers.
The administrator can add, delete, or change the current baseline based on the actual situation.
After setting a new Recommendation baseline, You need to notify developers to rebase their development view to make it consistent with the content of the Recommendation baseline.

6. Project Development

6.1clearcaseltclient

After clearcaseltclient is successfully installed, rationalclearcaseltexplorer is the most commonly used tool by developers. Many other tools have been integrated into rationalclearcaseltexplorer.
The left side of rationalclearcaseltexplorer is shortcutpane, which allows you to perform operations conveniently, including two parts: Toolbox (based on the box) and views (views). Toolbox includes various tools, views are the views of various projects involved by developers.
In toolbox, gettingstarted is the help part; UCM is the unified change management part. Developers will mainly use this part to control the development process, including: add project development, submit data, rebase, and open the project browser. baseclearcase is a basic CC function, including modifying view attributes, creating new views, deleting views, and modifying quick views.
The views of each project that developers participate in are listed in views. Generally, each project includes two views: development view and integration view. The development view jim_testa of the project testa is displayed. There is no content in this view, and one view is displayed. dat: This file indicates the view-related content. Do not delete this file during development. Otherwise, CC will lose this view and the recovery operation is complicated.
The following describes how to use clearcase.

6.2 Development Process

The main workflow of developers is to join the project, implement development based on the activity, submit the activity, rebase the workspace according to the Administrator's requirements, and continue development until the development is complete.

6.3 join a project

To add a project, click the "joinproject" button in rationalclearcaseltexplorer/toolbox/UCM (refer to the clearcaseltclient tool introduction section) and follow the prompts to complete the project development process.
After adding the project, click View/refreshviewshortcuts in the menu, and the view of the project appears in the views on the left panel. At the same time, the hard disk of the Computer (disk C by default) two directories are generated: user_project and user_project_integration. The directories generated in the preceding example are: jim_testa and jim_testa_integration.
In the future, the development work will be expanded in user_project, and the test work will be carried out in user_project_integration.
Note: to join the project development, the login user of the computer must meet the requirements in the clearcaselt Settings section.

6.4 Development

After joining a project, you can start the development work. During the development process, you can use different development tools, the items that can be submitted include the software source code, design documents, and other content that can be submitted as required by the Administrator. Developers can use development tools to directly modify them in the Development View.
However, you must remember one thing during development: before modifying the file in the development view, you must check the content to be modified before modification. After modification, use checkin to add to the view.

6.4.1 add files and directories

Developers who initially joined the project may face an empty project and need to constantly add new files or directories, which can be completed in rationalclearcaseltexplorer or Windows Resource Manager.
The clearcase shortcut is displayed in the shortcut menu of the folder corresponding to the development view.
Use Windows Resource Manager to generate a new directory in the development view directory and copy and add files. For example, in the jim_testa/testdirectory, add the file source、docand sourcefolder to the new file home.html. The newly generated directory and file are not included in the CC management, and must be manually added to the CC management, that is, addtosourcecontrol.
First, select the directory or file to be added to the CC control, and then add it to version control through tools/addtosourcecontrol or shortcut.
To add to version control, You must select "activity" (The UCM mode is based on activity), enter the activity name, and the activity is named addfolder. In this way, the newly added content is added to the CC control.
Note: Any newly added files/directories must be added to the CC through addtosourcecontrol.

6.4.2checkout

Adding new Code requires constant modification during the development process. You must first complete the checkout work. The operation is relatively simple. Select the directory or file to be modified by checkout, and then use the Tools menu or shortcut button to implement the checkout function. To modify any file, you must run the checkout function.
After you run the checkout command, you can disable the tools of clearcase.

6.4.3 Modification

After checkout, the developer can modify the corresponding file. You can directly modify the file in the development view directory, or overwrite the original file in the view after modification in other places.

6.4.4checkin

After modification, you need to add the newly modified content to the CC, which requires checkin. If many files are modified at a time, you can use the findcheckouts function in the shortcut menu to avoid missing some modifications. In this way, you can find all the files to be checkout and select these files, then select checkin. to cancel this modification, you can also select undocheckout. Of course, you can also select one or some files in view and select checkin from the shortcut menu to complete the checkin operation.

6.5 submit work

After the development work takes some time, you need to submit the changes so that the Administrator and other developers can see these changes.
In this way, the modified part will be added to the integration view, and the CC server will also be changed, the administrator can perform tests, generate new baselines, promote baselines, and generate new recommendation baselines based on new data.
After the system completes the submission, the submission is not actually completed. The CC dialog box is displayed. Ask the operator to confirm:
Operations in sequence:
(1) Click OK. An integration View window is opened to check whether the submitted data is correct. If the submitted results are normal, close the integration View window;
(2) If you confirm that the submitted job is normal, click complete. The system will submit the changes to the CC server. If you believe that the submitted results are incorrect, click Close to exit, continue modification and development.
(3) After the prompt is displayed, click Close to complete the submission.
If an exception occurs during the submission process, CC will prompt the developer to follow the prompts.

6.6 rebase

When the project administrator keeps paying attention to the development progress of the project, if the project administrator thinks that a better version is available and each developer needs to continue the development based on it, the Administrator will establish a baseline, set it as a recommendation baseline, and then require developers to maintain the same content as the recommendation baseline, and continue development on the basis of this baseline.
In this case, developers need to perform rebase operations to make their development views consistent with others. rebase also has multiple methods. The "submit work" section shows two methods.

6.7 Exception Handling

When developing a complex system, a developer's code conflict may occur, and some problems may occur when submitting work, in this case, developers should review the submitted work and select the correct version.
In addition, there are other possible exceptions. Please refer to help to handle them.

6.8 backup and Restoration

Backup restoration method
1. Back up and restore vob
(1) Back up vob
Lock vob
Back up the storage directory of vob
Unlock vob
Note: When you cannot back up the storage directory of vob, you should disable the CC service in the control panel.
(2) Restore vob
Restore
Stopsandrestartscc
Updatestheccvobregistry
Mergethevobdatabasesnapshotandvobstoragedirectory
Copiesthetemporarystoragedirectorytotargetlocation
Runscheckvobtoresynchronizethevobdatabaseandstoragepools
Note: network images cannot be restored.
Step:
Use advanced management to log on to the host that installs CC
Check that the drive letter of the target directory has enough space to restore the backed up vob.
Unlock vob
Note: When you cannot back up the storage directory of vob, you should disable the CC service in the control panel.
(2) Restore vob
Restore
Stopsandrestartscc
Updatestheccvobregistry
Mergethevobdatabasesnapshotandvobstoragedirectory
Copiesthetemporarystoragedirectorytotargetlocation
Runscheckvobtoresynchronizethevobdatabaseandstoragepools
Note: network images cannot be restored.
Step:
Use advanced management to log on to the host that installs CC
Check that the drive letter of the target directory has enough space to restore the backed up vob.
Close a view in the working state
Run:
Vob_restore/flex
Uncnames (// host/share/rest-of-path)
Check
Unlock
"/Vobstore/flex. vbs
Analyze vob and view
2. Back up and restore the view
1. Backup steps:
(1) determine the storage directory of the view. Use the ccadministratorconsole tool or execute lsview to view its storage information. Obtain the storage path of the view.
For example:
C:/> cleartoollsview-longakp_vu
You can obtain the following information:
Viewonhost: Neptune
Viewserveraccesspath:
/Home/AKP/views/AKP. vwsc:/home/AKP/View/AKP. VWS
(2) set the view in the working state to read-only
Cleartoolchview-readonlyakp_vu
(3) storage directory of backupview
(4) Cancel read-only
C:/cleartoolchview-readwriteakp_vu
(2) Restore View
(1) log on to the server host
(2) Check the remaining disk space at the target location
(3) Transfer the storage directory of the target location. Rename or delete.
For example:
C:/home/AKP/View> renakp. vwsakp. VWS. Old
(4) restore the backup file
% C:/> cleartoolrecoverview-tagakp_vu
6.9 permission management
Manage groups in a domain.
Users join different groups.
Different groups have different permissions on the project.

7. Other matters

Clearcase is an advanced Software Configuration Management Tool with powerful and complex functions. The above description only lists the features of clearcase, and its user manual contains more than 2000 pages.
Clearcase also supports UNIX systems and hybrid platform development. In addition to graphical interfaces, it also supports operations in the command line format.
Therefore, the introduction of just over 20 pages cannot detail all the functions of clearcase. The above introduction can only serve as an entry point. It is necessary to practice and read the user manual to be proficient in and use CC.
The manuals provided by clearcase include:
Clearcase Introduction
Clearcase installation manual
Clearcase Software Development Manual
Clearcase developer Manual
Clearcase Management Manual
Clearcase Project Management Manual
Clearcase Reference Manual
And so on.

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.