Advertisment

Running Jobs in Globus

author-image
PCQ Bureau
New Update

We are back with Globus, the middleware for clustering operations. In our last issue, we saw what Globus is and how you can set it up (Build a Computer Grid Using Globus, page 18, PCQuest October 2003). In this article, we’ll talk about how you can obtain an authentication certificate from the Globus website and then submit your jobs to the grid by setting up a client. 

Advertisment

But first, a recap of what we did last month. We installed the Globus server, which included ant, Globus toolkit and Tomcat application server software and set all the environment variables needed for it to work. So, if you have already done that, we can proceed. If not, refer to the last month’s article and have your setup ready. 

We’ll start by installing a client. Actually, the jobs can be run and submitted by any client machine which has at least gpt-2.2.10 installed. It’s not necessary to install the complete Globus toolkit on each client machine. So, to install gpt, first copy the gpt-2.2.10.src.tar.gz file to the client machine from the Globus toolkit tar ball, and run the following command to untar it.

#tar —zxvf gpt-2.2.10.src.tar.gz

Advertisment

Next, run these commands to install it.

#cd gpt-2.2.0



#./build_gpt

ONLINE CERTIFICATION SERVICE
According to the Globus website announcement at

www-unix.globus.org/mail_archive/announce/



2003/08/msg00001.html
, they will soon start an online certification service because of which all previous certificates will be discarded from 23 Jan 2004. This service was supposed to have been launched earlier, but was delayed due to some reason. This service will be quite useful as it will reduce the time taken between the e-mail transaction of the certificate request and the actual certificate to reach the user.
Advertisment

Now you have to set the environmental variables as we did in the Globus server machine last month. Then run the following command to configure all post installation settings in your machine.

#/$GLOBUS_LOCATION/sbin/gpt-postinstall

Next, fire the following command to create a distinguished name for your site and user, which you’ll use to request for a certificate. 

Advertisment

#/$GLOBUS_LOCATION/setup/globus/setup-gsi

The command will ask you to set the DN. If it doesn’t, then it will automatically allot a DN for your site. To create a default DN, juts run the above command and hit ‘y’. Press Enter and finally ‘q’ to exit.

Now it’s time to request for a certificate from the Globus certificate authority. To do this run the command called 

Advertisment

#/GLOBUS_LOCATION/bin/grid-cert-requests

This command will first ask you for the user name in whose name the certificate should me issued. It will then ask for the pass phrase which will be used to authenticate the user and finally it will create two files called userkey.pem and



usercert_request.pem in yourhomedirectory/.globus/ directory. 

Now you have to mail the contents of the file ‘usercert_ request.pem’ to ca@globus.org. You can either mail it by running the command as below.

Advertisment

#cat ~/.globus/ usercert_request.pem | mail ca@globus.org.

Note that the above command will only run if you have sendmail configured on your Linux box. If you don’t have your e-mail account properly configured there, then just copy the content of the usercert_request.pem file to any machine and e-mail it form there. Now you need to wait for globus to revert. The official documentation says that the certificate should reach you by e-mail within two working days. But we received it within three hours. 

When you receive mail from Globus, its subject would look like ‘Globus Certificate for /O=Grid/O=Globus/OU=com/CN=Anindya Roy’. This mail will contain a portion that has ‘––––-Begin Certificate–––-’ and ‘–––––––END Certificate–––––-’. Copy the text from within this portion and save it to your Linux machine running Globus, as ‘usercert.pem’. Save it in your .globus folder in your home directory. If you find a blank file by the same name in this location, just overwrite it with the new file.

Advertisment

You are now authenticated and ready to run and submit your jobs. So, first start up your proxy client as follows. 

#$GLOBUS_LOCATION/bin/grid-proxy-init. 

This will ask you for a pass phrase. This is the same one that you would have given when creating the usercert_request.pem file. Just type it and hit Enter. Next run the following command. 

#$GLOBUS_LOCATION/bin/globus-personal-gatekeeper

The will show you an output that looks something like this.

Pcq.local:927884:/O=Grid/O=Globus/CN=Anindya Roy

This is your host’s authentication string, which you will use to submit a job to Globus. It will help Globus keep track of all the jobs that you submit. Copy this string in a file and you’re now ready to submit jobs to Globus. To check weather your certificate is valid or not, run the following command.

#$GLOBUS_LOCATION/grid-cert-info

This will give you the status of your certificate, the number of days left for it to expire, etc. Now you can submit jobs to Globus through the command line. For instance, you can submit a simple job like the ‘ls’ command to your Globus server as follows. 

#/$GLOBUS_LOCATION/bin/globus-job-run “host”

/bin/ls

Here replace ‘host’ with the value you saved using the grid-personal-gatekeeper command. After the execution of the process, you will get the output on your screen.

Anindya Roy

Advertisment