Using the Admin Client
Rucio provides a CLI for administrative tasks. The get methods can be executed
by any user, but the set methods require some admin privileges. See the
rucio-admin help page.
The command line client for administrative tasks is called rucio-admin
.
Getting help
To get an overview of the available rucio-admin
subcommands and flags, run:
rucio-admin --help
Enable command line autocompletion
If you would like to automatically complete rucio-admin
commands, install
the argcomplete package and run:
eval "$(register-python-argcomplete rucio-admin)"
Next, type rucio-admin
(note the trailing space) and press the
Tab key to see all available options. To use the autocompletion
feature, type enough letters of a subcommand or flag to uniquely define it
and then press Tab.
Account and identity methods
To create a new account:
$ rucio-admin account add --type USER --email jdoe@blahblih.com jdoe
You can choose different types in the list USER, GROUP, SERVICE. Different policies/permissions can be set depending on the account type. Once the account is created, you need to create and attach an identity to this account:
$ rucio-admin identity add --type X509 \
--id "CN=jdoe,OU=Users,OU=Organic Units,DC=blih,DC=blah" \
--email jdoe@blahblih.com --account jdoe
The list of possible identity types is X509, GSS, USERPASS, SSH:
$ rucio-admin account list-identities jdoe
Identity: CN=jdoe,OU=Users,OU=Organic Units,DC=blih,DC=blah, type: X509
You can set attributes to the users:
$ rucio-admin account add-attribute --key country --value xyz jdoe
And list these attributes:
$ rucio-admin account list-attributes jdoe
+---------+-------+
| Key | Value |
|---------+-------|
| country | xyz |
+---------+-------+
You can also list all the accounts matching a certain attribute using the filter option:
$ rucio-admin account list --filters "country=xyz"
jdoe
To set the quota for one account on a given RSE:
$ rucio-admin account set-limits jdoe SITE2_SCRATCH 10000000000000
Set account limit for account jdoe on RSE SITE2_SCRATCH: 10.000 TB
$ rucio-admin account get-limits dcameron SITE2_SCRATCH
Quota on SITE2_SCRATCH for jdoe : 10 TB
Scope methods
To create a new scope:
$ rucio-admin scope add --account jdoe --scope user.jdoe
Only the owner of the scope or privileged users can write into the scope.
To list all the scopes:
$ rucio-admin scope list
user.janedoe
user.jdoe
RSE methods
To create a new RSE:
$ rucio-admin rse add SITE2_SCRATCH
To add a RSE attribute:
$ rucio-admin rse set-attribute --rse SITE2_SCRATCH --key country --value xyz
To check an RSE attribute:
$ rucio-admin rse get-attribute SITE2_SCRATCH
country: xyz
Replica methods
To declare bad (i.e. corrupted or lost replicas):
$ rucio-admin replicas declare-bad --reason "File corrupted" https//path/to/lost/file