Skip to content

Instantly share code, notes, and snippets.

@pdonorio
Created November 3, 2017 10:57
Show Gist options
  • Save pdonorio/53884e72f8b4d19d449d9fae93cecf2f to your computer and use it in GitHub Desktop.
Save pdonorio/53884e72f8b4d19d449d9fae93cecf2f to your computer and use it in GitHub Desktop.
B2SAFE implemented for EPOS

EPOS b2safe

Download the repo

git clone https://github.com/EUDAT-B2STAGE/http-api.git myb2safe
cd myb2safe && git checkout b2safe_development

STEP 1: prepare sql

  • change passwords IRODS_PASSWORD and ALCHEMY_PASSWORD in projects/b2safe/project_configuration.yaml

  • start only postgresql and open the interface:

# start sql server
rapydo --project b2safe --mode simple_sql start
# start sqladmin
rapydo --project b2safe --mode simple_sql interfaces sqlalchemy
# open interface
open http://localhost/adminer?pgsql=psqldb.dockerized.io&username=rods&db=ICAT&ns=public&select=user
# insert your Password

# copy your dump inside the container
docker cp README.md b2safe_postgres_1:/tmp/
# open a shell and load the dump
docker exec -it b2safe_postgres_1 ash
$ psql -U rods ...

STEP 2: launch irods

  • Docker mount a collection into icat container

    • modify projects/b2safe/confs/debug.yml
      • add YOUR_DATA_PATH and YOUR_IRULES_PATH in “Extra volumes”
  • start irods

rapydo --project b2safe start
  • !IMPORTANT! Check if irods gives error because ICAT already exists

STEP 3: mount the data to irods

Configure irods server to mount the collection of YOUR_DATA_PATH

# open a shell
rapydo --project b2safe shell icat
# become irods admin
$ berods

# mount
imcoll ... YOUR_DATA_PATH

# restart
/var/lib/irods/irodsctl restart

STEP 4: replica against another B2SAFE

# still inside icat container!

# copy your rules into /etc/irods/
cp YOUR_IRULES_PATH/*.re /etc/irods/

Now B2SAFE is up and running

STEP 5: launch HTTP-API

Another node! Follow: Start-up the project | http-api

Configure the file projects//b2stage/project_configuration.yaml and set:

  • ALCHEMY_PASSWORD
  • IRODS_HOST
  • IRODS_AUTHSCHEME: credentials
  • IRODS_USER
  • IRODS_PASSWORD
  • IRODS_ZONE

and start it like explained in: MODES | http-api

STEP 6: upgrade airods branch

To do

@pdonorio
Copy link
Author

pdonorio commented Nov 3, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment