Storage Manager
How does it work
An user can share its home with other node on Grid'5000. Each time you start a job, an access for all the assigned nodes is automatically created. You may want to use this tutorial if you want to allow additional addresses to access your home.
Note | |
---|---|
Only the home owner can interact with his accesses, so you need to be authenticated. It's done automatically on the froentend. |
Create access
Accesses creation is done by sending POST to the API.
Let's assume we want to share the nancy
home of user jpicard
to IP addresses 172.16.72.1
and 172.16.72.25
We need a termination condition, it can be a specific date or a job termination.
If we want to use a specific time (for example 2018-12-25 19:38
), we send the following request to the Storage API:
curl -X POST 'https://api.grid5000.fr/stable/sites/nancy/storage/home/jpicard/access' -H "Content-Type: application/json" -d '{"ipv4": ["172.16.72.1", "172.16.72.25"], "termination" : {"until":"2018-12-25 19:38"}}'
If we want to use a job termination, for example the job 4548
of grenoble
:
curl -X POST 'https://api.grid5000.fr/stable/sites/nancy/storage/home/jpicard/access' -H "Content-Type: application/json" -d '{"ipv4": ["172.16.72.1", "172.16.72.25"], "termination" : {"job": 4548, "site": "grenoble"}}
Warning | |
---|---|
The access is create immediately and until the termination of the job, even if the job has not yet started. |
List access
To list all access, you should do:
curl https://api.grid5000.fr/stable/sites/nancy
/storage/home/jpicard
/access
You get a list of accesses
{ "G5k-home_jpicard_j_1666466-nancy_1": { "ipv4": [ "172.16.64.97" ], "termination": { "job": 1666466, "site": "nancy" } }, "G5k-home_jpicard_u_1535456240_1": { "ipv4": [ "172.16.64.16" ], "termination": { "until": 1535456240, } } }
You can also ask for a specific access by providing its identifier, for instance :
curl https://api.grid5000.fr/stable/sites/nancy
/storage/home/jpicard
/access/G5k-home_jpicard_u_1535456240_1
After that, you should be able to mount the home where you want:
Note | |
---|---|
|
Delete an access
Accesses deletion is done by sending DELETE to the API. To delete an access you specify it's identifier, for instance:
curl -X DELETE https://api.grid5000.fr/stable/sites/nancy
/storage/home/jpicard
/access/G5k-home_jpicard_u_1535456240_1
API Specification:
GET /stable/sites/site
/storage/home/username
/access
fetch a list of access.
GET /stable/sites/site
/storage/home/username
/access/access_id
fetch information of a specific access
DELETE /stable/sites/site
/storage/home/username
/access/access_id
delete a specific access
DELETE /stable/sites/site
/storage/home/username
/access/?job=job_id
&site=job_site
delete all access link to job job_id of site job_site
POST /stable/sites/site
/storage/home/username
/access
Create new access. The payload must be in JSON format, and contains the following mandatory properties:
Parameter | Type | Description & Examples |
---|---|---|
ipv4 | Mandatory | Array of ipv4 allowed to access NFS
["172.16.72.1", ""172.16.72.25] |
termination | Mandatory | Termination condition can be of two types "Until" or "Job". The form is a structure/hash.
Until termination takes a date as an until parameter. The access will be deleted after the specify date. eg: {"until" : "2018-12-25 19:38"} Job terminations takes two parameters, job and site, which are respectively the id and the site of a Grid'5000 job. When the job end, the export is deleted. eg: {"job": "4548, "site":"nancy"} |