install_other.md 5.45 KB
Newer Older
1
*** Installation/Upgrade ***
2

Beatriz Sanchez's avatar
Beatriz Sanchez committed
3
The following describes the procedure to enable B2SAFE release-4.x.y
welbers's avatar
welbers committed
4

5
6
7
8
9
NOTE: This B2SAFE version makes use of the b2HANDLE library.
It can be found at: https://github.com/EUDAT-B2SAFE/B2HANDLE
Please use the included instructions in README.md to build and install B2HANDLE.
At the end of this installation the installation of B2HANDLE is described.

10
11
12
NOTE: iRODS is running as a normal user process. NOT as root. The package can
be build by any user. During installation of the package it will use: 
"/etc/irods/service_account.config" to set the ownership of the files.
13
NOTE: iRODS needs to be installed AND configured before installing/upgrading B2SAFE
14

welbers's avatar
welbers committed
15

16
It works as follows:
Beatriz Sanchez's avatar
Beatriz Sanchez committed
17

Beatriz Sanchez's avatar
Beatriz Sanchez committed
18
19
clone the b2safe project as any user. NOT root
```
20
  $ git clone https://github.com/EUDAT-B2SAFE/B2SAFE-core.git
Beatriz Sanchez's avatar
Beatriz Sanchez committed
21
22
23
```
go to the directory where the packaging files are and as irods user call create_rpm_package.sh
```
24
25
  $ cd B2SAFE-core/packaging
  $ ./create_rpm_package.sh
Beatriz Sanchez's avatar
Beatriz Sanchez committed
26
27
```
If upgrading from older version use convert*.py to convert install.conf to install.json
Beatriz Sanchez's avatar
Beatriz Sanchez committed
28

Beatriz Sanchez's avatar
Beatriz Sanchez committed
29
30
# INSTALLATION
login as root and install package:
Beatriz Sanchez's avatar
Beatriz Sanchez committed
31
```
Beatriz Sanchez's avatar
Beatriz Sanchez committed
32
rpm -ivh  /home/irods/rpmbuild/RPMS/noarch/irods-eudat-b2safe-4.3.2-0.noarch.rpm
Beatriz Sanchez's avatar
Beatriz Sanchez committed
33
34
35
36
37
38
39
40
Vorbereiten...                        ################################# [100%]
Aktualisierung/ Installation...

   1:irods-eudat-b2safe-4.3.2-0       ################################# [100%]

The package b2safe has been installed in /opt/eudat/b2safe.
```

Beatriz Sanchez's avatar
Beatriz Sanchez committed
41
42
43
44
# UPGRADE
login as root and upgrade package:
```
rpm -Uvh /home/irods/rpmbuild/RPMS/noarch/irods-eudat-b2safe-4.0-0.noarch.rpm
45
46
  Preparing...                ########################################### [100%]
     1:irods-eudat-b2safe     ########################################### [100%]
Beatriz Sanchez's avatar
Beatriz Sanchez committed
47
48
```
# CONFIGURATION 
Beatriz Sanchez's avatar
Beatriz Sanchez committed
49
50
To configure it in iRODS do following as the user who runs iRODS :

Beatriz Sanchez's avatar
Beatriz Sanchez committed
51
update install.conf with correct parameters with your favorite editor
Beatriz Sanchez's avatar
Beatriz Sanchez committed
52
53
54
55
56
57
```
sudo vi /opt/eudat/b2safe/packaging/install.json
```
Include the right irods users#zones in the handle_users and handle_groups options in install.json
  

Beatriz Sanchez's avatar
Beatriz Sanchez committed
58
install/configure it as the user who runs iRODS
Beatriz Sanchez's avatar
Beatriz Sanchez committed
59
60
61
62
63
64
65

```
source /etc/irods/service_account.config 
sudo su - $IRODS_SERVICE_ACCOUNT_NAME -s "/bin/bash" -c "cd /opt/eudat/b2safe/packaging/ ; ./install.py"
```


66
* DEB creation, installation/upgrade *
welbers's avatar
welbers committed
67

68
- create package:
69
  $ ./create_deb_package.sh
70
- login as root or use sudo to install package:
71
  $ sudo dpkg -i  /home/irods/debbuild/irods-eudat-b2safe_4.0-0.deb
72
  Selecting previously unselected package irods-eudat-b2safe.
73
  (Reading database ... .... files and directories currently installed.)
74
75
76
77
78
  Preparing to unpack .../irods-eudat-b2safe_4.0-0.deb ...
  Unpacking irods-eudat-b2safe (4.0-0) ...
  Setting up irods-eudat-b2safe (4.0-0) ...

After installation/upgrade actions. Always to do! Even after an upgrade.
79

80
81
82
The package b2safe has been installed in /opt/eudat/b2safe.
To install/configure it in iRODS do following as the user who runs iRODS :

83
84
# update install.conf with correct parameters with your favorite editor. See
 the NOTE below for parameters.
85
86
87
sudo vi /opt/eudat/b2safe/packaging/install.conf

# install/configure it as the user who runs iRODS
88
source /etc/irods/service_account.config
89
90
91
92
sudo su - $IRODS_SERVICE_ACCOUNT_NAME -s "/bin/bash" -c "cd /opt/eudat/b2safe/packaging/ ; ./install.sh"



93
NOTE: following needs to be updated/added in "/opt/eudat/b2safe/packaging/install.conf":
94
95
   - DEFAULT_RESOURCE
   - SERVER_ID
96
97
98
99
100
101
102
   - HANDLE_SERVER_URL      (needed for epicclient2)
   - PRIVATE_KEY            (needed for epicclient2)
   - CERTIFICATE_ONLY       (needed for epicclient2)
   - PREFIX                 (needed for epicclient2)
   - HANDLEOWNER            (needed for epicclient2)
   - REVERSELOOKUP_USERNAME (needed for epicclient2)
   - HTTPS_VERIFY           (needed for epicclient2)
ccacciari's avatar
ccacciari committed
103
   - AUTHZ_ENABLED (default=true)
Robert Verkerk's avatar
Robert Verkerk committed
104
   - MSG_QUEUE_ENABLED (default=false)
105

106

107
108
109
- check the python scripts for missing python libraries.
  $ cd /opt/eudat/b2safe/cmd
  $ ./authZmanager.py -h
110
  $ ./epicclient2.py --help
111
112
113
  $ ./logmanager.py -h
  $ ./messageManager.py -h
  $ ./metadataManager.py -h
114
  $ ./timeconvert.py epoch_to_iso8601 2000000
115

Claudio Cacciari's avatar
merging    
Claudio Cacciari committed
116
Try to install missing packages with the standard package manager like apt, yum, zypper etc.
117
If packages are not within the standards use pip and install the missing packages with pip. 
118

119
DONE
120

121

122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
== installation of B2HANDLE ==
The customers need to install the b2handle library on the b2safe system and
create public/private keypairs and certificates and get the public key binary
uploaded before the upgrades.
This entails following:
- Download the b2handle code from: https://github.com/EUDAT-B2SAFE/B2HANDLE
- Create an rpm and install it on the b2safe system. With the necessary
dependencies. See the github page:
  a> python setup.py bdist_rpm
  b> yum install <created_rpm in dist directory> 
- Ask the handle hosting service which user to use for a certificate.
- Create a private/public keypair and create a derived certificate as described
in  http://eudat-b2safe.github.io/B2HANDLE/creatingclientcertificates.html.: 
  a> Generate public/private key pair
     i>  First download the software needed to create the private/public keypair.
         It can be found on: http://www.handle.net/download_hnr.html.
     ii> Execute ./hdl-keygen from hsj-8.1.1/bin directory 
  b> Send public key (.bin file) to your hosting service.
  c> Step 2: Upload the user’s public key to the....  is executed by the hosting service
- Ask hosting service which username/password to use for reverselooup.
- Test using curl