20
Distribution After Release Tool Natalia Ratnikova

Distribution After Release Tool Natalia Ratnikova

Embed Size (px)

Citation preview

Page 1: Distribution After Release Tool Natalia Ratnikova

Distribution After Release Tool

Natalia Ratnikova

Page 2: Distribution After Release Tool Natalia Ratnikova

FNAL CD, 10 March 2004. Natalia Ratnikova <[email protected]> 2

Introduction

The Distribution After Release DAR tool was developed at Fermilab for quick-an-easy deployment of the software applications, which can run on the systems that do not have pre-existing application specific environment.

The concept and first tool prototype were proposed in 2001, and since the end of 2001 the tool was used for packaging and installation of the software applications in the CMS distributed MC Production.

Page 3: Distribution After Release Tool Natalia Ratnikova

FNAL CD, 10 March 2004. Natalia Ratnikova <[email protected]> 3

DAR Concept

The distribution unit is an application, which is considered to be a complete, self-contained software program, including required shared libraries and other files.

Applications are executed in a particular runtime environment and accomplish a particular computing task.

Page 4: Distribution After Release Tool Natalia Ratnikova

FNAL CD, 10 March 2004. Natalia Ratnikova <[email protected]> 4

DAR Concept (cont)

Natural and important requirement assumed for the distributed computing on the Grid, is that software applications should be relocatable: software could be installed and executed in the arbitrary location in the file system visible on the worker node.

This complies with the Grid architectures, where the disk space required for the software installation can be allocated by the resource broker, along with other resources such as CPU time, etc.

Page 5: Distribution After Release Tool Natalia Ratnikova

FNAL CD, 10 March 2004. Natalia Ratnikova <[email protected]> 5

DAR Concept (cont)

We proceed from the following assumptions: relocatable software does not contain hard-

coded absolute paths in the program or in the shared libraries (except those referred to the system area)

all required executables are found in the locations specified in the PATH environment variable, which is extended appropriately for each given application

distributions containing pre-compiled binaries may rely on the operating system compatibility.

Page 6: Distribution After Release Tool Natalia Ratnikova

FNAL CD, 10 March 2004. Natalia Ratnikova <[email protected]> 6

DAR Concept (cont)

Most of real quality software products are relocatable, and the actual locations of the software components for a given installation are usually defined in the software configuration parameters.

One of the standard ways to pass the configuration information to the application during the runtime is through the use of the UNIX shell environment variables, such as PATH, LD_LIBRARY_PATH, and others.

Page 7: Distribution After Release Tool Natalia Ratnikova

FNAL CD, 10 March 2004. Natalia Ratnikova <[email protected]> 7

DAR Concept (cont)

Most of real quality software products are relocatable, and the actual locations of the software components for a given installation are usually defined in the software configuration parameters.

One of the standard ways to pass the configuration information to the application during the runtime is through the use of the UNIX shell environment variables, such as PATH, LD_LIBRARY_PATH, and others.

Page 8: Distribution After Release Tool Natalia Ratnikova

FNAL CD, 10 March 2004. Natalia Ratnikova <[email protected]> 8

DAR Concept (cont)

DAR is using the set of the runtime environment variable specific for a given applications in order to decide which files need to be packaged into the distribution DAR file.

The DAR file is then delivered to the working site, and can be installed in any new directory. The runtime environment for the application is set using script generated by DAR during the installation.

Page 9: Distribution After Release Tool Natalia Ratnikova

FNAL CD, 10 March 2004. Natalia Ratnikova <[email protected]> 9

DAR Implementation

DAR distinguishes three types of the runtime environment variables:

1. Variable value is associated with some path to the existing file or directory in the local file system.

2. PATH-like variables: specify a list of paths in the local file system (entries are separated by the colon delimiter).

3. Simple values: not associated with any existing object in the local file system. These could be special flags controlling the execution mode, URL addresses, and other parameters that may be used during the execution time.

Page 10: Distribution After Release Tool Natalia Ratnikova

FNAL CD, 10 March 2004. Natalia Ratnikova <[email protected]> 10

DAR Implementation (cont)

All physical files and directories found in the locations specified through the runtime environment variables are copied into the distribution, preserving the underlying directory structure.

In case of PATH-like variables DAR walks through the specified list of paths and copies all contents into separate directories.

Page 11: Distribution After Release Tool Natalia Ratnikova

FNAL CD, 10 March 2004. Natalia Ratnikova <[email protected]> 11

DAR Implementation (cont)

During installation DAR generates shell setup environment script to be used later to initialize the application environment according to the actual location of the software installation.

The directory structure and the order of paths in the PATH-like variables are preserved to guarantee that the application will pick the same objects as in the original environment.

Page 12: Distribution After Release Tool Natalia Ratnikova

FNAL CD, 10 March 2004. Natalia Ratnikova <[email protected]> 12

Optimizations

Of course the resulting DAR file will likely contains superfluous directories and files. DAR provides options for more selective packaging.

The same files can be referred through different environment variables. To avoid multiple copies in the distribution, DAR recognizes this situations and includes only one instance of the file into the distribution, and substitutes other references by symbolic links.

Page 13: Distribution After Release Tool Natalia Ratnikova

FNAL CD, 10 March 2004. Natalia Ratnikova <[email protected]> 13

Optimizations

The erase option allows expert to remove files or directories that are formerly referred by the application environment, but are known to be not necessary for running the application. For example: *.html\;*.ps\;*.pdf\;CVS etc .

In general detection of files, that could be safely excluded, requires expert's knowledge of the software application. It may take several iterations to figure out what can be removed, and whether it is efficient and safe.

Page 14: Distribution After Release Tool Natalia Ratnikova

FNAL CD, 10 March 2004. Natalia Ratnikova <[email protected]> 14

Optimizations

Of course the resulting DAR file will likely contains superfluous directories and files. DAR provides options for more selective packaging.

The same files can be referred through different environment variables. To avoid multiple copies in the distribution, DAR recognizes this situations and includes only one instance of the file into the distribution, and substitutes other references by symbolic links.

Page 15: Distribution After Release Tool Natalia Ratnikova

FNAL CD, 10 March 2004. Natalia Ratnikova <[email protected]> 15

Tests The measure of success is a reproducible operation of the

application. Following tests are usually applied: Compare output in the native

environment and installed from the distribution DAR file on the same node. The difference indicate that the application is not truly relocatable, or that the use of expert options broke the consistency of the application.

Test application on a different node. The difference indicates some inconsistency of the system setup on different nodes.

Compare the contents of the installation directory against the list of files and their checksums provided by DAR : insure that the installation itself was not corrupted

Page 16: Distribution After Release Tool Natalia Ratnikova

FNAL CD, 10 March 2004. Natalia Ratnikova <[email protected]> 16

Using DAR in CMS production

DAR created distributions are being used as a mandatory way to install software for the official CMS Monte Carlo production.

Using the same set of applications and consistent software distribution mechanisms insured stable performance and trustworthy results.

Page 17: Distribution After Release Tool Natalia Ratnikova

FNAL CD, 10 March 2004. Natalia Ratnikova <[email protected]> 17

Production Coordinator

RefDBReferenceDatabase

MassStorage

Pro

du

ctio

n

Req

ues

t

Assignment

Req

uest

for

App

licat

ion

DAR

file

MOPJob

Submitter MCRunJob

JobGenerator

Job

Definition

CMSPhysicsGroup

Ph

ysic

s R

equ

est

Software

DARPackaging

SRBStorage

ResourceBroker

DAR file

Physics Data

ProductionGRID

CMSHappy

Physicist Physics

ProposalP

roduced

Data

GR

ID J

ob

S

ub

mis

sio

n

CMS physics data production cycle:

Page 18: Distribution After Release Tool Natalia Ratnikova

FNAL CD, 10 March 2004. Natalia Ratnikova <[email protected]> 18

Current Status

DAR-based distribution scheme is successfully used in the CMS event production for an extended period of time. It allows to keep the pace with the software developments and deliver software applications to the productions sites with ease and in a timely fashion.

Being re-packaged into RPM files, applications is re-used within different distribution approaches (LCFG).

Page 19: Distribution After Release Tool Natalia Ratnikova

FNAL CD, 10 March 2004. Natalia Ratnikova <[email protected]> 19

Future Work

Optimizations for distributed data analysis (time and space).

Generalization and extended functionality

Internal improvements for better maintainability, documentation.

Considering providing a DAR GUI and web services.

Page 20: Distribution After Release Tool Natalia Ratnikova

FNAL CD, 10 March 2004. Natalia Ratnikova <[email protected]> 20

References

1. Natalia M. Ratnikova, Gregory E. Graham, CMS Software Distribution and Installation Systems: Concepts, Practical Solutions and Experience at Fermilab as a CMS Tier 1 Center. Proceedings of CHEP01, Beijing, September, 2001

2. N. Ratnikova, A. Sciaba, S. Wynhoff, Distributing Applications in Distributed Environment. NIMA, Volume 502, No. 2-3, (April 2003) 458-460.

3. V.Lefebure, RefDB: A Reference Database for CMS Monte Carlo Production. CHEP03 proceedings, CHEP03, La Jolla, March, 2003.

4. Gregory E. Graham, et al, The CMS Integration Grid Testbed. CHEP03 proceedings,CHEP03, La Jolla, March, 2003