how to access the grid in the department ... · web viewsection ii: how to access the grid to...

6
University of Surrey Date: 16/01/2006 Department of Computing Introductory Grid Computing Tutorial Notes #1 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/courses/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). The machines are concorde01-concorde06, tornado01-tornado12 and hawk01-hawk06. Our teaching cluster comprises concorde machines. 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 concorde machines. (e.g. telnet concorde01.mcs.surrey.ac.uk) 2. You should be logged in the machine you specified.

Upload: lengoc

Post on 31-Mar-2018

219 views

Category:

Documents


5 download

TRANSCRIPT

Page 1: HOW TO ACCESS THE GRID IN THE DEPARTMENT ... · Web viewSection II: How to access the grid To access to the environment, you need to do the following steps: ... You have to use MYPORT

University of Surrey Date: 16/01/2006Department of ComputingIntroductory Grid Computing Tutorial Notes #1

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/courses/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 departmentCurrently 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).The machines are concorde01-concorde06, tornado01-tornado12 and hawk01-hawk06. Our

teaching cluster comprises concorde machines.

Section II: How to access the gridTo 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 concorde 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:

You must obtain a user certificate to use some facilities of Globus Toolkit such as submitting a job to a remote machine. We will require this in the third laboratory session. 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).

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

Page 2: HOW TO ACCESS THE GRID IN THE DEPARTMENT ... · Web viewSection II: How to access the grid To access to the environment, you need to do the following steps: ... You have to use MYPORT

University of Surrey Date: 16/01/2006Department of ComputingIntroductory Grid Computing Tutorial Notes #1

You will be asked to enter a password, which is to protect your key file. Please enter a password, 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.

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 (however your directory will be different):

cat /user/csckmpg/csp1sa/.globus/usercert_request.pem | mail [email protected]

Page 3: HOW TO ACCESS THE GRID IN THE DEPARTMENT ... · Web viewSection II: How to access the grid To access to the environment, you need to do the following steps: ... You have to use MYPORT

University of Surrey Date: 16/01/2006Department of ComputingIntroductory Grid Computing Tutorial Notes #1

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 e-mail 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.pemchmod 400 userkey.pem

6. Test your certificate using the following command:grid-proxy-init

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 course web site (or from /grid/users/ directory on concorde01 machine) to your home directory:

2. You should extract the files into your HOME directory. Please be sure that you are in your home directory.cdgzip –d gtuser.tar.gztar xvf gtuser.tar

3. Run sh $HOME/gt3/run.sh

4. 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. You have to use MYPORT variable as your default port number in the future exercises at all times.

Section V: How to use servicesGrid services, which are basically Web services with improved characteristics. In this section, we

are going to learn how to use them.

Page 4: HOW TO ACCESS THE GRID IN THE DEPARTMENT ... · Web viewSection II: How to access the grid To access to the environment, you need to do the following steps: ... You have to use MYPORT

University of Surrey Date: 16/01/2006Department of ComputingIntroductory Grid Computing Tutorial Notes #1

Note: Do not forget to change the IP addresses and port numbers in this example accordingly!

1. Change your directory to gt3.cd $HOME/gt3

2. Run the following command to extract the necessary service files:rm –r $HOME/gt3/guidecp –r /grid/software/globus3/guide $HOME/gt3ant deployGuide

You will see several lines. You are expected to see “BUILD SUCCESSFUL” line if you successfully did.

3. Set the necessary environment to run the “Counter” service.setenv CLASSPATH ${CLASSPATH}:$HOME/gt3/guide/build/lib/guide.jar

4. Write:globus-start-container –p $MYPORT

You are going to see the existing services displayed like this:http://131.227.74.141:8080/ogsa/services/samples/complex/NestedArrayFactoryServicehttp://131.227.74.141:8080/ogsa/services/samples/complex/NestedFactoryServicehttp://131.227.74.141:8080/ogsa/services/samples/weather/WeatherFactoryServicehttp://131.227.74.141:8080/ogsa/services/samples/serialization/SerializationServicehttp://131.227.74.141:8080/ogsa/services/samples/google/GoogleSearchFactoryServicehttp://131.227.74.141:8080/ogsa/services/samples/any/AnyFactoryServicehttp://131.227.74.141:8080/ogsa/services/samples/servicedata/ServiceDataServicehttp://131.227.74.141:8080/ogsa/services/samples/array/ArraySampleFactoryServicehttp://131.227.74.141:8080/ogsa/services/samples/chat/ChatFactoryServicehttp://131.227.74.141:8080/ogsa/services/ogsi/NotificationSubscriptionFactoryServicehttp://131.227.74.141:8080/ogsa/services/ogsi/HandleResolverServicehttp://131.227.74.141:8080/ogsa/services/base/streaming/FileStreamFactoryFactoryServicehttp://131.227.74.141:8080/ogsa/services/base/multirft/MultiFileRFTFactoryServicehttp://131.227.74.141:8080/ogsa/services/gsi/AuthenticationServicehttp://131.227.74.141:8080/ogsa/services/gsi/SecureNotificationSubscriptionFactoryService

The display will be hanged. Please do not make any action for that.

5. 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.74.141:8080/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.74.141:8080/ogsa/services/guide/counter/CounterFactoryService/calc Termination Time: infinity

6. We can now execute the program: java org.globus.ogsa.guide.impl.CounterClient http://131.227.74.141:8080/ogsa/services/guide/counter/CounterFactoryService/calc add 2

Page 5: HOW TO ACCESS THE GRID IN THE DEPARTMENT ... · Web viewSection II: How to access the grid To access to the environment, you need to do the following steps: ... You have to use MYPORT

University of Surrey Date: 16/01/2006Department of ComputingIntroductory Grid Computing Tutorial Notes #1

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?