Changes for page User documentation
Last modified by alexisdurieux on 2022/01/27 15:00
From version 5.1
edited by alexisdurieux
on 2022/01/27 14:49
on 2022/01/27 14:49
Change comment:
There is no comment for this version
Summary
-
Page properties (2 modified, 0 added, 0 removed)
Details
- Page properties
-
- Author
-
... ... @@ -1,1 +1,1 @@ 1 -XWiki. alexisdurieux1 +XWiki.evareill - Content
-
... ... @@ -17,7 +17,7 @@ 17 17 18 18 Why does each service provider need a Fenix service account? The reason is that the Principal Investigator who gets the Fenix service account is legally responsible for the jobs being run on the supercomputers and for not enabling the end-user to run unintended executables. 19 19 20 -[[image:Co llabs.ebrains-unicore-job-proxy.Userdocumentation.WebHome@ebrains-job-proxy-Job sequence.png]]20 +[[image:HPC Job Proxy diagram.jpg]] 21 21 22 22 == Use case == 23 23 ... ... @@ -40,6 +40,7 @@ 40 40 1. The HPC Job Proxy logs the job results, and pushes the actual cost of the job run for Bob to the EBRAINS Quota Manager. 41 41 1. The HPC Job Proxy notifies the Application of the results of the job. 42 42 43 + 43 43 == Sample transaction diagram == 44 44 45 45 [[image:ebrains-job-proxy-Job sequence.png]] ... ... @@ -51,7 +51,7 @@ 51 51 52 52 * Submit a job: **POST /api/jobs/** 53 53 54 -To submit a job to the proxy, you need to provide the following information as part of the POST JSON body: 55 +To submit a job to the proxy, you need to provide the following information as part of the POST JSON body: 55 55 56 56 * **job_def** - JSON: The Unicore job definition. For more information, please visit the [[__Unicore documentation__>>url:https://sourceforge.net/p/unicore/wiki/Job_Description/]] 57 57 * **site** - string: The Fenix site on which to run the job. ... ... @@ -71,6 +71,7 @@ 71 71 JURON 72 72 ))) 73 73 75 + 74 74 * Fetch a job's details: **GET /api/jobs/<job_id>** 75 75 76 76 The proxy will query Unicore on-the-fly for the job’s latest details. Fenix sites retain the information of past jobs for a set amount of days (30 days at CSCS). If the request is made after that delay, the information returned is that which has been stored in the HPC Job Proxy. The full information retrieved and stored is the following: ... ... @@ -94,9 +94,9 @@ 94 94 {{/code}} 95 95 {{/info}} 96 96 97 -* Fetch a file present in thejob'sexecution directory: **GET /api/jobs/<job_id>/<filename>**99 +* Fetch a job's file: **GET /api/jobs/<job_id>/<filename>** 98 98 99 -Out of convenience, you can fetch the files that are present in the job's execution directory. The output,error and exit code of a jobareplaced by Unicore in the job’s working directory. The filenames available are: stdout, stderr, UNICORE_SCRIPT_EXIT_CODE. If the job has pre commands or post commands, the following filenames are also available: stdout and stderr respectively under the folders .UNICORE_POST_0/ or .UNICORE_PRE_0/. If your job is creating files than they are too available to be fetched.101 +Out of convenience, you can fetch the output of a job (placed by Unicore in the job’s working directory). The filenames available are: stdout, stderr, UNICORE_SCRIPT_EXIT_CODE. If the job has pre commands or post commands, the following filenames are also available: stdout and stderr respectively under the folders .UNICORE_POST_0/ or .UNICORE_PRE_0/ 100 100 101 101 The proxy will respond with the //raw content// of the requested file. These files are available as long as the site does not delete them (30 days for CSCS PIZ DAINT). 102 102 ... ... @@ -104,7 +104,7 @@ 104 104 105 105 == Sample usage == 106 106 107 - [[A Jupyter Notebook provides sample code for the Application’s access to the HPC Job Proxy.>>https://lab.ch.ebrains.eu/user-redirect/lab/tree/shared/EBRAINS%20HPC%20job%20proxy/HPC_job_proxy_usage.ipynb]]109 +A Jupyter Notebook provides sample code for the Application’s access to the HPC Job Proxy. 108 108 109 109 == Source code == 110 110 ... ... @@ -116,13 +116,13 @@ 116 116 117 117 Your application needs an EBRAINS IAM service account. You should contact EBRAINS __support__ to create it. You will need to provide a username and an email address which is not linked to another EBRAINS account. The mapping between the EBRAINS service account and the Fenix service account is done automatically based on the linked email addresses which need to be identical. 118 118 119 -Your application needs an EBRAINS IAM OIDC client. See the [[__instructions__>>https://wiki.ebrains.eu/bin/view/Collabs/the-collaboratory/Documentation%20IAM/FAQ/OIDC%20Clients%20explained/1.%20Registering%20an%20OIDC%20client/#HCreatingyourOpenIDConnectclient]].121 +Your application needs an EBRAINS IAM OIDC client. See the __instructions__. 120 120 121 -Your application needs a Fenix project and a Fenix service account. See the [[__instructions__>>https://fenix-ri.eu/access]]to get a project. Then the Principal Investigator in your lab can request a Fenix service account via EBRAINS[[__support__>>https://ebrains.eu/support/]].123 +Your application needs a Fenix project and a Fenix service account. See the __instructions__ to get a project. Then the Principal Investigator in your lab can request a Fenix service account via EBRAINS __support__. 122 122 123 -Then in your app, you should retrieve the access token linked to your service account user. This requires the OIDC client ID, client Secret, EBRAINS service account's username and password. See the [[__instructions__>>https://wiki.ebrains.eu/bin/view/Collabs/the-collaboratory/Documentation%20IAM/FAQ/OIDC%20Clients%20explained/1.%20Registering%20an%20OIDC%20client/#HFetchingyourdeveloperaccesstoken]].125 +Then in your app, you should retrieve the access token linked to your service account user. This requires the OIDC client ID, client Secret, EBRAINS service account's username and password. See the __instructions__. 124 124 125 -When requesting a job on behalf of an end -user, your app gives this access token in the field "**user_info**" of the payload alongside the job request. Note that the access token expires (typically after one week), so your application should generate a new token.127 +When requesting a job on behalf of an end user, your app gives this access token in the field "**user_info**" of the payload alongside the job request. Note that the access token expires (typically after one week), so your application should generate a new token. See the __instructions__. 126 126 127 127 128 128 __Example__: