forked from oar-team/oar
-
Notifications
You must be signed in to change notification settings - Fork 0
/
INSTALL
733 lines (482 loc) · 22.8 KB
/
INSTALL
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
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
Installation
============
Overview
--------
There are currently 3 methods to install OAR:
- from the Debian packages
- from the RPM packages
- from sources
Before going further, please have in mind OAR's architecture. A common OAR
installation is composed of:
- a **server** which will hold all of OAR "smartness". That host will run
the OAR server daemon;
- one or more **frontends**, which users will have to login to, in order
to reserve computing nodes (oarsub, oarstat, oarnodes, ...);
- **computing nodes** (or basically *nodes*), where the jobs will execute;
- optionally a **visualisation server** which will host the
visualisation webapps (monika, drawgantt, ...);
- optionally an **API server**, which will host OAR restful API service.
Many OAR data are stored and archived in a database: you have the choice to use
either PostgreSQL or MySQL. We recommend using **PostgreSQL**.
Beside this documentation, please have a look at **OAR website**:
http://oar.imag.fr, which also provides a lot of information, espacially in the
**Download** and **Contribs** sections.
Computing nodes
---------------
Installation from the packages
______________________________
**Instructions**
*For RedHat like systems*::
# OAR provides a Yum repository.
# For more information see: http://oar.imag.fr/download#rpms
# Install OAR node
yum --enablerepo=OAR install oar-node
*For the Debian like systems*::
# OAR is shipped as part of Debian official distributions (newer versions can be available in backports)
# For more info see: http://oar.imag.fr/download#debian
# Install OAR node
apt-get install oar-node
Installation from the tarball
_____________________________
**Requirements**
*For RedHat like systems*::
# Build dependencies
yum install gcc make tar python-docutils
# Common dependencies
yum install Perl Perl-base openssh
*For Debian like system*::
# Build dependencies
apt-get install gcc make tar python-docutils
# Common dependencies
apt-get install perl perl-base openssh-client openssh-server
**Instructions**
Get the sources::
OAR_VERSION=2.5.4
wget -O - http://oar-ftp.imag.fr/oar/2.5/sources/stable/oar-${OAR_VERSION}.tar.gz | tar xzvf -
cd oar-${OAR_VERSION}/
build/install/setup::
# build
make node-build
# install
make node-install
# setup
make node-setup
Configuration
_____________
Init.d scripts
~~~~~~~~~~~~~~
If you have installed OAR from sources, you need to become root user and
install manually the {init.d,default,sysconfig} scripts present in the folders::
$PREFIX/share/doc/oar-node/examples/scripts/{init.d,default,sysconfig}
Then you just need to use the script ``/etc/init.d/oar-node`` to start
the SSH daemon dedicated to oar-node.
SSH setup
~~~~~~~~~
OAR uses SSH to connect from machine to machine (e.g. from server or frontend to
nodes or from nodes to nodes), using a dedicated SSH daemon usually running on
port 6667.
Upon installtion of the OAR server on the server machine, a SSH key pair along with an authorized_keys file is created for the oar user in ``/var/lib/oar/.ssh``. You need to copy that directory from the oar server to the nodes.
Please note that public key in the authorized_keys file must be prefixed with ``environment="OAR_KEY=1"``, e.g.::
environment="OAR_KEY=1" ssh-rsa AAAAB3NzaC1yc2[...]6mIcqvcwG1K7V6CHLQKHKWo/ root@server
Also please make sure that the ``/var/lib/oar/.ssh`` directory and contained files have the right ownership (oar.oar) and permissions for SSH to function.
Server
------
Installation from the packages
______________________________
**Instructions**
*For RedHat like systems*::
# OAR provides a Yum repository.
# For more information see: http://oar.imag.fr/download#rpms
# Install OAR server for the PostgreSQL backend
yum --enablerepo=OAR install oar-server oar-server-pgsql
# or Install OAR server for the MySQL backend
yum --enablerepo=OAR install oar-server oar-server-mysql
*For the Debian like systems*::
# OAR is shipped as part of Debian official distributions (newer versions can be available in backports)
# For more info see: http://oar.imag.fr/download#debian
# Install OAR server for the PostgreSQL backend
apt-get install oar-server oar-server-pgsql
# or Install OAR server for the MySQL backend
apt-get install oar-server oar-server-mysql
Installation from the tarball
_____________________________
**Requirements**
*For RedHat like systems*::
# Add the epel repository (choose the right version depending on your
# operating system)
yum install epel-release
# Build dependencies
yum install gcc make tar python-docutils
# Common dependencies
yum install Perl Perl-base openssh Perl-DBI perl-Sort-Versions perl-Capture-Tiny
# MySQL dependencies
yum install mysql-server mysql perl-DBD-MySQL
# PostgreSQL dependencies
yum install postgresql-server postgresql perl-DBD-Pg
*For Debian like system*::
# Build dependencies
apt-get install gcc make tar python-docutils
# Common dependencies
apt-get install perl perl-base openssh-client openssh-server libdbi-perl libsort-versions-perl libcapture-tiny-perl
# MySQL dependencies
apt-get install mysql-server mysql-client libdbd-mysql-perl
# PostgreSQL dependencies
apt-get install postgresql postgresql-client libdbd-pg-perl
**Instructions**
Get the sources::
OAR_VERSION=2.5.4
wget -O - http://oar-ftp.imag.fr/oar/2.5/sources/stable/oar-${OAR_VERSION}.tar.gz | tar xzvf -
cd oar-${OAR_VERSION}/
Build/Install/Setup the OAR server::
# build
make server-build
# install
make server-install
# setup
make server-setup
Configuration
_____________
The oar database
~~~~~~~~~~~~~~~~
Define the database configuration in /etc/oar/oar.conf. You need to set the
variables ``DB_TYPE, DB_HOSTNAME, DB_PORT, DB_BASE_NAME, DB_BASE_LOGIN,
DB_BASE_PASSWD, DB_BASE_LOGIN_RO, DB_BASE_PASSWD_RO``::
vi /etc/oar/oar.conf
Create the database and the database users::
# General case
oar-database --create --db-admin-user <ADMIN_USER> --db-admin-pass <ADMIN_PASS>
# OR, for PostgreSQL, in case the database is installed locally
oar-database --create --db-is-local
Init.d scripts
~~~~~~~~~~~~~~
If you have installed OAR from sources, you need to become root user and
install manually the init.d/default/sysconfig scripts present in the folders::
$PREFIX/share/doc/oar-server/examples/scripts/{init.d,default,sysconfig}
Then use the script ``/etc/init.d/oar-server`` to start the OAR server daemon.
Adding resources to the system
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
To **automatically** initialize resources for your cluster, you can run the
``oar_resources_init`` command. It will detect the resources from nodes set in
a file and give the OAR commands to initialize the database with the
appropriate values for the memory and the cpuset properties.
Another tool is also available to create resources beforehand: that tool does
not require nodes to be up and accessible by SSH. See ``oar_resources_add``.
*Otherwise:*
To add resources to your system, you can use (as root) the ``oarnodesetting``
command. For a complete understanding of what that command does, see the
manual page. For a basic usage, the main options are **-a** (means add a
resource) and **-h** (defines the resource hostname or ip adress).
For instance, to add a computing resource for node <NODE_IP> to your setup,
type::
oarnodesetting -a -h <NODE_IP>
This adds a resource with <NODE_IP> as host IP address (network_address
property).
You can modify resources properties with **-p** option, for instance::
oarnodesetting -r 1 -p "besteffort=YES"
This allows the resource #1 to accept jobs of type *besteffort* (an admission
rule forces besteffort jobs to execute on resources with the property
"besteffort=YES").
Notes
_____
Security issues
~~~~~~~~~~~~~~~
For security reasons it is hardly **recommended** to configure a read only
account for the OAR database (like the above example). Thus you will be able
to add it in DB_BASE_LOGIN_RO and DB_BASE_PASSWD_RO in *oar.conf*.
PostgreSQL: autovacuum
~~~~~~~~~~~~~~~~~~~~~~~
Be sure to activate the "autovacuum" feature in the "postgresql.conf" file (OAR
creates and deletes a lot of records and this setting cleans the postgres
database from unneeded records).
PostgreSQL: authentication
~~~~~~~~~~~~~~~~~~~~~~~~~~~
In case you've installed a PostgreSQL database remotely, if your PostgreSQL
installation doesn't authorize the local connections by default, you need to
enable the connections to this database for the oar users. Assuming the OAR
server has the address <OAR_SERVER>, you can add the following lines in the
``pg_hba.conf`` file::
# in /etc/postgresql/8.1/main/pg_hba.conf or /var/lib/pgsql/data/pg_hba.conf
host oar oar_ro <OAR_SERVER>/32 md5
host oar oar <OAR_SERVER>/32 md5
Using Taktuk
~~~~~~~~~~~~
If you want to use taktuk to manage remote administration commands, you have to
install it. You can find information about taktuk from its website:
http://taktuk.gforge.inria.fr.
Then, you have to edit your oar configuration file and fill in the related
parameters:
- ``TAKTUK_CMD`` (the path to the taktuk command)
- ``PINGCHECKER_TAKTUK_ARG_COMMAND`` (the command used to check resources states)
- ``SCHEDULER_NODE_MANAGER_SLEEP_CMD`` (command used for halting nodes)
CPUSET feature
~~~~~~~~~~~~~~
OAR uses the CPUSET features provided by the Linux kernel >= 2.6. This
enables to restrict user processes to reserved processors only and provides
a powerful clean-up mechanism at the end of the jobs.
For more information, have a look at the CPUSET file.
Energy saving
~~~~~~~~~~~~~
Starting with version 2.4.3, OAR provides a module responsible of advanced
management of wake-up/shut-down of nodes when they are not used.
To activate this feature, you have to:
- provide 2 commands or scripts which will be executed on the oar server
to shutdown (or set into standby) some nodes and to wake-up some nodes
(configure the path of those commands into the
``ENERGY_SAVING_NODE_MANAGER_WAKE_UP_CMD`` and
``ENERGY_SAVING_NODE_MANAGER_SHUT_DOWN_CMD`` variables in oar.conf)
Thes 2 commands are executed by the oar user.
- configure the ``available_upto`` property of all your nodes:
- ``available_upto=0`` : to disable the wake-up and halt
- ``available_upto=1`` : to disable the wake-up (but not the halt)
- ``available_upto=2147483647`` : to disable the halt (but not the wake-up)
- ``available_upto=2147483646`` : to enable wake-up/halt forever
- ``available_upto=<timestamp>`` : to enable the halt, and the wake-up until
the date given by <timestamp>
Ex: to enable the feature on every nodes forever:
::
oarnodesetting --sql true -p available_upto=2147483646
- activate the energy saving module by setting ``ENERGY_SAVING_INTERNAL="yes"``
and configuring the ``ENERGY_*`` variables into oar.conf
- configure the metascheduler time values into ``SCHEDULER_NODE_MANAGER_IDLE_TIME``,
``SCHEDULER_NODE_MANAGER_SLEEP_TIME`` and ``SCHEDULER_NODE_MANAGER_WAKEUP_TIME``
variables of the oar.conf file.
- restart the oar server (you should see an "Almighty" process more).
You need to restart OAR each time you change an ``ENERGY_*`` variable.
More informations are available inside the oar.conf file itself. For more
details about the mechanism, take a look at the "Hulot" module documentation.
Disabling SELinux
~~~~~~~~~~~~~~~~~
On some distributions, SELinux is enabled by default. There is currently no OAR
support for SELinux. So, you need to disable SELinux, if enabled.
Cpuset id issue
~~~~~~~~~~~~~~~
On some rare servers, the core ids are not persistent across reboot. So you need
to update the cpuset ids in the resource database at startup for each computing
node. You can do this by using the ``/etc/oar/update_cpuset_id.sh`` script. The
following page give more informations on how configuring it:
http://oar.imag.fr/wiki:old:customization_tips#start_stop_of_nodes_using_ssh_keys
Frontends
---------
Installation from the packages
______________________________
**Instructions**
*For RedHat like systems*::
# OAR provides a Yum repository.
# For more information see: http://oar.imag.fr/download#rpms
# Install OAR user for the PostgreSQL backend
yum --enablerepo=OAR install oar-user oar-user-pgsql
# or Install OAR user for the MySQL backend
yum --enablerepo=OAR install oar-user oar-user-mysql
*For the Debian like systems*::
# OAR is shipped as part of Debian official distributions (newer versions can be available in backports)
# For more info see: http://oar.imag.fr/download#debian
# Install OAR server for the PostgreSQL backend
apt-get install oar-user oar-user-pgsql
# or Install OAR server for the MySQL backend
apt-get install oar-user oar-user-mysql
Installation from the tarball
_____________________________
**Requirements**
*For RedHat like systems*::
# Build dependencies
yum install gcc make tar python-docutils
# Common dependencies
yum install Perl Perl-base openssh Perl-DBI
# MySQL dependencies
yum install mysql perl-DBD-MySQL
# PostgreSQL dependencies
yum install postgresql perl-DBD-Pg
*For Debian like system*::
# Build dependencies
apt-get install gcc make tar python-docutils
# Common dependencies
apt-get install perl perl-base openssh-client openssh-server libdbi-perl
# MySQL dependencies
apt-get install mysql-client libdbd-mysql-perl
# PostgreSQL dependencies
apt-get install postgresql-client libdbd-pg-perl
**Instructions**
Get the sources::
OAR_VERSION=2.5.4
wget -O - http://oar-ftp.imag.fr/oar/2.5/sources/stable/oar-${OAR_VERSION}.tar.gz | tar xzvf -
cd oar-${OAR_VERSION}/
Build/Install/setup::
# build
make user-build
# install
make user-install
# setup
make user-setup
Configuration
_____________
SSH setup
~~~~~~~~~
OAR uses SSH to connect from machine to machine (e.g. from server or frontend to
nodes or from nodes to nodes), using a dedicated SSH daemon usually running on
port 6667.
Upon installtion of the OAR server on the server machine, a SSH key pair along with an authorized_keys file is created for the oar user in ``/var/lib/oar/.ssh``. You need to copy that directory from the oar server to the frontend (if not the same machine).
Please note that public key in the authorized_keys file must be prefixed with ``environment="OAR_KEY=1"``, e.g.::
environment="OAR_KEY=1" ssh-rsa AAAAB3NzaC1yc2[...]6mIcqvcwG1K7V6CHLQKHKWo/ root@server
Also please make sure that the ``/var/lib/oar/.ssh`` directory and contained files have the right ownership (oar.oar) and permissions for SSH to function.
Coherent configuration files between server node and user nodes
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
You need to have a coherent oar configuration between the server node and the
user nodes. So you can just copy the /etc/oar/oar.conf directory from to server node to
the user nodes.
About X11 usage in OAR
~~~~~~~~~~~~~~~~~~~~~~
The easiest and scalable way to use X11 application on cluster nodes is to open
X11 ports and set the right DISPLAY environment variable by hand. Otherwise
users can use X11 forwarding via SSH to access cluster frontends. You
must configure the SSH server on the frontends nodes with::
X11Forwarding yes
X11UseLocalhost no
With this configuration, users can launch X11 applications after a 'oarsub -I'
on the given node or "oarsh -X node12".
API server
----------
Description
___________
Since the version 2.5.3, OAR offers an API for users and admins interactions.
This api must be installed on a frontend node (with the user module installed).
Installation from the packages
______________________________
**Instructions**
*For RedHat like systems*::
# OAR provides a Yum repository.
# For more information see: http://oar.imag.fr/download#rpms
# Install apache FastCGI and Suexec modules (optional but highly recommended)
# Install OAR Restful api
yum --enablerepo=OAR install oar-restful-api
*For the Debian like systems*::
# OAR is shipped as part of Debian official distributions (newer versions can be available in backports)
# For more info see: http://oar.imag.fr/download#debian
# Install apache FastCGI and Suexec modules (optional but highly recommended)
# Install OAR Restful api
apt-get install oar-restful-api
Installation from the tarball
_____________________________
**Requirements**
*For RedHat like systems*::
# Build dependencies
yum install gcc make tar python-docutils
# Common dependencies
yum install perl perl-base perl-DBI perl-CGI perl-JSON perl-YAML perl-libwww-perl httpd
# Install apache FastCGI and Suexec modules (optional but highly recommended)
# MySQL dependencies
yum install perl-DBD-MySQL
# PostgreSQL dependencies
yum install perl-DBD-Pg
*For Debian like system*::
# Build dependencies
apt-get install gcc make tar python-docutils
# Common dependencies
apt-get install perl perl-base libdbi-perl libjson-perl libyaml-perl libwww-perl apache2 libcgi-fast-perl
# Install apache FastCGI and Suexec modules (optional but highly recommended)
# MySQL dependencies
apt-get install libdbd-mysql-perl
# PostgreSQL dependencies
apt-get install libdbd-pg-perl
**Instructions**
Get the sources::
OAR_VERSION=2.5.4
wget -O - http://oar-ftp.imag.fr/oar/2.5/sources/stable/oar-${OAR_VERSION}.tar.gz | tar xzvf -
cd oar-${OAR_VERSION}/
build/install/setup::
# build
make api-build
# install
make api-install
# setup
make api-setup
Configuration
_____________
*Configuring OAR*
For the moment, the API needs the user tools to be installed on the same
host ('``make user-install``' or oar-user packages). A suitable
``/etc/oar/oar.conf`` should be present. For the API to work, you should have
the oarstat/oarnodes/oarsub commands to work (on the same host you installed
the API)
*Configuring Apache*
The api provides a default configuration file (``/etc/oar/apache-api.conf``) that
is using an identd user identification enabled only from localhost. Edit the
``/etc/oar/apache-api.conf`` file and customize it to reflect the authentication
mechanism you want to use. For ident, you may have to install a "identd" daemon
on your distrib. The steps may be:
- Install and run an identd daemon on your server (like *pidentd*).
- Activate the ident auth mechanism into apache (``a2enmod ident``).
- Activate the headers apache module (``a2enmod headers``).
- Activate the rewrite apache module (``a2enmod rewrite``).
- Customize apache-api.conf to allow the hosts you trust for ident.
*YAML, JSON, XML*
You need at least one of the YAML or JSON perl module to be installed on
the host running the API.
*Test*
You may test the API with a simple wget::
wget -O - http://localhost/oarapi/resources.html
It should give you the list of resources in the yaml format but enclosed in an
html page. To test if the authentication works, you need to post a new job.
See the example.txt file that gives you example queries with a ruby rest
client.
Visualization server
--------------------
Description
___________
OAR provides two webapp tools for visualizing the resources utilization::
- monika which displays the current state of resources as well as all running and waiting jobs
- drawgantt-svg which displays gantt chart of nodes and jobs for the past and future.
Installation from the packages
______________________________
**Instructions**
*For RedHat like systems*::
# OAR provides a Yum repository.
# For more information see: http://oar.imag.fr/download#rpms
# Install OAR web status package
yum --enablerepo=OAR install oar-web-status
*For the Debian like systems*::
# OAR is shipped as part of Debian official distributions (newer versions can be available in backports)
# For more info see: http://oar.imag.fr/download#debian
# Install OAR web status package
apt-get install oar-web-status
Installation from the tarball
_____________________________
**Requirements**
*For RedHat like systems*::
# Build dependencies
yum install gcc make tar python-docutils
# Common dependencies
yum install perl perl-base perl-DBI ruby-GD ruby-DBI perl-Tie-IxHash perl-Sort-Naturally perl-AppConfig php
# MySQL dependencies
yum install mysql perl-DBD-MySQL ruby-mysql php-mysql
# PostgreSQL dependencies
yum install postgresql perl-DBD-Pg ruby-pg php-pgsql
*For Debian like system*::
# Build dependencies
apt-get install gcc make tar python-docutils
# Common dependencies
apt-get install perl perl-base ruby libgd-ruby1.8 libdbi-perl libtie-ixhash-perl libappconfig-perl libsort-naturally-perl libapache2-mod-php5
# MySQL dependencies
apt-get install libdbd-mysql-perl libdbd-mysql-ruby php5-mysql
# PostgreSQL dependencies
apt-get install libdbd-pg-perl libdbd-pg-ruby php5-pgsql
**Instructions**
Get the sources::
OAR_VERSION=2.5.4
wget -O - http://oar-ftp.imag.fr/oar/2.5/sources/stable/oar-${OAR_VERSION}.tar.gz | tar xzvf -
cd oar-${OAR_VERSION}/
build/install/setup::
# build
make monika-build drawgantt-build drawgantt-svg-build www-conf-build
# install
make monika-install drawgantt-install drawgantt-svg-install www-conf-install
# setup
make monika-setup drawgantt-setup drawgantt-svg-setup www-conf-setup
Configuration
_____________
**Monika configuration**
- Edit ``/etc/oar/monika.conf`` to fit your configuration.
**Drawgantt-SVG configuration**
- Edit ``/etc/oar/drawgantt-config.inc.php`` to fit your configuration.
**httpd configuration**
- You need to edit ``/etc/oar/apache.conf`` to fit your needs and verify that you
http server configured.