Project

General

Profile

Submit Grid Job » History » Version 8

Timo Eronen, 2016-10-12 11:23

1 1 Timo Eronen
h1. Submit Grid Job
2 1 Timo Eronen
3 2 Timo Eronen
*======================== DRAFT ===============================*
4 1 Timo Eronen
5 1 Timo Eronen
First you need to create a Personal Certificate according to this help: [[Obtain_the_Personal_Certificate]]
6 1 Timo Eronen
7 6 Timo Eronen
Then you need to Join to the fgi.csc.fi Virtual Organization. You should use the same machine and Browser for obtaining both the 
8 6 Timo Eronen
Certificate and for joining the VO:
9 1 Timo Eronen
10 5 Timo Eronen
Go to page https://voms.fgi.csc.fi:8443/voms/fgi.csc.fi, fill the form and submit it.
11 5 Timo Eronen
12 5 Timo Eronen
Once you have sent your application you need to wait until it has been processed after which you'll get an email how to proceed.
13 5 Timo Eronen
14 5 Timo Eronen
*1. Extract the Personal Certificate.*
15 5 Timo Eronen
16 6 Timo Eronen
Your Personal Certificate is stored into the Web Browser where you created it. To extract it for the Grid usage proceed as follows:
17 3 Timo Eronen
18 3 Timo Eronen
Locate the certificate in your Browser. It's placed under something like "Preferences" => "Advanced" => "Certificates" => "View Certificates" => "Your Certificates".
19 4 Timo Eronen
20 4 Timo Eronen
For example the Certificate in Firefox for OSX looks the following:
21 4 Timo Eronen
22 1 Timo Eronen
https://p55cc-redmine.utu.fi/attachments/download/6/cert_help.tiff
23 4 Timo Eronen
24 5 Timo Eronen
It's hard to tell where it is stored as there are too many different Browsers and versions, but the name of the Certificate should be TERENA and your name and email must be part of the Certificate.
25 1 Timo Eronen
26 1 Timo Eronen
Now "Backup" or "Export" the Certificate, or whatever options you have to Extract the Certificate into a file.
27 5 Timo Eronen
28 6 Timo Eronen
You will be asked filename into which the Certificate shall be stored. Give some name, for example _user.p12_
29 1 Timo Eronen
30 5 Timo Eronen
Select “File type” as PKCS12 for the Certificate file.
31 1 Timo Eronen
32 6 Timo Eronen
Then you will be asked to create a password. Invent a reasonable password and remember it (you will need it later).
33 1 Timo Eronen
34 1 Timo Eronen
Once you have entered the password the Certificate will be stored into the given file. The file consist of the Certificate and an associated private key. These two items will be separated into two files next.
35 1 Timo Eronen
36 6 Timo Eronen
To extract the Certificate private key enter command as follows:
37 1 Timo Eronen
38 6 Timo Eronen
<pre>
39 6 Timo Eronen
openssl pkcs12 -nocerts -in user.p12 -out userkey.pem
40 6 Timo Eronen
</pre>
41 1 Timo Eronen
42 6 Timo Eronen
When executed, this command will ask for the old and the new key passwords (they can be the same).
43 6 Timo Eronen
44 6 Timo Eronen
To extract the User Certificate enter the command:
45 6 Timo Eronen
46 6 Timo Eronen
<pre>
47 6 Timo Eronen
openssl pkcs12 -clcerts -nokeys -in user.p12 -out usercert.pem
48 6 Timo Eronen
</pre>
49 6 Timo Eronen
50 6 Timo Eronen
The two commands above should have created two files, _usercert.pem_ and _userkey.pem_. These two files should be moved into a _.globus_ sub-directory under the user's home directory (note the dot as the first character of the directory name). If the _.globus_ directory does not exist, it can be created with the command:
51 6 Timo Eronen
52 7 Timo Eronen
<pre>
53 7 Timo Eronen
mkdir ~/.globus/
54 7 Timo Eronen
</pre>
55 6 Timo Eronen
56 6 Timo Eronen
After this, the two Certificate files can be moved to the _.globus_ directory with the commands:
57 6 Timo Eronen
58 6 Timo Eronen
<pre>
59 8 Timo Eronen
mv usercert.pem ~/.globus/
60 6 Timo Eronen
61 8 Timo Eronen
mv userkey.pem ~/.globus/
62 6 Timo Eronen
</pre>
63 6 Timo Eronen
64 6 Timo Eronen
At this point you can remove the original Certificate file:
65 6 Timo Eronen
66 6 Timo Eronen
<pre>
67 6 Timo Eronen
rm user.p12
68 6 Timo Eronen
</pre>
69 6 Timo Eronen
70 6 Timo Eronen
Finally, make sure that the access permissions of the _userkey.pem_ file are set up correctly. The command to ensure this is:
71 6 Timo Eronen
72 1 Timo Eronen
<pre>
73 1 Timo Eronen
chmod 400 ~/.globus/userkey.pem
74 8 Timo Eronen
</pre>
75 8 Timo Eronen
76 8 Timo Eronen
At this point the setup is done and you can verify all is set and you are ready to use Grid. To check enter the command:
77 8 Timo Eronen
78 8 Timo Eronen
<pre>
79 8 Timo Eronen
arcproxy -S fgi.csc.fi
80 8 Timo Eronen
</pre>
81 8 Timo Eronen
82 8 Timo Eronen
If successful the output is something like this:
83 8 Timo Eronen
84 8 Timo Eronen
<pre>
85 8 Timo Eronen
Your identity: /DC=org/DC=terena/DC=tcs/C=FI/O=Turun yliopisto/CN=Timo Eronen tke@utu.fi
86 8 Timo Eronen
Contacting VOMS server (named fgi.csc.fi): voms.fgi.csc.fi on port: 15003
87 8 Timo Eronen
Proxy generation succeeded
88 8 Timo Eronen
Your proxy is valid until: 2016-10-12 23:16:10
89 6 Timo Eronen
</pre>