.. Copyright 2018 CERN for the benefit of the ATLAS collaboration.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
Authors:
- Thomas Beermann <thomas.beermann@cern.ch>, 2018
- Cedric Serfon <cedric.serfon@cern.ch>, 2018
- Vincent Garonne <vgaronne@gmail.com>, 2018
Rucio demo
==========
Starting a Rucio demo instance
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The instructions can be found in `Setting up a Rucio demo environment <http://rucio.readthedocs.io/installing_demo.html>`_
Boostrap the Rucio demo
~~~~~~~~~~~~~~~~~~~~~~~
Once everything is ready you can log into the container and start playing around with rucio::
$ docker exec -i -t demo_rucio_1 /bin/bash
The bash tab completion is by default enabled for the Rucio CLIs.
The rucio configuration file is located in `/opt/rucio/etc/rucio.cfg`.
The clients are configured to talk to the local server instance::
$ cat /opt/rucio/etc/rucio.cfg
...
[client]
rucio_host = https://localhost:443
auth_host = https://localhost:443
...
In this demo, an apache server runs and the log files are located in ´/var/log/rucio/´
To query the Rucio server, you can ping it with::
$ curl -k https://localhost/ping
{"version": "1.14.9.post1"}
In the corresponding apache log file, you can see the access log entry::
$ tail -f /var/log/rucio/httpd_access_log
localhost - - [27/Feb/2018:11:57:59 +0000] "GET /ping HTTP/1.1" 200 27
The equivalent command exists with the rucio CLI::
$ rucio ping
cannot get auth_token
2018-02-27 13:22:54,297 ERROR Cannot authenticate.
Details: userpass authentication failed
But it fails since the command also authenticates with Rucio and this Rucio instance is not configured.
Configuring Rucio
~~~~~~~~~~~~~~~~~
A bootstrap script is provided at `/setup_data.py`. This script creates the database tables and creates 2 accounts: `root` and `jdoe` and 2 local Rucio storage elements (RSEs): `SITE1_DISK`, `SITE2_DISK` mounted on the /tmp partition.
This example script uses the Rucio python client module.To execute it::
$ /setup_data.py
By default, it will create a MySQL database as specified in the configuration::
$ cat /opt/rucio/etc/rucio.cfg
...
[database]
default = mysql://rucio:rucio@mysql/rucio
...
To create a different one like sqlite, you need to change this section, e.g.,::
$ cat /opt/rucio/etc/rucio.cfg
...
[database]
default = sqlite:////tmp/rucio.db
...
Execute the script and restart apache::
$ /setup_data.py
$ httpd -k restart
Rucio supports mysql, mariadb, oracle and postgresql.
`rucio ping` now works::
$ rucio ping
1.14.9.post1
The token is stored in `/tmp/root/.rucio_root/auth_token_root`.
The equivalent can be done with the Rucio python clients::
$ python
...
>>> from rucio.client import Client
>>> rucio_client = Client()
>>> rucio_client.ping()
{u'version': u'1.14.9.post1'}
You can also check your account::
[root@3a6d4527e1f6 rucio]# rucio whoami
status : ACTIVE
account : root
account_type : SERVICE
created_at : 2018-02-08T15:37:26
suspended_at : None
updated_at : 2018-02-08T15:37:26
deleted_at : None
email : None
To list the RSEs::
$ rucio list-rses
SITE1_DISK
SITE2_DISK
We can add some RSE attributes::
$ rucio-admin rse set-attribute --rse SITE1_DISK --key zone --value eu-west-3
Added new RSE attribute for SITE1_DISK: zone-eu-west-3
$ rucio-admin rse set-attribute --rse SITE2_DISK --key zone --value us-west-1
Added new RSE attribute for SITE2_DISK: rucio list-rses --expression 'zone=us-west-1'
$ rucio list-rses --expression 'zone=eu-west-3'
SITE1_DISK
To list the accounts::
$ # rucio-admin account list
jdoe
root
Testing dataset upload, creation of dataset and rules
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
There are no datasets created yet. To generate datasets and copy them to one of the RSEs, you can use a daemon called automatix::
[root@3a6d4527e1f6 rucio]# /usr/bin/rucio-automatix --run-once --input-file /opt/rucio/etc/automatix.json
...
2018-02-19 13:47:07,532 277 DEBUG https://localhost:443 "POST /dids/tests/test.24659.automatix_stream.recon.AOD.917/dids HTTP/1.1" 201 None
2018-02-19 13:47:07,533 277 INFO Thread [1/1] : Upload operation for tests:test.24659.automatix_stream.recon.AOD.917 done
2018-02-19 13:47:07,534 277 INFO Thread [1/1] : Run with once mode. Exiting
2018-02-19 13:47:07,541 277 INFO Thread [1/1] : Graceful stop requested
2018-02-19 13:47:07,541 277 INFO Thread [1/1] : Graceful stop done
The daemon has created and uploaded a new dataset in the tests scope. One can list all the DIDs in this scope::
[root@3a6d4527e1f6 rucio]# rucio list-dids tests:*
+-------------------------------------------------+--------------+
| SCOPE:NAME | [DID TYPE] |
|-------------------------------------------------+--------------|
| tests:AOD.a9753781316c4b2f8bd88c60e9dd3570 | FILE |
| tests:AOD.fc50eb5e2b1949919880f8218bf62108 | FILE |
| tests:test.24659.automatix_stream.recon.AOD.917 | DATASET |
+-------------------------------------------------+--------------+
And one can list the content of the dataset::
[root@3a6d4527e1f6 rucio]# rucio list-files tests:test.24659.automatix_stream.recon.AOD.917
+--------------------------------------------+--------------------------------------+-------------+------------+----------+
| SCOPE:NAME | GUID | ADLER32 | FILESIZE | EVENTS |
|--------------------------------------------+--------------------------------------+-------------+------------+----------|
| tests:AOD.a9753781316c4b2f8bd88c60e9dd3570 | 32C89A5A-F0BD-43F6-A958-099C46954C7F | ad:480900d5 | 1.000 MB | |
| tests:AOD.fc50eb5e2b1949919880f8218bf62108 | 1937B5B8-BFE3-4AE0-B5CE-28AFE964F5F8 | ad:32bf834e | 1.000 MB | |
+--------------------------------------------+--------------------------------------+-------------+------------+----------+
Total files : 2
Total size : 2.000 MB
Now if you list the rule for this dataset, you will see that there are no files listed on SITE1_DISK::
[root@3a6d4527e1f6 rucio]# rucio list-rules tests:test.24659.automatix_stream.recon.AOD.917
ID ACCOUNT SCOPE:NAME STATE[OK/REPL/STUCK] RSE_EXPRESSION COPIES EXPIRES (UTC) CREATED (UTC)
-------------------------------- --------- ----------------------------------------------- ---------------------- ---------------- -------- --------------- -------------------
7744c0e0dcce4243b906a2afbc8bc87f root tests:test.24659.automatix_stream.recon.AOD.917 OK[0/0/0] SITE1_DISK 1 2018-02-19 13:47:06
The information needs to be updated by another daemon called the judge. To run it once::
[root@3a6d4527e1f6 rucio]# /usr/bin/rucio-judge-evaluator --run-once
2018-02-19 13:47:37,943 328 DEBUG re_evaluator[0/0] index query time 0.003242 fetch size is 1
2018-02-19 13:47:37,951 328 INFO Re-Evaluating did tests:test.24659.automatix_stream.recon.AOD.917 for ATTACH
2018-02-19 13:47:38,010 328 DEBUG Creating locks and replicas for rule 7744c0e0dcce4243b906a2afbc8bc87f [0/0/0]
2018-02-19 13:47:38,011 328 DEBUG Creating OK
没有合适的资源?快使用搜索试试~ 我知道了~
资源推荐
资源详情
资源评论
收起资源包目录
PyPI 官网下载 | rucio-clients-1.21.0rc3.tar.gz (896个子文件)
.buildinfo 230B
setup.cfg 1014B
ChangeLog 98B
theme.css 110KB
alabaster.css 10KB
basic.css 10KB
pygments.css 4KB
badge_only.css 3KB
custom.css 42B
rucio.doctree 298KB
rucio-admin.doctree 251KB
rse.doctree 249KB
exception.doctree 201KB
rse.doctree 199KB
did.doctree 182KB
did.doctree 144KB
account.doctree 137KB
replica.doctree 116KB
rule.doctree 87KB
account.doctree 64KB
authentication.doctree 59KB
subscription.doctree 59KB
replica.doctree 58KB
rule.doctree 53KB
download.doctree 47KB
subscription.doctree 44KB
objectstore.doctree 40KB
rucio_demo.doctree 39KB
lifetime_exception.doctree 37KB
contributing.doctree 36KB
config.doctree 34KB
1.14.0.doctree 33KB
meta-data.doctree 32KB
meta.doctree 32KB
identity.doctree 32KB
1.16.0.doctree 31KB
identity.doctree 31KB
1.15.0.doctree 28KB
installing_demo.doctree 28KB
replica_workflow.doctree 27KB
1.14.6.doctree 27KB
rse_expressions.doctree 26KB
RSE_Expressions.doctree 26KB
objectstore.doctree 26KB
1.14.9.doctree 25KB
cli_examples.doctree 24KB
authors.doctree 23KB
redirect.doctree 23KB
1.17.0.doctree 23KB
1.14.8.doctree 22KB
AUTHORS.doctree 21KB
scope.doctree 21KB
config.doctree 20KB
rucio-conveyor-transfer-submitter.doctree 20KB
configuration.doctree 20KB
1.15.2.doctree 20KB
1.18.1.doctree 20KB
rucio-c3po.doctree 20KB
installing_server.doctree 19KB
account_limit.doctree 18KB
accountlimit.doctree 18KB
1.17.6.doctree 18KB
scope.doctree 18KB
rucio-conveyor-submitter.doctree 18KB
lifetime.doctree 17KB
1.16.3.doctree 17KB
touch.doctree 17KB
1.14.1.doctree 16KB
rucio-conveyor-stager.doctree 16KB
1.15.3.doctree 16KB
1.17.1.doctree 16KB
developing.doctree 16KB
1.16.1.doctree 16KB
1.18.0.doctree 16KB
upload.doctree 15KB
overview_File_Dataset_Container.doctree 15KB
cli_admin_examples.doctree 15KB
lock.doctree 14KB
lock.doctree 14KB
database.doctree 13KB
1.17.7.doctree 13KB
rest.doctree 12KB
rucio-reaper.doctree 12KB
1.15.4.doctree 12KB
request.doctree 12KB
1.14.2.doctree 12KB
rucio-bb8.doctree 12KB
1.17.8.doctree 12KB
rucio-conveyor-finisher.doctree 11KB
rucio-conveyor-poller.doctree 11KB
archive.doctree 11KB
installing_clients.doctree 11KB
monitoring.doctree 11KB
1.17.5.doctree 11KB
index.doctree 11KB
temporary_did.doctree 11KB
nongrid_trace.doctree 10KB
trace.doctree 10KB
overview_Replica_management.doctree 10KB
releasenotes.doctree 10KB
共 896 条
- 1
- 2
- 3
- 4
- 5
- 6
- 9
资源评论
挣扎的蓝藻
- 粉丝: 13w+
- 资源: 15万+
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功