rucio-clients 32.8.6__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of rucio-clients might be problematic. Click here for more details.
- rucio/__init__.py +18 -0
- rucio/alembicrevision.py +16 -0
- rucio/client/__init__.py +16 -0
- rucio/client/accountclient.py +413 -0
- rucio/client/accountlimitclient.py +155 -0
- rucio/client/baseclient.py +929 -0
- rucio/client/client.py +77 -0
- rucio/client/configclient.py +113 -0
- rucio/client/credentialclient.py +54 -0
- rucio/client/didclient.py +691 -0
- rucio/client/diracclient.py +48 -0
- rucio/client/downloadclient.py +1674 -0
- rucio/client/exportclient.py +44 -0
- rucio/client/fileclient.py +51 -0
- rucio/client/importclient.py +42 -0
- rucio/client/lifetimeclient.py +74 -0
- rucio/client/lockclient.py +99 -0
- rucio/client/metaclient.py +137 -0
- rucio/client/pingclient.py +45 -0
- rucio/client/replicaclient.py +444 -0
- rucio/client/requestclient.py +109 -0
- rucio/client/rseclient.py +664 -0
- rucio/client/ruleclient.py +287 -0
- rucio/client/scopeclient.py +88 -0
- rucio/client/subscriptionclient.py +161 -0
- rucio/client/touchclient.py +78 -0
- rucio/client/uploadclient.py +871 -0
- rucio/common/__init__.py +14 -0
- rucio/common/cache.py +74 -0
- rucio/common/config.py +796 -0
- rucio/common/constants.py +92 -0
- rucio/common/constraints.py +18 -0
- rucio/common/didtype.py +187 -0
- rucio/common/exception.py +1092 -0
- rucio/common/extra.py +37 -0
- rucio/common/logging.py +404 -0
- rucio/common/pcache.py +1387 -0
- rucio/common/policy.py +84 -0
- rucio/common/schema/__init__.py +143 -0
- rucio/common/schema/atlas.py +411 -0
- rucio/common/schema/belleii.py +406 -0
- rucio/common/schema/cms.py +478 -0
- rucio/common/schema/domatpc.py +399 -0
- rucio/common/schema/escape.py +424 -0
- rucio/common/schema/generic.py +431 -0
- rucio/common/schema/generic_multi_vo.py +410 -0
- rucio/common/schema/icecube.py +404 -0
- rucio/common/schema/lsst.py +423 -0
- rucio/common/stomp_utils.py +160 -0
- rucio/common/stopwatch.py +56 -0
- rucio/common/test_rucio_server.py +148 -0
- rucio/common/types.py +158 -0
- rucio/common/utils.py +1946 -0
- rucio/rse/__init__.py +97 -0
- rucio/rse/protocols/__init__.py +14 -0
- rucio/rse/protocols/cache.py +123 -0
- rucio/rse/protocols/dummy.py +112 -0
- rucio/rse/protocols/gfal.py +701 -0
- rucio/rse/protocols/globus.py +243 -0
- rucio/rse/protocols/gsiftp.py +93 -0
- rucio/rse/protocols/http_cache.py +83 -0
- rucio/rse/protocols/mock.py +124 -0
- rucio/rse/protocols/ngarc.py +210 -0
- rucio/rse/protocols/posix.py +251 -0
- rucio/rse/protocols/protocol.py +530 -0
- rucio/rse/protocols/rclone.py +365 -0
- rucio/rse/protocols/rfio.py +137 -0
- rucio/rse/protocols/srm.py +339 -0
- rucio/rse/protocols/ssh.py +414 -0
- rucio/rse/protocols/storm.py +207 -0
- rucio/rse/protocols/webdav.py +547 -0
- rucio/rse/protocols/xrootd.py +295 -0
- rucio/rse/rsemanager.py +752 -0
- rucio/vcsversion.py +11 -0
- rucio/version.py +46 -0
- rucio_clients-32.8.6.data/data/etc/rse-accounts.cfg.template +25 -0
- rucio_clients-32.8.6.data/data/etc/rucio.cfg.atlas.client.template +42 -0
- rucio_clients-32.8.6.data/data/etc/rucio.cfg.template +257 -0
- rucio_clients-32.8.6.data/data/requirements.txt +55 -0
- rucio_clients-32.8.6.data/data/rucio_client/merge_rucio_configs.py +147 -0
- rucio_clients-32.8.6.data/scripts/rucio +2540 -0
- rucio_clients-32.8.6.data/scripts/rucio-admin +2434 -0
- rucio_clients-32.8.6.dist-info/METADATA +50 -0
- rucio_clients-32.8.6.dist-info/RECORD +88 -0
- rucio_clients-32.8.6.dist-info/WHEEL +5 -0
- rucio_clients-32.8.6.dist-info/licenses/AUTHORS.rst +94 -0
- rucio_clients-32.8.6.dist-info/licenses/LICENSE +201 -0
- rucio_clients-32.8.6.dist-info/top_level.txt +1 -0
rucio/vcsversion.py
ADDED
rucio/version.py
ADDED
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
# -*- coding: utf-8 -*-
|
|
2
|
+
# Copyright European Organization for Nuclear Research (CERN) since 2012
|
|
3
|
+
#
|
|
4
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
# you may not use this file except in compliance with the License.
|
|
6
|
+
# You may obtain a copy of the License at
|
|
7
|
+
#
|
|
8
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
#
|
|
10
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
# See the License for the specific language governing permissions and
|
|
14
|
+
# limitations under the License.
|
|
15
|
+
|
|
16
|
+
try:
|
|
17
|
+
from rucio.vcsversion import VERSION_INFO
|
|
18
|
+
except ImportError:
|
|
19
|
+
VERSION_INFO = {'branch_nick': 'LOCALBRANCH', # NOQA
|
|
20
|
+
'revision_id': 'LOCALREVISION',
|
|
21
|
+
'version': 'VERSION',
|
|
22
|
+
'final': False,
|
|
23
|
+
'revno': 0}
|
|
24
|
+
|
|
25
|
+
RUCIO_VERSION = [VERSION_INFO['version'], ]
|
|
26
|
+
FINAL = VERSION_INFO['final'] # This becomes true at Release Candidate time
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
def canonical_version_string():
|
|
30
|
+
""" Get the canonical string """
|
|
31
|
+
return '.'.join(filter(None, RUCIO_VERSION))
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
def version_string():
|
|
35
|
+
""" Get the version string """
|
|
36
|
+
return canonical_version_string()
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
def vcs_version_string():
|
|
40
|
+
""" Get the VCS version string """
|
|
41
|
+
return "%s:%s" % (VERSION_INFO['branch_nick'], VERSION_INFO['revision_id'])
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
def version_string_with_vcs():
|
|
45
|
+
""" Get the version string with VCS """
|
|
46
|
+
return "%s-%s" % (canonical_version_string(), vcs_version_string())
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
{
|
|
2
|
+
"lxplus.cern.ch":{
|
|
3
|
+
"username":"USERNAME",
|
|
4
|
+
"password":"PASSWORD",
|
|
5
|
+
"host":"lxplus.cern.ch"
|
|
6
|
+
},
|
|
7
|
+
"swift.cern.ch": {
|
|
8
|
+
"access_key": "ACCESSKEY",
|
|
9
|
+
"secret_key": "PASSWORD",
|
|
10
|
+
"host_base": "swift.cern.ch",
|
|
11
|
+
"host_bucket": "swift.cern.ch",
|
|
12
|
+
"progress_meter": "False",
|
|
13
|
+
"skip_existing": "False"
|
|
14
|
+
},
|
|
15
|
+
"posix": {},
|
|
16
|
+
"DESY-ZN_SCRATCHDISK": {
|
|
17
|
+
"auth_type": "cert",
|
|
18
|
+
"timeout":300
|
|
19
|
+
},
|
|
20
|
+
"TAIWAN-LCG2_PPSSCRATCHDISK": {
|
|
21
|
+
"cert": ["/tmp/x509up","/tmp/x509up"],
|
|
22
|
+
"auth_type": "cert",
|
|
23
|
+
"timeout":300
|
|
24
|
+
}
|
|
25
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
# Copyright 2014-2021 CERN
|
|
2
|
+
#
|
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
# you may not use this file except in compliance with the License.
|
|
5
|
+
# You may obtain a copy of the License at
|
|
6
|
+
#
|
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
+
#
|
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
# See the License for the specific language governing permissions and
|
|
13
|
+
# limitations under the License.
|
|
14
|
+
#
|
|
15
|
+
# Authors:
|
|
16
|
+
# - Vincent Garonne <vincent.garonne@cern.ch>, 2014
|
|
17
|
+
# - Mario Lassnig <mario.lassnig@cern.ch>, 2018
|
|
18
|
+
# - Nicolo Magini <nicolo.magini@cern.ch>, 2018
|
|
19
|
+
# - Tomas Javurek <tomas.javurek@cern.ch>, 2019
|
|
20
|
+
# - David Población Criado <david.poblacion.criado@cern.ch>, 2021
|
|
21
|
+
|
|
22
|
+
[common]
|
|
23
|
+
|
|
24
|
+
[client]
|
|
25
|
+
rucio_host = https://voatlasrucio-server-prod.cern.ch:443
|
|
26
|
+
auth_host = https://voatlasrucio-auth-prod.cern.ch:443
|
|
27
|
+
client_x509_proxy = $X509_USER_PROXY
|
|
28
|
+
request_retries = 3
|
|
29
|
+
auth_type = x509_proxy
|
|
30
|
+
|
|
31
|
+
[policy]
|
|
32
|
+
permission = atlas
|
|
33
|
+
schema = atlas
|
|
34
|
+
lfn2pfn_algorithm_default = hash
|
|
35
|
+
support = hn-atlas-dist-analysis-help@cern.ch
|
|
36
|
+
support_rucio = https://github.com/rucio/rucio/issues/
|
|
37
|
+
|
|
38
|
+
[upload]
|
|
39
|
+
#transfer_timeout = 3600
|
|
40
|
+
|
|
41
|
+
[download]
|
|
42
|
+
#transfer_timeout = 3600
|
|
@@ -0,0 +1,257 @@
|
|
|
1
|
+
# Copyright 2012-2022 CERN
|
|
2
|
+
#
|
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
# you may not use this file except in compliance with the License.
|
|
5
|
+
# You may obtain a copy of the License at
|
|
6
|
+
#
|
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
+
#
|
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
# See the License for the specific language governing permissions and
|
|
13
|
+
# limitations under the License.
|
|
14
|
+
#
|
|
15
|
+
# Authors:
|
|
16
|
+
# - Mario Lassnig <mario.lassnig@cern.ch>, 2012-2020
|
|
17
|
+
# - Vincent Garonne <vincent.garonne@cern.ch>, 2012-2017
|
|
18
|
+
# - Thomas Beermann <thomas.beermann@cern.ch>, 2012-2021
|
|
19
|
+
# - Luis Rodrigues <lfrodrigues@gmail.com>, 2013
|
|
20
|
+
# - Cedric Serfon <cedric.serfon@cern.ch>, 2013
|
|
21
|
+
# - Wen Guan <wen.guan@cern.ch>, 2014
|
|
22
|
+
# - Fernando López <felopez@cern.ch>, 2015
|
|
23
|
+
# - Martin Barisits <martin.barisits@cern.ch>, 2015-2021
|
|
24
|
+
# - Vitjan Zavrtanik <vitjan.zavrtanik@cern.ch>, 2017
|
|
25
|
+
# - Stefan Prenner <stefan.prenner@cern.ch>, 2018
|
|
26
|
+
# - Nicolo Magini <nicolo.magini@cern.ch>, 2018
|
|
27
|
+
# - Frank Berghaus <berghaus@cern.ch>, 2019
|
|
28
|
+
# - Dilaksun Bavarajan <dilaksun.bavarajan@cern.ch>, 2019
|
|
29
|
+
# - James Perry <j.perry@epcc.ed.ac.uk>, 2019
|
|
30
|
+
# - Ruturaj Gujar <ruturaj.gujar23@gmail.com>, 2019
|
|
31
|
+
# - Jaroslav Guenther <jaroslav.guenther@cern.ch>, 2019
|
|
32
|
+
# - Benedikt Ziemons <benedikt.ziemons@cern.ch>, 2020-2021
|
|
33
|
+
# - David Población Criado <david.poblacion.criado@cern.ch>, 2021
|
|
34
|
+
# - Radu Carpa <radu.carpa@cern.ch>, 2021-2022
|
|
35
|
+
# - Rakshita Varadarajan <rakshitajps@gmail.com>, 2021
|
|
36
|
+
# - Joel Dierkes <joel.dierkes@cern.ch>, 2021
|
|
37
|
+
|
|
38
|
+
[common]
|
|
39
|
+
logdir = /var/log/rucio
|
|
40
|
+
loglevel = DEBUG
|
|
41
|
+
logformat = %%(asctime)s\t%%(process)d\t%%(levelname)s\t%%(message)s
|
|
42
|
+
mailtemplatedir=/opt/rucio/etc/mail_templates
|
|
43
|
+
|
|
44
|
+
[client]
|
|
45
|
+
rucio_host = https://rucio-server-prod.cern.ch:443
|
|
46
|
+
auth_host = https://rucio-auth-prod.cern.ch:443
|
|
47
|
+
auth_type = userpass
|
|
48
|
+
#auth_type = gss
|
|
49
|
+
#auth_type = x509_proxy
|
|
50
|
+
#auth_type = ssh
|
|
51
|
+
username = ddmlab
|
|
52
|
+
password = secret
|
|
53
|
+
ca_cert = /opt/rucio/etc/web/ca.crt
|
|
54
|
+
#client_cert = /opt/rucio/etc/web/client.crt
|
|
55
|
+
#client_key = /opt/rucio/etc/web/client.key
|
|
56
|
+
#client_x509_proxy = $X509_USER_PROXY
|
|
57
|
+
#ssh_private_key = $HOME/.ssh/id_rsa
|
|
58
|
+
account = root
|
|
59
|
+
request_retries = 3
|
|
60
|
+
protocol_stat_retries = 6
|
|
61
|
+
|
|
62
|
+
[upload]
|
|
63
|
+
#transfer_timeout = 3600
|
|
64
|
+
#preferred_impl = xrootd, rclone
|
|
65
|
+
|
|
66
|
+
[download]
|
|
67
|
+
#transfer_timeout = 3600
|
|
68
|
+
#preferred_impl = xrootd, rclone
|
|
69
|
+
|
|
70
|
+
[core]
|
|
71
|
+
geoip_licence_key = LICENCEKEYGOESHERE # Get a free licence key at https://www.maxmind.com/en/geolite2/signup
|
|
72
|
+
default_mail_from = spamspamspam@cern.ch
|
|
73
|
+
|
|
74
|
+
[database]
|
|
75
|
+
default = sqlite:////tmp/rucio.db
|
|
76
|
+
#default = oracle://_____________:___________@(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=_________)(PORT=______))(ADDRESS=(PROTOCOL=TCP)(HOST=_________)(PORT=_____))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=__________)))
|
|
77
|
+
#default = oracle://_____________:___________@(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=127.0.0.1)(PORT=______))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=_____________)))
|
|
78
|
+
#schema=atlas_rucio # only for cern oracle
|
|
79
|
+
#default = mysql+pymysql://rucio:rucio@localhost/rucio
|
|
80
|
+
#default = postgresql://rucio:rucio@localhost/rucio
|
|
81
|
+
pool_recycle=3600
|
|
82
|
+
echo=0
|
|
83
|
+
pool_reset_on_return=rollback
|
|
84
|
+
# Uncomment the following line to disable database connection pooling.
|
|
85
|
+
#poolclass = nullpool
|
|
86
|
+
|
|
87
|
+
[bootstrap]
|
|
88
|
+
# Hardcoded salt = 0, String = secret, Python: hashlib.sha256("0secret").hexdigest()
|
|
89
|
+
userpass_identity = ddmlab
|
|
90
|
+
userpass_pwd = 2ccee6f6dd1bc2269cddd7cd5e47578e98e430539807c36df23fab7dd13e7583
|
|
91
|
+
userpass_email = ph-adp-ddm-lab@cern.ch
|
|
92
|
+
|
|
93
|
+
# Default DDMLAB client certificate from /opt/rucio/etc/web/client.crt
|
|
94
|
+
x509_identity = emailAddress=ph-adp-ddm-lab@cern.ch,CN=DDMLAB Client Certificate,OU=PH-ADP-CO,O=CERN,ST=Geneva,C=CH
|
|
95
|
+
x509_email = ph-adp-ddm-lab@cern.ch
|
|
96
|
+
|
|
97
|
+
# Default DDMLAB cern account
|
|
98
|
+
gss_identity = ddmlab@CERN.CH
|
|
99
|
+
gss_email = ph-adp-ddm-lab@cern.ch
|
|
100
|
+
|
|
101
|
+
# Default DDMLAB ssh key
|
|
102
|
+
ssh_identity = ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAq5LySllrQFpPL614sulXQ7wnIr1aGhGtl8b+HCB/0FhMSMTHwSjX78UbfqEorZV16rXrWPgUpvcbp2hqctw6eCbxwqcgu3uGWaeS5A0iWRw7oXUh6ydnVy89zGzX1FJFFDZ+AgiZ3ytp55tg1bjqqhK1OSC0pJxdNe878TRVVo5MLI0S/rZY2UovCSGFaQG2iLj14wz/YqI7NFMUuJFR4e6xmNsOP7fCZ4bGMsmnhR0GmY0dWYTupNiP5WdYXAfKExlnvFLTlDI5Mgh4Z11NraQ8pv4YE1woolYpqOc/IMMBBXFniTT4tC7cgikxWb9ZmFe+r4t6yCDpX4IL8L5GOQ== ddmlab
|
|
103
|
+
ssh_email = ph-adp-ddm-lab@cern.ch
|
|
104
|
+
|
|
105
|
+
# Default DDMLAB SAML Name ID
|
|
106
|
+
saml_id = ddmlab
|
|
107
|
+
saml_email = ph-adp-ddm-lab@cern.ch
|
|
108
|
+
|
|
109
|
+
[monitor]
|
|
110
|
+
carbon_server = rucio-graphite-int.cern.ch
|
|
111
|
+
carbon_port = 8125
|
|
112
|
+
user_scope = your_username
|
|
113
|
+
enable_metrics = False
|
|
114
|
+
metrics_port = 8080
|
|
115
|
+
|
|
116
|
+
[conveyor]
|
|
117
|
+
scheme = srm,gsiftp,root,http,https
|
|
118
|
+
transfertool = fts3
|
|
119
|
+
ftshosts = https://fts3-pilot.cern.ch:8446, https://fts3-pilot.cern.ch:8446
|
|
120
|
+
cacert = /opt/rucio/etc/web/ca.crt
|
|
121
|
+
usercert = /opt/rucio/tools/x509up
|
|
122
|
+
|
|
123
|
+
[messaging-fts3]
|
|
124
|
+
port = 61123
|
|
125
|
+
ssl_key_file = /home/mario/.ssh/hostkey.pem
|
|
126
|
+
ssl_cert_file = /home/mario/.ssh/hostcert.pem
|
|
127
|
+
destination = /topic/transfer.fts_monitoring_queue_state
|
|
128
|
+
brokers = dashb-test-mb.cern.ch
|
|
129
|
+
voname = atlas
|
|
130
|
+
|
|
131
|
+
[messaging-hermes]
|
|
132
|
+
username = ____
|
|
133
|
+
password = ____
|
|
134
|
+
port = 61023
|
|
135
|
+
nonssl_port = 61013
|
|
136
|
+
use_ssl = True
|
|
137
|
+
ssl_key_file = /etc/grid-security/hostkey.pem
|
|
138
|
+
ssl_cert_file = /etc/grid-security/hostcert.pem
|
|
139
|
+
destination = /topic/rucio.events
|
|
140
|
+
brokers = localhost
|
|
141
|
+
voname = atlas
|
|
142
|
+
email_from = Rucio <spamspamspam@cern.ch>
|
|
143
|
+
email_test = spamspamspam@cern.ch
|
|
144
|
+
|
|
145
|
+
[transmogrifier]
|
|
146
|
+
maxdids = 100000
|
|
147
|
+
|
|
148
|
+
[accounts]
|
|
149
|
+
# These are accounts that can write into scopes owned by another account
|
|
150
|
+
special_accounts = panda, tier0
|
|
151
|
+
|
|
152
|
+
[trace]
|
|
153
|
+
tracedir = /var/log/rucio/trace
|
|
154
|
+
brokers=localhost
|
|
155
|
+
port=61013
|
|
156
|
+
username = _________
|
|
157
|
+
password = _________
|
|
158
|
+
topic = /topic/rucio.tracer
|
|
159
|
+
trace_host = https://rucio-server-prod.cern.ch:443
|
|
160
|
+
|
|
161
|
+
[tracer-kronos]
|
|
162
|
+
brokers=localhost
|
|
163
|
+
port=61013
|
|
164
|
+
ssl_key_file = /etc/grid-security/hostkey.pem
|
|
165
|
+
ssl_cert_file = /etc/grid-security/hostcert.pem
|
|
166
|
+
queue = /queue/Consumer.kronos.rucio.tracer
|
|
167
|
+
prefetch_size = 10
|
|
168
|
+
chunksize = 10
|
|
169
|
+
subscription_id = rucio-tracer-listener
|
|
170
|
+
use_ssl = False
|
|
171
|
+
reconnect_attempts = 100
|
|
172
|
+
excluded_usrdns = CN=proxy,CN=Robot: Ganga Robot,CN=722147,CN=gangarbt,OU=Users,OU=Organic Units,DC=cern,DC=ch
|
|
173
|
+
username = _________
|
|
174
|
+
password = _________
|
|
175
|
+
dataset_wait = 60
|
|
176
|
+
|
|
177
|
+
[injector]
|
|
178
|
+
file = /opt/rucio/tools/test.file.1000
|
|
179
|
+
bytes = 1000
|
|
180
|
+
md5 = fd21ce524a9e45060fd3f62c4ef6a386
|
|
181
|
+
adler32 = 52590737
|
|
182
|
+
#file = /opt/rucio/tools/test.file.1G
|
|
183
|
+
#bytes = 1000000000
|
|
184
|
+
#md5sum = 1a3031f43cc0c0cf4f8341920a9faf52
|
|
185
|
+
#adler32 = 5ff2d417
|
|
186
|
+
|
|
187
|
+
[alembic]
|
|
188
|
+
cfg = /opt/rucio/etc/alembic.ini
|
|
189
|
+
|
|
190
|
+
[messaging-cache]
|
|
191
|
+
port = 61023
|
|
192
|
+
ssl_key_file = /etc/grid-security/hostkey.pem
|
|
193
|
+
ssl_cert_file = /etc/grid-security/hostcert.pem
|
|
194
|
+
destination = /topic/rucio.fax
|
|
195
|
+
brokers = localhost
|
|
196
|
+
voname = atlas
|
|
197
|
+
account = cache_mb
|
|
198
|
+
|
|
199
|
+
[test]
|
|
200
|
+
cacert = /opt/rucio/etc/web/ca.crt
|
|
201
|
+
#cacert = /etc/pki/tls/certs/CERN-bundle.pem
|
|
202
|
+
usercert = /opt/rucio/etc/web/usercert.pem
|
|
203
|
+
#usercert = /home/mario/.ssh/usercert_with_key.pem
|
|
204
|
+
|
|
205
|
+
[nagios]
|
|
206
|
+
proxy = /opt/rucio/etc/ddmadmin.proxy.nagios
|
|
207
|
+
rfcproxy = /opt/rucio/etc/ddmusr01.rfc.proxy
|
|
208
|
+
fts_servers = https://fts3-pilot.cern.ch:8446, https://fts3-devel.cern.ch:8446, https://fts3.cern.ch:8446, https://lcgfts3.gridpp.rl.ac.uk:8446, https://fts3-test.gridpp.rl.ac.uk:8446, https://fts.usatlas.bnl.gov:8446
|
|
209
|
+
|
|
210
|
+
[auditor]
|
|
211
|
+
cache = /opt/rucio/auditor-cache
|
|
212
|
+
results = /opt/rucio/auditor-results
|
|
213
|
+
|
|
214
|
+
[c3po]
|
|
215
|
+
placement_algorithm = t2_free_space
|
|
216
|
+
elastic_url = http://aianalytics01.cern.ch:9200
|
|
217
|
+
redis_host = localhost
|
|
218
|
+
redis_port = 6379
|
|
219
|
+
|
|
220
|
+
[c3po-popularity]
|
|
221
|
+
elastic_url = http://rucio-logger-prod-01.cern.ch:9200
|
|
222
|
+
|
|
223
|
+
[c3po-site-mapper]
|
|
224
|
+
panda_url = http://atlas-agis-api.cern.ch/request/pandaqueue/query/list/?json
|
|
225
|
+
ddm_url = http://atlas-agis-api.cern.ch/request/ddmendpoint/query/list/?json
|
|
226
|
+
|
|
227
|
+
[c3po-workload]
|
|
228
|
+
panda_url = http://bigpanda.cern.ch/jobs/?category=analysis&jobstatus=running
|
|
229
|
+
window = 604800
|
|
230
|
+
|
|
231
|
+
[policy]
|
|
232
|
+
package = ATLASRucioPolicy
|
|
233
|
+
permission = atlas
|
|
234
|
+
schema = atlas
|
|
235
|
+
lfn2pfn_algorithm_default = hash
|
|
236
|
+
support = hn-atlas-dist-analysis-help@cern.ch
|
|
237
|
+
support_rucio = https://github.com/rucio/rucio/issues/
|
|
238
|
+
|
|
239
|
+
[webui]
|
|
240
|
+
usercert = /opt/rucio/etc/usercert_with_key.pem
|
|
241
|
+
|
|
242
|
+
[credentials]
|
|
243
|
+
gcs = /opt/rucio/etc/google-cloud-storage-test.json
|
|
244
|
+
signature_lifetime = 3600
|
|
245
|
+
|
|
246
|
+
[saml]
|
|
247
|
+
config_path = /opt/rucio/lib/rucio/web/ui/common/saml/
|
|
248
|
+
|
|
249
|
+
[oidc]
|
|
250
|
+
idpsecrets = /opt/rucio/etc/idpsecrets.json
|
|
251
|
+
admin_issuer = wlcg
|
|
252
|
+
|
|
253
|
+
[api]
|
|
254
|
+
#endpoints = accountlimits, accounts, config, credentials, dids, export, heartbeats, identities, import, lifetime_exceptions, locks, meta, ping, redirect, replicas, requests, rses, rules, scopes, subscriptions
|
|
255
|
+
|
|
256
|
+
[transfers]
|
|
257
|
+
srm_https_compatibility = False
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
# All dependencies needed to run rucio client (and server/daemons) should be defined here
|
|
2
|
+
requests>=2.25.1,<=2.31.0 # Python HTTP for Humans.
|
|
3
|
+
urllib3~=1.26.16 # HTTP library with thread-safe connection pooling, file post, etc.
|
|
4
|
+
dogpile.cache~=1.2.2 # Caching API plugins (1.1.2 is the first version to support pymemcache)
|
|
5
|
+
tabulate~=0.9.0 # Pretty-print tabular data
|
|
6
|
+
jsonschema~=4.18.4 # For JSON schema validation (Policy modules)
|
|
7
|
+
|
|
8
|
+
# All dependencies needed in extras for rucio client (and server/daemons) should be defined here
|
|
9
|
+
paramiko~=3.4.0 # ssh_extras; SSH2 protocol library (also needed in the server)
|
|
10
|
+
kerberos~=1.3.1 # kerberos_extras for client and server
|
|
11
|
+
pykerberos~=1.2.4 # kerberos_extras for client and server
|
|
12
|
+
requests-kerberos>=0.14.0 # kerberos_extras for client and server
|
|
13
|
+
python-swiftclient~=4.3.0 # swift_extras
|
|
14
|
+
argcomplete~=3.1.1 # argcomplete_extras; Bash tab completion for argparse
|
|
15
|
+
python-magic~=0.4.27 # dumper_extras; File type identification using libmagic
|
|
16
|
+
|
|
17
|
+
# All dependencies needed to run rucio server/daemons should be defined here
|
|
18
|
+
SQLAlchemy==2.0.19 # DB backend
|
|
19
|
+
alembic~=1.11.1 # Lightweight database migration tool for SQLAlchemy
|
|
20
|
+
pymemcache==4.0.0 # A comprehensive, fast, pure-Python memcached client (Used by Dogpile)
|
|
21
|
+
python-dateutil==2.8.2 # Extensions to the standard datetime module
|
|
22
|
+
stomp.py==8.1.0 # ActiveMQ Messaging Protocol
|
|
23
|
+
statsd==4.0.1 # Needed to log into graphite with more than 1 Hz
|
|
24
|
+
geoip2==4.7.0 # GeoIP2 API (for IPv6 support)
|
|
25
|
+
google-auth==2.22.0 # Google authentication library for Python
|
|
26
|
+
redis==4.6.0 # Python client for Redis key-value store
|
|
27
|
+
Flask==2.3.2 # Python web framework
|
|
28
|
+
oic==1.6.1 # for authentication via OpenID Connect protocol
|
|
29
|
+
prometheus_client==0.17.1 # Python client for the Prometheus monitoring system
|
|
30
|
+
boto3==1.28.5 # S3 boto protocol (new version)
|
|
31
|
+
|
|
32
|
+
# All dependencies needed in extras for rucio server/daemons should be defined here
|
|
33
|
+
cx_oracle==8.3.0 # oracle_extras
|
|
34
|
+
psycopg2-binary==2.9.6 # postgresql_extras
|
|
35
|
+
PyMySQL==1.1.0 # mysql_extras
|
|
36
|
+
PyYAML==6.0.1 # globus_extras and used for reading test configuration files
|
|
37
|
+
globus-sdk==3.24.0 # globus_extras
|
|
38
|
+
python3-saml==1.15.0 # saml_extras
|
|
39
|
+
pymongo==4.4.1 # pymongo (metadata plugin)
|
|
40
|
+
|
|
41
|
+
# All dependencies needed to develop/test rucio should be defined here
|
|
42
|
+
pytest==7.4.0
|
|
43
|
+
pytest-xdist~=3.3.1 # Used for parallel testing
|
|
44
|
+
pyflakes==3.0.1 # Passive checker of Python programs
|
|
45
|
+
flake8==6.0.0 # Wrapper around PyFlakes&pep8; python_version < '3.9'
|
|
46
|
+
pycodestyle==2.10.0 # New package replacing pep8; python_version < '3.9'
|
|
47
|
+
pylint==3.0.0a7
|
|
48
|
+
astroid==3.0.0a9
|
|
49
|
+
virtualenv==20.24.0 # Virtual Python Environment builder
|
|
50
|
+
xmltodict==0.13.0 # Makes working with XML feel like you are working with JSON
|
|
51
|
+
pytz==2023.3 # World timezone definitions, modern and historical
|
|
52
|
+
pydoc-markdown~=4.8.2 # Used for generating Markdown documentation for docusaurus
|
|
53
|
+
sh~=2.0.4 # Convenience library for running subprocesses in Python
|
|
54
|
+
apispec==6.3.0 # Generate OpenApi definition out of pydoc comments
|
|
55
|
+
apispec-webframeworks # Integration of apispec in Flask
|
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
# -*- coding: utf-8 -*-
|
|
2
|
+
# Copyright European Organization for Nuclear Research (CERN) since 2012
|
|
3
|
+
#
|
|
4
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
# you may not use this file except in compliance with the License.
|
|
6
|
+
# You may obtain a copy of the License at
|
|
7
|
+
#
|
|
8
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
#
|
|
10
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
# See the License for the specific language governing permissions and
|
|
14
|
+
# limitations under the License.
|
|
15
|
+
|
|
16
|
+
import argparse
|
|
17
|
+
import logging
|
|
18
|
+
from pathlib import Path
|
|
19
|
+
|
|
20
|
+
import os
|
|
21
|
+
import json
|
|
22
|
+
import sys
|
|
23
|
+
|
|
24
|
+
try:
|
|
25
|
+
import yaml
|
|
26
|
+
except ImportError:
|
|
27
|
+
yaml = None
|
|
28
|
+
import configparser
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
# Multi-word sections used in kubernetes are slightly different from what rucio expects.
|
|
32
|
+
# Usually, it's just a .replace('-', '_'), but not for hermes2, which doesn't follow any convention.
|
|
33
|
+
multi_word_sections = {
|
|
34
|
+
'messaging_fts3': 'messaging-fts3',
|
|
35
|
+
'messaging_cache': 'messaging-cache',
|
|
36
|
+
'messaging_hermes': 'messaging-hermes',
|
|
37
|
+
'messaging_hermes2': 'hermes',
|
|
38
|
+
'nongrid_trace': 'nongrid-trace',
|
|
39
|
+
'tracer_kronos': 'tracer-kronos',
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
def load_flat_config(flat_config):
|
|
44
|
+
"""
|
|
45
|
+
takes a dict of the form: {"section_option": "value"}
|
|
46
|
+
and converts to {"section": {"option": "value"}
|
|
47
|
+
"""
|
|
48
|
+
config_dict = {}
|
|
49
|
+
for flat_key, config_value in flat_config.items():
|
|
50
|
+
section = option = None
|
|
51
|
+
# Try parsing a multi-word section
|
|
52
|
+
for mw_key in multi_word_sections:
|
|
53
|
+
if flat_key.startswith(mw_key + '_'):
|
|
54
|
+
section = mw_key
|
|
55
|
+
option = flat_key[len(mw_key) + 1:]
|
|
56
|
+
|
|
57
|
+
# It didn't match any known multi-word section, assume it's a single word
|
|
58
|
+
if not section:
|
|
59
|
+
section, option = flat_key.split('_', maxsplit=1)
|
|
60
|
+
|
|
61
|
+
config_dict.setdefault(section, {})[option] = config_value
|
|
62
|
+
return config_dict
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
def fix_multi_word_sections(config_dict):
|
|
66
|
+
return {multi_word_sections.get(section, section): config_for_section for section, config_for_section in config_dict.items()}
|
|
67
|
+
|
|
68
|
+
|
|
69
|
+
def config_len(config_dict):
|
|
70
|
+
return sum(len(option) for _, option in config_dict.items())
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
def merge_configs(source_file_paths, dest_file_path, use_env=True, logger=logging.log):
|
|
74
|
+
"""
|
|
75
|
+
Merge multiple configuration sources into one rucio.cfg.
|
|
76
|
+
On conflicting values, relies on the default python's ConfigParser behavior: the value from last source wins.
|
|
77
|
+
Sources can be .ini, .yaml, or .json files. Json is supported as a compromise solution for easier integration
|
|
78
|
+
with kubernetes (because both python and helm natively support it).
|
|
79
|
+
If use_env=True, env variables starting with RUCIO_CFG_ are also merged as the last (highest priority) source.
|
|
80
|
+
"""
|
|
81
|
+
|
|
82
|
+
parser = configparser.ConfigParser()
|
|
83
|
+
for path in source_file_paths:
|
|
84
|
+
path = Path(path)
|
|
85
|
+
|
|
86
|
+
if not path.exists():
|
|
87
|
+
logger(logging.WARNING, "Skipping {}: path doesn't exist".format(path))
|
|
88
|
+
continue
|
|
89
|
+
|
|
90
|
+
if path.is_dir():
|
|
91
|
+
file_paths = sorted(p for p in path.iterdir() if not p.name.startswith(".") and p.is_file())
|
|
92
|
+
else:
|
|
93
|
+
file_paths = [path]
|
|
94
|
+
|
|
95
|
+
for file_path in file_paths:
|
|
96
|
+
try:
|
|
97
|
+
if file_path.suffix == '.json':
|
|
98
|
+
with open(file_path, 'r') as f:
|
|
99
|
+
file_config = fix_multi_word_sections(json.load(f))
|
|
100
|
+
parser.read_dict(file_config)
|
|
101
|
+
elif yaml and file_path.suffix in ['.yaml', '.yml']:
|
|
102
|
+
with open(file_path, 'r') as f:
|
|
103
|
+
file_config = fix_multi_word_sections(yaml.safe_load(f))
|
|
104
|
+
parser.read_dict(file_config)
|
|
105
|
+
elif path.is_file() or file_path.suffix in ['.ini', '.cfg', '.config']:
|
|
106
|
+
local_parser = configparser.ConfigParser()
|
|
107
|
+
local_parser.read(file_path)
|
|
108
|
+
file_config = {section: {option: value for option, value in section_proxy.items()} for section, section_proxy in local_parser.items()}
|
|
109
|
+
else:
|
|
110
|
+
logger(logging.WARNING, "Skipping file {} due to wrong extension".format(file_path))
|
|
111
|
+
continue
|
|
112
|
+
|
|
113
|
+
parser.read_dict(file_config)
|
|
114
|
+
logger(logging.INFO, "Merged {} configuration values from {}".format(config_len(file_config), file_path))
|
|
115
|
+
except Exception as error:
|
|
116
|
+
logger(logging.WARNING, "Skipping file {} due to error: {}".format(file_path, error))
|
|
117
|
+
|
|
118
|
+
if use_env:
|
|
119
|
+
# env variables use the following format: "RUCIO_CFG_{section.substitute('-','_').upper}_{option.substitute('-', '_').upper}"
|
|
120
|
+
env_config = {}
|
|
121
|
+
for env_key, env_value in os.environ.items():
|
|
122
|
+
rucio_cfg_prefix = 'RUCIO_CFG_'
|
|
123
|
+
if not env_key.startswith(rucio_cfg_prefix):
|
|
124
|
+
continue
|
|
125
|
+
env_key = env_key[len(rucio_cfg_prefix):].lower() # convert "RUCIO_CFG_WHATEVER" to "whatever"
|
|
126
|
+
env_config[env_key] = env_value
|
|
127
|
+
|
|
128
|
+
env_config = fix_multi_word_sections(load_flat_config(env_config))
|
|
129
|
+
parser.read_dict(env_config)
|
|
130
|
+
logger(logging.INFO, "Merged {} configuration values from ENV".format(config_len(env_config)))
|
|
131
|
+
|
|
132
|
+
if dest_file_path:
|
|
133
|
+
logger(logging.INFO, "Writing {}".format(dest_file_path))
|
|
134
|
+
with open(dest_file_path, 'w') as dest_file:
|
|
135
|
+
parser.write(dest_file)
|
|
136
|
+
else:
|
|
137
|
+
parser.write(sys.stdout)
|
|
138
|
+
|
|
139
|
+
|
|
140
|
+
logging.getLogger().setLevel(logging.INFO)
|
|
141
|
+
parser = argparse.ArgumentParser(description="Merge multiple rucio configuration sources into one rucio.cfg")
|
|
142
|
+
parser.add_argument("--use-env", action="store_true", default=False, help='Also source config from RUCIO_CFG_* env variables')
|
|
143
|
+
parser.add_argument('-s', '--source', type=str, nargs='*', help='Source config file paths (in .json, .yaml or .ini format)')
|
|
144
|
+
parser.add_argument('-d', '--destination', default=None, help='Destination file path')
|
|
145
|
+
args = parser.parse_args()
|
|
146
|
+
|
|
147
|
+
merge_configs(args.source or [], args.destination, use_env=args.use_env)
|