Skip to content

Setup Client

After installing the client, you need to configure it to connect to the iRODS server.

Environment Configuration File

Most clients use a configuration json file.

For each environment it will be slightly different:

Configuration File

{
    "irods_host": "irods-test.wurnet.nl",
    "irods_port": 1247,
    "irods_user_name": "abcde001",
    "irods_home": "/WCDSacc/courses/11032025/abcde001",
    "irods_default_resource": "hot_1",
    "irods_zone_name": "WCDSacc",
    "irods_authentication_scheme": "pam_password",
    "irods_client_server_negotiation": "request_server_negotiation",
    "irods_client_server_policy": "CS_NEG_REQUIRE",
    "irods_encryption_algorithm": "AES-256-CBC",
    "irods_encryption_key_size": 32,
    "irods_encryption_num_hash_rounds": 16,
    "irods_encryption_salt_size": 8
}
You will need to change irods_user_name and irods_home.

{
    "irods_host": "scomp1751.wurnet.nl",
    "irods_port": 1247,
    "irods_user_name": "abcde001",
    "irods_home": "/ArchvPROD"
    "irods_default_resource": "hot_1",
    "irods_zone_name": "ArchvPROD",
    "irods_authentication_scheme": "pam_password",
    "irods_client_server_negotiation": "request_server_negotiation",
    "irods_client_server_policy": "CS_NEG_REQUIRE",
    "irods_encryption_algorithm": "AES-256-CBC",
    "irods_encryption_key_size": 32,
    "irods_encryption_num_hash_rounds": 16,
    "irods_encryption_salt_size": 8
}
You will need to change irods_user_name

{
    "irods_host": "archive.anunna.wur.nl",
    "irods_port": 1247,
    "irods_user_name": "abcde001",
    "irods_home": "/HPC",
    "irods_default_resource": "hot_1",
    "irods_zone_name": "HPC",
    "irods_authentication_scheme": "pam_password",
    "irods_client_server_negotiation": "request_server_negotiation",
    "irods_client_server_policy": "CS_NEG_REQUIRE",
    "irods_encryption_algorithm": "AES-256-CBC",
    "irods_encryption_key_size": 32,
    "irods_encryption_num_hash_rounds": 16,
    "irods_encryption_salt_size": 8
}
You will need to change irods_user_name

Configure Client Environment

Configure Environment

Create/Edit your iRODS environment file based on the example above and save it in ~/.irods/irods_environment.json.

You might need to create the .irods folder.

Click on the 'Configure' and select 'Add Configuration'

Add env step 1

Paste the iRODS environment file based on the example above and save it in ~/.irods/irods_environment.json.

You might need to create the .irods folder.

Add env step 2

You can check the configuration by click the "Check" button.

The installion of WUR iBridges creates two configuration files, for WCDSacc and ArchvPROD. You can directly connect using these. Connect to wurbriredges

You can also edit or add files here for other environments, see the ibridges tab for this

In any text editor, paste the iRODS environment file based on the example above and save it in ~/.irods/irods_environment.json.

In any text editor, paste the iRODS environment file based on the example above and save it in ~/.irods/irods_environment.json.

Initialize your iRODS session

Initialize session
iinit

You will be prompted to enter your password. This command sets up your authentication for the session.

Click on the 'Connect' and select 'Connect to iRODS'

Connect step 2

Select the env file you saved previously. Enter your WUR password.

Connect step 2

Now, you can start working with iRODS. Run:

gocmd init

This command will request a series of questions (Host, Port, Zone etc.), you can skip these by pressing enter up until the point where your iRODS password is requested. Enter your WUR password.

NOTE: If (due to inactivity) you receive the error message "Authentication failed (auth scheme: "pam_password", username: "abcde001", zone: "WCDSacc")!" Rerun gocmd init

The following script will be necessary for establishing a connection with the iRODS server. Note: This code needs to be executed in a (python3) terminal. It will not run in a interpreter environment due to the 'getpass' function. You can do so by running the following command:

python3 connect.py
As for the code:
# Contents of file: connect.py
import ssl
import os
import getpass
import json
from irods.session import iRODSSession


def connect_to_irods(irods_env_file_loc: str = r'~\.irods\irods_environment.json') -> iRODSSession:
    irods_env_file_loc = os.path.expanduser(irods_env_file_loc)
    ssl_context = ssl.create_default_context(purpose=ssl.Purpose.SERVER_AUTH, cafile=None, capath=None, cadata=None)
    ssl_settings = {"ssl_context": ssl_context}

    print('Connecting to iRODS using file: ', irods_env_file_loc, '...')
    pw = getpass.getpass().encode()

    with open(irods_env_file_loc) as f:
        ienv = json.load(f)
    session = iRODSSession(**ienv, password=pw.decode(), **ssl_settings)

    return session


if __name__ == "__main__":

    session = connect_to_irods()
    session.cleanup()