<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>
<head>
   <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
   <meta name="GENERATOR" content="Mozilla/4.78 [en] (X11; U; Linux 2.4.9-13 i686) [Netscape]">
<link rel="stylesheet" type="text/css" href="../styles/style2.css">
</head>
<body>
Below the steps are described that need to be taken to set up the ASTRO-WISE
Environment database, fileserver and parallel processing parts.

It is assumed that the pipeline is already installed according to the
<a href="http://cvs.astro-wise.org/cgi-bin/viewcvs/cgi/viewcvs.cgi/opipe/README?rev=HEAD&content-type=text/vnd.viewcvs-markup">README</a>
(see also <a href="cvs.html">CVS howto</a>) and that the environment can be
started with the <tt>awe</tt> command.

<ol>

 <li>Install the pipeline if you have not already done so and create a databae
 account.
 </li>

 <li>In your <tt>~/.awe/Environment.cfg</tt> set
 <pre>database_engine : oracle_9i
database_name : &lt;tnsname of your database here&gt;
database_user : &lt;name of the database account you created previously&gt;
</pre>
 Then start <tt>awe</tt> and do <pre>import astro.database.DBMain</pre>
 You should get a prompt asking for your database password.
 If you are able to connect you can continue with the next step.
 </li>

 <li>Create the <tt>AWOPER</tt> database account and an <tt>AWUSER</tt> role 
 <pre>awe opipe/Toolbox/dbawoper.py</pre>
 </li>

 <li>Create the shared <tt>AWOPER</tt> schema for all database users using
 <pre>awe opipe/Toolbox/dbimportall.py</pre>
 </li>

 <li>Grant <tt>SELECT/INSERT/UPDATE</tt> permission on the <tt>AWOPER</tt>
 schema to the <tt>AWUSER</tt> role.
 <pre>awe opipe/Toolbox/dbgrants.py</pre>
 If new persistent classes are defined you should run this script as well to
 make sure that users have access to the new tables.
 </li>

 <li>Add a new user to the database. The username should consist of the first
 initial followed by the completed surname of the user.
 <pre>awe opipe/Toolbox/dbnewuser.py mjackson</pre>
 Note that this will create a database account with <tt>AW</tt> as a prefix.
 In the above example the database account would be called <tt>AWMJACKSON</tt>.
 </li>

 <li>On the machine where the FITS images should be stored go to the directory
 where you want to store them and do
 <pre>mkdir cache
awe opipe/parallel/dataserver_server.py &lt;hostname&gt; &lt;port&gt;</pre>
 The cache directory is the placed where new files will be stored.
 </li>

 <li>In your <tt>~/.awe/Environment.cfg</tt> add the following lines
 <pre>data_server : &lt;hostname_you_have_supplied_to_dataserver_server.py&gt;
data_port : &lt;port_you_have_supplied_to_dataserver_server.py&gt;</pre>
 </li>

 <li>For the parallel processing you have to define the individual nodes on which
you want to run the parallel package.
In your <tt>~/.awe/Environment.cfg</tt> set the following variables (the values are examples):
<pre>
cluster_nodes        : virgo01,virgo02,virgo03,virgo04,virgo05,virgo06,virgo07,virgo08
cluster_ports        : 9001,9002,9003,9004,9005,9006,9007,9008
cluster_wdirs        : /tmp,/tmp,/tmp,/tmp,/tmp,/tmp,/tmp,/tmp
cluster_rsh          : ssh -n
cluster_port         : 9000
cluster_httpport     : 8999
cluster_passwordfile : /Users/users/kgb/.awe/Cluster.pw
cluster_username     : kgb
cluster_password     : secret
</pre>

The variable <tt>cluster_nodes</tt> defines the different nodes,
<tt>cluster_ports</tt> the ports on which the cluster software is
communicating with the cluster_scheduler and <tt>cluster_wdirs</tt> the
working directories on the diferetn nodes.  Note that each node should
have a different working directory and that the path to the opipe
software tree should be the same on all nodes.  <br>

The variable <tt>cluster_rsh</tt> defines the command which will be used
to logon on to the individual nodes without user intervention.  <br>

<tt>cluster_port</tt> defines the port for the cluster_manager and
<tt>cluster_httpport</tt> the port to get oniine information about the
cluster_manager via a web-browser.  <br>

The username/password combination can be generated with the programme
<tt>dbmmanagein</tt> in directory <tt>parallel</tt> of the opipe source
tree.  Example of use:

<pre> python /bee1/users/kgb/opipe/parallel/dbmmanage.py
/Users/users/kgb/.awe/Cluster.pw add kgb </pre>

Testing the parallel software can be done with the programme
<tt>testtask.py</tt> in directory <tt>parallel</tt>.  </li>

 <li>To ingest data use the opipe/Toolbox/ingest.py script.
 </li>

</ol>