ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/COMP/XCMSI/modules/GridInstall_help.pm
Revision: 1.3
Committed: Thu Feb 17 13:09:13 2005 UTC (20 years, 2 months ago) by krabbert
Content type: text/plain
Branch: MAIN
CVS Tags: XCMSI_0_9_pre8, XCMSI_0_9_pre7, XCMSI_0_9_pre6, XCMSI_0_9_pre5
Changes since 1.2: +5 -3 lines
Log Message:
Changed on-request im/exporting to auto-im/exporting modules contents

File Contents

# User Rev Content
1 corvo 1.1 #!/usr/bin/perl
2 krabbert 1.3 # $Id: GridInstall_help.pm,v 1.2 2004/12/10 15:14:10 nowack Exp $
3     # last modified:
4     # kr, 17.02.2005: Change on-request im/export to auto-im/export
5 corvo 1.1 package GridInstall_help;
6    
7     use Cwd;
8 krabbert 1.3 use site_utils;
9 corvo 1.1 our (@ISA, @EXPORT, @EXPORT_OK);
10     use Exporter;
11     @ISA = qw(Exporter);
12 krabbert 1.3 @EXPORT = qw(&help);
13 corvo 1.1
14     sub help {
15    
16     my $option = shift or 'man';
17     $helpStr = "
18    
19     =pod
20    
21     =head1 NAME
22    
23     B<" . $::exec . " > - (version 0.0.1).
24    
25     =head1 SYNOPSIS
26    
27     B<$::exec> [I<options>]
28    
29     =head1 DESCRIPTION
30    
31     I<". $::exec ."> is a Perl program intended to simplify the process
32     of creation and submission of CMS software installation jobs.
33     The program is able to generate scripts for different CMS
34     software types (tar, DAR, RPM) and submit them to the a given site.
35    
36     This script is based on queries on LCG BDIIs, that is on LCG Information system. It asks a given site, or site set,
37     for the published software tags (e.g. VO-cms-ORCA_8_6_0) and, according to the answer, performs the
38     best action, either full \"from scratch\" installation, or a simple upgrade.
39    
40     Then it updates the site Information System with the latest installed software tag.
41    
42     Multiple software installations are supported. The core installation script is I<cmsi>.
43    
44     B<". $::exec . "> relies on a set of different perl fragments, which can be combined to perform the right installation
45     according to the chosen software flavour.
46    
47     Once perl scripts and jdl files have been assembled, jobs are submitted to the target Computing Elements. Once landed on Worker Nodes
48     the scripts check the environment, basically an anvironment variable called \$VO_CMS_SW_DIR where CMS software is supposed
49     to be installed. Then I<cmsi> starts installing rpms.
50    
51     Finally the Information System is updated with the publishing of the new software tags.
52    
53     =head1 OPTIONS
54    
55     =over 4
56    
57     =item B<-i, --install> I< software name >
58    
59     Declares the software you want to install. It's possible to declare multiple software
60     (e.g. --install \"ORCA_8_6_0 OSCAR_3_6_1\")
61    
62     =item B<-u, --uninstall> I< software name >
63    
64     Declares the software you want to uninstall.
65    
66     =item B<-t, --type> I< software type >
67    
68     Declares the kind of distribution you're going to install. Possible value are tar, dar and rpm.
69    
70     =item B<-s, --site > I<site>
71    
72     Declares where you would like to install the given software. It can be a full URL or a domain name, e.g.
73     gridit001.pd.infn.it or infn.it.
74    
75     =item B<-l, --label> I< software tag >
76    
77     Defines the software tag you're going to publish on a site Information System. Conventionally CMS adopted:
78     VO-cms-I< software name >
79    
80     =item B<-b, --bdii> I<bdii>
81    
82     Defines the BDII to retrieve sites' software tag. LCG has no hierarchical Information System, so one has to define
83     \'a priori\' the BDII containing the choosen site to install. CMS has a official BDII, that is lxn1187.cern.ch. There's also
84     a \'test zone\' BDII, lxn1189.cern.ch, containing sites which are not yet LCG certified.
85    
86     =item B<-o, --org> I< virtual organization>
87    
88     Your Virtual Organization. Default is \'cms\'. The script selects for installation only those sites belonging to the given VO.
89     The user must have a valid grid certificate to be recognized by the information system.
90    
91     =back
92    
93    
94     =head1 EXAMPLES
95    
96     $::exec --install ORCA_8_6_0 -t rpm --site pd.infn.it --label VO-cms-ORCA_8_6_0\n
97    
98     installs Orca, version 860 and rpm flavour, in Padova.
99    
100     $::exec --install ORCA_8_6_0 -t rpm --site fzk.de --label VO-cms-ORCA_8_6_0 --bdii lxn1189.cern.ch\n
101    
102     installs Orca, version 860 and rpm flavour, in FZK querying the \"test BDII\" at Cern.
103    
104     $::exec --install CMKIN_3_2_0 -t tar --site pd.infn.it --label VO-cms-CMKIN_3_2_0_dar\n
105    
106     installs CMKIN, version 320 and tar flavour, in Padova.
107    
108     $::exec --uninstall ORCA_8_2_0 -t rpm --site pd.infn.it --label VO-cms-ORCA_8_2_0\n
109    
110     uninstalls Orca from Padova and removes the software tag from the Information System.
111    
112     =head1 ENVIRONMENT
113    
114     If user wants to submit jobs in GRID, which is default, it is necessary
115     to create a proxy certificate
116    
117     grid-proxy-init
118    
119     =cut";
120    
121     my $pod = getcwd() . '/CmsSwGridInstall.pod';
122     open($fh, ">$pod");
123     print ($fh $helpStr);
124     close $fh;
125     my $man = getcwd() . '/CmsSwGridInstall.man';
126     my $pod2man = 'pod2man --center=" " --release=" " ' . $pod . ' > ' . $man;
127     &execSys($pod2man);
128     my $cmd = 'man '. $man;
129     system($cmd);
130     exit;
131     }