jungle/web/content/hut/_index.md

2.2 KiB

title, description, date
title description date
Hut Control node 2023-06-13T19:36:57+02:00

Hut

From the hut we monitor and control other nodes. It consist of one node only, which is available at hut or xeon07. It runs the following services:

  • Prometheus: to store the monitoring data.
  • Grafana: to plot the data in the web browser.
  • Slurmctld: to manage the SLURM nodes.
  • Gitlab runner: to run CI jobs from Gitlab.
  • Nix binary cache: to serve cached nix builds

This node is prone to interruptions from all the services it runs, so it is not a good candidate for low noise executions.

Binary cache

We provide a binary cache in hut, with the aim of avoiding unnecessary recompilation of packages.

The cache should contain common packages from bsckpkgs, but we don't provide any guarantee that of what will be available in the cache, or for how long. We recommend following the latest version of the jungle flake to avoid cache misses.

Usage

From NixOS

In NixOS, we can add the cache through the nix.settings option, which will enable it for all builds in the system.

{ ... }: {
  nix.settings = {
    substituters = [ "https://jungle.bsc.es" ];
    trusted-public-keys = [ "jungle.bsc.es:pEc7MlAT0HEwLQYPtpkPLwRsGf80ZI26aj29zMw/HH0=" ];
  };
}

Interactively

The cache can also be specified in a per-command basis through the flags --substituters and --trusted-public-keys:

nix build --substituters "https://jungle.bsc.es/cache" --trusted-public-keys "jungle.bsc.es:pEc7MlAT0HEwLQYPtpkPLwRsGf80ZI26aj29zMw/HH0=" <...>

Nix configuration file (non-nixos)

If using nix outside of NixOS, you'll have to update nix.conf

echo "substituters = https://jungle.bsc.es" >> /etc/nix/nix.conf
echo "trusted-public-keys = jungle.bsc.es:pEc7MlAT0HEwLQYPtpkPLwRsGf80ZI26aj29zMw/HH0=" >> /etc/nix/nix.conf

Hint in flakes

By adding the configuration below to a flake.nix, when someone uses the flake, nix will interactively ask to trust and use the provided binary cache:

{
  nixConfig = {
    extra-substituters = [
      "https://jungle.bsc.es/cache"
    ];
    extra-trusted-public-keys = [
      "jungle.bsc.es:pEc7MlAT0HEwLQYPtpkPLwRsGf80ZI26aj29zMw/HH0="
    ];
  };
  outputs = { ... }: {
    ...
  };
}