Setting up EDG UI v1.2.2 on RH 6.2

Firewall:

> The connections you will need to be able to make outgoing are
> 
> $ telnet rb.gridpp.ac.uk 7846             (Resource Broker)
> $ telnet rb.gridpp.ac.uk 7771             (Logging Broker)
> $ telnet rb.gridpp.ac.uk 2811             (GridFTP)
> $ telnet www.gridpp.ac.uk 80              (CRL Lists)
> 
> You do not need any inbound connections.
> Unless you use globus-job-run directly in which case the normal
> GLOBUS_TCP_RANGE=10000,12000  and then they have to be opened up
> incoming.

For an R_GMA "server" (i.e. the box with the producer and consumer 
servlets) you will need port 8080 open in both directions.

Start from stock" RedHat 6.2 box with current set of updates - make sure 
have relevant packages.

I'm using "commercial" SSH ssh-2.4.0-1

Need libwww, including devel -
	w3c-libwww-5.2.8-4
	w3c-libwww-apps-5.2.8-4
	w3c-libwww-devel-5.2.8-4

If need a proxy and are not using wget's config file, can set up env 
variable, e.g.:
	setenv http_proxy "http://wwwcache.brunel.ac.uk:10000/"
and similar for ftp_proxy gopher_proxy wais_proxy. Especially if using 
R-GMA on multiple machines at one site, you should also have a no_proxy 
variable indicating the local domain and covering port 8080, e.g.
	setenv no_proxy "brunel.ac.uk,brunel.ac.uk:8080"


Need OpenSSL, including devel -
	openssl-0.9.5a-29
	openssl-devel-0.9.5a-29
	openssl-perl-0.9.5a-29
	openssl-python-0.9.5a-29

Need wget -
	wget-1.5.3-6

RH7.2: need lesstif-0.92.32-6.i386.rpm for libXm.so.2 for prove?


From the WP6 EDG Packages repository on http://marianne.in2p3.fr/

Python (in the UI external collection):
	python2-2.1.3-1.i386.rpm
	python2-tkinter-2.1.3-1.i386.rpm
	python2-devel-2.1.3-1.i386.rpm
	python2-tools-2.1.3-1.i386.rpm
	expat-1.95.1-1
	expat-devel-1.95.1-1
The PYTHONPATH variable is set up in the edg_user_env script, so
no need to do anything permanent now - but may be good idea to set it 
in shell used for install process.
[ setenv PYTHONPATH "/opt/edg/lib" or whatever ]

[ need	rpm -ev --test python-tools-1.5.2-13 python-docs-1.5.2-13 
		python-devel-1.5.2-13 

first, then install (leaving python (1.5.2) in /usr/bin )]


Globus: all rpms in UI globus collection -
	globus_common-gcc32dbg_rtl-2.0-21.i386.rpm 
	globus_common-gcc32dbgpthr_rtl-2.0-21.i386.rpm 
	globus_core-edgconfig-0.17-1.noarch.rpm 
	globus_core-gcc32dbg_pgm-2.1-21.i386.rpm 
	globus_cyrus_sasl-gcc32dbg_rtl-1.5.27-21.i386.rpm 
	globus_cyrus_sasl-gcc32dbgpthr_rtl-1.5.27-21.i386.rpm 
	globus_data_conversion-gcc32dbg_rtl-2.0-21.i386.rpm 
	globus_duct_common-gcc32dbg_rtl-2.0-21.i386.rpm 
	globus_duct_control-gcc32dbg_rtl-2.0-21.i386.rpm 
	globus_duroc_common-gcc32dbg_rtl-2.0-21.i386.rpm 
	globus_duroc_control-gcc32dbg_rtl-2.0-21.i386.rpm 
	globus_ftp_client-gcc32dbg_rtl-1.2-21.i386.rpm 
	globus_ftp_client-gcc32dbgpthr_rtl-1.2-21.i386.rpm 
	globus_ftp_control-gcc32dbg_rtl-1.0-21.i386.rpm 
	globus_ftp_control-gcc32dbgpthr_rtl-1.0-21.i386.rpm 
	globus_gass_copy-gcc32dbg_pgm-2.0-21.i386.rpm 
	globus_gass_copy-gcc32dbg_rtl-2.0-21.i386.rpm 
	globus_gass_copy-gcc32dbgpthr_rtl-2.0-21.i386.rpm 
	globus_gass_server_ez-gcc32dbg_rtl-2.0-21.i386.rpm 
	globus_gass_transfer-gcc32dbg_rtl-2.0-21.i386.rpm 
	globus_gass_transfer-gcc32dbgpthr_rtl-2.0-21.i386.rpm 
	globus_gram_client-gcc32dbg_rtl-2.0-21.i386.rpm 
	globus_gram_client_tools-gcc32dbg_pgm-2.1-21.i386.rpm 
	globus_gram_protocol-gcc32dbg_rtl-2.0-21.i386.rpm 
	globus_gss_assist-gcc32dbg_rtl-2.0-21d.i386.rpm 
	globus_gss_assist-gcc32dbgpthr_rtl-2.0-21d.i386.rpm 
	globus_gssapi_gsi-gcc32dbg_rtl-2.0-21.i386.rpm 
	globus_gssapi_gsi-gcc32dbgpthr_rtl-2.0-21.i386.rpm 
	globus_io-gcc32dbg_rtl-2.0-21.i386.rpm 
	globus_io-gcc32dbgpthr_rtl-2.0-21.i386.rpm 
	globus_libtool-gcc32dbgpthr_rtl-1.4-21.i386.rpm 
	globus_mds_common-gcc32dbgpthr_pgm-2.2-21.i386.rpm 
	globus_mp-gcc32dbg_rtl-2.0-21.i386.rpm 
	globus_nexus-gcc32dbg_rtl-6.0-21.i386.rpm 
	globus_openldap-gcc32dbg_rtl-2.0.14-21.i386.rpm 
	globus_openldap-gcc32dbgpthr_pgm-2.0.14-21.i386.rpm 
	globus_openldap-gcc32dbgpthr_rtl-2.0.14-21.i386.rpm 
	globus_openssl-gcc32dbg_rtl-0.9.6b-21.i386.rpm 
	globus_openssl-gcc32dbgpthr_pgm-0.9.6b-21.i386.rpm 
	globus_openssl-gcc32dbgpthr_rtl-0.9.6b-21.i386.rpm 
	globus_profile-edgconfig-0.17-1.noarch.rpm 
	globus_replica_catalog-gcc32dbg_dev-2.1-21c.i386.rpm 
	globus_replica_catalog-gcc32dbg_pgm-2.1-21c.i386.rpm 
	globus_replica_catalog-gcc32dbg_rtl-2.1-21c.i386.rpm 
	globus_replica_catalog-gcc32dbgpthr_dev-2.1-21c.i386.rpm 
	globus_replica_catalog-gcc32dbgpthr_rtl-2.1-21c.i386.rpm 
	globus_replica_catalog-noflavor_data-2.1-21c.i386.rpm 
	globus_replica_management-gcc32dbg_dev-2.1-21.i386.rpm 
	globus_replica_management-gcc32dbg_pgm-2.1-21.i386.rpm 
	globus_replica_management-gcc32dbg_rtl-2.1-21.i386.rpm 
	globus_replica_management-gcc32dbgpthr_dev-2.1-21.i386.rpm 
	globus_replica_management-gcc32dbgpthr_rtl-2.1-21.i386.rpm 
	globus_rsl-gcc32dbg_rtl-2.0-21.i386.rpm 
	globus_rsl_assist-gcc32dbg_rtl-2.0-21.i386.rpm 
	globus_ssl_utils-gcc32dbg_pgm-2.1-21e.i386.rpm 
	globus_ssl_utils-gcc32dbg_rtl-2.1-21e.i386.rpm 
	globus_ssl_utils-gcc32dbgpthr_rtl-2.1-21e.i386.rpm 
	globus_user_env-noflavor_data-2.1-21b.i386.rpm 


From UI appcommon collection -
	GNU.LANG_gcc_shr-2.95.2-0_asis_1
	GNU.LANG_gcc_sys-2.95.2-0_asis_1


From UI external collection -
	classads-0.0-edg2
	openmotif-2.1.30-8 
	myproxy-client-0.4.4-edg6

EDG:
From UI EDG collection (all except edg-rgma*, grm, prove and spitfire) -
	userinterface-1.2.10-1
	userinterface-profile-1.2.10-1
	workload-profile-1.2.10-1
	edg-compiler-1.0-1
	edg-profile-0.3-1
	edg-profile-apps-1.2.1-1
	edg-user-env-0.3-1
	edg-utils-system-1.2.5-1
	edg-utils-user-1.2.5-1
	edg-se-libstringextra-1.0.2-1
	edg_se_query-1.0.5-1
	BrokerInfo-gcc32dbg-3.0-2
	edg-replica-manager-gcc32dbg-1.0-3
	gdmp-client-3.0-12
	userguide-1.2.10-1


Set env variables for EDG:

For c-shell users, source in user .cshrc -
	if ( -x /opt/edg ) then
		source /opt/edg/etc/edg-user-env.csh
	endif

Edit /opt/edg/etc/edg-user-env.csh replacing 'return 1' at line 7 with 
'goto end' and adding 'end:' as a final line. [bug in script]


The following should be set for each user

setenv RC_CONFIG_FILE /opt/edg/etc/atlas/rc.conf
setenv GDMP_CONFIG_FILE /opt/edg/etc/atlas/gdmp.conf

translated for your shell and VO. 


C-shell users should note that the unique jobids contain a '?'
which you must escape from the csh:

	$ dg-job-status 'JOBId'


Certificates and CRL updates: 

You need which ever CAs you trust from UI ca collection - e.g.
	ca_CERN-0.10-1.noarch.rpm 
	ca_CERN-new-0.10-1.noarch.rpm 
	ca_GridPP-0.10-1.noarch.rpm 
	ca_INFN-0.10-1.noarch.rpm

and also something to update them at intervals - you should run

$ /sbin/chkconfig edg-crl-upgraded on
$ /sbin/service edg-crl-upgraded start
$ /sbin/chkconfig edg-gridmapfile-upgraded off


GDMP:

The client for GDMP is configured with a script that is provided. For each 
Virtual Organisation that your most local storage element supports issue

$ /opt/edg/sbin/configure_gdmp_client gppse06.gridpp.rl.ac.uk /opt/edg gridpp 

where the three arguments are the 'local' storage element, the EDG top 
level directory and a virtual organisation. 


Replica Catalogue:

The replica catalogue client tools require some configuration files, one 
per VO. Ask Steve Traylen or tb-support to send you the configuration 
files as they contain slightly secret passwords.  


You should now have a working UI for job submission, but no RGMA for 
application monitoring ... yet.



R-GMA:

For R-GMA, a UI only needs the API to be able to talk to an R-GMA 
"server", but if there is no suitable server available at your site then 
you can install one on your UI; need MySQL, Java and Tomcat:

MySQL (in the UI external collection, recent ones give trouble on RH 6.2):
	MySQL-3.23.42
	MySQL-client-3.23.42-1
	MySQL-devel-3.23.42-1
	MySQL-shared-3.23.42-1

mm.MySQL (JDBC driver for MySQL, available from WP6 after much hunting):
	mm.mysql-2.0.6-2

Tomcat (in the UI external collection):
	tomcat-4.0.0-edg2

Java (available in the UI external collection):
	j2sdk-1.4.0-fcs
	j2sdk_profile-1.4.0-1
(You can get away with only the run-time env. jre if you will always use 
non-Java APIs to R-GMA. Remember to remove kaffe first if it is already 
installed...)

[ I've also got Apache:	
	apache-1.3.22-5.6
	apache-devel-1.3.22-5.6 ]

You will need to install and configure Apache and MySQL. Tomcat only needs 
install (rpm -ivh ...) - it is configured and started up by R-GMA's setup 
script.

Get latest R-GMA from 
	http://hepwww.rl.ac.uk/DataGridMonitoring/rpms/index.html

server+Java API:
ant-1.4-2
junit-3.7-edg1
log4j-1.1.3-edg1
Xerces-J-1.4.3-edg1 
	
edg-rgma-api-java-2.2.4-12
edg-rgma-common-2.2.4-12
edg-rgma-demo-2.2.4-12
edg-rgma-servlets-2.2.4-12
edg-rgma-tools-2.2.4-12


C++ API:
cppunit-1.6.2-1
log4cpp-0.2.7-3 (available from WP6 after poking round)
log4cpp-devel-0.2.7-3 (available from WP6 after poking round)
xerces-c-1.7.0-1 (available from WP6 after poking round)
xerces-c-devel-1.7.0-1 (available from WP6 after poking round)

edg-rgma-api-cpp-2.2.4-12

Other APIs:
edg-rgma-api-c-2.2.4-12

SWIG-1.3.11-edg1
edg-rgma-api-perl-2.2.4-12
edg-rgma-api-python-2.2.4-12

As root:
Edit and replace whole {URI} for Schema and registry servers to be used in
	/opt/edg/etc/info/rgma-schemaBrowser.xml.in 
- note this includes servlet path and name (/R-GMA/SchemaServlet, etc.).
This is young.brunel.ac.uk for CMS/BOSS test
[poss. spare: gw33.hep.ph.ic.ac.uk:8080]
[ general: infocat.gridpp.rl.ac.uk:8080]

Run /opt/edg/bin/rgma-config and give requested info - e.g. 
Registry to be used young.brunel.ac.uk:8080 for CMS/BOSS test.

Copy  /opt/edg/etc/info/rgma-setup.sh
to root's home dir, chmod 755 it, run and add it to .bashrc

Stop Tomcat

* in /opt/edg/share/info/webapps, edit ArchiverServlet/WEB-INF/web.xml
to fully-qualified domain name for registry. repeat for other servlets

* in /opt/edg/etc/info edit Archiver.props to include fully qualified 
domain name for user servlet host. repeat for CircularBufferProducer.props 
Consumer.props and DataBaseProducer.props .

In /opt/edg/bin/pulse.sh, check that jar files are correct; I had to 
change to 
/usr/share/ant/lib/crimson.jar
/usr/share/ant/lib/jaxp.jar

Start Tomcat
Run rgma-setup.sh

As user:
run /opt/edg/bin/rgma-config
chmod 755 ~/rgma-setup.sh and put in .cshrc.
run ./rgma-setup.sh

young ~> /opt/edg/sbin/check-rgma-config client
*  Warning  *  OS := Linux 2.2.22-6.2.2 and should be one of ['^Linux 2.4.9', '^Linux 2.4.18-3']
*  Warning  *  gcc version := package edg-compile is not installed and should be one of ['fixme', 'FIXME']
*  Warning  *  /root/rgma-setup.sh exists := 0 and should be 1
*  Warning  *  /usr/java/JavaCC exists (from JAVACC_HOME) := 0 and should be 1

and the servlets are running:

young: ~> /opt/edg/sbin/check-rgma-config user-servlets
*  Warning  *  OS := Linux 2.2.19-6.2.16 and should be one of ['^Linux 2.4.9', '^Linux 2.4.18-3']

Try http://young.brunel.ac.uk:8080/R-GMA/ProducerServlet/getStatus
and get CircularBufferProducerServlet OK

pulse.sh "/opt/edg/etc/info/rgma-schemaBrowser.xml"
should connect to Schema server and show it OK.

(In 1.2.0beta I tried installing JavaCC-2.1-edg1 and seting the env. var, 
this fixes warning but not other errors. Not needed unless developing R-GMA.) 
# obj-rgma* for LCFG use - ignore.

BOSS:
BOSS v3_3pre4 as per instructions for UI v1.2.0beta 

Get BOSS v3_3pre5 and unpack. Instructions in 00README
MySQL should already be installed & running.
http://www.bo.infn.it/cms/computing/BOSS/boss-v3_3_pre5.tar.gz
As normal user

     As BOSS administrator:
       1. make config
       2. check in BOSSDBConfig.sh that the variables are fine for you
          (default will work if you installed the mysql server as in the
          previous step).

Names in pre5 already shortened - I made values of BOSS_db_name, 
BOSS_db_guest and  BOSS_db_user (guest and user to be 16 chars) to be
boss_v3_3_young, BOSSv3_3_mgr, BOSSv3_3_mon to match earlier.

         Please note that starting with version 3.0 there is a variable
          $BOSS_TMP_DIR that defines the directory where the temporary BOSS
          files are created. This directory must be present on any host  
          where the jobs may happen to run and on any host where BOSS
          commands are executed. By default BOSS_TMP_DIR=/tmp.
          BOSS_TMP_DIR=. is a valid value and gives the same behavour of
          previous versions of BOSS. Since AFS doesn't support FIFO's,
          BOSS_TMP_DIR cannot be on AFS.
          If your MySQL server supports InnoDB tables it is possible to
          specify InnoDB as default table type (BOSS_TABLE_TYPE).

source bossenv.sh or source bossenv.csh

       3. make
       4. Please note: root access to MySQL server during "make":
          When "make" is executed the BOSS libraries and executables are
          created and the database is configured. Database configuration
          needs root access to MySQL server. The installation scripts try
          first without password. If this works the installation finishes.
          If root access is protected by password the installation script
          prompts for the password. If you don't have the root password you
          need to interrupt the installation and ask your MySQL  
          administrator to execute the commands for you. The commands may be
          found in the file MySQLconfig.sql

       5. If BOSS will be used with a grid scheduler, access to the MySQL
          server must be granted to the BOSS MySQL users from any host where
          the jobs may happen to run.
          You can grant access to the MySQL server from any host using the
          file ${BOSSDIR}/MySQLGridConfig.sql:
          mysql -u root -h MySQL host -s -f [-p] < MySQLGridConfig.sql

mysql -u root -s -f -p < MySQLGridConfig.sql
mysql -u root -s -f -p < MySQLconfig.sql

as on same box

       6. Before using BOSS in any session you need to set the environment 
          by sourcing $BOSSDIR/bossenv.csh (or $BOSSDIR/bossenv.sh)

In $BOSSDIR/sched_examples, ./registerEDGScheduler to register grid 
scheduler, and in $BOSSDIR/jobtest do ./registerTestJob to register the 
TestJob type.

In $BOSSDIR/jobtest (as user with write perms)
boss submit -scheduler fork -classad test.clad
to submit testjob locally, and 
boss query -all
to see results. Increase the count parameter to 400 or more, and it should 
be possible to watch the counter updating using either boss query or from 
within MySQL directly.

After all this, ~> mysqlshow
+-----------------+
|    Databases    |
+-----------------+
| arch0           |
| arch1           |
| arch2           |
| archiverTestDB0 |
| boss_v3_3_young |
| mysql           |
| test            |
+-----------------+