GT3 Installation and Setup_0524

15
GT3 Installation and Setup on RedHat 9.0 or Fedora Jun-Yi Shen, Fu-Zong Wang, Song-Yi Chen, Po-Chi Shih Note: (*1): GT3 recommend that your machine must have a full qualified domain name so your machine can be recognized everywhere in the internet, and your DNS server must support forward domain and reverse domain query. If you can’t make these things above, then simply add IP and domain name mapping in /etc/hosts, but remember each machine in grid must have same setting to recognize each other. (It means when you add a machine to the grid, you have to modify all the machine’s /etc/hosts file to add the IP/domain name of the new machine.) 1. Introduction GT3 is an implementation of the Open Grid Services Infrastructure (OGSI) version 1.0. Globus is using OGSI as their infrastructure for their GT3 base services. They also add some management services. OGSI represents the reference open source standard implementation of the Open Grid Services Infrastructure standard. The following Figure shows the key areas identified as a basis for Grid computing. Each pillar would be included in most of Grid implementations. These key areas are: Resource management, Information services, and Data management. 2. Account Requirement globus or root account Toolkit environment For installation and execution of Toolkit. Any other user account End user environment. For jobs execution on the Grid. 3. Software

Transcript of GT3 Installation and Setup_0524

GT3 Installation and Setup on RedHat 9.0 or FedoraJun-Yi Shen, Fu-Zong Wang, Song-Yi Chen, Po-Chi Shih Note: (*1): GT3 recommend that your machine must have a full qualified domain name so your machine can be recognized everywhere in the internet, and your DNS server must support forward domain and reverse domain query. If you cant make these things above, then simply add IP and domain name mapping in /etc/hosts, but remember each machine in grid must have same setting to recognize each other. (It means when you add a machine to the grid, you have to modify all the machines /etc/hosts file to add the IP/domain name of the new machine.) 1. Introduction GT3 is an implementation of the Open Grid Services Infrastructure (OGSI) version 1.0. Globus is using OGSI as their infrastructure for their GT3 base services. They also add some management services. OGSI represents the reference open source standard implementation of the Open Grid Services Infrastructure standard. The following Figure shows the key areas identified as a basis for Grid computing. Each pillar would be included in most of Grid implementations. These key areas are: Resource management, Information services, and Data management.

2. Account Requirement globus or root account Toolkit environment For installation and execution of Toolkit. Any other user account End user environment. For jobs execution on the Grid. 3. Software

JAVA SDK http://java.sun.com http://java.sun.com/j2se/1.4.2/download.html (j2sdk-1_4_2_03-linux-i586-rpm.bin) Apache Ant http://ant.apache.orgs http://ant.apache.org/bindownload.cgi (apache-ant-1.6.0-bin.tar.gz) JUnit http://www.junit.org http://prdownloads.sourceforge.net/junit/junit3.8.1.zip?download (junit3.8.1.zip) GT3 Source Installation Package (GT 3.0.2) http://www-unix.globus.org/toolkit/download.html (gt3.0.2-source-installer.taz) Globus Simple CA Package by NCHC http://www.globus.org/security/simple-ca.html http://www-unix.globus.org/ftppub/gsi/simple_ca/globus_simple_ca-latest-src_bundl e.tar.gz (globus_simple_ca-latest-src_bundle.tar.gz) MPICH-G2 (1.2.5.2) http://www-unix.mcs.anl.gov/mpi/mpich/ http://www-unix.mcs.anl.gov/mpi/mpich/downloads/mpich.tar.gz (mpich.tar.gz) Install SCMS http://www.opensce.org/moin/Downloads Install Condor 6.6.5 Require packages Perl 5 (Fedora core default version is version 5) glibc 2.3 (Fedora core default version is 2.3.2 Condor 6.6.5, http://www.cs.wisc.edu/condor/downloads/ 4. Installation of GT3 4.1. Setup your domain name and ip address. 4.1.1. Use root account. 4.1.2. Edit /etc/hosts file and add your ip address with domain name (any you want) as follow.

4.2. Install Java SDK 4.2.1. Use root account. 4.2.2. Add executable attribute to the SDK source installation package. chmod +x j2sdk-1_4_2_04-linux-i586-rpm.bin 4.2.3. Uncompress and install ./j2sdk-1_4_2_04-linux-i586-rpm.bin rpm -ivh j2sdk-1_4_2_04-linux-i586.rpm

4.3. Install Apache Ant & JUnit 4.3.1. Use root account 4.3.2. Uncompress Apache Ant tar -xzvf apache-ant-1.6.1-bin.tar.gz mv apache-ant-1.6.1 /usr/local 4.3.3. Unzip JUnit and copy junit.jar to the lib directory of your Apache Ant installation directory unzip junit3.8.1.zip cp junit3.8.1/junit.jar /usr/localapache-ant-1.6.0/lib

4.4. Setup environment variable 4.4.1. Use root account 4.4.2. Add Java and Ant install directory to system path vi /etc/profile (omits) if [ -z "$INPUTRC" -a ! -f "$HOME/.inputrc" ]; then INPUTRC=/etc/inputrc fi # JAVA PATH JAVA_HOME=/usr/java/j2sdk1.4.2_04

PATH=$PATH:$JAVA_HOME/bin export JAVA_HOME # ANT PATH ANT_HOME=/usr/local/apache-ant-1.6.1 PATH=$PATH:$ANT_HOME/bin export ANT_HOME export PATH USER LOGNAME MAIL HOSTNAME HISTSIZE INPUTRC

4.4.3.

Rerun profile Source /etc/profile(. /etc/profile)

4.5. Install GT3 4.5.1. Use root account 4.5.2. Uncompress GT3 tar -xzvf gt3.0.2-source-installer.tar.gz 4.5.3. Install GT3 cd gt3.0.2-source-installer ./install-gt3 /usr/local/globus/|tee installgt3.log

4.6. Setup environment variable 4.6.1. Use root account 4.6.2. Add Globus install directory and set globus environment variable vi /etc/profile fi # JAVA PATH JAVA_HOME="/usr/java/j2sdk1.4.2_04" PATH="$PATH:$JAVA_HOME/bin" export JAVA_HOME # ANT PATH ANT_HOME="/grid_software/ant/apache-ant-1.6.1" PATH="$PATH:$ANT_HOME/bin" export ANT_HOME #GLOBUS PATH GLOBUS_LOCATION="/usr/local/globus" PATH="$PATH:$GLOBUS_LOCATION/bin" export GLOBUS_LOCATION export PATH USER LOGNAME MAIL HOSTNAME HISTSIZE INPUTRC . $GLOBUS_LOCATION/etc/globus-user-env.sh

4.6.3.

Rerun profile Source /etc/profile(. /etc/profile)

4.7. Install and setup Globus Simple CA (CA Server installed by NCHC) 4.7.1. Use root account 4.7.2. Install simple CA server globus_simple_ca-latest-src_bundle.tar.gz gpt-build globus_simple_ca-latest-src_bundle.tar.gz gcc32 gpt-postinstall Enter the CA subject after gpt-postinstall, and enter a password for CA. 4.7.3. Setup CA use default setting /usr/local/globus/setup/globus_simple_ca__se tup/setup-gsi default 4.8. Install and setup Globus Simple CA (CA client) 4.8.1. Use root account 4.8.2. Get the CA install file on your CA server, in our case it is called globus_simple_ca_ffa40f5d_setup-0.13.tar.gz 4.8.3. Install CA, in /usr/src directory, as root 4.8.3.1. Let me remind you something before this step. Now you have to check your host name( you can see it on command line prompt in linux), if it is localhost, then you need to register you machine to DNS, and get a domain name or you can edit /etc/sysconfig/network and change HOSTNAME= then reboot. Anyway you cant use localhost to install simple CA.

gpt-build globus_simple_ca_ffa40f5d_setup-0.13.tar.gz gcc32 gpt-postinstall If you cant find the gpt-build instruction, it locate at usr\local\globus\sbin. You can add this to path. 4.8.4. Setup CA use default setting /usr/local/globus/setup/globus_simple_ca_ffa40f5d_ setup/setup-gsi default 4.8.5. Setup host certificate grid-cert-request -host It will generate 3 files as follow: /etc/grid-security/hostkey.pem /etc/grid-security/hostcert_request.pem /etc/grid-security/hostcert.pem(zero size) Note: In CA server, there is a file in /root/.globus/simpleCA/ that named globus_simple_ca_hash_setup-0.13.tar.gz (hash is depend on your ca) copy this file to other client node, and gpt-build with this file Note: If you are The CA server, command grid-ca-sign -in hostcert_request.pem -out hostcert.pem and then send this file to the requested client node and save this ca file into /etc/grid-secruity/ and make the file named hostcert.pem read only for the other users. If your ca server also wants to join to grid computing, dont forget to sign yourself. (machine) You have to send hostcert_request.pem file to the CA server to require a certificate for your machine, then Server will send back the hostcert.pem file. Finally you must replace this file with your original empty file. 4.8.6. Setup user certificate 4.8.6.1. Use you own user account. grid-cert-request user/.globus/userkey.pem user/.globus/usercert_request.pem user/.globus/usercert.pem (zero size)

This user certification step is almost same as host, first send the usercert_request.pem to CA server, and then take usercert.pem back from CA server. Last step is replacing this file with your original empty file.

Note: If your machine is CA server, type grid-ca-sign -in usercert_request.pem -out usercert.pem, and dont forget to change the owner of the file to the requested user of CA. 4.8.7. Test CA setup

4.8.7.1. We can test if CA is setting correctly by use grid-proxy-init command; this command is used to initiate a proxy to enable access to other machine. Correct result will show below. grid-proxy-init

4.9. Setup grid-mapfile 4.9.1. This step will add all accessible certificate users to our machine, so anyone you want to let them running job on you computer must be added. You can use grid-cert-info subject command to check the authorizations for users and copy the output then paste to grid-mapfile (see below) vi /etc/grid-security/grid-mapfile

4.10. Setup gatekeeper 4.10.1. In order to let the jog to run and communication to each other, we have to setup the port that allow job to pass. vi /etc/services Add this line gsigatekeeper /etc/services. 2119/tcp # Globus Gatekeeper to

4.10.2. Next we need to add connection setting file gsigatekeeper. vi /etc/xinetd.d/gsigatekeeper Add the follow line to this file, but remember to replace the GLOBUS_LOCATION with your absolute GT3 installation path. In our case it will be replaced by /usr/local/globus.

service gsigatekeeper { socket_type = stream protocol = tcp wait = no user = root env = LD_LIBRARY_PATH=/usr/local/globus/lib server = /usr/local/globus/sbin/globus-gatekeeper server_args = -conf /usr/local/globus/etc/globus-gatekeeper.conf disable = no } Note: be careful the server_args its only one line

4.10.3. Finally restart all service changed above. /etc/rc.d/init.d/xinetd restart 4.11. Setup host file(optional) 4.11.1. Edit /etc/hosts and add any computer domain name versus ip address that in our grid system. vi /etc/hosts

4.12. Test to run a simple job 4.12.1. This is a very exciting step of all things you done above. If this work, then I have to say Congratulations!!. But if not, you would better to check all step above and ensure that nothing you forget to setup or make any mistake. One last thing I must remind you is that you must run grid-proxy-init before this step. 4.12.2. Test local site globus-job-run /bin/date 4.12.3. Test remote site globus-job-run /bin/date

5. Install and setup mpich-g2 5.1 Use root account 5.2 Uncompress mpich-g2( do not put it in /usr/local directory) tar zxvf mpich.tar.gz 5.3 Configuration 5.3.1 You have to change to the directory you want to install. In our case it is /usr/local/mpich-1.2.5 ./configure --prefix= --with-device=globus2:-flavor=gcc32dbg Make install 5.4.1 Make all the configuration make 5.4.2 Install make install 6. Run MPI program 6.1 Compiler a MPI program 6.1.1 First you have to choice a MPI program, you can choice one at /examples/basic/. 6.1.2 Compiler your program by type mpicc o mpicc -o cpi cpi.c 6.2 Create machine file 6.2.1 Before you run mpi program you have to create a machine map file that hold the machine name and number of cpu.

5.4

6.3

Run mpi program 6.3.1 Copy your program to the other machine you want mpi program to execute; it must locate in the same directory. 6.3.2 Run mpi program by type mpirun machinefile -np mpirun -machinefile machinefile -np 2 cpi

Note: in machinefile, the host name must be the same with hostcert name, if the host name was not correct, you will see this error

If your host name was correct, it must be seen like this.

GridFTP As root, vi /etc/services add one line such as gsiftp 2811/tcp

Next we need to add connection setting file gsiftp. vi /etc/xinetd.d/gsiftp service gsiftp { instances = 1000 socket_type = stream wait = no user = root env = LD_LIBRARY_PATH=GLOBUS_LOCATION/lib server = GLOBUS_LOCATION/sbin/in.ftpd server_args = -l -a -G GLOBUS_LOCATION log_on_success += DURATION nice = 10 disable = no } Note: Be sure to replace GLOBUS_LOCATION with the actual $GLOBUS_LOCATION in your environment (our value is /usr/local/globus). value of

Then check the gsiftp service does work correctly or not, use globus-url-copy gsiftp://biogrid01.hpc.csie.thu.edu.tw/home/test/test.txt file:///home/test/test1.txt. Note: biogrid01.hpc.csie.thu.edu.tw is my hostname, the name must be same with hostcert name see grid-cert-request hostcommand, do not use localhost domain, if your host name in grid was not named localhost.

Install SCMS Require packages scms_rpms.tgz This is the package file we made, you can simply uncompress this package and execute the shell file, it is named postinstall.sh and install.sh. First run install.sh, then run postinstall.sh. That is all. Install Condor Require packages Perl 5 (Fedora core default version is version 5) glibc 2.3 (Fedora core default version is 2.3.2 Condor 6.6.5 http://www.cs.wisc.edu/condor/downloads/ Install on the machine to be the pool's central manager 1. Add a user name condor 2. Uncompress your conder tarball 3. Enter into your condor path and then type ./condor_install 4. Please answer these questions carefully.

Theres are 11 steps ( 11 steps ,) STEP 1: What type of Condor installation do you want? condor execute, submit manage job, condor , hostname , domain name STEP 2: How many machines are you setting up this way? condor, , , , hostname STEP 3: Install the Condor release directory , STEP 4: How and where should Condor send e-mail if things go wrong? Condor e-mail ? STEP 5: File system and UID domains. case, user, password ( NIS server), user, password , , , , user , STEP 6: Java Universe support in Condor. Java VM path , /usr/local/j2sdk1.4.2_04/bin/java STEP 7: Where should public programs be installed? , , , STEP 8: What machine will be your central manager? job manage ?, , , , host STEP 9: Where will the local directory go? STEP 10: Where will the local (machine-specific) configuration files go?

STEP 11: How shall Condor find its configuration file? : type /usr/local/condor/sbin/condor_master and then type ps -aux | egrep condor_, if you see the output such that , your condor is works well

Reference: http://www.globus.org/ http://www-unix.globus.org/toolkit/ http://crystal.uta.edu/~levine/class/spring2003/grid/globus_commands/ http://www-900.ibm.com/developerWorks/cn/grid/gr-redbook/index.shtml http://www-unix.globus.org/toolkit/3.0/ogsa/docs/java_programmers_guide.html http://www.cs.wisc.edu/condor/