Skip to content

Commit c5a1dcb

Browse files
committed
Update the CLI user docs to address updated CLI
1 parent 6ce1e80 commit c5a1dcb

File tree

4 files changed

+130
-172
lines changed

4 files changed

+130
-172
lines changed

docs/index.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@ from single files up to Petabyte sized datasets.
3636

3737
- [Setting Up the Rucio Client](user/setting_up_the_rucio_client.md)
3838
- [Using the Client](user/using_the_client.md)
39-
- [Using the Admin Client](user/using_the_admin_client.md)
4039

4140
## Administration
4241

docs/user/using_the_admin_client.md

Lines changed: 0 additions & 137 deletions
This file was deleted.

docs/user/using_the_client.md

Lines changed: 130 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,12 @@ title: Using the Client
66
Rucio provides several commands for the end-user. See [executables](bin/rucio.md).
77
The command line client is called ``rucio``.
88

9+
Please note that these commands are not meant to be included in python scripts.
10+
For such applications, we encourage using the [python client](pathname:///html/site/client.html).
11+
12+
If you are using a version of the client prior to ~36.0, please view the [migration guide](user/migrating_from_35_client.md).
13+
14+
# Basic Commands
915

1016
## Getting help
1117

@@ -257,7 +263,7 @@ auth_token_file_path = /path/to/token/file
257263
You can query the list of available RSEs:
258264
259265
```bash
260-
$ rucio list-rses
266+
$ rucio rse list
261267
SITE1_DISK
262268
SITE1_TAPE
263269
SITE2_DISK
@@ -269,7 +275,7 @@ If the RSEs are tagged with attributes you can build RSE expressions and query
269275
the sites matching these expressions:
270276
271277
```bash
272-
$ rucio list-rses --rses "tier=1&disk=1"
278+
$ rucio rse list --rses "tier=1&disk=1"
273279
SITE1_DISK
274280
SITE2_DISK
275281
```
@@ -279,7 +285,7 @@ SITE2_DISK
279285
To list all the possible scopes:
280286
281287
```bash
282-
$ rucio list-scopes
288+
$ rucio scope list
283289
mc
284290
data
285291
user.jdoe
@@ -290,7 +296,7 @@ You can query the DIDs matching a certain pattern. It always requires to specify
290296
the scope in which you want to search:
291297
292298
```bash
293-
$ rucio list-dids user.jdoe:*
299+
$ rucio did list --did user.jdoe:*
294300
+-------------------------------------------+--------------+
295301
| SCOPE:NAME | [DID TYPE] |
296302
|-------------------------------------------+--------------|
@@ -307,7 +313,7 @@ $ rucio list-dids user.jdoe:*
307313
You can filter by key/value, e.g.:
308314
309315
```bash
310-
$ rucio list-dids --filter type=CONTAINER
316+
$ rucio did list --filter type=CONTAINER --did user.jdoe:*
311317
+-------------------------------------------+--------------+
312318
| SCOPE:NAME | [DID TYPE] |
313319
|-------------------------------------------+--------------|
@@ -320,7 +326,7 @@ If you want to resolve a collection (CONTAINER or DATASET) into the list of its
320326
constituents:
321327
322328
```bash
323-
$ rucio list-content user.jdoe:user.jdoe.test.container.1234.1
329+
$ rucio did content list --did user.jdoe:user.jdoe.test.container.1234.1
324330
+------------------------------------+--------------+
325331
| SCOPE:NAME | [DID TYPE] |
326332
|------------------------------------+--------------|
@@ -329,30 +335,15 @@ $ rucio list-content user.jdoe:user.jdoe.test.container.1234.1
329335
+------------------------------------+--------------+
330336
```
331337
332-
You can resolve also the collections (CONTAINER or DATASET) into the list of
333-
files:
334-
335-
```bash
336-
$ rucio list-files user.jdoe:user.jdoe.test.container.1234.1
337-
+-----------------------+---------+-------------+------------+----------+
338-
| SCOPE:NAME | GUID | ADLER32 | FILESIZE | EVENTS |
339-
|-----------------------+---------+-------------+------------+----------|
340-
| user.jdoe:test.file.1 | 9DF3... | ad:56fb0723 | 39.247 kB | |
341-
| user.jdoe:test.file.2 | 67E8... | ad:e3e573b5 | 636.075 kB | |
342-
| user.jdoe:test.file.3 | 32CD... | ad:22849380 | 641.427 kB | |
343-
+-----------------------+---------+-------------+------------+----------+
344-
Total files : 3
345-
Total size : 1.316 MB:
346-
```
347-
348338
## Rules operations
349339
350340
You can create a new rule like this:
351341
352342
```bash
353343
$ rucio add-rules --lifetime 1209600 \
354-
user.jdoe:user.jdoe.test.container.1234.1 1 \
355-
"tier=1&disk=1"
344+
--did user.jdoe:user.jdoe.test.container.1234.1 \
345+
--copies 1 \
346+
--rses "tier=1&disk=1"
356347
a12e5664555a4f12b3cc6991db5accf9
357348
```
358349
@@ -361,7 +352,7 @@ The command returns the rule_id of the rule.
361352
You can list the rules for a particular DID:
362353
363354
```bash
364-
$ rucio list-rules user.jdoe:user.jdoe.test.container.1234.1
355+
$ rucio rule list --did user.jdoe:user.jdoe.test.container.1234.1
365356
ID ACCOUNT SCOPE:NAME STATE[OK/REPL/STUCK] RSE_EXPRESSION COPIES EXPIRES
366357
---- ------- ---------- -------------------- -------------- ------ -------
367358
a... jdoe user.... OK[3/0/0] tier=1&disk=1 1 2018...
@@ -409,3 +400,117 @@ Downloaded files : 3
409400
Files already found locally : 0
410401
Files that cannot be downloaded : 0
411402
```
403+
404+
# Operator Commands
405+
406+
Rucio provides a CLI for administrative tasks. The get methods can be executed
407+
by any user, but the set methods require some admin privileges.
408+
409+
410+
## Account and identity methods
411+
412+
To create a new account:
413+
414+
```bash
415+
$ rucio account add --type USER --email [email protected] jdoe
416+
```
417+
418+
You can choose different types in the list USER, GROUP, SERVICE. Different
419+
policies/permissions can be set depending on the account type. Once the account
420+
is created, you need to create and attach an identity to this account:
421+
422+
```bash
423+
$ rucio account identity add --type X509 \
424+
--id "CN=jdoe,OU=Users,OU=Organic Units,DC=blih,DC=blah" \
425+
426+
--account jdoe
427+
```
428+
429+
The list of possible identity types is X509, GSS, USERPASS, SSH, SAML, OIDC:
430+
431+
```bash
432+
$ rucio account identity list --account jdoe
433+
Identity: CN=jdoe,OU=Users,OU=Organic Units,DC=blih,DC=blah, type: X509
434+
```
435+
436+
You can set attributes to the users:
437+
438+
```bash
439+
$ rucio account attribute add --key country --value xyz --account jdoe
440+
```
441+
442+
And list these attributes:
443+
444+
```bash
445+
$ rucio-admin account attribute list --account jdoe
446+
+---------+-------+
447+
| Key | Value |
448+
|---------+-------|
449+
| country | xyz |
450+
+---------+-------+
451+
```
452+
453+
You can also list all the accounts matching a certain attribute using the filter
454+
option:
455+
456+
```bash
457+
$ rucio account list --filters "country=xyz"
458+
jdoe
459+
```
460+
461+
To add the quota for one account on a given RSE:
462+
463+
```bash
464+
$ rucio account limit add --account jdoe --rses SITE2_SCRATCH --bytes 10000000000000
465+
Set account limit for account jdoe on RSE SITE2_SCRATCH: 10.000 TB
466+
467+
$ rucio account limit list --account jdoe --rses SITE2_SCRATCH
468+
Quota on SITE2_SCRATCH for jdoe : 10 TB
469+
```
470+
471+
## Scope methods
472+
473+
To create a new scope:
474+
475+
```bash
476+
$ rucio scope add --account jdoe --scope user.jdoe
477+
```
478+
479+
Only the owner of the scope or privileged users can write into the scope.
480+
481+
To list all the scopes:
482+
483+
```bash
484+
$ rucio scope list
485+
user.janedoe
486+
user.jdoe
487+
```
488+
489+
## RSE methods
490+
491+
To create a new RSE:
492+
493+
```bash
494+
$ rucio rse add --rse SITE2_SCRATCH
495+
```
496+
497+
To add a RSE attribute:
498+
499+
```bash
500+
$ rucio rse attribute add --rse SITE2_SCRATCH --key country --value xyz
501+
```
502+
503+
To check an RSE attribute:
504+
505+
```bash
506+
$ rucio rse attribute list --rse SITE2_SCRATCH
507+
country: xyz
508+
```
509+
510+
## Replica methods
511+
512+
To declare bad (i.e. corrupted or lost replicas):
513+
514+
```bash
515+
$ rucio replica state update bad --reason "File corrupted" --files https//path/to/lost/file
516+
```

website/sidebars.json

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -31,15 +31,6 @@
3131
"user/setting_up_the_rucio_client",
3232
"user/configuring_the_client",
3333
"user/using_the_client",
34-
"user/using_the_admin_client",
35-
{
36-
"Python Client API": [
37-
{
38-
"type": "autogenerated",
39-
"dirName": "client_api"
40-
}
41-
]
42-
},
4334
"user/developing_with_rucio",
4435
"user/migrating_from_35_client"
4536
],

0 commit comments

Comments
 (0)