@@ -4,21 +4,21 @@ title: Multi-VO Rucio
4
4
sidebar_label : Multi-VO Rucio
5
5
---
6
6
7
- This section provides an overview of using Rucio for multiple virtual
8
- organizations (VOs) on a single instance with the "Multi-VO" feature. Rather
9
- than each VO having to set up an entire instance by themselves, they can share
10
- the same server and database which are run by a central "super_root", and
11
- continue to use Rucio as they would a normal or "Single-VO" instance. Their
12
- accounts, scopes and RSEs are associated with their VO which ensures all rules
13
- and replicas are kept separate from other VOs using the instance.
7
+ Multi-VO Rucio configuration allows a single instance of Rucio to support
8
+ multiple experiments or Virtual Organisations (VOs). Multi-VO Rucio are run by a
9
+ "super_root" which administers the Rucio instance, creating VOs within Rucio,
10
+ each VO is then administered by VO specific "root" accounts created with the VO
11
+ that deal with the VO requirements and needs. Each VO uses Rucio as a normal or
12
+ "Single-VO" instance, meaning a Rucio instance can transition to support more
13
+ VOs without significant disruption. Each VO's accounts, scopes and RSEs are
14
+ associated with their VO which ensures all rules and replicas are kept separate
15
+ from other VOs using the instance.
14
16
15
17
## Changes to the Client
16
18
17
- At the CLI and client level there are few changes to how Rucio is used. These
18
- cases, such as optional arguments for VO, are covered in documentation for the
19
- affected function. The main change is the addition of two options in the
20
- ` rucio.cfg ` file, one to flag that the instance is being run in M-VO mode and
21
- another to specify the VO the users belong to:
19
+ To utilise the Rucio client against a Multi-VO Rucio the client needs to first
20
+ know if it is interacting with a multi-VO Rucio instance, then which VO the client
21
+ should be accessing. This is done in the ` rucio.cfg ` as shown below:
22
22
23
23
``` cfg
24
24
[common]
@@ -33,29 +33,39 @@ vo = abc
33
33
## Changes to the rucio.cfg on the Server and Daemons
34
34
35
35
Similar settings need to be changed on the server and daemon rucio.cfg files as
36
- well as on the client end. For the server ` multi_vo ` should also be set in the
37
- config file. For the daemons another section is needed to be added, this is to
36
+ well as on the client end. For the server, ` multi_vo ` should also be set in the
37
+ config file. For the daemons, another section needs to be added: this is to
38
38
map each VO to its own proxy certificate. Rucio uses this information when
39
39
submitting and polling transfers to use the correct certificates.
40
40
41
41
``` cfg
42
+ [common]
43
+ ...
44
+ multi_vo = True
45
+
42
46
[vo_certs]
43
47
...
44
48
<3 char vo name> = <path/to/vo/proxy>
45
49
```
46
50
47
- It is recommended that the proxies are placed in /tmp/x509up _ [ VO] , and the
51
+ It is recommended that the proxies are placed in /tmp/x509up \_ [ VO] , and the
48
52
certificates and keys are placed in /opt/rucio/certs/[ VO] / and
49
53
/opt/rucio/keys/[ VO] / respectively.
50
54
51
- However , ` vo ` should not be set for the server or the daemons as these parts of
52
- Rucio are not associated with a single VO. If ` multi_vo ` is not set, or set to
53
- False, then Rucio will operate normally.
55
+ Unlike the Rucio client , ` vo ` in the ` client ` section should not be configured
56
+ for the server and daemons, unless specifically to ensure certain daemons act
57
+ for one VO alone:
54
58
55
- Similar settings need to be changed on the server and daemon rucio.cfg files as
56
- well as on the client end. For the server ` multi_vo ` should also be set in the
57
- config file. For the daemons another section is needed to be added, this is to
58
- map each VO to its own proxy certificate. Rucio uses this information when
59
+ ``` cfg
60
+ [common]
61
+ ...
62
+ multi_vo = True
63
+ ```
64
+
65
+ For the daemons, files and configuration are needed to allow daemons to act on
66
+ the various VOs: this inludes the VO specific certificates, keys, and proxies,
67
+ as well as an additional configuration section which maps each VO to its
68
+ respective x.509 authentication credentials. Rucio uses this information when
59
69
submitting and polling transfers to use the correct certificates.
60
70
61
71
``` yaml
@@ -64,26 +74,25 @@ submitting and polling transfers to use the correct certificates.
64
74
[3 char vo name] = [path/to/vo/proxy]
65
75
```
66
76
67
- However, ` vo ` should
68
- not be set for the server or the daemons as these parts of Rucio are not
69
- associated with a single VO. If ` multi_vo ` is not set, or set to False, then
70
- Rucio will operate normally.
71
-
72
77
## Role of the super_root
73
78
74
- While root accounts still retain their administrative role within a VO, for
75
- example adding RSEs and accounts, functions relating to the creation and
76
- management of VOs is handled by the super_root account, a concept introduced
77
- with M-VO Rucio. It is worth noting that the super_root account ** cannot** be
79
+ For overall administration of Multi-VO Rucio another layer of admin role has
80
+ been created outside of the VO structure. This means each VO has its own
81
+ root/admin accounts still retain their administrative role within a VO, for
82
+ example adding and editing accounts, adding and modifying RSEs for the VO.
83
+ Functions relating to the creation and management of VOs are handled by the
84
+ super_root account. It is worth noting that the super_root account ** cannot** be
78
85
used to perform individual VO administration; the roles of super_root and root
79
86
are distinct.
80
87
81
88
## Access of super_root Functions
82
89
83
90
As the super_root functions aren't intended for use by normal users of admins,
84
- they do not have an implementation in the client or CLI. They can be accessed
85
- from the core or the :ref:` vo-rest-api ` , however the latter will require the VO
86
- endpoint to be added to the aliases file used when setting up the server as it
91
+ they do not have an implementation in the client or CLI.
92
+
93
+ The super_root functions can be accessed from the core or the
94
+ :ref:` vo-rest-api ` . Access to the functions through the API will require the VO
95
+ endpoint to be added to the endpoints list used when setting up the server as it
87
96
is disabled by default.
88
97
89
98
## Starting a M-VO Instance
@@ -96,32 +105,26 @@ it. The identity used to access this account can be managed in the usual way.
96
105
## Creating VOs
97
106
98
107
When creating a new VO with the ` add_vo ` function you need to specify the three
99
- digit identifier for the new VO, which can contain letters and numbers. This
100
- must be unique for the instance. A more complete description can also be
101
- optionally included, along with an email to use for the root of this new VO. In
102
- addition to creating the new VO, a root account is also created for this VO, and
103
- has all identities associated with super_root added to it. The identities for
104
- the new root can then be configured as usual.
105
-
106
- ## Managing VOs
107
-
108
- In addition to creating VOs, the description and email for a VO can be altered
109
- using ` update_vo ` . If the root user of a VO loses access to their account, the
110
- super_root can associate a new identity with it using
111
- ` recover_vo_root_identity ` . Finally, a list of current VOs and their
112
- descriptions is accessible via ` list_vos ` .
108
+ character identifier for the new VO, which can contain letters and numbers. This
109
+ must be unique for the instance (A long VO name can be enabled for usage if
110
+ required, as shown in the [ ` Long VO Name Mapping ` ] ( #long-vo-name-mapping )
111
+ section). A more complete description can also be optionally included, along
112
+ with an email to use for the root of this new VO. As the new VO is created, its
113
+ corresponding root account is also created, and has all identities associated
114
+ with super_root added to it. The identities for the VO root can then be
115
+ configured as usual.
113
116
114
117
## Long VO Name Mapping
115
118
116
119
The rucio database stores all VO references as a single three-character tag for
117
120
performance reasons. It's possible to create aliases for these tag to allow
118
121
users/clients to specify long VO names when getting a token (and modifying VOs)
119
122
and have these converted to the internal tag automatically. Long VO names should
120
- only use the basic DNS name character set of alphanumber charaters , hyphen and
121
- dot (a-zA-Z0-9-.). The alias mappings are stored in the vo-map section of the
122
- configs database table and can be edited via the usual methods for modifying
123
- this config. The option name is the long VO name and the value is the short
124
- name; for example these can be added using the CLI:
123
+ only use the basic DNS name character set of alphanumeric characters , hyphen
124
+ and dot (a-zA-Z0-9-.). The alias mappings are stored in the vo-map section of
125
+ the configs database table and can be edited via the commands below. The option
126
+ name is the long VO name and the value is the short name; for example these can
127
+ be added using the CLI:
125
128
126
129
``` bash
127
130
rucio-admin config set --section vo-map --option my.long.vo --value mlv
@@ -130,28 +133,44 @@ rucio-admin config set --section vo-map --option another.vo --value ant
130
133
131
134
You may specify more than one alias for a VO if required.
132
135
136
+ ## Managing VOs
137
+
138
+ Super_root can also change the description and email for a VO using the ` update_vo `
139
+ API call. If a VO root user loses access to their account, the super_root can
140
+ associate a new identity with it using ` recover_vo_root_identity ` . Finally, a
141
+ list of current VOs and their descriptions is accessible via ` list_vos ` .
142
+
133
143
## Converting Existing Instances
134
144
135
- As opposed to starting a new M-VO instance from scratch, it may be desirable to
136
- convert the database for an existing (S-VO) Rucio instance into a M-VO instance
137
- so that additional VOs can be added without disrupting the original VO or
138
- needing to create a second instance. Conversely, one VO within a M-VO instance
139
- may grow to the point where it needs its own dedicated instance, and so
140
- converting data from M-VO to S-VO may also be desirable. These operations can be
141
- performed using utility functions included with Rucio.
142
-
143
- As mentioned above, in order to configure a M-VO instance of Rucio only the
144
- config file needs to change. However for an existing instance any entries
145
- already in the database will not be associated with a VO (or associated with
146
- their old one if previously in M-VO mode). In order to change these, direct
147
- operations on the database are required. These commands are generated using
148
- SQLAlchemy, and can either be run directly on the database or printed out and
149
- run manually.
145
+ Rather than initialising a new Rucio instance to support multiple VOs, a
146
+ single-VO instance of Rucio can be converted to a Multi-VO instance if desired.
147
+ This conversion allows the Rucio instance to expand the number of supported VOs
148
+ with minimal disruption. The tools to perform this can be found in
149
+ [ ` rucio/tools/convert_database_vo.py ` ] ( https://github.com/rucio/rucio/blob/master/tools/convert_database_vo.py ) ,
150
+ and further documentation on the [ single VO to multi VO] ( #s-vo-to-m-vo ) and
151
+ [ multi-VO to single VO] ( #m-vo-to-s-vo ) instances are found below.
152
+
153
+ The fuction ` convert_to_mvo ` facilitates the conversion of a single-VO instance
154
+ to a multi-VO instance, where ` convert_to_svo ` performs the opposite. VOs can
155
+ also be renamed using ` rename_vo ` , or deleted using ` remove_vo ` . The conversion
156
+ functions are callable by using the command line with details on what each
157
+ function requires to be carried out, as well as various optional arguments.
158
+
159
+ Remember that after any database conversion tools are used to update the ` rucio.cfg `
160
+ appropriately, this may include adding the ` multi_vo = True ` , as found in
161
+ [ ` changes to the rucio.cfg section ` ] ( #changes-to-the-ruciocfg-on-the-server-and-daemons ) .
162
+
163
+ These above tools will allow Rucio to change its VO support model. However,
164
+ when converting an existing instance, any entries already in the database will
165
+ not be associated with a VO (or associated with their old one if previously in
166
+ M-VO mode). In order to change these, direct operations on the database are
167
+ required. These commands are generated using SQLAlchemy, and can either be run
168
+ directly on the database or printed out and run manually.
150
169
151
170
## Practicalities
152
171
153
172
Before attempting to convert existing data, it is recommended that a backup of
154
- the database is taken in case an issue arises . Furthermore, of the databases
173
+ the database is taken in case any issues arise . Furthermore, of the databases
155
174
supported by Rucio, only PostgreSQL has been tested on real data. Based on this
156
175
test (which was performed on a machine with 64GB memory and four Intel Xeon
157
176
E5-2430 v2), the tables with 2 columns that needed updating were converted at a
@@ -165,8 +184,8 @@ be accessed using the `super_root` account if needed.
165
184
166
185
## S-VO to M-VO
167
186
168
- Before starting, ensure that ` multi_vo ` is set to ` True ` in the config file.
169
- The SQL commands needed to convert the database involve dropping foreign key
187
+ Before starting, ensure that ` multi_vo ` is set to ` True ` in the config file. The
188
+ SQL commands needed to convert the database involve dropping foreign key
170
189
constraints that affect accounts/scopes, then altering the relevant columns,
171
190
before re-adding the constraints. The 3 character identifier for the VO, a full
172
191
description and an admin email should be provided:
@@ -194,12 +213,12 @@ $ python
194
213
>>> create_root_account(create_counters=False)
195
214
```
196
215
197
- Alternatively by specifying ` --commit_changes ` the script will attempt to
198
- modify the database as it runs, however this requires the account used by the
199
- Rucio instance to access the database to be the owner of the the tables. In
200
- this case, the ` super_root ` account can be added as part of the script by
201
- passing the argument ` --create_super_root ` . If there is an error during the
202
- conversion, then none of the changes will be committed.
216
+ Alternatively by specifying ` --commit_changes ` the script will attempt to modify
217
+ the database as it runs, however this requires the account used by the Rucio
218
+ instance to access the database to be the owner of the the tables. In this case,
219
+ the ` super_root ` account can be added as part of the script by passing the
220
+ argument ` --create_super_root ` . If there is an error during the conversion, then
221
+ none of the changes will be committed.
203
222
204
223
``` bash
205
224
$ tools/convert_database_vo.py --commit_changes \
@@ -223,6 +242,7 @@ Before starting, ensure that `multi_vo` is set to `True` in the config file
223
242
the conversion is the same as before, dropping foreign key constraints and
224
243
renaming the entries that were associated with the old VO. The name of this VO
225
244
is the only required argument:
245
+
226
246
``` bash
227
247
$ tools/convert_database_vo.py
228
248
convert_to_svo old ALTER TABLE account_limits DROP CONSTRAINT
@@ -233,10 +253,10 @@ account_limits ADD CONSTRAINT "ACCOUNT_LIMITS_ACCOUNT_FK" FOREIGN KEY(account)
233
253
REFERENCES accounts (account);
234
254
```
235
255
236
- By default data associated with any other VOs
237
- is left in the database, but will be inaccessible to Rucio users. By setting
238
- pass the argument ` --delete_vos ` , these entries will be deleted from the
239
- database completely:
256
+ By default, data associated with any other VOs is left in the database, but will
257
+ be inaccessible to Rucio users.
258
+ These entries can be completely deleted from the database
259
+ by pasing the ` --delete_vos ` argument.
240
260
241
261
``` bash
242
262
tools/convert_database_vo.py convert_to_svo old --delete_vos ... \
@@ -250,6 +270,7 @@ Once again, historical tables skipped with `--skip_history`, and the commands
250
270
can be run directly against the database using the ` --commit_changes ` argument;
251
271
if this is not set then the ` super_root ` account should be manually deleted
252
272
after running the SQL:
273
+
253
274
``` bash
254
275
$ python
255
276
>>> from rucio.common.types import InternalAccount
0 commit comments