20
P. Wellisch, CERN/EP/SFT SCRAM SCRAM Information on SCRAM J.P. Wellisch, C. Williams, S. Ashby

J.P. Wellisch, CERN/EP/SFT SCRAM Information on SCRAM J.P. Wellisch, C. Williams, S. Ashby

Embed Size (px)

Citation preview

Page 1: J.P. Wellisch, CERN/EP/SFT SCRAM Information on SCRAM J.P. Wellisch, C. Williams, S. Ashby

J.P. Wellisch, CERN/EP/SFT

SCRAMSCRAM

Information on SCRAM

J.P. Wellisch,

C. Williams,

S. Ashby

Page 2: J.P. Wellisch, CERN/EP/SFT SCRAM Information on SCRAM J.P. Wellisch, C. Williams, S. Ashby

J.P. Wellisch, CERN/EP/SFT

A SCRAM Managed ProjectA SCRAM Managed Project

SCRAM PROJECT

RequirementsDocument

<doc type=Requirements><base url=cvs://cmsdoc.ce..><require name=HelloWorld version=1.0>

BootStrap<doc type=BootStrap><base cvs=//cvsbase/abs>BootStrap

<doc type=BootStrap><base cvs=//cvsbase/abs>BootStrap

<doc type=BootStrap><base cvs=//cvsbase/abs>

BuildFile<Use name=fred><External ref=X11>BuildFile

<Use name=fred><External ref=X11>BuildFile

<Use name=fred><External ref=X11>

BuildSystemConfiguration

ConfigurationManagement

• scram_version

Source codeDistribution

Page 3: J.P. Wellisch, CERN/EP/SFT SCRAM Information on SCRAM J.P. Wellisch, C. Williams, S. Ashby

J.P. Wellisch, CERN/EP/SFT

Part of a component systemPart of a component system

Interfaces towards– Code management– Change management– Binary distribution– Dependency analysis– Coding rule and style rule analysis– Software QA– Metrics– Integration – validation– Etc..

Page 4: J.P. Wellisch, CERN/EP/SFT SCRAM Information on SCRAM J.P. Wellisch, C. Williams, S. Ashby

J.P. Wellisch, CERN/EP/SFT

Configuration managementConfiguration management

Based around the following concepts:– PBS (Product break-down)– Product specification– Product versioning– Configuration definition and versioning– Product-wise configuration specification– ABS (Assembly break-down)

Page 5: J.P. Wellisch, CERN/EP/SFT SCRAM Information on SCRAM J.P. Wellisch, C. Williams, S. Ashby

J.P. Wellisch, CERN/EP/SFT

The key to successThe key to success

Configuration swim-lanes– Scram allows to define a set of internally compatible

swim-lanes of configuration

– These are backwards compatible extensions of the starting configuration of the swim-lane.

– These are indispensable for staged mass production through the full chain of generation, simulation, reconstruction and analysis, where part of the code is developed, while other parts are already in production use.

Page 6: J.P. Wellisch, CERN/EP/SFT SCRAM Information on SCRAM J.P. Wellisch, C. Williams, S. Ashby

J.P. Wellisch, CERN/EP/SFT

SCRAM resource mappingSCRAM resource mapping

SCRAM

Applicationrequires:CLHEP 1.5Objectivity 5.2NAG 3.1X11 R6

Linux 2.2Information on target system is extracted and stored by SCRAM

InstallationPlatformLinux 2.2

CLHEP 1.7

X11 R6

Object..6.2

NAG 3.1

InstallationPlatformSunOS 5.8

CLHEP 1.7

X11 R6

Object..6.2

NAG 3.1Installed Products

ApplicationSystem Map

Page 7: J.P. Wellisch, CERN/EP/SFT SCRAM Information on SCRAM J.P. Wellisch, C. Williams, S. Ashby

J.P. Wellisch, CERN/EP/SFT

SCRAM project development SCRAM project development distribution modeldistribution model

BootStrap<doc type=BootStrap><base cvs=//cvsbase/abs>

CentralRelease Area

CentralRelease Area

CentralRelease Area

Describes project

Site A Site B Site C

Developers Areas

Page 8: J.P. Wellisch, CERN/EP/SFT SCRAM Information on SCRAM J.P. Wellisch, C. Williams, S. Ashby

J.P. Wellisch, CERN/EP/SFT

Requirements Document - Requirements Document - Sharing Configurations Sharing Configurations

between projectsbetween projectsRepository A

CommonRequirements Doc

Repository C

Project 2Requirements Doc

Repository B

Project 1Requirements Doc

<include url=“RepositoryA:Common Requirements Doc”>

Project 1Requirements Doc

CommonRequirements Doc

CommonRequirements Doc

Project 2Requirements Doc

Inlined byActiveDocPreProcessor

•mechanisms to restrict the included configuration exist

Page 9: J.P. Wellisch, CERN/EP/SFT SCRAM Information on SCRAM J.P. Wellisch, C. Williams, S. Ashby

J.P. Wellisch, CERN/EP/SFT

Project Configuration Project Configuration RequirementsRequirements

Requirements Document– defines products and versions of external packages

(tools)– tool description document (url) required for each tool– Refers to a configuration file in case of multi-project

environment Keep Consistent configurations between

projects with a centrally maintained Configuration Document– mechanisms to restrict the configuration exist

Page 10: J.P. Wellisch, CERN/EP/SFT SCRAM Information on SCRAM J.P. Wellisch, C. Williams, S. Ashby

J.P. Wellisch, CERN/EP/SFT

Tool Configuration Tool Configuration ManagementManagement

SCRAMtOOLbOX– Each tool has its own configuration environment– Know exactly what product/version is being used

Finding which tools are available in the toolbox

>scram tool listclhep 1.5 (default 1.5)objectspace 2.0 (default 2.0)objectivity 5.1.2 (default 5.1.2)

Page 11: J.P. Wellisch, CERN/EP/SFT SCRAM Information on SCRAM J.P. Wellisch, C. Williams, S. Ashby

J.P. Wellisch, CERN/EP/SFT

Tool Description DevelopmentTool Description Development

Development of tool description documents– Edit the apropriate file in .SCRAM/ToolFiles directory

e.g. CLHEP version 5.0 would be stored as clhep_5.0

– Run the tool setup command to initiate the changes e.g. scram setup clhep 5.0

– To be useful outside of your area these documents should be made available on a server (e.g. cvs) so they can be accessed by the url mechanism

Page 12: J.P. Wellisch, CERN/EP/SFT SCRAM Information on SCRAM J.P. Wellisch, C. Williams, S. Ashby

J.P. Wellisch, CERN/EP/SFT

SCRAM project installationSCRAM project installation

BootStrap DocumentPublished with eachRelease of a product

Client Downloads Document runs throughSCRAM

BootStrap<doc type=BootStrap><base cvs=//cvsbase/abs>

1.2.

3.SCRAM assembles components describedin BootStrap document into a designated Central Installation Area.

Page 13: J.P. Wellisch, CERN/EP/SFT SCRAM Information on SCRAM J.P. Wellisch, C. Williams, S. Ashby

J.P. Wellisch, CERN/EP/SFT

SCRAM project installation SCRAM project installation model (contd)model (contd)4. If a Requirements Document is

specified, SCRAM tries to find the requested products on the client system or the site file, and creates a map in the Installation Area.

RequirementsDocument

<doc type=Requirements><base url=cvs://cmsdoc.ce..><require name=HelloWorld version=1.0>

5. The client may, depending on the individual project, need to build the installation on the client system with the ‘scram build’ command.

Page 14: J.P. Wellisch, CERN/EP/SFT SCRAM Information on SCRAM J.P. Wellisch, C. Williams, S. Ashby

J.P. Wellisch, CERN/EP/SFT

SCRAM project installation SCRAM project installation model (contd)model (contd)

Freeze The Central Installation Area

6.

7.Register the Installation in the scram database(‘scram install’ command). It is now ready for use

All OK? Then ...

Page 15: J.P. Wellisch, CERN/EP/SFT SCRAM Information on SCRAM J.P. Wellisch, C. Williams, S. Ashby

J.P. Wellisch, CERN/EP/SFT

Developer AreasDeveloper Areas

S C R A M P R O JE C T A R E A

D eve lop er A reaO R C A _ 6 _ 0 _ 0

D eve lop er A reaO R C A _ 6 _ 0 _ 0

C en tra l In s ta lla tionO R C A _ 6 _ 0 _ 0

• Isolated and well defined environment to develop code

• Based against a central release area from which it can draw resources

Page 16: J.P. Wellisch, CERN/EP/SFT SCRAM Information on SCRAM J.P. Wellisch, C. Williams, S. Ashby

J.P. Wellisch, CERN/EP/SFT

Creating a Developer AreaCreating a Developer Area

Area Creation - scram project

>scram project ORCA ORCA_5_4_0

scram project options :

Developer Area ORCA_5_4_0

•Created in local directory•Directory Name has format Name_Version

(N.B. Removal of project name from version)

-n alternative_name - Specify a different name for the area-d directory - Create in directory specified rather than locally

Page 17: J.P. Wellisch, CERN/EP/SFT SCRAM Information on SCRAM J.P. Wellisch, C. Williams, S. Ashby

J.P. Wellisch, CERN/EP/SFT

Environment VariablesEnvironment Variables

Setting Up the environment - scram runtime

>eval `scram runtime -csh` use -sh for borne shells>cd developer_area you should be in an area

•Your environment is now set for the developer_area•Undoes the effect of any previous scram runtime command (Makes it easy to switch between areas)

•Instead of using eval you could redirect the output from the scram runtime to a file which you could source when appropriate.

Page 18: J.P. Wellisch, CERN/EP/SFT SCRAM Information on SCRAM J.P. Wellisch, C. Williams, S. Ashby

J.P. Wellisch, CERN/EP/SFT

Build System - BuildFilesBuild System - BuildFiles

Can be anywhere in source tree Used to override defaults, add additional

build information, specify interfaces and dependencies.

Written as XML style documents

>scram build•Performs the default build operations corresponding to the current directory

Page 19: J.P. Wellisch, CERN/EP/SFT SCRAM Information on SCRAM J.P. Wellisch, C. Williams, S. Ashby

J.P. Wellisch, CERN/EP/SFT

The BuildSystem The BuildSystem Configuration MappingConfiguration Mapping

srcsrc

subsystems packages

test

SubSystem BuildFile

<Use name=fred><External ref=X11>

library src

BuildFile<Use name=fred><External ref=X11>

Package BuildFile

<Use name=fred><External ref=X11>

unit test BuildFile

<Use name=fred><External ref=X11>

Build Configuration

Package B

BuildFile<Use name=fred><External ref=X11>

•BuildFile describes Build functionality

Page 20: J.P. Wellisch, CERN/EP/SFT SCRAM Information on SCRAM J.P. Wellisch, C. Williams, S. Ashby

J.P. Wellisch, CERN/EP/SFT

BuildSystem - Build ClassesBuildSystem - Build ClassesExample:

Archive

Shared Debug Shared

DebugArchive

ProfiledShared

ProfiledArchive

Library Class

Select a subset as a default build operation.Default can be overridden on the command line.

BuildFile<Use name=fred><External ref=X11>

BuildFile Requests a Classand sets parameters such as source code, library name, etc.