[Bio] / FigCommon / setup-sge.pl Repository:
ViewVC logotype

Annotation of /FigCommon/setup-sge.pl

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (view) (download) (as text)

1 : olson 1.1 #
2 :     # Configure the SGE install for this machine.
3 :     #
4 :     # We copy the SGE directory from the common runtime
5 :     # directory to the directory FIGdisk/gendb/SGE so that
6 :     # we can have a custom installation as part of the build
7 :     # (this should help in the configuration of the system
8 :     # if one copies a figdisk from one machine to another).
9 :     #
10 :    
11 :     use FIG_Config;
12 :     use FIG;
13 :    
14 :     my $root = "$FIG_Config::fig_disk/gendb/SGE";
15 :    
16 :     my $cell = "default";
17 :    
18 :     if (-d "$root/$cell")
19 :     {
20 :     die "It appears that SGE is already configured in $root.\n";
21 :     }
22 :    
23 :     my $sge_src = "$FIG_Config::common_runtime/sge";
24 :     if (! -d $sge_src)
25 :     {
26 :     die "Cannot find SGE source directory $sge_src\n";
27 :     }
28 :    
29 :    
30 :     &FIG::verify_dir($root);
31 :     my $rc = system("cd $sge_src; tar cf - . | (cd $root; tar xfp -)");
32 :     if ($rc != 0)
33 :     {
34 :     die "Copy of sge from $FIG_Config::common_runtime/sge failed\n";
35 :     }
36 :    
37 :     #
38 :     # Just use these defaults for now.
39 :     my %replacements = (ROOT => $root,
40 :     QMASTER_PORT => 10111,
41 :     EXECD_PORT => 10112,
42 :     CELL_NAME => $cell,
43 :     GID_RANGE=> '20000-20100',
44 :     ADMIN_HOSTS => "localhost",
45 :     SUBMIT_HOSTS => "localhost",
46 :     EXEC_HOSTS => "localhost",
47 :     );
48 :    
49 :     my $conf = "$root/SGE_Config";
50 :     open(CONF, ">$conf") or die "Cannot open $conf for writing: $!\n";
51 :    
52 :     while (<DATA>)
53 :     {
54 :     my $k, $v;
55 :     while (($k, $v) = each(%replacements))
56 :     {
57 :     s/\@$k\@/$v/g;
58 :     }
59 :     print CONF $_;
60 :     }
61 :     close(DATA);
62 :     close(CONF);
63 :    
64 :     chdir($root) or die "Cannot chdir $root: $!\n";
65 :    
66 :     my $inst = "$root/inst_sge";
67 :    
68 :     -x $inst or die "Cannot execute $inst\n";
69 :    
70 :     $rc = system($inst, qw(-m -x -auto ./SGE_Config));
71 :    
72 :     if ($rc != 0)
73 :     {
74 :     die "$inst failed\n";
75 :     }
76 :     print "SGE setup to $root succeeded\n";
77 :    
78 :    
79 :     __DATA__
80 :     #-------------------------------------------------
81 :     # SGE default configuration file
82 :     #-------------------------------------------------
83 :    
84 :     # Use always fully qualified pathnames, please
85 :    
86 :     # SGE_ROOT Path, this is basic information
87 :     #(mandatory for qmaster and execd installation)
88 :     SGE_ROOT=@ROOT@
89 :    
90 :     # SGE_QMASTER_PORT is used by qmaster for communication
91 :     # Please enter the port in this way: 1300
92 :     # Please do not this: 1300/tcp
93 :     #(mandatory for qmaster installation)
94 :     SGE_QMASTER_PORT=@QMASTER_PORT@
95 :    
96 :     # SGE_EXECD_PORT is used by execd for communication
97 :     # Please enter the port in this way: 1300
98 :     # Please do not this: 1300/tcp
99 :     #(mandatory for qmaster installation)
100 :     SGE_EXECD_PORT=@EXECD_PORT@
101 :    
102 :     # CELL_NAME, will be a dir in SGE_ROOT, contains the common dir
103 :     # Please enter only the name of the cell. No path, please
104 :     #(mandatory for qmaster and execd installation)
105 :     CELL_NAME="@CELL_NAME@"
106 :    
107 :     # The dir, where qmaster spools this parts, which are not spooled by DB
108 :     #(mandatory for qmaster installation)
109 :     QMASTER_SPOOL_DIR=$SGE_ROOT/$CELL_NAME/spool/qmaster
110 :    
111 :     # The dir, where the execd spools (active jobs)
112 :     # This entry is needed, even if your are going to use
113 :     # berkeley db spooling. Only cluster configuration and jobs will
114 :     # be spooled in the database. The execution daemon still needs a spool
115 :     # directory
116 :     #(mandatory for qmaster installation)
117 :     EXECD_SPOOL_DIR=$SGE_ROOT/$CELL_NAME/spool
118 :    
119 :     # For monitoring and accounting of jobs, every job will get
120 :     # unique GID. So you have to enter a free GID Range, which
121 :     # is assigned to each job running on a machine.
122 :     # If you want to run 100 Jobs at the same time on one host you
123 :     # have to enter a GID-Range like that: 16000-16100
124 :     #(mandatory for qmaster installation)
125 :     GID_RANGE=@GID_RANGE@
126 :    
127 :     # If SGE is compiled with -spool-dynamic, you have to enter here, which
128 :     # spooling method should be used. (classic or berkeleydb)
129 :     #(mandatory for qmaster installation)
130 :     SPOOLING_METHOD="berkeleydb"
131 :    
132 :     # Name of the Server, where the Spooling DB is running on
133 :     # if spooling methode is berkeleydb, it must be "none", when
134 :     # using no spooling server and it must containe the servername
135 :     # if a server should be used. In case of "classic" spooling,
136 :     # can be left out
137 :     DB_SPOOLING_SERVER="none"
138 :    
139 :     # The dir, where the DB spools
140 :     # If berkeley db spooling is used, it must contain the path to
141 :     # the spooling db. Please enter the full path. (eg. /tmp/data/spooldb)
142 :     # Remember, this directory must be local on the qmaster host or on the
143 :     # Berkeley DB Server host. No NSF mount, please
144 :     DB_SPOOLING_DIR=$SGE_ROOT/$CELL_NAME/spool/spooldb
145 :    
146 :     # A List of Host which should become admin hosts
147 :     # If you do not enter any host here, you have to add all of your hosts
148 :     # by hand, after the installation. The autoinstallation works without
149 :     # any entry
150 :     ADMIN_HOST_LIST="@ADMIN_HOSTS@"
151 :    
152 :     # A List of Host which should become submit hosts
153 :     # If you do not enter any host here, you have to add all of your hosts
154 :     # by hand, after the installation. The autoinstallation works without
155 :     # any entry
156 :     SUBMIT_HOST_LIST="@SUBMIT_HOSTS@"
157 :    
158 :     # A List of Host which should become exec hosts
159 :     # If you do not enter any host here, you have to add all of your hosts
160 :     # by hand, after the installation. The autoinstallation works without
161 :     # any entry
162 :     # (mandatory for execution host installation)
163 :     EXEC_HOST_LIST="@EXEC_HOSTS@"
164 :    
165 :     # The dir, where the execd spools (local configuration)
166 :     # If you want configure your execution daemons to spool in
167 :     # a local directory, you have to enter this directory here.
168 :     # If you do not want to configure a local execution host spool directory
169 :     # please leave this empty
170 :     EXECD_SPOOL_DIR_LOCAL="$SGE_ROOT/$CELL_NAME/spool"
171 :    
172 :     # If true, the domainnames will be ignored, during the hostname resolving
173 :     # if false, the fully qualified domain name will be used for name resolving
174 :     HOSTNAME_RESOLVING="true"
175 :    
176 :     # Shell, which should be used for remote installation (rsh/ssh)
177 :     # This is only supported, if your hosts and rshd/sshd is configured,
178 :     # not to ask for a password, or promting any message.
179 :     SHELL_NAME="ssh"
180 :    
181 :     # Enter your default domain, if you are using /etc/hosts or NIS configuration
182 :     DEFAULT_DOMAIN="none"
183 :    
184 :     # If a job stops, fails, finnish, you can send a mail to this adress
185 :     ADMIN_MAIL="none"
186 :    
187 :     # If true, the rc scripts (sgemaster, sgeexecd, sgebdb) will be added,
188 :     # to start automatically during boottime
189 :     ADD_TO_RC="false"
190 :    
191 :     #If this is "true" the file permissions of executables will be set to 755
192 :     #and of ordenary file to 644.
193 :     SET_FILE_PERMS="true"
194 :    
195 :     # This option is not implemented, yet.
196 :     # When a exechost should be uninstalled, the running jobs will be rescheduled
197 :     RESCHEDULE_JOBS="wait"
198 :    
199 :     # Enter a one of the three distributed scheduler tuning configuration sets
200 :     # (1=normal, 2=high, 3=max)
201 :     SCHEDD_CONF="1"
202 :    
203 :     # The name of the shadow host. This host must have read/write permission
204 :     # to the qmaster spool directory
205 :     # If you want to setup a shadow host, you must enter the servername
206 :     # (mandatory for shadowhost installation)
207 :     SHADOW_HOST="none"
208 :    
209 :     # Remove this execution hosts in automatic mode
210 :     # (mandatory for unistallation of execution hosts)
211 :     EXEC_HOST_LIST_RM="localhost"
212 :    
213 :     # This option is used for startup script removing.
214 :     # If true, all rc startup scripts will be removed during
215 :     # automatic deinstallation. If false, the scripts won't
216 :     # be touched.
217 :     # (mandatory for unistallation of execution/qmaster hosts)
218 :     REMOVE_RC="false"

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3