using oracle9i scm for software configuration management · using oracle repository for software...

17
Using Oracle9 i SCM for Software Configuration Management An Oracle Technical White Paper July 2002

Upload: others

Post on 12-Jul-2020

27 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Using Oracle9i SCM for Software Configuration Management · Using Oracle Repository for Software Configuration Management 6 CONFIGURATIONS Configurations identify specific versions

Using Oracle9i SCM for Software Configuration Management An Oracle Technical White Paper July 2002

Page 2: Using Oracle9i SCM for Software Configuration Management · Using Oracle Repository for Software Configuration Management 6 CONFIGURATIONS Configurations identify specific versions

Using Oracle Repository for Software Configuration Management 2

INTRODUCTION

As organizations strive to build larger, more complex, fully integrated software applications the

challenge to manage the development is ever-increasing. Developers are expected to produce quality

software that integrates with existing applications and other projects, while working at “Internet

speed”. If control of the versions of software released into a production environment is lost huge

costs can be incurred backtracking to a working solution. With global development teams, expected

to communicate all changes and dependencies to each other, a more rigorous approach is required

beyond email and paper based control systems.

Software Configuration Management (SCM) aids development by controlling who has access to

versions of code and managing the particular versions that go together to create a release. Further

control can be achieved by permitting parallel development combined with merging of the

development streams. Dependency management between versions and products can also improve

the quality and reliability of developed software. Oracle9i Software Configuration Manager

(Oracle9i SCM) provides these SCM capabilities as an integral component of Oracle Internet

Developer Suite.

Education is essential to ensure that development teams take maximum advantage of SCM. This

includes a clear understanding of the tools and the benefits of using them.

To enable software developers to work together in a carefully managed, secure development

environment requires:

• a repository for storing development objects

• mechanisms for managing versioned objects

• controlling access to the repository

• policies that impose restrictions on versioning operations

This document discusses each of the above, adding repository driven impact analysis, and continues

with a discussion on how the tools in Oracle Internet Developer Suite integrate with Oracle 9i SCM.

Page 3: Using Oracle9i SCM for Software Configuration Management · Using Oracle Repository for Software Configuration Management 6 CONFIGURATIONS Configurations identify specific versions

Using Oracle Repository for Software Configuration Management

3

ORACLE9I SCM OVERVIEW

Briefly, Oracle9i SCM is a software configuration management (SCM) system. It was previously

available only with Oracle Designer, which is used to model and generate data and applications. The

availability of Oracle9i SCM as a separate component helps developers who need an integrated

SCM capability for version control and code management outside the Oracle Designer environment.

As an integral component of Oracle9iDS, Oracle9i SCM manages structured and unstructured data

throughout the development life cycle. It supports multi-developer, multi-stream software

development projects of any size and complexity.

The key components of Oracle9i SCM are articulated around the repository meta data stored in an

Oracle database and various tools that are available to access the meta data as follows:

• Repository Object Navigator - provides easy to use graphic navigation through

repository storage

• Dependency Manager – maintains relationships of dependency among objects, for

example which data is used by which code

• Matrix Diagrammer – for analyzing impact of changes on objects

• Repository Administration Library – tools to maintain and administer Oracle

Repository

• Repository Reports – provides a variety of reports on Oracle Repository and its usage.

STORING DATA

Oracle9i SCM acts as a central storage area for structured and unstructured data. Structured data is

the meta data used as application building blocks. Application developers use modeling tools such

as Oracle9i Designer to create these object definitions in the underlying repository. Unstructured data

consists of all types of files and file systems e.g. Oracle Forms .FMB files, text documents, XML

files, DTDs, schemas, XSL stylesheets, SQL scripts, Java programs and images. Individual files or

complete file systems can be copied into the Oracle9i SCM repository (uploaded), and can then be

Page 4: Using Oracle9i SCM for Software Configuration Management · Using Oracle Repository for Software Configuration Management 6 CONFIGURATIONS Configurations identify specific versions

Using Oracle Repository for Software Configuration Management

4

accessed by other tools (e.g., text editors or word processors). Files created in the repository, or

uploaded to it, can also be copied to any accessible file system (downloaded).

In this overview, we use the generic term 'object' to refer to both structured objects and file system

objects. Within the SCM repository, objects are stored in containers.

Objects can be manipulated via a Java or PL/SQL API or via tools that use these APIs, such as the

Oracle9i SCM Command Line Interface or Repository Object Navigator. For more information on

these APIs see the Oracle9i SCM documentation.

CONTAINERS

Containers are a means of organizing data in a logical fashion, and are similar to directories in a file

system. Each object is owned by a container and has a set of audit properties that record details such

as the date when the object was created and who created the object.

There are two types of container: folders and application systems. Either can hold instances of any

type of repository object. Folders are available if you install only the core repository (for example

when using the repository as a source control system). Application systems are available (as well as

folders) if you install Oracle Designer model in the SCM repository. Containers are also used to

control access to repository objects. A user may be granted access to a container and thus to the

container objects.

Page 5: Using Oracle9i SCM for Software Configuration Management · Using Oracle Repository for Software Configuration Management 6 CONFIGURATIONS Configurations identify specific versions

Using Oracle Repository for Software Configuration Management

5

MANAGING DATA

Within the repository there may be many versions of objects. Oracle9i SCM has two primary

mechanisms for managing versioned repository objects:

WORKAREAS

Worakareas are specific views of the repository through which you can work on your own objects.

An individual user may not want to see a list of every version of every object in the repository. In

addition, some kind of mechanism is needed to ensure that one user does not interfere with another

user's work. Oracle9i SCM addresses both these requirements with workareas.

Workarea

Containers

Figure 1 Repository Object Navigator showing Containers

Page 6: Using Oracle9i SCM for Software Configuration Management · Using Oracle Repository for Software Configuration Management 6 CONFIGURATIONS Configurations identify specific versions

Using Oracle Repository for Software Configuration Management

6

CONFIGURATIONS

Configurations identify specific versions of objects and group them, e.g., to build a test suite or

release a product. A configuration is a collection of repository object versions that are related in

some way. Usually a configuration details all the object versions that represent a checkpoint in

development or component of an application, for example, all the object versions that make up a

payroll production application.

Oracle9i SCM provides facilities for the management of configurations, rather like the idea of

striping or labeling in some software configuration management systems. A specific object version

that is included in a configuration is said to be a member of that configuration. For example, when

Figure 2 Workarea views of the Repository

Page 7: Using Oracle9i SCM for Software Configuration Management · Using Oracle Repository for Software Configuration Management 6 CONFIGURATIONS Configurations identify specific versions

Using Oracle Repository for Software Configuration Management

7

the development of individual objects reaches the stage where you can build a particular application,

you need to specify exactly which version of each object is to be used for the build. The same

applies when assembling a set of objects to be used for a test or included in a patch release – the

configuration defines which versions of which objects are to be used.

ACCESS TO THE ORACLE9I SCM REPOSITORY

Access to the entire repository is controlled through Oracle database security. Anyone wishing to use

the Oracle9i SCM must already have an account on the database where it resides. Only a user with

database administrator (DBA) privileges can create user accounts on the database. At the time the

repository is installed, only the repository owner can access the repository. The repository owner can

subsequently authorize other existing database users to access the repository.

Once an account is created access to the repository and the tasks users can perform, are determined

by Repository privileges and access rights. Privileges allow a user to execute a particular Oracle9i

SCM tool. The users who own those items set access rights against workareas, containers and

configurations. Your access rights on any other type of repository object are determined from the

object's owning container. For example, if you have Select access rights on a container, you also have

Select access rights on all objects in that container.

Figure 3 Thick line represents a Configuration through object versions

Page 8: Using Oracle9i SCM for Software Configuration Management · Using Oracle Repository for Software Configuration Management 6 CONFIGURATIONS Configurations identify specific versions

Using Oracle Repository for Software Configuration Management

8

ORACLE 9I SCM REPOSITORY POLICIES

Oracle9i SCM provides users with policies that impose restrictions on the following version control

features:

• branching

• version labeling

• locking

When an automatic branching policy is set, all checked -out objects check in to the default branch set

for each workarea. Doing so ensures that specific development branches are not populated with

new object versions at critical periods in development, for example during a build. If no default

branch is set, or the automatic branching policy is not set, then objects check in to the same branch

they were checked out from.

When automatic version labeling is set, the repository automatically assigns a label for an object

version when it is checked in. This ensures adherence to a system-specified version-labeling scheme.

Users have the option to lock an object version when they check out the object.

IMPACT ANALYSIS

For many Oracle9i SCM users, it is important to assess the impact on the rest of an application of

changing one component - a process known as impact analysis. For example, developers could

investigate how many applications use a particular PL/SQL function, and thus discover whether a

change to the function would have a significant impact across the enterprise. Oracle9i SCM provides

a set of tools that are useful for impact analysis. For example, the Dependency Analyzer is a utility

that analyzes the relationships between objects in an application and allows users to determine the

effects of change.

Page 9: Using Oracle9i SCM for Software Configuration Management · Using Oracle Repository for Software Configuration Management 6 CONFIGURATIONS Configurations identify specific versions

Using Oracle Repository for Software Configuration Management

9

ORACLE9I SCM SETUP

Oracle9i SCM features a set of tools enabling Software Configuration Management in complex

development environments. The following section describes how an Oracle9i SCM development

environment is setup and used. Further detail is available in the online help.

First, use the Repository Administration Utility to create a repository and add Repository Users. At

least two types of user are required, a developer and a configuration manager. Developers must be

able to use the repository tools without reducing their productivity; thus they should be able to easily

create a development environment. Use the Repository Object Navigator as the configuration

manager to setup a workarea definition. This typically would include the latest object versions of a

software development. Include in this definition any branch and configuration rules that may be

required for a particular team of developers.

Consider the following example:

Workarea Ruleset:

• LATEST(GrantAccess)

• LATEST(AccessRights)

• LATEST(Payroll_1)

• INCLUDE_CONFIG(Payroll{MAIN;1}=Configuration)

The above workarea ruleset is taken from an Access Rights project on a Payroll Project and reads, in

order:

• include all the latest files that exist on a branch named GrantAccess. This is the task branch on

which a developer is working.

• then include all the latest files on the AccessRights branch, as long as they do not exist in the

above rule. This is known as the project branch.

• then include all the latest files on the Payroll_1 branch, as long as they do not exist in the above

rule. This is known as the Release branch.

Page 10: Using Oracle9i SCM for Software Configuration Management · Using Oracle Repository for Software Configuration Management 6 CONFIGURATIONS Configurations identify specific versions

Using Oracle Repository for Software Configuration Management

10

• then include all files that exist in the named configuration, again provided they are not already

included in the above two rules.

Using the Workarea Wizard save the above Workarea ruleset to a file. This file is made available to

developers working on the Access Rights Project. Viewed as a set of branches this looks like the

following:

Release Project Task

Branch Branch Branch

Figure 4 Branch Schematic

Each developer takes the Workarea ruleset file and creates his/her own workarea and ‘private task’

branch. A local filesystem directory is mapped to the root folder of the folder system, enabling files

to be checked out and worked upon. Files are created or modified and once complete are checked

onto the developer’s task branch. A modified or new file from the task branch is then merged onto

the Project branch by the developer or team leader. A team leader would then merge the Project

branch onto the Release branch. At each stage, both before and after merging, testing is performed.

The Repository Object Navigator and Commandline Tool are ideal for creating the above

environment. The Version History Viewer enables discrete versions of a file to be examined,

compared and merged.

Once all the required files from a project branch are complete and merged a configuration is created

of the Release branch at a point in time. This configuration is used to create a workarea from which

Page 11: Using Oracle9i SCM for Software Configuration Management · Using Oracle Repository for Software Configuration Management 6 CONFIGURATIONS Configurations identify specific versions

Using Oracle Repository for Software Configuration Management

11

a complete set of files can be downloaded to the filesystem. This then forms the release set of

software, which in turn goes on for testing.

Multi developer software projects with many code streams and developer branches are supported,

taking advantage of the underlying Oracle database performance and scalability features.

ORACLE9I SCM AS AN INTEGRAL PART OF ORACLE INTERNET DEVELOPER SUITE

Oracle9i SCM provides configuration management services for software development projects

from inception through deployment. It serves as an integrating mechanism in collaborative

development environments by providing access to relevant models, documents and code for team

members. Within Oracle Internet Developer Suite, the following products offer access to Oracle9i

SCM repository:

• Oracle JDeveloper (applicable to release 3.2 onward)

• Oracle Forms and Reports

• Oracle Designer

The remainder of this paper illustrates how each of the above works with Oracle Repository.

Page 12: Using Oracle9i SCM for Software Configuration Management · Using Oracle Repository for Software Configuration Management 6 CONFIGURATIONS Configurations identify specific versions

Using Oracle Repository for Software Configuration Management

12

ORACLE JDEVELOPER (APPLICABLE TO RELEASE 3.2 ONWARD)

Oracle JDeveloper can use Oracle9i SCM for code management. As shown in Figure 5, its main

menu allows files to be checked in/out of the Repository. Access is also given to the Repository

toolset. Files can be versioned, compared and merged as well as parsed to give dependency

information:

Parsing Java files provides dependency information that can be viewed in summary or detail form

using the Dependency Manager, as illustrated by Figure 6:

Figure 5 Oracle JDeveloper 3.2 Integration with Oracle Repository

Page 13: Using Oracle9i SCM for Software Configuration Management · Using Oracle Repository for Software Configuration Management 6 CONFIGURATIONS Configurations identify specific versions

Using Oracle Repository for Software Configuration Management

13

ORACLE FORMS AND REPORTS

Oracle Forms and Oracle Reports permit the source code (.fmb or .rdf ) to be stored and

maintained from Oracle Repository. Oracle Forms .fmb files can be versioned, compared, merged

and parsed to offer dependency information. Oracle Reports .rdf files can be versioned and parsed.

Figure 7 shows an example check-in of a report file.

Figure 6 Parsed Java file -showing dependencies

Page 14: Using Oracle9i SCM for Software Configuration Management · Using Oracle Repository for Software Configuration Management 6 CONFIGURATIONS Configurations identify specific versions

Using Oracle Repository for Software Configuration Management

14

Figure 7 Oracle Reports integration with Oracle Repository

ORACLE DESIGNER

Oracle Designer structured objects (i.e. Table and Entity definitions) are stored in Oracle Repository.

They can also be versioned, compared, merged and parsed to offer dependency information using

the Oracle Repository toolset. As an example, Figure 8 illustrates check-in of an Entity Relationship

diagram.

Page 15: Using Oracle9i SCM for Software Configuration Management · Using Oracle Repository for Software Configuration Management 6 CONFIGURATIONS Configurations identify specific versions

Using Oracle Repository for Software Configuration Management

15

SUMMARY

Several Software Configuration Management tools exist, ranging from single user, single code stream

to multi user, multi code stream. Oracle Repository offers a highly scalable, multi user SCM

environment, ideally suited to large-scale projects where rapid change and continuous delivery and

maintenance are required.

Oracle Repository provides a multi-user, managed and secure development environment enabling

the building of complex integrated applications. Oracle Repository stores both structured and

unstructured information, ensuring that all project documentation, definitions and code are stored in

one place. Without management of all project artifacts developers might work on the wrong code,

Figure 8 Oracle Designer Entity Relationship Diagrammer showing ‘check in’ of a structured Entity

Page 16: Using Oracle9i SCM for Software Configuration Management · Using Oracle Repository for Software Configuration Management 6 CONFIGURATIONS Configurations identify specific versions

Using Oracle Repository for Software Configuration Management

16

wasting valuable resources. As developers are required to be more productive and react to change

more quickly a managed and integrated SCM environment becomes essential.

Page 17: Using Oracle9i SCM for Software Configuration Management · Using Oracle Repository for Software Configuration Management 6 CONFIGURATIONS Configurations identify specific versions

Using Oracle Repository for Software Configuration Management

17

Oracle Corporation World Headquarters 500 Oracle Parkway Redwood Shores, CA 94065 U.S.A.

Worldwide Inquiries: +1.650.506.7000 Fax +1.650.506.7200 http://www.oracle.com/

Copyright © Oracle Corporation 2001 All Rights Reserved

This document is provided for informational purposes only, and the information herein is subject to change without notice. Please report any errors herein to Oracle Corporation. Oracle Corporation does not provide any warranties covering and specifically disclaims any liability in connection with this document.

Oracle is a registered trademark, and Oracle8i, Oracle8, PL/SQL, and Oracle Expert are trademarks of Oracle Corporation. All other company and product names mentioned are used for identification purposes only and may be trademarks of their respective owners.