GLite (Alien) -EGEE middleware . Практический курс пользователя

44
GLite - EGEE Middleware 1 EGEE is a projectfunded by the European Union undercontract IST-2003-508833 w w w .eu-egee.org GLite (Alien) -EGEE middleware. Практический курс пользователя Галактионов В.В Дубна, ОИЯИ

description

GLite (Alien) -EGEE middleware . Практический курс пользователя. Галактионов В.В Дубна, ОИЯИ. Система безопасности информации Privacy Шифрование Integrity Цифровая подпись Authentication Сертификаты Authorisation. Сертификат пользователя Получение сертификата - PowerPoint PPT Presentation

Transcript of GLite (Alien) -EGEE middleware . Практический курс пользователя

Page 1: GLite (Alien) -EGEE middleware . Практический курс пользователя

GLite - EGEE Middleware 1EGEE is a project funded by the European Union under contract IST-2003-508833

www.eu-egee.org

GLite (Alien) -EGEE middleware. Практический курс пользователя

Галактионов В.В

Дубна, ОИЯИ

Page 2: GLite (Alien) -EGEE middleware . Практический курс пользователя

GLite - EGEE Middleware 2

Система безопасности информации

Privacy Шифрование

Integrity Цифровая подпись

Authentication Сертификаты

Authorisation

Page 3: GLite (Alien) -EGEE middleware . Практический курс пользователя

GLite - EGEE Middleware 3

Сертификат пользователя

Получение сертификата

Для Церна руководство по адресу:http://service-grid-ca.web.cern.ch/service-grid-ca/help/user_req.html

Для ОИЯИ:lxpub01:~ > grid-cert-request

Page 4: GLite (Alien) -EGEE middleware . Практический курс пользователя

GLite - EGEE Middleware 4

A certificate request and private key is being created.

You will be asked to enter a PEM pass phrase. This pass phrase is akin to your account password,

and is used to protect your key file.If you forget your pass phrase, you will need toobtain a new certificate.

Using configuration from /etc/grid-security/globus-user-ssl.confGenerating a 1024 bit RSA private key......++++++..++++++writing new private key to '/afs/jinr.ru/user/g/gvv/.globus/userkey.pem'Enter PEM pass phrase:Verifying password - Enter PEM pass phrase:-----You are about to be asked to enter information that will be incorporatedinto your certificate request.What you are about to enter is what is called a Distinguished Name or a DN.There are quite a few fields but you can leave some blankFor some fields there will be a default value,If you enter '.', the field will be left blank.

-----Country Name (2 letter code), do not change! [RU]:Level 0 Organization, do not change! [DataGrid]:Your institution domain name (e.g. jinr.ru) [jinr.ru]:Your full name (e.g. Ivan Petrov) []:

Page 5: GLite (Alien) -EGEE middleware . Практический курс пользователя

GLite - EGEE Middleware 5

A private key and a certificate request has been generated with the subject:

/C=RU/O=DataGrid/OU=jinr.ru/CN=Galaktionov Victor

If the CN=Galaktionov Victor is not appropriate, rerun thisscript with the -force -cn "Common Name" options.

Your private key is stored in /afs/jinr.ru/user/g/gvv/.globus/userkey.pemYour request is stored in /afs/jinr.ru/user/g/gvv/.globus/usercert_request.pem

Please e-mail the request to the Russian DataGrid CA [email protected] may use a command similar to the following:

cat /afs/jinr.ru/user/g/gvv/.globus/usercert_request.pem | mail [email protected]

Only use the above if this machine can send AND receive e-mail. if not, pleasemail using some other method.

Your certificate will be mailed to you within two working days.If you receive no response, contact Russian DataGrid CA at [email protected]

Page 6: GLite (Alien) -EGEE middleware . Практический курс пользователя

GLite - EGEE Middleware 6

Результат:

В HOME-директории создается поддиректория .globus с 3 файлами: usercert.pem usercert_request.pem userkey.pem

или usercert.pem userkey.pem userreq.pem

!!! Установите код доступа 400 для файла userkey.pem

Page 7: GLite (Alien) -EGEE middleware . Практический курс пользователя

GLite - EGEE Middleware 7

Подпись сертификата

Процедура подписи сертификата устанавливается в каждой организации, выполняется через соответствующихуполномоченных. Ему пересылается файл usercert_request.pem илиuserreq.pem

Результат: полученный файл (подписанный сертификат) под именеим usercert.pem c правами доступа 644 запишите в директорию .globus

Page 8: GLite (Alien) -EGEE middleware . Практический курс пользователя

GLite - EGEE Middleware 8

Регистрация в виртуальной организации

1. Генерация сертификата для браузера

генерация сертификата: Инструкция: http://lcg-registrar.cern.ch/load_certificates.html

openssl pkcs12 -export -inkey userkey.pem \ -in usercert.pem \ -out my_cert.p12 -name "My certificate”

userkey.pem Путь к закрытому ключу (доступ 400) usercert.pem Путь к файлу сертификатаmy_cert.p12 Путь к создаваемому сертификату брузера в формате PKCS12."My certificate" Необязательный параметр.

Page 9: GLite (Alien) -EGEE middleware . Практический курс пользователя

GLite - EGEE Middleware 9

- Включение сертификата в браузер: использовать механизм импортрования сертификатов.

- Вход в WEB-портал для регистрации членства в VOДоступ через браузер с установленным сертификатомhttps://lxb2023.cern.ch:8443/edg-voms-admin/EGEE/index.html

- Получить извещения о регистрации в VO

Page 10: GLite (Alien) -EGEE middleware . Практический курс пользователя

GLite - EGEE Middleware 10

Подключение к GLite в Церне

GLite в Церне находится в: /afs/cern.ch/project/egee/jra1/prototype/glite.

Нужно иметь доступ к Церн AFS

Наиболее простой путь подключения установить cвязь в директории, куда есть путь доступа:

cd $HOME/binln -s /afs/cern.ch/project/egee/jra1/prototype/ glite/bin/glite .

Подключение выполнено!

Page 11: GLite (Alien) -EGEE middleware . Практический курс пользователя

GLite - EGEE Middleware 11

Аутентификация

1. Аутентификация через сертификаты2. Аутентификация через SSH ключи

Аутентификация через сертификаты

cd ~mkdir .aliencd ~/.alien/ln -s ~/.globus/ globuscat > EnvironmentALIEN_USER=<voms username>

Page 12: GLite (Alien) -EGEE middleware . Практический курс пользователя

GLite - EGEE Middleware 12

[lxplus055] ~/.alien > ls -altotal 12drwxr-xr-x 3 vgalakti gr 2048 Jan 27 15:38 .drwxr-xr-x 40 vgalakti gr 6144 Feb 4 17:21 ..-rw-r--r-- 1 vgalakti gr 24 Dec 2 12:19 Environmentlrwxr-xr-x 1 vgalakti gr 36 Nov 29 09:48 globus -> /afs/cern.ch/user/v/vgalakti/.globus

[lxplus055] ~/.alien > ls -al globus/total 19drwxr-xr-x 2 vgalakti gr 2048 Dec 1 17:43 .drwxr-xr-x 40 vgalakti gr 6144 Feb 4 17:21 ..-rw-r--r-- 1 vgalakti gr 2148 Dec 1 17:44 my_cert.p12-rw-r--r-- 1 vgalakti gr 4706 Dec 1 17:33 usercert.pem-r-------- 1 vgalakti gr 963 Nov 30 12:36 userkey.pem-rw-r--r-- 1 vgalakti gr 1138 Nov 30 12:36 userreq.pem

Page 13: GLite (Alien) -EGEE middleware . Практический курс пользователя

GLite - EGEE Middleware 13

Вход в GLite

[lxplus055] ~ > gliteWarning: No valid proxy. Trying SSH key...An error occured during AliEn authentication: user not authenticatedJan 27 17:12:09 info Could not connect to database: user not authenticated (1)

Database: In _validateUser validation of user vgalaktionov (as vgalaktionov) failed.[lxplus059] ~ >

Page 14: GLite (Alien) -EGEE middleware . Практический курс пользователя

GLite - EGEE Middleware 14

[lxplus055] ~ > glite proxy-initYour identity: /C=CH/O=CERN/OU=GRID/CN=Victor Galaktionov 7912Enter GRID pass phrase for this identity:Creating proxy ....................................... DoneYour proxy is valid until: Fri Jan 28 05:06:12 2005

Page 15: GLite (Alien) -EGEE middleware . Практический курс пользователя

GLite - EGEE Middleware 15

[lxplus055] ~ > glite proxy-infosubject : /C=CH/O=CERN/OU=GRID/CN=Victor Galaktionov 7912/CN=proxyissuer : /C=CH/O=CERN/OU=GRID/CN=Victor Galaktionov 7912identity : /C=CH/O=CERN/OU=GRID/CN=Victor Galaktionov 7912type : full legacy globus proxystrength : 512 bitspath : /tmp/x509up_u19747timeleft : 11:59:31

Page 16: GLite (Alien) -EGEE middleware . Практический курс пользователя

GLite - EGEE Middleware 16

[lxplus055] ~ > glite[lxb2075.cern.ch:3308] /egee/user/v/vgalaktionov/ >

[lxplus055] ~ > glite -exec whoamivgalaktionov

[lxplus055] ~ > glite -u vgalaktionov -exec whoamivgalaktionov

Page 17: GLite (Alien) -EGEE middleware . Практический курс пользователя

GLite - EGEE Middleware 17

[lxplus055] ~ > glite -exec ls -aldrwxr-xr-x vgalakti vgalakti 0 Jan 19 14:18 . drwxr-xr-x admin admin 0 Jan 14 14:34 .. drwxr-xr-x vgalakti vgalakti 0 Jan 19 14:18 bin drwxr-xr-x vgalakti vgalakti 0 Jan 19 14:18 glite -rwxr-xr-x vgalakti vgalakti 96 Jan 28 16:38 perltest.pl-rwxr-xr-x vgalakti vgalakti 182 Jan 28 16:47 perltestjdl-rwxr-xr-x vgalakti vgalakti 152 Feb 01 17:43 qwe -rwxr-xr-x vgalakti vgalakti 152 Feb 01 17:45 qwer -rwxr-xr-x vgalakti vgalakti 152 Feb 01 17:40 qwerty -rwxr-xr-x vgalakti vgalakti 152 Jan 27 15:25 second -rwxr-xr-x vgalakti vgalakti 247 Jan 28 16:58 testJava.jdl-rwxr-xr-x vgalakti vgalakti 152 Jan 27 17:20 third

Page 18: GLite (Alien) -EGEE middleware . Практический курс пользователя

GLite - EGEE Middleware 18

Основные команды

[lxn5220.cern.ch:3308] / > < tab > < tab > $? aioless exit masterCopy removetouch . aioput findmirror removeTag tree accesscat findEx mkdir removeTagValueumask add cd get mkremdirresolve update addHost chgroupglob mount rm updateTagValueaddMirror chmod groups mssurlrmdir user addTag chownguid2lfn mv services whereisaddTagValue cp help passwdshowAllTagValue whoami addUser debughost preFetch showMirror zoomaiocat deleteMirror lfn2guid pwd showTagValueaiocert df ls quit showTagsaioget echo lsinternal register silent

Page 19: GLite (Alien) -EGEE middleware . Практический курс пользователя

GLite - EGEE Middleware 19

Управление данными

Файлы в GLite:

Logical File Names (LFN). Physical File Names (PFN).

Примеры PFN:castor://alienx.cern.ch/castor/cern.ch/user/a/aliprod/sim//2001-02/V3.06.02/00014/00056/galice.roothsi://pdsflx002.nersc.gov/nersc/projects/alice/2001-02/V3.06.02/00034/00056/galice.roottape://alienx.cern.ch/Y27671/52?size=274&bsize=26214

Page 20: GLite (Alien) -EGEE middleware . Практический курс пользователя

GLite - EGEE Middleware 20

register - регистрация файлов

register -helpFeb 3 15:56:10 info Error in register: not enough argumentsUsage register <path> <pfn> [<size> [<GUID>]]Pfn: castor://<host>/<path>

[lxplus055] ~ > glite login -u vgalaktionov -exec register third file://lxplus.cern.ch/afs/cern.ch/user/v/vgalakti/lcg/perltest.pl 152Jan 27 17:21:17 info File /egee/user/v/vgalaktionov/third inserted in the catalog

[lxplus055] ~ > glite -u vgalaktionov -exec register qwerty file://lxplus029.cern.ch/tmp/vgalakti/perltest.jdl 152Feb 1 17:41:01 info File /egee/user/v/vgalaktionov/qwerty inserted in the catalog

Page 21: GLite (Alien) -EGEE middleware . Практический курс пользователя

GLite - EGEE Middleware 21

[lxplus055] ~ > glite [lxb2075.cern.ch:3308] /egee/user/v/vgalaktionov/ > ls -aldrwxr-xr-x vgalakti vgalakti 0 Jan 19 14:18 . drwxr-xr-x admin admin 0 Jan 14 14:34 .. drwxr-xr-x vgalakti vgalakti 0 Jan 19 14:18 bin drwxr-xr-x vgalakti vgalakti 0 Jan 19 14:18 glite -rwxr-xr-x vgalakti vgalakti 96 Jan 28 16:38 perltest.pl-rwxr-xr-x vgalakti vgalakti 182 Jan 28 16:47 perltestjdl-rwxr-xr-x vgalakti vgalakti 152 Feb 01 17:40 qwerty -rwxr-xr-x vgalakti vgalakti 152 Jan 27 15:25 second -rwxr-xr-x vgalakti vgalakti 247 Jan 28 16:58 testJava.jdl-rwxr-xr-x vgalakti vgalakti 152 Jan 27 17:20 third

Page 22: GLite (Alien) -EGEE middleware . Практический курс пользователя

GLite - EGEE Middleware 22

[lxb2075.cern.ch:3308] /egee/user/v/vgalaktionov/ register aqwe file:/afs/cern.ch/user/v/vgalakti/lcg/perltest.jdl 152Feb 3 15:30:45 info File /egee/user/v/vgalaktionov/aqwe inserted in the catalog

[lxb2075.cern.ch:3308] /egee/user/v/vgalaktionov/ > register newFile file://lxplus029.cern.ch/tmp/vgalakti/perltest.jdl 152Jan 27 15:20:54 info File /egee/user/v/vgalaktionov/newFile inserted in the catalog

[lxb2075.cern.ch:3308] /egee/user/v/vgalaktionov/ > register second file://lxplus.cern.ch/afs/cern.ch/user/v/vgalakti/lcg/perltest.pl 152Jan 27 15:25:53 info File /egee/user/v/vgalaktionov/second inserted in the catalog

Page 23: GLite (Alien) -EGEE middleware . Практический курс пользователя

GLite - EGEE Middleware 23

[lxb2075.cern.ch:3308] /egee/user/v/vgalaktionov/ > cat qwertyFeb 1 17:41:51 info The SE returned an error: SE :: Not able to get the file file://lxplus029.cern.ch/tmp/vgalakti/perltest.jdl

[lxb2075.cern.ch:3308] /egee/user/v/vgalaktionov/ > cat qwerExecutable="perltest.pl";############################3InputSandbox={"perltest.pl"};Arguments="Grid";StdOutput="std.out";StdError="std.err";OutputSandbox={"std.out", "std.err"};

Page 24: GLite (Alien) -EGEE middleware . Практический курс пользователя

GLite - EGEE Middleware 24

add - копирование файлов в GLite.

add -helpError: not enough parameters'add' copies a file into the SE, and register an entry in the catalogue that points to the file in the SE

Usage: add <lfn> <pfn> [<SE> [<previous storage element>]]

Page 25: GLite (Alien) -EGEE middleware . Практический курс пользователя

GLite - EGEE Middleware 25

add perltest.pl /afs/cern.ch/user/v/vgalakti/lcg/perltest.plJan 28 16:39:04 info The pfn '/afs/cern.ch/user/v/vgalakti/lcg/perltest.pl' does not look like a pfn... let's hope that it refers to 'file://lxplus080.cern.ch/afs/cern.ch/user/v/vgalakti/lcg/perltest.pl'Jan 28 16:39:04 info Registering the file file://lxplus080.cern.ch/afs/cern.ch/user/v/vgalakti/lcg/perltest.pl in EGEE::CERN::SRMCastorJan 28 16:39:05 info Initializing ServiceJan 28 16:39:05 info Starting a service to transfer the file from the local machineCan't exec "/afs/cern.ch/project/egee/jra1/prototype/N20050113/bin/bbftpd": No such file or directory at /afs/cern.ch/project/egee/jra1/prototype/N20050113/lib/perl5/site_perl/5.8.5/AliEn/Service/SubmitFile.pm line 142.Jan 28 16:39:05 info Error starting bbftpJan 28 16:39:05 info Starting a soap server...Jan 28 16:39:05 info Contacting SE at http://lxb1432.cern.ch:8000, and tell it to pick up soap://lxplus080.cern.ch:8085/afs/cern.ch/user/v/vgalakti/lcg/perltest.pl?URI=SubmitFileJan 28 16:39:05 info Copying a file into an SEJan 28 16:39:06 info Transfering file /afs/cern.ch/user/v/vgalakti/lcg/perltest.plJan 28 16:39:11 info Stopping the service (pid 15041) (and I'm 14620)

Jan 28 16:39:11 info Getting the file srm://gridftp05.cern.ch:8443/castor/cern.ch/user/g/gproduct/EGEETEST/SE/13/30533/BE2B7B20-7142-11D9-8079-D2BB22BE5185.1106926745 of size 96

Jan 28 16:39:11 info File /egee/user/v/vgalaktionov/perltest.pl inserted in the catalog

Page 26: GLite (Alien) -EGEE middleware . Практический курс пользователя

GLite - EGEE Middleware 26

add perltestjdl file://lxplus080.cern.ch/afs/cern.ch/user/v/vgalakti/lcg/perltest.jdlJan 28 16:47:24 info Registering the file file://lxplus080.cern.ch/afs/cern.ch/user/v/vgalakti/lcg/perltest.jdl in EGEE::CERN::SRMCastorJan 28 16:47:24 info Initializing ServiceJan 28 16:47:24 info Starting a service to transfer the file from the local machineCan't exec "/afs/cern.ch/project/egee/jra1/prototype/N20050113/bin/bbftpd": No such file or directory at /afs/cern.ch/project/egee/jra1/prototype/N20050113/lib/perl5/site_perl/5.8.5/AliEn/Service/SubmitFile.pm line 142.Jan 28 16:47:24 info Error starting bbftpJan 28 16:47:24 info Starting a soap server...Jan 28 16:47:24 info Contacting SE at http://lxb1432.cern.ch:8000, and tell it to pick up soap://lxplus080.cern.ch:8085/afs/cern.ch/user/v/vgalakti/lcg/perltest.jdl?URI=SubmitFileJan 28 16:47:24 info Copying a file into an SEJan 28 16:47:25 info Transfering file /afs/cern.ch/user/v/vgalakti/lcg/perltest.jdlJan 28 16:47:29 info Stopping the service (pid 21597) (and I'm 14620)Jan 28 16:47:30 info Getting the file srm://gridftp05.cern.ch:8443/castor/cern.ch/user/g/gproduct/EGEETEST/SE/13/39833/E7F3FFBC-7143-11D9-B0DD-D2BB22BE5185.1106927245 of size 182

Jan 28 16:47:30 info File /egee/user/v/vgalaktionov/perltestjdl inserted in the catalog

Page 27: GLite (Alien) -EGEE middleware . Практический курс пользователя

GLite - EGEE Middleware 27

add testJava.jdl file://lxplus080.cern.ch/afs/cern.ch/user/v/vgalakti/lcg/testJava.jdlJan 28 16:56:59 info Registering the file file://lxplus080.cern.ch/afs/cern.ch/user/v/vgalakti/lcg/testJava.jdl in EGEE::CERN::SRMCastorJan 28 16:56:59 info Initializing ServiceJan 28 16:57:00 info Starting a service to transfer the file from the local machineCan't exec "/afs/cern.ch/project/egee/jra1/prototype/N20050113/bin/bbftpd": No such file or directory at /afs/cern.ch/project/egee/jra1/prototype/N20050113/lib/perl5/site_perl/5.8.5/AliEn/Service/SubmitFile.pm line 142.Jan 28 16:57:00 info Error starting bbftpJan 28 16:57:00 info Starting a soap server...Jan 28 16:57:00 info Contacting SE at http://lxb1432.cern.ch:8000, and tell it to pick up soap://lxplus080.cern.ch:8085/afs/cern.ch/user/v/vgalakti/lcg/testJava.jdl?URI=SubmitFileJan 28 16:57:00 info Copying a file into an SEJan 28 16:57:00 error The server returned an error: contacting the SubmitFile

Jan 28 16:57:01 info Stopping the service (pid 30864) (and I'm 14620)

Page 28: GLite (Alien) -EGEE middleware . Практический курс пользователя

GLite - EGEE Middleware 28

[lxb2075.cern.ch:3308] /egee/user/v/vgalaktionov/ > add testJava.jdl file://lxplus080.cern.ch/afs/cern.ch/user/v/vgalakti/lcg/testJava.jdlJan 28 16:58:58 info Registering the file file://lxplus080.cern.ch/afs/cern.ch/user/v/vgalakti/lcg/testJava.jdl in EGEE::CERN::SRMCastorJan 28 16:58:58 info Initializing ServiceJan 28 16:58:59 info Starting a service to transfer the file from the local machineCan't exec "/afs/cern.ch/project/egee/jra1/prototype/N20050113/bin/bbftpd": No such file or directory at /afs/cern.ch/project/egee/jra1/prototype/N20050113/lib/perl5/site_perl/5.8.5/AliEn/Service/SubmitFile.pm line 142.Jan 28 16:58:59 info Error starting bbftpJan 28 16:58:59 info Starting a soap server...Jan 28 16:58:59 info Contacting SE at http://lxb1432.cern.ch:8000, and tell it to pick up soap://lxplus080.cern.ch:8085/afs/cern.ch/user/v/vgalakti/lcg/testJava.jdl?URI=SubmitFileJan 28 16:58:59 info Copying a file into an SEJan 28 16:58:59 info Transfering file /afs/cern.ch/user/v/vgalakti/lcg/testJava.jdlJan 28 16:59:04 info Stopping the service (pid 31433) (and I'm 14620)

Jan 28 16:59:05 info Getting the file srm://gridftp05.cern.ch:8443/castor/cern.ch/user/g/gproduct/EGEETEST/SE/15/40831/85D662FA-7145-11D9-A859-D2BB22BE5185.1106927939 of size 247 Jan 28 16:59:05 info File /egee/user/v/vgalaktionov/testJava.jdl insertJan 28 16:59:05 info File /egee/user/v/vgalaktionov/testJava.jdl inserted in the catalog

Page 29: GLite (Alien) -EGEE middleware . Практический курс пользователя

GLite - EGEE Middleware 29

get - перепись в локальные файлы

get -helpError: not enough arguments in getUsage: get [-n] [-o]<file> [<localfile>]

Пример из документации:[lxn5220.cern.ch:3308] /bin/ > get hello May 19 14:53:30 info Getting the file srm://lxn5209.cern.ch:8000/castor/cern.ch/home/egee/00001/00028.1084884720 And the file is /tmp/EGEE/cache/00028.1084884720.130921084884755.35141084971159

Page 30: GLite (Alien) -EGEE middleware . Практический курс пользователя

GLite - EGEE Middleware 30

Реально:

Пример 1.[lxb2075.cern.ch:3308] /egee/user/v/vgalaktionov/ > get secondJan 31 16:09:46 info The guid is 58EDE0D2-706F-11D9-B9C8-D2BB22BE5185Jan 31 16:09:46 info Getting the pfn from EGEE::CERN::SRMCastor

Jan 31 16:09:46 error Error contacting the IS

Page 31: GLite (Alien) -EGEE middleware . Практический курс пользователя

GLite - EGEE Middleware 31

Пример 2.[lxb2075.cern.ch:3308] /egee/user/v/vgalaktionov/ > get secondFeb 1 17:29:09 info The guid is 58EDE0D2-706F-11D9-B9C8-D2BB22BE5185Feb 1 17:29:09 info Getting the pfn from EGEE::CERN::SRMCastorFeb 1 17:29:09 info Asking the SE at http://lxb1432.cern.ch:8000Feb 1 17:29:09 info In getfile, with EGEE::CERN::SRMCastor Feb 1 17:29:09 info Getting the file file://lxplus.cern.ch/afs/cern.ch/user/v/vgalakti/lcg/perltest.pl

And the file is /tmp/EGEE/cache/perltest.pl.7411106836302

Page 32: GLite (Alien) -EGEE middleware . Практический курс пользователя

GLite - EGEE Middleware 32

Пример 3.[lxb2075.cern.ch:3308] /egee/user/v/vgalaktionov/ > get testJava.jdlFeb 1 17:35:01 info The guid is 85D662FA-7145-11D9-A859-D2BB22BE5185Feb 1 17:35:01 info Getting the pfn from EGEE::CERN::SRMCastorFeb 1 17:35:01 info Asking the SE at http://lxb1432.cern.ch:8000Feb 1 17:35:02 info In getfile, with EGEE::CERN::SRMCastor Feb 1 17:35:02 info Getting the file srm://lxb1432.cern.ch/castor/cern.ch/user/g/gproduct/EGEETEST/SE/15/40831/85D662FA-7145-11D9-A859-D2BB22BE5185.1106927939Feb 1 17:35:02 info We are not authenticated to get the file :(

Feb 1 17:35:02 info Error: file not copied!!Feb 1 17:35:02 info Asking the SE to get srm://lxb1432.cern.ch/castor/cern.ch/user/g/gproduct/EGEETEST/SE/15/40831/85D662FA-7145-11D9-A859-D2BB22BE5185.1106927939Feb 1 17:35:02 info In bringFiletoSE, with EGEE::CERN::SRMCastorFeb 1 17:35:18 info Getting the local copy brought by the SE file://lxb1432.cern.ch/tmp/EGEE/cache/85D662FA-7145-11D9-A859-D2BB22BE5185.1106927939.238411106928988.144591107275701Feb 1 17:35:18 info Everything worked and got /tmp/EGEE/cache/85D662FA-7145-11D9-A859-D2BB22BE5185.1106927939.238411106928988.144591107275701.26101107275718

And the file is /tmp/EGEE/cache/85D662FA-7145-11D9-A859-D2BB22BE5185.1106927939.238411106928988.144591107275701.26101107275718

Page 33: GLite (Alien) -EGEE middleware . Практический курс пользователя

GLite - EGEE Middleware 33

Управление задачами

[lxplus055] ~ > glite proxy-initYour identity: /C=CH/O=CERN/OU=GRID/CN=Victor Galaktionov 7912Enter GRID pass phrase for this identity:Creating proxy ...................................................... DoneYour proxy is valid until: Mon Feb 7 03:18:40 2005

Page 34: GLite (Alien) -EGEE middleware . Практический курс пользователя

GLite - EGEE Middleware 34

[lxplus055] ~ > glite loginFeb 6 15:30:01 notice Starting remotequeue...Feb 6 15:30:01 info [ Requirements = ( other.Type == "Job" ); CloseSE = { "EGEE::CERN::SRMCastor", "EGEE::CERN::SRM", "EGEE::CERN::scratch", "EGEE::CERN::SRMdCache", "EGEE::CERN::pcitgm10", "EGEE::CERN::scratch2", "EGEE::CERN::SRMo" }; CE = "EGEE::CERN::CONDOR"; Host = "lxn5210.cern.ch"; LocalDiskSpace = 9000000; WNHost = "lxplus055.cern.ch"; TTL = 172800; Type = "machine"; Uname = "2.4.21-27.0.2.EL.cernsmp"; GridPartitions = { "Production" } ]

Page 35: GLite (Alien) -EGEE middleware . Практический курс пользователя

GLite - EGEE Middleware 35

[lxb2075.cern.ch:3308] /egee/user/v/vgalaktionov/ > cat jdl/hello.jdlType = "Job";JobType = "Normal";Executable = "helloWorld.sh";

cat bin/helloworld.sh#!/bin/bashecho "=======================" echo "Hello, World"echo `date`echo `hostname`echo "Done"

Page 36: GLite (Alien) -EGEE middleware . Практический курс пользователя

GLite - EGEE Middleware 36

submit jdl/hello.jdlFeb 6 15:36:14 info Submitting job '/egee/user/v/vgalaktionov/bin/helloWorld.sh '...Feb 6 15:36:14 info There is no time to live (TTL) defined in the jdl... putting the default '6 hours'Feb 6 15:36:14 info Input Box: {}Feb 6 15:36:14 info Command submitted (job 14971)!!

Page 37: GLite (Alien) -EGEE middleware . Практический курс пользователя

GLite - EGEE Middleware 37

[lxb2075.cern.ch:3308] /egee/user/v/vgalaktionov/ > topJobId Status Command name Exechost 14971 WAITING /egee/user/v/vgalaktionov/bin/helloWorld.sh

[lxb2075.cern.ch:3308] /egee/user/v/vgalaktionov/ > topJobId Status Command name Exechost 14971 WAITING /egee/user/v/vgalaktionov/bin/helloWorld.sh

[lxb2075.cern.ch:3308] /egee/user/v/vgalaktionov/ > topJobId Status Command name Exechost 14971 ASSIGNED /egee/user/v/vgalaktionov/bin/helloWorld.sh [email protected]

Page 38: GLite (Alien) -EGEE middleware . Практический курс пользователя

GLite - EGEE Middleware 38

[lxb2075.cern.ch:3308] /egee/user/v/vgalaktionov/ > topJobId Status Command name Exechost 14971 STARTED /egee/user/v/vgalaktionov/bin/helloWorld.sh [email protected]

[lxb2075.cern.ch:3308] /egee/user/v/vgalaktionov/ > topJobId Status Command name Exechost 14971 SAVING /egee/user/v/vgalaktionov/bin/helloWorld.sh [email protected]

[lxb2075.cern.ch:3308] /egee/user/v/vgalaktionov/ > topJobId Status Command name Exechost

Page 39: GLite (Alien) -EGEE middleware . Практический курс пользователя

GLite - EGEE Middleware 39

[lxb2075.cern.ch:3308] /egee/user/v/vgalaktionov/ > cat /proc/vgalaktionov/14971/job-output/stdoutTest: ClusterMonitor is at lxn5210.cern.ch:8084Execution machine: lxn5211.cern.ch=======================

Hello, WorldSun Feb 6 15:36:31 CET 2005lxn5211.cern.chDone

Page 40: GLite (Alien) -EGEE middleware . Практический курс пользователя

GLite - EGEE Middleware 40

get /proc/vgalaktionov/14971/job-output/stdoutFeb 6 16:00:28 info The guid is 80BEB1EC-784C-11D9-9403-D2BB22BE5185Feb 6 16:00:28 info Getting the pfn from EGEE::CERN::SRMCastorFeb 6 16:00:28 info Asking the SE at http://lxb1432.cern.ch:8000Feb 6 16:00:28 info In getfile, with EGEE::CERN::SRMCastor Feb 6 16:00:28 info Getting the file srm://gridftp05.cern.ch:8443/castor/cern.ch/user/g/gproduct/EGEETEST/SE/06/56515/7F4C3FA0-784C-11D9-92A5-EE7314AC9522.1107700593And the file is /tmp/EGEE/cache/7F4C3FA0-784C-11D9-92A5-EE7314AC9522.1107700593.122621107700639.34081107700660

Page 41: GLite (Alien) -EGEE middleware . Практический курс пользователя

GLite - EGEE Middleware 41

[lxb2075.cern.ch:3308] /egee/user/v/vgalaktionov/ > exitbye now![lxplus055] ~cat /tmp/EGEE/cache/7F4C3FA0-784C-11D9-92A5-EE7314AC9522.1107700593.122621107700639.34081107700660Test: ClusterMonitor is at lxn5210.cern.ch:8084Execution machine: lxn5211.cern.ch=======================Hello, WorldSun Feb 6 15:36:31 CET 2005lxn5211.cern.ch

Page 42: GLite (Alien) -EGEE middleware . Практический курс пользователя

GLite - EGEE Middleware 42

Job StatusThe usual status transition of a job can be seen in the following picture: When a user submits a job, the first state of the job will be INSERTING. Then, a service will check the requirements of the job, and set the jobto WAITING. The job will wait until a CE gets the job, in which case the job will be firt ASSIGNED, and then QUEUED in the local batch system of the CE. Once the job lands on the worker node, the status will be STARTED, and it will fetch the command and the input files from the catalogue. At some point, the job will be RUNNING. Once the job finishes, it will go to SAVING while all its output is added to the catalogue. Finally, the job will be DONE.

Page 43: GLite (Alien) -EGEE middleware . Практический курс пользователя

GLite - EGEE Middleware 43

Язык JDL

https://edms.cern.ch/file/555796/1/ EGEE-JRA1-TEC-555796-JDL-Attributes-v0-1.doc

Page 44: GLite (Alien) -EGEE middleware . Практический курс пользователя

GLite - EGEE Middleware 44

Пример

Type = "job"; JobType = "normal"; Executable = "script.sh"; Arguments = "60";

StdOutput = "sim.out"; StdError = "sim.err";

OutputSandbox = { "sim.err", "sim.out" };