Objectives:: University of Surrey Date: 17/01/2005 Department of Computing Introductory Grid Computing Tutorial Notes #1

Download as doc, pdf, or txt
Download as doc, pdf, or txt
You are on page 1of 5

University of Surrey Department of Computing Introductory Grid Computing Tutorial Notes #1

Date: 17/01/2005

Objectives:
This tutorial aims to teach: Grid configuration and throughput in the department How to access the grid Obtaining a user certificate Globus Toolkit 3 user environment configuration for the departmental use How to use services

Prerequisites:
For all the tutorial notes, you are expected to know the basics in Unix and Java. Please refer to the following tutorials for more information: Unix Tutorial for Beginners: http://www.ee.surrey.ac.uk/Teaching/Unix/ Java Tutorials and Code Camps: http://java.sun.com/learning/tutorial/index.html You can download the tutorials from the course web page, which is: http://www.computing.surrey.ac.uk/csm23 Instead of writing the commands manually, you can refer to the online version of the tutorials. Please do not forget to change the host ip and port name accordingly in the commands, when it is necessary.

Section I: Grid configuration and throughput in the department Currently our infrastructure consists of 24 nodes (18 Dell PowerEdge 2650 with 1 GB memory and dual processors; and 6 Optiplex GX150s with 256MB memory, single processor) and a daily newsfeed provided by Reuters Financial Services (c. 35 MB or 6000 news items on average per day; one year is around 2 GB texts). We have developed programs using Reuters API to capture the news, historical time series data and tick data. Reuters supply news with categories, authorships and date information.
The machines are concorde01-concorde06, tornado01-tornado12 and hawk01-hawk06.

Section II: How to access the grid


To access to the environment, you need to do the following steps: If you are in Windows environment.

1. Type telnet MACHINE.mcs.surrey.ac.uk and login. (In Windows, select Start on the menu bar
and then Run) where MACHINE is one of hawk, concorde or tornado machines. (e.g. telnet concorde01.mcs.surrey.ac.uk) 2. You should be logged in the machine you specified. 3. The grid software is under /grid/software/globus3.

Section III: Obtaining a user certificate


You must obtain a user certificate to use some facilities of Globus Toolkit. In order to have a certificate, you should follow the following steps: Precondition: You should login to one of the Grid machines (see Section I).

University of Surrey Department of Computing Introductory Grid Computing Tutorial Notes #1

Date: 17/01/2005

1. Type grid-cert-request and press enter. You will see the following screenshot:

You will be asked to enter a password, which is to protect your key file. Please enter a keyword, which you believe that you will remember in the future. I would like to remind you that if you do not remember your password in the future, you should follow the same steps to obtain a new one. 2. You will be asked again to enter your password for verification.

3. After you entered your password, the following message will be displayed.

University of Surrey Department of Computing Introductory Grid Computing Tutorial Notes #1

Date: 17/01/2005

This means that you successfully created your key file. Now, this key file should be sent to local authority. In order to do this, please copy the complete line beginning with cat (First highlight that line with your mouse then press enter). The command will look like: cat /user/csckmpg/csp1sa/.globus/usercert_request.pem | mail grid@eim.surrey.ac.uk Then paste it to the command line (Press the above left corner, select edit then paste) Please check this line a couple of times to ensure that you copied it correctly before you press enter! Do not forget that you will not see any confirmation when you pressed enter. Please do not do this more than one! 4. After a couple of days, you are going to receive your certificate via e-mail. When you receive it, you have to save the e-mail as a file under the name usercert.pem into <home_directory>/.globus, for example, /user/csm3/csm5xx/.globus/usercert.pem, where your home directory is /user/csm3/csm5xx/ and .globus is your private globus directory. I would like to remind you that you do not need to remove email headers or any other information from this email and the e-mail should be saved as plain text. 5. Please change the permissions of the file under <home_directory>/.globus3 as follows: -r--r--r-- 1 Jane_Public 2735 Apr 14 15:32 usercert.pem -r-------- 1 Jane_Public 963 Apr 6 17:14 userkey.pem You should use the following commands to change the permissions of your files in Unix window. chmod 444 usercert.pem chmod 400 userkey.pem

Section IV: Globus Toolkit 3 user environment configuration for the departmental use
In order to use the Grid facilities, you are also required to configure the Globus toolkit environment according to your account. 1. You should copy gtuser.tar.gz from /a/juliet/vol/juliet/www/computing/courses/csm23/software to your home directory: cp /a/juliet/vol/juliet/www/computing/courses/csm23/software/gtuser.tar.gz $HOME P.S: If you experience problems regarding gtuser.tar.gz, you can download it from: http://www.computing.surrey.ac.uk/courses/csm23/software/ address as well. 2. You should extract the files into your HOME directory. Please be sure that you are in your home directory. cd gzip d gtuser.tar.gz tar xvf gtuser.tar 3. Write: id u This command will generate a unique number for you. Please note down this number and use it in the next section wherever you see <id_output>. 4. Run the following to finalise the configuration: cp -r /grid/software/globus3/schema/samples $HOME/gt3/schema

University of Surrey Department of Computing Introductory Grid Computing Tutorial Notes #1

Date: 17/01/2005

5. Finally, you should write the following line to your .cshrc file. cd pico .cshrc Write the following lines to the end of the file: source ~/gt3/initial.csh setenv MY_PORT <id_output> Note: Do not forget to replace <id_output> with the value you got from the previous step! Press CTRL+X together and write Y to confirm the changes. Relogin to the system. Your globus configuration is installed under your $HOME/gt3 now. In the future tutorials, you are going to work under this directory.

Section V: How to use services


Grid services, which are basically Web services with improved characteristics. In this section, we are going to learn how to use them. Note: Do not forget to change the IP addresses and port numbers in this example accordingly! 1. First, do the following commands: rm r $HOME/gt3/guide

cp r /grid/software/globus3/guide $HOME/gt3
2. Change your directory to gt3. cd $HOME/gt3 3. Run the following command to extract the necessary service files: ant deployGuide You will see several lines. You are expected to see BUILD SUCCESSFUL line if you successfully did. 4. Set the necessary environment to run the Counter service. setenv CLASSPATH ${CLASSPATH}:$HOME/gt3/guide/build/lib/guide.jar 5. Write: globus-start-container p $MY_PORT You are going to see the existing services displayed like this:
http://131.227.74.141:8080/ogsa/services/samples/complex/NestedArrayFactoryService http://131.227.74.141:8080/ogsa/services/samples/complex/NestedFactoryService http://131.227.74.141:8080/ogsa/services/samples/weather/WeatherFactoryService http://131.227.74.141:8080/ogsa/services/samples/serialization/SerializationService http://131.227.74.141:8080/ogsa/services/samples/google/GoogleSearchFactoryService http://131.227.74.141:8080/ogsa/services/samples/any/AnyFactoryService http://131.227.74.141:8080/ogsa/services/samples/servicedata/ServiceDataService http://131.227.74.141:8080/ogsa/services/samples/array/ArraySampleFactoryService http://131.227.74.141:8080/ogsa/services/samples/chat/ChatFactoryService http://131.227.74.141:8080/ogsa/services/ogsi/NotificationSubscriptionFactoryService

University of Surrey Department of Computing Introductory Grid Computing Tutorial Notes #1

Date: 17/01/2005

http://131.227.74.141:8080/ogsa/services/ogsi/HandleResolverService http://131.227.74.141:8080/ogsa/services/base/streaming/FileStreamFactoryFactoryService http://131.227.74.141:8080/ogsa/services/base/multirft/MultiFileRFTFactoryService http://131.227.74.141:8080/ogsa/services/gsi/AuthenticationService http://131.227.74.141:8080/ogsa/services/gsi/SecureNotificationSubscriptionFactoryService

The display will be hanged. Please do not make any action for that. 6. Open a new telnet window and login. Now, we are going to run Counter service. First, we need to create an instance from this service. ogsi-create-service http://131.227.68.170:8090/ogsa/services/guide/counter/CounterFactoryService calc If you created it successfully, then you will see the following lines:
Service successfully created: Handle: http://131.227.68.170:8090/ogsa/services/guide/counter/CounterFactoryS ervice/calc Termination Time: infinity

7. We can now execute the program: java org.globus.ogsa.guide.impl.CounterClient http://131.227.68.170:8090/ogsa/services/guide/counter/CounterFactoryService/calc add 2 If you are successful, then you will see the following output: Counter add: 2 Exercise: Add 5 more using the same instructions. What do you see? Is this possible with Web Services? Why?

You might also like