install_other.md 5.72 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

Robert Verkerk's avatar
Robert Verkerk committed
5
6
7
8
*NOTE*: This B2SAFE version does NOT make use of the b2HANDLE library. It uses
the msi-persistent-id microservice.

For bulk purposes the B2HANDLE library can be found at: https://gitlab.eudat.eu/b2safe/B2HANDLE
9
10
11
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.

12
13
14
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.
15
NOTE: iRODS needs to be installed AND configured before installing/upgrading B2SAFE
16

welbers's avatar
welbers committed
17

18
It works as follows:
Beatriz Sanchez's avatar
Beatriz Sanchez committed
19

Beatriz Sanchez's avatar
Beatriz Sanchez committed
20
21
clone the b2safe project as any user. NOT root
```
Robert Verkerk's avatar
Robert Verkerk committed
22
  $ git clone git@gitlab.eudat.eu:b2safe/B2SAFE-core.git
Beatriz Sanchez's avatar
Beatriz Sanchez committed
23
24
25
```
go to the directory where the packaging files are and as irods user call create_rpm_package.sh
```
26
27
  $ cd B2SAFE-core/packaging
  $ ./create_rpm_package.sh
Beatriz Sanchez's avatar
Beatriz Sanchez committed
28
```
Beatriz Sanchez's avatar
Beatriz Sanchez committed
29

Beatriz Sanchez's avatar
Beatriz Sanchez committed
30
31
# INSTALLATION
login as root and install package:
Beatriz Sanchez's avatar
Beatriz Sanchez committed
32
```
Beatriz Sanchez's avatar
Beatriz Sanchez committed
33
rpm -ivh  /home/irods/rpmbuild/RPMS/noarch/irods-eudat-b2safe-4.3.2-0.noarch.rpm
Beatriz Sanchez's avatar
Beatriz Sanchez committed
34
35
36
37
38
39
40
41
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
42
43
44
45
# UPGRADE
login as root and upgrade package:
```
rpm -Uvh /home/irods/rpmbuild/RPMS/noarch/irods-eudat-b2safe-4.0-0.noarch.rpm
46
47
  Preparing...                ########################################### [100%]
     1:irods-eudat-b2safe     ########################################### [100%]
Beatriz Sanchez's avatar
Beatriz Sanchez committed
48
49
```
# CONFIGURATION 
Beatriz Sanchez's avatar
Beatriz Sanchez committed
50
51
To configure it in iRODS do following as the user who runs iRODS :

Robert Verkerk's avatar
Robert Verkerk committed
52
53
54
55
56
57
58
59
When going from version 4.2.x or lower of B2SAFE to version 4.3 or higher convert the installation configuration.
As the user who runs iRODS do following:
```bash
cd /opt/eudat/b2safe/packaging
./convert_b2safe_conf_to_json.sh
```
Notice all the warnings and take them in to account.

Beatriz Sanchez's avatar
Beatriz Sanchez committed
60
update install.conf with correct parameters with your favorite editor
Beatriz Sanchez's avatar
Beatriz Sanchez committed
61
```
Robert Verkerk's avatar
Robert Verkerk committed
62
vi /opt/eudat/b2safe/packaging/install.json
Beatriz Sanchez's avatar
Beatriz Sanchez committed
63
64
65
66
```
Include the right irods users#zones in the handle_users and handle_groups options in install.json
  

Beatriz Sanchez's avatar
Beatriz Sanchez committed
67
install/configure it as the user who runs iRODS
Beatriz Sanchez's avatar
Beatriz Sanchez committed
68
69
70
71
72
73
74

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


75
* DEB creation, installation/upgrade *
welbers's avatar
welbers committed
76

77
- create package:
78
  $ ./create_deb_package.sh
79
- login as root or use sudo to install package:
80
  $ sudo dpkg -i  /home/irods/debbuild/irods-eudat-b2safe_4.0-0.deb
81
  Selecting previously unselected package irods-eudat-b2safe.
82
  (Reading database ... .... files and directories currently installed.)
83
84
85
86
87
  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.
88

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

92
93
# update install.conf with correct parameters with your favorite editor. See
 the NOTE below for parameters.
94
95
96
sudo vi /opt/eudat/b2safe/packaging/install.conf

# install/configure it as the user who runs iRODS
97
source /etc/irods/service_account.config
98
99
100
101
sudo su - $IRODS_SERVICE_ACCOUNT_NAME -s "/bin/bash" -c "cd /opt/eudat/b2safe/packaging/ ; ./install.sh"



102
NOTE: following needs to be updated/added in "/opt/eudat/b2safe/packaging/install.conf":
103
104
   - DEFAULT_RESOURCE
   - SERVER_ID
105
106
107
108
109
110
111
   - 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
112
   - AUTHZ_ENABLED (default=true)
Robert Verkerk's avatar
Robert Verkerk committed
113
   - MSG_QUEUE_ENABLED (default=false)
114

115

116
117
118
- check the python scripts for missing python libraries.
  $ cd /opt/eudat/b2safe/cmd
  $ ./authZmanager.py -h
119
  $ ./epicclient2.py --help
120
121
122
  $ ./logmanager.py -h
  $ ./messageManager.py -h
  $ ./metadataManager.py -h
123
  $ ./timeconvert.py epoch_to_iso8601 2000000
124

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

128
DONE
129

130

131
132
133
134
135
== 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:
Robert Verkerk's avatar
Robert Verkerk committed
136
- Download the b2handle code from: https://gitlab.eudat.eu/b2safe/B2HANDLE
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
- 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