Skip to content

Commit 0113712

Browse files
committed
fix: docs fixes for server installation
1 parent 7920a82 commit 0113712

File tree

6 files changed

+74
-78
lines changed

6 files changed

+74
-78
lines changed

docs/source/AdministratorGuide/ServerInstallations/InstallingDiracServer.rst

Lines changed: 40 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -195,6 +195,12 @@ Couple notes:
195195
* SAN in your certificates: if you are contacting a machine using its aliases, make sure that all the aliases are in the SubjectAlternativeName (SAN) field of the certificates
196196
* FQDN in the configuration: SAN normally contains only FQDN, so make sure you use the FQDN in the CS as well (e.g. ``mymachine.cern.ch`` and not ``mymachine``)
197197

198+
199+
User (admin) certificate
200+
------------------------
201+
202+
The user installing the server should have their own certificate: it will be used for administration.
203+
198204
.. _using_own_CA:
199205

200206
-----------------
@@ -266,41 +272,31 @@ be taken based on the Python version you wish to install.
266272
# it can be used to cover more than one VO in the grid sense.
267273
# If you are going to setup DIRAC as a multi-VO instance, remove the VirtualOrganization parameter.
268274
VirtualOrganization = Name of your VO
269-
# Site name
275+
# Server name
270276
SiteName = DIRAC.HostName.ch
271277

272278
# Flag to skip download of CAs, on the first Server of your installation you need to get CAs
273-
# installed by some external means
279+
# installed by some external means, so do not change this flag.
274280
SkipCADownload = yes
275-
# Flag to use the server certificates
281+
# Flag to use the server certificates. Do not change this flag.
276282
UseServerCertificate = yes
277-
# Configuration Server URL (This should point to the URL of at least one valid Configuration
278-
# Service in your installation, for the primary server it should not used )
279-
# ConfigurationServer = dips://myprimaryserver.name:9135/Configuration/Server
280-
# Configuration Name
281-
ConfigurationName = MyConfiguration
282-
#
283-
# These options define the DIRAC components to be installed on "this" DIRAC server.
284-
#
285-
#
286-
# The next options should only be set for the primary server,
287-
# they properly initialize the configuration data
288-
#
289-
# Name of the Admin user (default: None )
290-
AdminUserName = adminusername
291-
# DN of the Admin user certificate (default: None )
283+
# Name of the Admin user (default: None)
284+
# This should be the nickname as appears in your identity provider (normally: first letter of your name followed by surname)
285+
AdminUserName =
286+
# DN of the Admin user certificate (default: None)
292287
# In order the find out the DN that needs to be included in the Configuration for a given
293288
# host or user certificate the following command can be used::
294289
#
295290
# openssl x509 -noout -subject -enddate -in <certfile.pem>
296291
#
297-
AdminUserDN = /DC=ch/aminDN
298-
# Email of the Admin user (default: None )
299-
AdminUserEmail = adminmail@provider
300-
# Name of the Admin group (default: dirac_admin )
301-
AdminGroupName = dirac_admin
302-
# DN of the host certificate (*) (default: None )
303-
HostDN = /DC=ch/DC=country/OU=computers/CN=computer.dn
292+
AdminUserDN =
293+
# Email of the Admin user (default: None)
294+
AdminUserEmail =
295+
# DN of the host certificate (*) (default: None)
296+
HostDN =
297+
#
298+
# These options define the DIRAC components to be installed on "this" DIRAC server (do not change).
299+
#
304300
# Define the Configuration Server as Master for your installations
305301
ConfigurationMaster = yes
306302
# List of Systems to be installed - by default all services are added
@@ -351,14 +347,13 @@ be taken based on the Python version you wish to install.
351347
}
352348
}
353349

354-
or You can download the full server installation from::
350+
or you can download the full server installation from::
355351

356352
$ curl -L https://github.com/DIRACGrid/DIRAC/raw/integration/src/DIRAC/Core/scripts/install_full.cfg -o install.cfg
357353

358354
- Run ``install_site.sh`` giving the edited configuration file as the argument. The configuration file must have
359-
.cfg extension (CFG file). While not strictly necessary, it's advised that a version is added with the '-v' switch
360-
(pick the most recent one, see `here<https://pypi.org/project/DIRAC/#history>`).
361-
In the same way, extensions have to be added with the '-e' switch (the name of the extension should be complete). Finally,
355+
.cfg extension (CFG file).
356+
Extensions can be added with the '-e' switch (the name of the extension should be complete). Finally,
362357
further pip packages (e.g. WebAppDIRAC) can follow with the '-p' switch, which can be repeated multiple times::
363358

364359
$ ./install_site.sh -i /opt/dirac [-v <x.y.z>] [-e <extension>] [-p <extra-pip-install>] /home/dirac/DIRAC/install.cfg
@@ -376,11 +371,13 @@ of the status of running DIRAC services, e.g.::
376371
Name : Runit Uptime PID
377372
Configuration_Server : Run 41 30268
378373
Framework_SystemAdministrator : Run 21 30339
374+
Framework_ComponentMonitoring : Run 21 30341
375+
ResourceStatus_ResourceStatus : Run 21 30349
379376
Tornado_Tornado : Run 11 30340
380377

381378

382-
Now the basic services - Configuration, SystemAdministrator, TornadoComponentMonitoring and TornadoResourceStatus - are installed,
383-
or at least their DBs should be installed, and their services up and running.
379+
Now the basic services - Configuration, SystemAdministrator, ComponentMonitoring and ResourceStatus - are installed,
380+
or at least their DBs should be installed, and the services connecting to them up and running.
384381

385382
There are anyway a couple more steps that should be done to fully activate the ComponentMonitoring and the ResourceStatus.
386383
These steps can be found in the respective administration sessions of this documentation:
@@ -390,8 +387,7 @@ These steps can be found in the respective administration sessions of this docum
390387

391388
but, no hurry: you can do it later.
392389

393-
The rest of the installation can proceed using the DIRAC Administrator interface,
394-
either command line (System Administrator Console) or using Web Portal (eventually, not available yet).
390+
The rest of the installation can proceed using the DIRAC Administrator interface CLI.
395391

396392
It is also possible to include any number of additional systems, services, agents and databases to be installed by ``install_site.sh``.
397393

@@ -407,11 +403,22 @@ It is also possible to include any number of additional systems, services, agent
407403
killall runsv svlogd
408404
killall runsvdir
409405

406+
407+
Now it is time to add the necessary services for a minimal installation. In order to do so:
408+
409+
- install a client as described in the users' guide. Remember to use the same user certificate that you defined as "AdminUser".
410+
- get a proxy using `dirac-proxy-init -g dirac_admin --no-upload`
411+
- start the `dirac-admin-sysadmin-cli --host=$your_server_host` and inside install the services "Framework/BundleDelivery", "Framework/ProxyManager" (see instructions on the use of this CLI below)
412+
- exit the CLI, and simply run `dirac-proxy-init`
413+
414+
410415
.. _install_additional_server:
411416

412417
Additional server installation
413418
------------------------------
414419

420+
Additional servers can be installed for redundacy purposes. This operation can always be done later, so for now the suggestion is to skip to the next session.
421+
415422
To add a new server to an already existing DIRAC Installation the procedure is similar to the one above.
416423
You should perform all the preliminary steps to prepare the host for the installation. One additional
417424
operation is the registration of the new host in the already functional Configuration Service.
@@ -444,8 +451,6 @@ operation is the registration of the new host in the already functional Configur
444451
# Service in your installation, for the primary server it should not used)
445452
ConfigurationServer = https://myprimaryserver.name:9135/Configuration/Server
446453
ConfigurationServer += https://localhost:8443/Tornado/Tornado
447-
# Configuration Name
448-
ConfigurationName = MyConfiguration
449454

450455
#
451456
# These options define the DIRAC components being installed on "this" DIRAC server.

docs/source/UserGuide/GettingStarted/InstallingClient/index.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ At this point you need a proxy, so you should issue the command::
5555
$ dirac-proxy-init
5656

5757
This command will also embed a token in the proxy, in order to talk to DiracX.
58-
You can see which file is your proxy certificate using the `dirac-proxy-info` command.
58+
You can see which file is your proxy certificate using the `dirac-proxy-info` command.
5959

6060
Updating client
6161
===============

src/DIRAC/Core/scripts/install_full.cfg

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ LocalInstallation
2929
# Service in your installation, for the primary server it should not used )
3030
# ConfigurationServer = dips://myprimaryserver.name:9135/Configuration/Server
3131
# Configuration Name
32-
ConfigurationName = Dirac-Production
32+
ConfigurationName = central_config
3333
#
3434
# These options define the DIRAC components to be installed on "this" DIRAC server.
3535
#
@@ -48,8 +48,6 @@ LocalInstallation
4848
AdminUserDN = /DC=ch/DC=cern/OU=Organic Units/OU=Users/CN=jdoe/CN=123467/CN=John Doe
4949
# Email of the Admin user (default: None )
5050
AdminUserEmail = john.doe@example.invalid
51-
# Name of the Admin group (default: dirac_admin )
52-
AdminGroupName = dirac_admin
5351
# DN of the host certificate (*) (default: None )
5452
HostDN = /DC=ch/DC=cern/OU=computers/CN=lbcertifdirac7.cern.ch
5553
# Define the Configuration Server as Master for your installations

src/DIRAC/FrameworkSystem/Client/ComponentInstaller.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
3737
If a Controller Configuration Server is being installed the following Options can be used::
3838
39-
/LocalInstallation/ConfigurationName: Name of the Configuration (default: Setup )
39+
/LocalInstallation/ConfigurationName: Name of the Configuration (default: central_config )
4040
/LocalInstallation/AdminUserName: Name of the Admin user (default: None )
4141
/LocalInstallation/AdminUserDN: DN of the Admin user certificate (default: None )
4242
/LocalInstallation/AdminUserEmail: Email of the Admin user (default: None )
@@ -45,6 +45,7 @@
4545
/LocalInstallation/VirtualOrganization: Name of the main Virtual Organization (default: None)
4646
4747
"""
48+
4849
import glob
4950
import importlib
5051
import importlib.util
@@ -1302,7 +1303,7 @@ def setupSite(self, scriptCfg, cfg=None):
13021303
setupWeb = self.localCfg.getOption(cfgInstallPath("WebPortal"), False)
13031304
setupConfigurationController = self.localCfg.getOption(cfgInstallPath("ConfigurationMaster"), False)
13041305
setupPrivateConfiguration = self.localCfg.getOption(cfgInstallPath("PrivateConfiguration"), False)
1305-
setupConfigurationName = self.localCfg.getOption(cfgInstallPath("ConfigurationName"), "DIRAC-Prod")
1306+
setupConfigurationName = self.localCfg.getOption(cfgInstallPath("ConfigurationName"), "central_config")
13061307
setupAddConfiguration = self.localCfg.getOption(cfgInstallPath("AddConfiguration"), True)
13071308

13081309
for serviceTuple in setupServices:
@@ -1673,7 +1674,7 @@ def installComponent(self, componentType, system, component, extensions, compone
16731674
textwrap.dedent(
16741675
f"""#!/bin/bash
16751676
1676-
rcfile={os.path.join(self.instancePath, 'bashrc')}
1677+
rcfile={os.path.join(self.instancePath, "bashrc")}
16771678
[[ -e ${{rcfile}} ]] && source ${{rcfile}}
16781679
#
16791680
export DIRAC_USE_TORNADO_IOLOOP=Yes
@@ -1883,7 +1884,7 @@ def installPortal(self):
18831884
textwrap.dedent(
18841885
f"""#!/bin/bash
18851886
1886-
rcfile={os.path.join(self.instancePath, 'bashrc')}
1887+
rcfile={os.path.join(self.instancePath, "bashrc")}
18871888
[[ -e $rcfile ]] && source $rcfile
18881889
#
18891890
exec 2>&1
@@ -2299,7 +2300,7 @@ def installTornado(self):
22992300
textwrap.dedent(
23002301
f"""#!/bin/bash
23012302
2302-
rcfile={os.path.join(self.instancePath, 'bashrc')}
2303+
rcfile={os.path.join(self.instancePath, "bashrc")}
23032304
[ -e $rcfile ] && source $rcfile
23042305
#
23052306
export DIRAC_USE_TORNADO_IOLOOP=Yes

tests/Jenkins/dirac_ci.sh

Lines changed: 26 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,6 @@ INSTALL_CFG_FILE="${TESTCODE}/DIRAC/tests/Jenkins/install.cfg"
6666
# shellcheck source=tests/Jenkins/utilities.sh
6767
source "${TESTCODE}/DIRAC/tests/Jenkins/utilities.sh"
6868

69-
70-
7169
#...............................................................................
7270
#
7371
# installSite:
@@ -107,11 +105,11 @@ installSite() {
107105
else
108106
DIRACOS2_URL="https://github.com/DIRACGrid/DIRACOS2/releases/latest/download/DIRACOS-Linux-x86_64.sh"
109107
fi
110-
curl -L "${DIRACOS2_URL}" > "installer.sh"
108+
curl -L "${DIRACOS2_URL}" >"installer.sh"
111109
fi
112110
bash "installer.sh"
113111
rm "installer.sh"
114-
echo "source \"$PWD/diracos/diracosrc\"" > "$PWD/bashrc"
112+
echo "source \"$PWD/diracos/diracosrc\"" >"$PWD/bashrc"
115113

116114
mkdir -p "${SERVERINSTALLDIR}/diracos/etc/grid-security/certificates/"
117115

@@ -176,7 +174,7 @@ installSite() {
176174
# "Missing mandatory /DiracX/URL configuration"
177175
# Call findFutureServices and read services into an array
178176
findFutureServices 'exclude' $DIRACX_DISABLED_SERVICES
179-
mapfile -t futureServices < futureServices
177+
mapfile -t futureServices <futureServices
180178

181179
# If there are any remaining services, add them to args
182180
if [[ ${#futureServices[@]} -gt 0 ]]; then
@@ -196,7 +194,6 @@ installSite() {
196194

197195
}
198196

199-
200197
#...............................................................................
201198
#
202199
# fullInstall:
@@ -226,12 +223,12 @@ fullInstallDIRAC() {
226223
cat "${SERVERINSTALLDIR}/diracos/etc/dirac.cfg"
227224
fi
228225

229-
echo 'Content of etc/Production.cfg (just after installSite):'
230-
if [[ -e "${SERVERINSTALLDIR}/etc/Production.cfg" ]]; then
231-
cat "${SERVERINSTALLDIR}/etc/Production.cfg"
226+
echo 'Content of etc/central_config.cfg (just after installSite):'
227+
if [[ -e "${SERVERINSTALLDIR}/etc/central_config.cfg" ]]; then
228+
cat "${SERVERINSTALLDIR}/etc/central_config.cfg"
232229
fi
233-
if [[ -e "${SERVERINSTALLDIR}/diracos/etc/Production.cfg" ]]; then
234-
cat "${SERVERINSTALLDIR}/diracos/etc/Production.cfg"
230+
if [[ -e "${SERVERINSTALLDIR}/diracos/etc/central_config.cfg" ]]; then
231+
cat "${SERVERINSTALLDIR}/diracos/etc/central_config.cfg"
235232
fi
236233

237234
#just add a site
@@ -251,16 +248,15 @@ fullInstallDIRAC() {
251248
exit 1
252249
fi
253250

254-
255251
findServices 'FrameworkSystem'
256-
grep -v 'Tornado' services > disetServices
252+
grep -v 'Tornado' services >disetServices
257253
if [[ "${TEST_HTTPS:-Yes}" = "No" ]]; then
258254
mv disetServices services
259255
else
260256
# construct the list with a mix of Tornado and DISET services
261-
grep 'Tornado' services > tornadoServices
262-
more tornadoServices | sed s/Tornado//g > tornadoServicesWithoutTornado
263-
comm -1 -3 <(sort tornadoServicesWithoutTornado) <(sort disetServices) >> tornadoServices
257+
grep 'Tornado' services >tornadoServices
258+
more tornadoServices | sed s/Tornado//g >tornadoServicesWithoutTornado
259+
comm -1 -3 <(sort tornadoServicesWithoutTornado) <(sort disetServices) >>tornadoServices
264260
mv tornadoServices services
265261
fi
266262
#
@@ -281,8 +277,8 @@ fullInstallDIRAC() {
281277
exit 1
282278
fi
283279

284-
echo 'Content of etc/Production.cfg:'
285-
cat "${SERVERINSTALLDIR}/etc/Production.cfg"
280+
echo 'Content of etc/central_config.cfg:'
281+
cat "${SERVERINSTALLDIR}/etc/central_config.cfg"
286282

287283
echo "==> Restarting Framework services"
288284
dirac-restart-component Framework '*' -o /DIRAC/Security/UseServerCertificate=True ${DEBUG}
@@ -313,14 +309,14 @@ fullInstallDIRAC() {
313309
# services (not looking for FrameworkSystem already installed)
314310
findServices 'exclude' 'FrameworkSystem'
315311

316-
grep -v 'Tornado' services > disetServices
312+
grep -v 'Tornado' services >disetServices
317313
if [[ "${TEST_HTTPS:-Yes}" = "No" ]]; then
318314
mv disetServices services
319315
else
320316
# construct the list with a mix of Tornado and DISET services
321-
grep 'Tornado' services > tornadoServices
322-
more tornadoServices | sed s/Tornado//g > tornadoServicesWithoutTornado
323-
comm -1 -3 <(sort tornadoServicesWithoutTornado) <(sort disetServices) >> tornadoServices
317+
grep 'Tornado' services >tornadoServices
318+
more tornadoServices | sed s/Tornado//g >tornadoServicesWithoutTornado
319+
comm -1 -3 <(sort tornadoServicesWithoutTornado) <(sort disetServices) >>tornadoServices
324320
mv tornadoServices services
325321
fi
326322

@@ -333,14 +329,14 @@ fullInstallDIRAC() {
333329
if [[ "${TEST_HTTPS:-Yes}" = "No" ]]; then
334330
echo "==> calling dirac-install-component DataManagement MultiVOFileCatalog -m FileCatalog -p Port=9198 -p Database=MultiVOFileCatalogDB -o /DIRAC/Security/UseServerCertificate=True ${DEBUG}"
335331
if ! dirac-install-component DataManagement MultiVOFileCatalog -m FileCatalog -p Port=9198 -p Database=MultiVOFileCatalogDB -o /DIRAC/Security/UseServerCertificate=True "${DEBUG}"; then
336-
echo 'ERROR: dirac-install-component failed' >&2
337-
exit 1
332+
echo 'ERROR: dirac-install-component failed' >&2
333+
exit 1
338334
fi
339335
else
340336
echo "==> calling dirac-install-component DataManagement TornadoMultiVOFileCatalog -m TornadoFileCatalog -p Port=9198 -p Protocol=https -p Database=MultiVOFileCatalogDB -o /DIRAC/Security/UseServerCertificate=True ${DEBUG}"
341337
if ! dirac-install-component DataManagement TornadoMultiVOFileCatalog -m TornadoFileCatalog -p Port=9198 -p Protocol=https -p Database=MultiVOFileCatalogDB -o /DIRAC/Security/UseServerCertificate=True "${DEBUG}"; then
342-
echo 'ERROR: dirac-install-component failed' >&2
343-
exit 1
338+
echo 'ERROR: dirac-install-component failed' >&2
339+
exit 1
344340
fi
345341
echo "==> Restarting Tornado Tornado"
346342
dirac-restart-component Tornado Tornado ${DEBUG}
@@ -409,17 +405,16 @@ fullInstallDIRAC() {
409405
else
410406
echo "==> Restarting Tornado Tornado"
411407
dirac-restart-component Tornado Tornado -o /DIRAC/Security/UseServerCertificate=True ${DEBUG}
412-
fi
408+
fi
413409

414-
echo 'Content of etc/Production.cfg:'
415-
cat "${SERVERINSTALLDIR}/etc/Production.cfg"
410+
echo 'Content of etc/central_config.cfg:'
411+
cat "${SERVERINSTALLDIR}/etc/central_config.cfg"
416412

417413
echo "==> Restarting Configuration Server"
418414
dirac-restart-component Configuration Server -o /DIRAC/Security/UseServerCertificate=True ${DEBUG}
419415
}
420416

421-
422-
clean(){
417+
clean() {
423418

424419
echo "==> [clean]"
425420

tests/Jenkins/install.cfg

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@ LocalInstallation
77
VirtualOrganization = vo
88
SkipCADownload = yes
99
UseServerCertificate = yes
10-
# ConfigurationServer = https://myprimaryserver.name:8443/Configuration/Server
11-
ConfigurationName = Production
1210
#LogLevel of the installed components
1311
LogLevel = DEBUG
1412

@@ -21,7 +19,6 @@ LocalInstallation
2119
#
2220
AdminUserDN = /C=ch/O=DIRAC/OU=DIRAC CI/CN=ciuser
2321
AdminUserEmail = lhcb-dirac-ci@cern.ch
24-
AdminGroupName = dirac_admin
2522
# DN of the host certificate (*) (default: None )
2623
HostDN = /C=ch/O=DIRAC/OU=DIRAC CI/CN=VAR_HostDN
2724
ConfigurationMaster = yes

0 commit comments

Comments
 (0)