Skip to content

Commit 26155ff

Browse files
committed
docs: fixes for server installations
1 parent 94ffde4 commit 26155ff

File tree

2 files changed

+56
-48
lines changed

2 files changed

+56
-48
lines changed

docs/source/AdministratorGuide/ExternalsSupport/index.rst

Lines changed: 5 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -7,33 +7,17 @@ Supported environments and packages
77
OS:
88
---
99

10-
DIRAC *server* installation is officially supported only for:
11-
12-
- CERN CentOS 7 (`CC7 <https://linux.web.cern.ch/centos7/>`_)
13-
14-
Tests are also regularly run for other platforms but no official support is offered for them.
15-
16-
17-
Python versions:
18-
----------------
19-
20-
DIRAC brings its own version of python at installation time: this version is right now fixed to 2.7.13.
21-
An experimental support for python3 server installations is also offered from DIRAC version 7.3.
22-
23-
DIRAC installation scripts (including pilots) use the native python version, and for this the python versions supported are:
24-
25-
- 2.6.9 (native on SLC6)
26-
- 2.7.5 (native on CC7)
27-
- 2.7.13
28-
- 3.6.8+
10+
DIRAC *server* installation is possible for all architectures supported by DIRACOS2 releases: https://github.com/DIRACGrid/DIRACOS2/releases.
11+
DIRAC brings its own version of python at installation time, right now 3.9.x.
2912

3013
MySQL versions:
3114
---------------
3215

3316
MySQL is a hard dependency for all DIRAC servers installations. Supported versions:
3417

35-
- 5.7
36-
- 8.0
18+
- MySQL 5.7
19+
- MySQL 8.0
20+
- MariaDB versions "compatible" with the above MySQL versions.
3721

3822
MySQL server is not shipped with DIRAC. You are responsible of its administration.
3923

docs/source/AdministratorGuide/ServerInstallations/InstallingDiracServer.rst

Lines changed: 51 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@
44
DIRAC Server Installation
55
=========================
66

7+
.. set highlighting to python console input/output
8+
.. highlight:: console
9+
10+
711
The procedure described here outlines the installation of the DIRAC components on a host machine, a
812
DIRAC server. There are two distinct cases of installations:
913

@@ -51,22 +55,22 @@ Requirements
5155
default range if predefined ports are used, the port on which services are listening can be
5256
configured by the DIRAC administrator)::
5357

54-
iptables -I INPUT -p tcp --dport 9130:9200 -j ACCEPT
55-
service iptables save
58+
$ iptables -I INPUT -p tcp --dport 9130:9200 -j ACCEPT
59+
$ service iptables save
5660

5761
- DIRAC extensions that need specific services which are not an extension of DIRAC used
5862
should better use ports 9201-9300 in order to avoid confusion. If this happens,
5963
the procedure above should be repeated to include the new range of ports.
6064
- For the server hosting the portal, ports 80 and 443 should be open and redirected to ports
6165
8080 and 8443 respectively, i.e. setting iptables appropriately::
6266

63-
iptables -t nat -I PREROUTING -p tcp --dport 80 -j REDIRECT --to-ports 8080
64-
iptables -t nat -I PREROUTING -p tcp --dport 443 -j REDIRECT --to-ports 8443
67+
$ iptables -t nat -I PREROUTING -p tcp --dport 80 -j REDIRECT --to-ports 8080
68+
$ iptables -t nat -I PREROUTING -p tcp --dport 443 -j REDIRECT --to-ports 8443
6569

6670
If you have problems with NAT or iptables you can use multipurpose relay *socat*::
6771

68-
socat TCP4-LISTEN:80,fork TCP4:localhost:8080 &
69-
socat TCP4-LISTEN:443,fork TCP4:localhost:8443 &
72+
$ socat TCP4-LISTEN:80,fork TCP4:localhost:8080 &
73+
$ socat TCP4-LISTEN:443,fork TCP4:localhost:8443 &
7074

7175
- Grid host certificates in pem format;
7276
- At least one of the servers of the installation must have updated CAs and CRLs files; if you want to install
@@ -94,39 +98,39 @@ the steps below. This procedure must be followed for the primary server and for
9498

9599
- As *root* create a *dirac* user account. This account will be used to run all the DIRAC components::
96100

97-
adduser -s /bin/bash -d /home/dirac dirac
101+
$ adduser -s /bin/bash -d /home/dirac dirac
98102

99103
- As *root*, create the directory where the DIRAC services will be installed::
100104

101-
mkdir /opt/dirac
102-
chown -R dirac:dirac /opt/dirac
105+
$ mkdir /opt/dirac
106+
$ chown -R dirac:dirac /opt/dirac
103107

104108
- As *root*, check that the system clock is exact. Some system components are generating user certificate proxies
105109
dynamically and their validity can be broken because of the wrong system date and time. Properly configure
106110
the NTP daemon if necessary.
107111

108112
- As *dirac* user, create directories for security data and copy host certificate::
109113

110-
mkdir -p /opt/dirac/etc/grid-security/
111-
cp hostcert.pem hostkey.pem /opt/dirac/etc/grid-security
114+
$ mkdir -p /opt/dirac/etc/grid-security/
115+
$ cp hostcert.pem hostkey.pem /opt/dirac/etc/grid-security
112116

113117
In case your host certificate is in the p12 format, you can convert it with::
114118

115-
openssl pkcs12 -in host.p12 -clcerts -nokeys -out hostcert.pem
116-
openssl pkcs12 -in host.p12 -nocerts -nodes -out hostkey.pem
119+
$ openssl pkcs12 -in host.p12 -clcerts -nokeys -out hostcert.pem
120+
$ openssl pkcs12 -in host.p12 -nocerts -nodes -out hostkey.pem
117121

118122
Make sure the permissions are set right correctly, such that the hostkey.pem is only readable by the ``dirac`` user.
119123
- As *dirac* user, create a directory or a link pointing to the CA certificates directory, for example::
120124

121-
ln -s /etc/grid-security/certificates /opt/dirac/etc/grid-security/certificates
125+
$ ln -s /etc/grid-security/certificates /opt/dirac/etc/grid-security/certificates
122126

123127
(this is only mandatory in one of the servers. Others can be synchronized from this one using DIRAC tools.)
124128

125129
- As *dirac* user download the install_site.sh script::
126130

127-
mkdir /home/dirac/DIRAC
128-
cd /home/dirac/DIRAC
129-
curl -O https://raw.githubusercontent.com/DIRACGrid/management/master/install_site.sh
131+
$ mkdir /home/dirac/DIRAC
132+
$ cd /home/dirac/DIRAC
133+
$ curl -O https://raw.githubusercontent.com/DIRACGrid/management/master/install_site.sh
130134

131135

132136
----------------
@@ -191,9 +195,9 @@ In case the CA certificate is not coming from traditional sources (installed usi
191195
you need to make sure the hash of that CA certificate is created. Make sure the CA certificate is located under
192196
``/etc/grid-security/certificates``, then do the following as root::
193197

194-
cd /etc/grid-security/certificates
195-
openssl x509 -noout -in cert.pem -hash
196-
ln -s cert.pem hash.0
198+
$ cd /etc/grid-security/certificates
199+
$ openssl x509 -noout -in cert.pem -hash
200+
$ ln -s cert.pem hash.0
197201

198202
where the output of the ``openssl`` command gives you the hash of the certificate ``cert.pem``, and must be used for the
199203
``hash.0`` link name. Make sure the ``.0`` part is present in the name, as this is looked for when starting the web server.
@@ -216,6 +220,10 @@ In addition to the root/admin user(s) the following users must be created, with
216220
Primary server installation
217221
---------------------------
218222

223+
.. set highlighting to none
224+
.. highlight:: none
225+
226+
219227
The installation consists of setting up a set of services, agents and databases for the
220228
required DIRAC functionality. The SystemAdministrator interface can be used later to complete
221229
the installation by setting up additional components. The following steps should
@@ -331,22 +339,28 @@ be taken based on the Python version you wish to install.
331339
}
332340
}
333341

342+
.. set highlighting to python console input/output
343+
.. highlight:: console
344+
334345
or You can download the full server installation from::
335346

336-
curl https://github.com/DIRACGrid/DIRAC/raw/integration/src/DIRAC/Core/scripts/install_full_py3.cfg -o install.cfg
347+
$ curl https://github.com/DIRACGrid/DIRAC/raw/integration/src/DIRAC/Core/scripts/install_full_py3.cfg -o install.cfg
337348

338349
- Run install_site.sh giving the edited configuration file as the argument. The configuration file must have
339350
.cfg extension (CFG file). While not strictly necessary, it's advised that a version is added with the '-v' switch
340351
(pick the most recent one, see release notes in https://raw.githubusercontent.com/DIRACGrid/DIRAC/integration/release.notes)::
341352

342-
./install_site.sh install.cfg
353+
$ ./install_site.sh install.cfg
343354

344355
Primary server installation (continued)
345356
---------------------------------------
346357

347358
- If the installation is successful, in the end of the script execution you will see the report
348359
of the status of running DIRAC services, e.g.::
349360

361+
.. set highlighting to python console input/output
362+
.. highlight:: none
363+
350364
Name : Runit Uptime PID
351365
Configuration_Server : Run 41 30268
352366
Framework_SystemAdministrator : Run 21 30339
@@ -443,7 +457,7 @@ operation is the registration of the new host in the already functional Configur
443457

444458
- Now run install_site.sh giving the edited CFG file as the argument:::
445459

446-
./install_site.sh install.cfg
460+
$ ./install_site.sh install.cfg
447461

448462
If the installation is successful, the SystemAdministrator service will be up and running on the
449463
server. You can now set up the required components as described in :ref:`setting_with_CLI`
@@ -453,16 +467,26 @@ server. You can now set up the required components as described in :ref:`setting
453467
Setting up DIRAC services and agents using the System Administrator Console
454468
---------------------------------------------------------------------------
455469

470+
.. set highlighting to python console input/output
471+
.. highlight:: console
472+
473+
456474
To use the :ref:`system-admin-console`, you will need first to install the DIRAC Client software on some machine.
457475
To install the DIRAC Client, follow the procedure described in the User Guide.
458476

459477
- Start admin command line interface using administrator DIRAC group::
460478

461-
dirac-proxy-init -g dirac_admin
462-
dirac-admin-sysadmin-cli --host <HOST_NAME>
479+
.. set highlighting to python console input/output
480+
.. highlight:: console
481+
$ dirac-proxy-init -g dirac_admin
482+
$ dirac-admin-sysadmin-cli --host <HOST_NAME>
463483

464484
where the HOST_NAME is the name of the DIRAC service host
465485

486+
.. set highlighting to python console input/output
487+
.. highlight:: none
488+
489+
466490
- At any time you can use the help command to get further details::
467491

468492
dirac.pic.es >help
@@ -507,9 +531,9 @@ To change the components configuration parameters
507531

508532
- Use the comand line interface to the Configuration Service::
509533

510-
$ dirac-configuration-cli
534+
$ dirac-configuration-cli
511535

512536
- In the server all the logs of the services and agents are stored and rotated in
513537
files that can be checked using the following command::
514538

515-
tail -f /opt/dirac/startup/<System>_<Service or Agent>/log/current
539+
$ tail -f /opt/dirac/startup/<System>_<Service or Agent>/log/current

0 commit comments

Comments
 (0)