Back

Contents

Usage

If in development, bring up the services via docker-compose (https://github.com/rucio/rucio/blob/master/etc/docker/dev/docker-compose-storage-externalmetadata.yml).

Specify the plugin

root@ubuntu rucio]# vim /opt/rucio/etc/rucio.cfg
[metadata]
plugins = rucio.core.did_meta_plugins.mongo_meta.MongoDidMeta
mongo_service_ip = mongo
mongo_service_port = 27017
mongo_db_name = test
mongo_collection_name = test_collection

Create mongodb collection, test_collection in database test

use test
db.createCollection("test_collection")

Create metadata

[root@646a9fd77749 rucio]# rucio set-metadata --did test:file1 --key test --value test
[root@646a9fd77749 rucio]# rucio get-metadata test:file1 --plugin mongo
test:  test

Inspect mongodb collection

db.test_collection.find({})

Top