User login
Learn how to use Qlustar!

First Steps

Fictive XHTML Validation Header

This document describes the first steps to perform after a fresh install of a Qlustar head-node.

First Boot

After the server has booted the newly installed Qlustar OS, log in as root and start the post-install configuration process by running the command

qlustar-initial-config

This will first thoroughly check your network connectivity and then complete the installation by executing the remaining configuration steps as detailed below. During the package update process you might be asked whether to keep locally modified configuration files. In this case always choose the option

keep the local version currently installed.

Further configuration steps

If your chosen hostname can't be resolved via DNS, you will see a non-fatal error message reminding you that the hostname should be registered in some (external) name service (typically DNS).

Cluster name

First, you will be asked for the name of the new Qlustar cluster. This can be any string and is used in some places like the slurm or ganglia configuration.

NIS Setup

Next is the setup of the NIS database. Just confirm the suggested NIS server with <Ctrl-D> and type <return> to proceed.

Configuring ssh

An ssh key for the root user is generated next. You can enter an optional pass-phrase for it. Note however, that a non-empty pass-phrase will have the effect that you will have to specify it any time, you try to ssh to another host in the cluster. If you don't want that, work without a pass-phrase. This key, will be used to enable login by root to any node of the cluster without specifying a password.

Configuring Nagios

The configuration of Nagios requires you to choose a password for the Nagios admin account. Please type in the password twice.

Configuring QluMan

QluMan, the Qlustar management framework (see the QluMan Guide), requires a mysql (mariaDB) database. You will be asked for the password of the QluMan DB user next. After entering it, the QluMan database and configuration settings will be initialized. This can take a while, since a number of OS images and chroots (see below ) will be generated during this step.

Configuring Slurm

If slurm was selected as the cluster resource manager, its configuration requires the generation of a munge key and the specification of a password for the slurm mysql account. Enter the chosen password twice when asked for it. Note that the slurm database daemon is also being configured by this process. Hence, you will be ready to take full advantage of the accounting features of slurm.

Configuring the virtual Demo Cluster

If you have chosen to setup some virtual demo nodes during installation, you will be asked for the user name of a test account that can be used to explore the cluster. The account will be generated with the default password for the cluster (see the information on the screen).

Final Reboot

Please reboot again once all the previous steps are complete (e.g. by typing the command shutdown -r now ). After the head-node is up and running again, test its network connectivity by pinging its public IP address (hostname). Do the same for the virtual front-end node, if you have chosen to configure one. It should have booted as well after the head-node is up and running. You can try to login to it using ssh.

A test mail should have been sent to the e-mail address(es) you specified during the installation. If you didn't receive one, review your settings in /etc/aliases and/or /etc/postfix/main.cf. In case some of them are wrong, you can execute

$ dpkg-reconfigure postfix

to modify them.

Starting the virtual Demo Cluster

If you have chosen to configure a virtual demo-cluster, you can start it by executing the command:

$ demo-system-start

and to stop

$ demo-system-stop

These commands use the configuration file /etc/qlustar/vm-configs/demo-system.conf. If you find that the (automatically calculated) amount of RAM per VM is not right, you can change the variable CN_MEM to some other value in that file. The consoles of the virtual nodes (and also of the virtual front-end node if you chose to set one up) are accessible in a screen session. Type

$ console-fe-vm

to attach to the console session of the virtual FE node and

$ console-demo-vms

to attach to the console sessions of the virtual demo cluster nodes. Note that the screen command character is Ctrl-t. To detach from the screen session, type Ctrl-t d, to switch to the next/previous screen type Ctrl-t n / Ctrl-t p. More details on the usage of screen (or byobu, the Debian customized version we use) are available in the corresponding man pages. To check whether all nodes are up and running, type

$ dsh -a uptime

dsh or pdsh can be used to execute arbitrary commands on groups of nodes. Check their man pages and the corresponding section in the QluMan guide for further information.

Installed services

The following services are now configured and running on your head-node:

  • Nagios3 (monitoring/alerts) with its web interface at http://<servername>/nagios3/. Login as nagiosadmin with the password you specified previously.
  • Ganglia (monitoring) at http://<servername>/ganglia/
  • DHCP/ATFTP boot service
  • NTP time server as client and server
  • NFS-Server with exports defined in /etc/exports
  • Depending on your choice of software packages: Slurm (DB + control daemon), Torque server, Corosync (HA), Munge (authentification for slurm/torque). Note that among the latter only slurm and munge are configured automatically during installation. Torque and Corosync require a manual configuration.
  • NIS server
  • Mail service Postfix
  • MariaDB server (mysql fork)
  • QluMan server (Qlustar Management)

Please note, that you shouldn't install the default Ubuntu MySQL server packages on the head-node, since QluMan requires MariaDB and packages of the latter conflict with the MySQL packages. MariaDB is a complete and compatible substitute for MySQL.

Adding software

As explained elsewhere, the RAM-based root file-system of a Qlustar compute/storage node can be supplemented by a global NFS-exported chroot to allow access to software not already contained in the boot images themselves. During installation, one chroot per selected edge platform was automatically created. The chroots are located at /srv/apps/chroots/<chroot name>, where <chroot name> would be precise or wheezy. Each of them contains a full-featured installation of the corresponding Qlustar edge platform. To change into a chroot, convenience bash shell aliases of the form chroot-<chroot name> are defined for the root user on the head-node. You may use them as follows (e.g. for Debian/Wheezy, if it was selected at install):

$ chroot-wheezy

Once you're inside a chroot, you can use the standard Debian/Ubuntu tools to control its software packages, e.g.

(chroot-wheezy) root@head:~ # aptitude update
(chroot-wheezy) root@head:~ # aptitude dist-upgrade
(chroot-wheezy) root@head:~ # aptitude install <package>
(chroot-wheezy) root@head:~ # exit

The nice thing about this mechanism is that software from packages installed in a particular chroot will be available instantaneously on all compute/storage nodes that are configured to use that chroot.
Important: There is usually no need to install additional packages on the head-node itself (only in the chroot). Software packages installed directly on the head-node will not be visible cluster-wide.

Starting the Cluster Manager QluMan

During installation, the Qlustar management GUI qluman-qt is installed for the virtual FE node, if one has been setup, otherwise on the head-node. If you like to have it available on the head-node in any case, just install it there like any other package:

$ apt-get install qluman-qt

The installation on the head-node is not done by default, since it pulls and installs a lot of other packages that qluman-qt depends on, which will slow down updates. If you have the possibility, install qluman-qt on your workstation (see below) and work from there. You can launch qluman-qt remotely on the node where it is installed (FE or head-node) per ssh (with X11 forwarding enabled / -X option) as follows:

$ ssh -X root@servername qluman-qt

This should bring up the Management Console. For a detailed introduction to QluMan read the QluMan Guide.

Installing the QluMan GUI on a workstation

If your workstation runs one of the edge platforms currently supported by Qlustar, you can install the QluMan GUI directly there. This is recommended, since the responsiveness of a GUI, that is locally started, is a lot better as compared to one that is running via remote X11. To install the qluman-qt package on your workstation, you need to add the correct Qlustar repository to your apt sources list. This can be accomplished by executing the following as root on your workstation.

$ dpkg -l | grep python-software-properties > /dev/null 2>&1 || apt-get install python-software-properties
$ gpg --no-default-keyring --primary-keyring /etc/apt/trusted.gpg --recv-keys E6BA110F3C0BC307

The second command should have imported the Qlustar PGP key and must output a line like:

gpg: key 3C0BC307: public key "Q-Leap Networks (automatic archive key) <info@q-leap.com>" imported

Then if you have Ubuntu/Trusty execute:

$ add-apt-repository 'deb http://repo.qlustar.com/repo/qluman 9.0-trusty main non-free'
$ add-apt-repository 'deb http://repo.qlustar.com/repo/qluman 9.0-trusty-proposed-updates main non-free'

Else for Debian/Wheezy:

$ add-apt-repository 'deb http://repo.qlustar.com/repo/qluman 9.0-wheezy main non-free'
$ add-apt-repository 'deb http://repo.qlustar.com/repo/qluman 9.0-wheezy-proposed-updates main non-free'

After this you can install qluman-qt the usual way:

$ apt-get update
$ apt-get install qluman-qt

Note, that on Ubuntu you need to have the universe repository enabled in your sources list for the above command to succeed. Finally, the QluMan GUI can then be launched as an ordinary user in a shell on the workstation:

$ qluman-qt &

Important: Please note that the versions of the QluMan packages on the workstation should be the same as on the head-node(s) to ensure correct operation. Some unequal version combinations might work too, but are usually not well tested.

Creating Users

Authenticating users in the cluster can be done in many ways, hence the creation of users depends on what method is used. The most basic method is to use NIS. If there is no requirement of keeping user authentification in sync with some external service like e.g. LDAP this is sufficient. A NIS database is setup during the initial installation process and cluster users can be authenticated against it. Creating accounts that should use other authentification mechanisms is more complex and beyond the scope of this guide. Some options are explained in the admin manual. Add a test user by executing a command like this:

$ adduser.sh -u test -n "Test User"

The behavior of the adduser.sh script can be customized in its configuration file /etc/qlustar/common/adduser.cf. It also contains the definition of the initial user password.

Compiling an MPI program

MPI (Message Passing Interface) is the de facto standard for distributed parallel programming on Linux clusters. The default MPI variant in Qlustar is OpenMpi and is automatically installed in the default chroot during installation. You can test the correct installation of MPI with two small "hello world" test programs (one in C the other one in FORTRAN90) as the test user you created earlier: Login on the front-end node as this user and execute

$ mpicc.openmpi-gcc -o hello-world-c hello-world.c
$ mpif90.openmpi-gcc -o hello-world-f hello-world.f90

After this you should have created two executables. Check it with

$ ls -l hello-world-?

Now we're prepared to test the queuing system with the two programs.

Running an MPI Job

Still logged in as the test user and assuming at least two demo nodes are started, we can submit the two "hello world" programs created previously as follows (commands are given for slurm):

$ OMPI_MCA_btl="tcp,self" salloc -N 2 --ntasks-per-node=2 -p demo \
  srun hello-world-c

This will run the job interactively on 2 nodes with 2 processes each (total of 4 processes). You should obtain an output like this:

salloc: Granted job allocation 19
cpu_bind=NULL - beo-201, task  0  0 [13959]: mask 0x1
cpu_bind=NULL - beo-202, task  3  1 [13607]: mask 0x2
cpu_bind=NULL - beo-202, task  2  0 [13606]: mask 0x1
cpu_bind=NULL - beo-201, task  1  1 [13960]: mask 0x2
Hello world from process 1 of 4
Hello world from process 3 of 4
Hello world from process 0 of 4
Hello world from process 2 of 4
salloc: Relinquishing job allocation 19
salloc: Job allocation 19 has been revoked.

The lines starting with cpu_bind=NULL are new in Qlustar 9 and appear due to the fact, that we have enabled the verbose setting for the configuration of cpusets under slurm. They indicate the binding (core affinity) of the separate MPI tasks to the CPUs/cores of the compute nodes. This is done by the slurm cgroup plugin, that is now enabled by default. Binding of processes to cores guarantees data (memory) locality and thus improves performance on NUMA systems, since access to local memory is faster than to remote memory. Note that essentially all modern multi-socket (CPU) systems have a NUMA architecture these days (Intel Xeon, AMD Opteron, ...), so this is relevant.

Similarly the F90 version can be submitted as a batch job using the script hello-world-f90-slurm.sh (to see the output, execute cat slurm-<job#>.out after the job has finished):

$ sbatch -N 2 --ntasks-per-node=2 -p demo hello-world-f90-slurm.sh

Note that the environment variable OMPI_MCA_btl="tcp,self" is used in the above two examples to prevent error messages from not finding an Infiniband network. The latter would otherwise occur, because we compile OpenMPI to use an IB network per default and if not found, a TCP network is used as backup. TCP can also be set as the default in the OpenMPI config file (in the chroot, typically under /srv/apps/chroots/trusty/etc/openmpi/x.y.z/openmpi-mca-params.conf) by adding the entry:

btl = tcp,self

Running the Linpack benchmark

The Linpack benchmark is used to classify supercomputers in the Top500 list. That's why on most clusters, it's probably run as one of the first parallel programs to check functionality, stability and performance. Qlustar comes with an optimized pre-compiled version of Linpack (using a current version of the OpenBlas library), and a script to auto-generate the necessary input file given the number of nodes, processes per node and total amount of RAM for the run.

The test user has some pre-defined shell aliases to simplify the submission of Linpack jobs. Type alias to see what's available. They are defined in $HOME/.bash/alias. Example submission (assuming you have 4 running demo nodes):

$ linp-4-demo-nodes

Check that the job is started (output should be similar):

$ squeue 
  JOBID PARTITION     NAME     USER  ST       TIME  NODES NODELIST(REASON)
     27      demo linstres     test   R       2:46      4 beo-[201-204]

ssh to one of the nodes in the NODELIST and check with top that Linpack is running at full steam, like:

  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND                 
18307 test      20   0  354m 280m 2764 R  100 28.0   6:42.92 xhpl-openblas           
18306 test      20   0  354m 294m 2764 R   99 29.3   6:45.09 xhpl-openblas           

You can check the output of each Linpack run in the files:

$HOME/bench/hpl/run/job-<jobid>-*/openblas/job-<jobid>-*-<run#>.out

where <jobid> is the slurm JOBID (see squeue command above) and <run#> is an integer starting from 1. The way the script is designed, it will run indefinitely, restarting Linpack in an infinite loop. So to stop it, you need to cancel the job like

$ scancel <jobid>
glqxz9283 sfy39587stf02 mnesdcuix8
sfy39587stf03
sfy39587p08