Deploying OAR

NixOS Compose can deploy complex distributed system, such as the a cluster managed by the OAR batch scheduler.

Clone the composition

git clone --depth=1 git@github.com:oar-team/oar-nixos-compose.git

Variants

This repository contains several variants of the composition deploying OAR.

Let's use the master one:

cd master/

Inspect the composition

Take a look at the composition.nix file. You can see that there are 3 roles:

  • frontend: this role is reponsible to receive the job requests from the users (the oarsub commands). This is the same as the frontend nodes on Grid'5000 (e.g., fgrenoble, fnancy).

  • server: this role hosts the "brain" of OAR. It is responsible to schedule the jobs.

  • node: this role represents the compute nodes of the cluster. Notice that the roleDistribution attribute: it can generate several instances of a role (this is similar to the nodes.yaml file seen in 'Generalization of the composition', but more static).

Build the composition

nxc build -f g5k-nfs-store

Start the composition

Reserve the nodes

We thus need to reserve 4 nodes (1 frontend, 1 server and 2 node):

export $(oarsub --project lab-2025-compas-nxc -l nodes=4,walltime=1:0:0 "$(nxc helper g5k_script) 1h" | grep OAR_JOB_ID)

Deploy the composition

nxc start -m OAR.$OAR_JOB_ID.stdout -W

Connect to the frontend

nxc connect frontend

Submiting a OAR job in our deployed OAR

[root@frontend:~]# su user1
[user1@frontend:/root]# cd ~
[user1@frontend:/root]# oarsub -I

You should then be connected on one of the compute node (node1 or node2) with the OAR_JOB_ID=1.

Release the nodes

When you are done, do not forget to release the nodes from the Grid'5000 frontend:

oardel $OAR_JOB_ID