forked from EUDAT-B2SAFE/B2SAFE-core
-
Notifications
You must be signed in to change notification settings - Fork 1
/
install.txt
161 lines (117 loc) · 6.14 KB
/
install.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
*** Dependencies ***
*** Installation ***
This setup describes the procedure to enable the B2SAFE module for iRODS 3.3.x
There are two automatic ways to deploy the module.
One is based on the python script:
<irods>/modules/B2SAFE/b2safe_install.py
And on its configuration file:
<irods>/modules/B2SAFE/b2safe.conf
The other is based on the shell script:
<irods>/modules/B2SAFE/install.sh
And on its configuration file:
<irods>/modules/B2SAFE/install.conf
And a manual way, reported in the following paragraphs.
Enable the module
Automatically:
0. download the git repository
from https://github.com/EUDAT-B2SAFE/B2SAFE-core/releases
1. copy source conf dir (/whre_you_have_downloaded/B2SAFE-core/conf)
to the future config directory of the b2safe module
(for irods4: /etc/irods/b2safe-core; for irods3: /home/user/b2safe-core)
2. create a symbolic link to the eudat rulebase
for irods3: ln -s /whre_you_have_downloaded/B2SAFE-core/rulebase/*.re <irods>/server/config/reConfigs/*.re
for irods4: ln -s /whre_you_have_downloaded/B2SAFE-core/rulebase/*.re /etc/irods/*.re
replacing the jolly character "*" with each file name available in the directory "rulebase".
3. edit <irods>/server/config/server.config (irods3) or /etc/irods/server.config (irods4)
and append to "reRuleSet" the list of ruleset file names written
in a single line and without the suffix".re", in this way ",filename1,filename2,filename3 ..."
(make sure to include the comma and no spaces)
4. configure iRODS hooks.
edit the <irods>/server/config/reConfigs/core.re (irods3) or /etc/irods/core.re (irods4) file
and add the following two acPostProcForPutHooks:
acPostProcForPut {
ON($objPath like "\*.replicate") {
processReplicationCommandFile($objPath);
}
}
acPostProcForPut {
ON($objPath like "\*.pid.create") {
processPIDCommandFile($objPath);
}
}
5. properly configure the default resource in <irods>/server/config/reConfigs/core.re (irods3)
or /etc/irods/core.re (irods4)
6.1 install the python scripts
for irods3: <irods_dir> is usually /home/user/iRODS
for irods4: <irods_dir> is usually /var/lib/irods/iRODS
ln -s /whre_you_have_downloaded/B2SAFE-core/cmd/* <irods_dir>/server/bin/cmd/
check permissions on the scripts and make sure they are executable by the irods user
e.g.chmod u+x cmd/*
6.2 update the "getEpicApiParameters" rule in "./server/config/reConfigs/euloc.re" (irods3)
or /etc/irods/euloc.re (irods4)
- Configure the credential storage type: "os": stored on the local filesystem
or "irods": stored on de irods namespace.
- Set the path to the credentials file
- set the correct serverID to include the fully qualified hostname.
For instance: "irods://node.domain.com:1247"
- Set the proper values in the credentials file
(see /whre_you_have_downloaded/B2SAFE-core/cmd/credentials_example for an example)
6.3 update the "getAuthZParameters" rule in "./server/config/reConfigs/euloc.re" (irods3)
or /etc/irods/euloc.re (irods4)
- Set the proper values in <irods>/server/bin/cmd/authz.map.json
6.4 update the "getLogParameters" rule in "./server/config/reConfigs/euloc.re" (irods3)
or /etc/irods/euloc.re (irods4)
- Set the proper values in <irods>/server/bin/cmd/log.manager.conf
7. create a shared space in all zones (local and remote), for example: "<zone>/replicate".
Grant all users involved in the replication write access to this collection.
8.0.1 change "#!/usr/bin/env python" in the python scripts in modules/B2SAFE/cmd/ to your python installation
8.0.2 install httplib2, simplejson, lxml, defusedxml, queuelib, and pylint:
httplib2
download from http://code.google.com/p/httplib2
python setup.py install
simplejson
download from http://pypi.python.org/pypi/simplejson/
python setup.py install
pip install lxml
pip install defusedxml
apt-get install pylint
yum install pylint
queuelib
download from https://pypi.python.org/pypi/queuelib
python setup.py install
8.1 test the epic api interaction by running
"./cmd/epicclient.py <os_or_irods> <path_to_credentials> test" script manually
and with "iexecmd epicclient.py"
8.2 test the module by changing and triggering rules in <irods>/modules/B2SAFE/rules
For example, eudatRepl.r to replicate a data set. See the hints inside the rule.
DATACENTER only:
it is necessary to configure the <irods>/server/bin/cmd/authz.map.json file
in order to allow user to execute rules, which calls external scripts (see documentation).
it is necessary to configure the <irods>/server/bin/cmd/log.manager.conf file
in order to enable the logging system (see documentation).
*** Command files ***
The command files are written to the shared iRODS space and are used to control replications and PID management
1) *.replicate
Contains a list of replication commands separated by commas:
command1,command2,command3
Each replication command contains three parameters, separated by a semicolon:
"*pid;*source;*destination"
*pid the handle of the source object
*source the iRODS location of the source object
*destination the iRODS location of the destination object (will be created if it does not exist)
2) *.pid.create
Contains a command to create a new PID:
"create;*pid;*destination"
*pid the handle of the source object (the parent)
*destination the iRODS location of the destination object
3) *.pid.update
Contains a command to update a PID:
"update;*pid;*new_pid"
*pid the handle of the source object (the parent)
*new_pid the (generated) handle of the destination object (the child)
*** Know bugs ***
- the rule set string in the file <irods>/server/config/server.config has a limit of 64 characters.
Hence the error message:
ERROR: rstrcpy not enough space in dest, slen:65, maxLen:64
means that the string has to be made shorter.
- the character '&' is not managed by the function "EUDATSearchPID": the epic client invocation fails.