= Update

This page describes how to update Slurm-web to the latest version. It is
important to keep your installation up to date to benefit from the latest
features, improvements, and security patches.

The document provides a general procedure for updating the software and specific
steps for updating to latest major version.

== General Procedure

=== Update Packages

Depending on host Linux distribution, run this command to update Slurm-web
packages:

[tabs]
======
RHEL, CentOS, Rocky Linux, AlmaLinux OS and Fedora::
+
====

[source,console]
----
# dnf update
----
====

Debian and Ubuntu::
+
====
[source,console]
----
# apt update && apt upgrade
----
====

SLES and openSUSE::
+
====
[source,console]
----
# zypper update
----
====
======

=== Restart Services

Run these command to restart services:

[tabs]
======
Native service::
+
====
When using default native service:

[source,console]
----
# systemctl restart slurm-web-gateway.service slurm-web-agent.service
----
====

Production HTTP server::
+
====
When using xref:conf:wsgi/index.adoc[production HTTP server]:

[source,console]
----
# systemctl restart slurm-web-gateway-uwsgi.service slurm-web-agent-uwsgi.service
----
====
======

=== Check Status

Check status of services:

[tabs]
======
Native service::
+
====
When using default native service:

[source,console]
----
# systemctl status slurm-web-gateway.service slurm-web-agent.service
----
====

Production HTTP server::
+
====
When using xref:conf:wsgi/index.adoc[production HTTP server]:

[source,console]
----
# systemctl status slurm-web-gateway-uwsgi.service slurm-web-agent-uwsgi.service
----
====
======

Services must be *active* and *running*.

Connect to Slurm-web web interface with your browser to check it is
up-and-running.

== Notes for Slurm-web 6

To update Slurm-web from version 5 to version 6, some manual additional steps
must be performed.

To avoid impacting users with automatic upgrades, Slurm-web 6 packages are
published to a separate repository. Package repositories settings must be
updated to install this version.

=== DNF

NOTE: This procedure works on
https://www.redhat.com/en/technologies/linux-platforms/enterprise-linux[RHEL],
https://www.centos.org/[CentOS],
https://rockylinux.org/[Rocky Linux] and
https://almalinux.org/[AlmaLinux OS].

Edit [.path]#`/etc/yum.repos.d/rackslab.repo`# to change repository from
_slurmweb-5_ to _slurmweb-6_:

[tabs]
======
RHEL 8::
+
====
[source,diff]
----
--- a/etc/yum.repos.d/rackslab.repo
+++ b/etc/yum.repos.d/rackslab.repo
@@ -4,8 +4,8 @@
 gpgcheck=1
 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-Rackslab

-[rackslab-slurmweb-5]
-name=Rackslab slurmweb-5
-baseurl=https://pkgs.rackslab.io/rpm/el8/slurmweb-5/$basearch/
+[rackslab-slurmweb-6]
+name=Rackslab slurmweb-6
+baseurl=https://pkgs.rackslab.io/rpm/el8/slurmweb-6/$basearch/
 gpgcheck=1
 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-Rackslab
----
====

RHEL 9::
+
====
[source,diff]
----
--- a/etc/yum.repos.d/rackslab.repo
+++ b/etc/yum.repos.d/rackslab.repo
@@ -3,3 +3,9 @@
@@ -4,8 +4,8 @@
 gpgcheck=1
 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-Rackslab

-[rackslab-slurmweb-5]
-name=Rackslab slurmweb-5
-baseurl=https://pkgs.rackslab.io/rpm/el9/slurmweb-5/$basearch/
+[rackslab-slurmweb-6]
+name=Rackslab slurmweb-6
+baseurl=https://pkgs.rackslab.io/rpm/el9/slurmweb-6/$basearch/
 gpgcheck=1
 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-Rackslab
----
====

Fedora 41::
+
====
[source,diff]
----
--- a/etc/yum.repos.d/rackslab.repo
+++ b/etc/yum.repos.d/rackslab.repo
@@ -4,8 +4,8 @@
 gpgcheck=1
 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-Rackslab

-[rackslab-slurmweb-5]
-name=Rackslab slurmweb-5
-baseurl=https://pkgs.rackslab.io/rpm/fc41/slurmweb-5/$basearch/
+[rackslab-slurmweb-6]
+name=Rackslab slurmweb-6
+baseurl=https://pkgs.rackslab.io/rpm/fc41/slurmweb-6/$basearch/
 gpgcheck=1
 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-Rackslab

----
====

Fedora 42::
+
====
[source,diff]
----
@@ -4,8 +4,8 @@
 gpgcheck=1
 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-Rackslab

-[rackslab-slurmweb-5]
-name=Rackslab slurmweb-5
-baseurl=https://pkgs.rackslab.io/rpm/fc42/slurmweb-5/$basearch/
+[rackslab-slurmweb-6]
+name=Rackslab slurmweb-6
+baseurl=https://pkgs.rackslab.io/rpm/fc42/slurmweb-6/$basearch/
 gpgcheck=1
 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-Rackslab
----
====
======

Run this command to update repositories and packages:

[source,console]
----
# dnf update
----

=== APT

NOTE: This procedure works https://debian.org/[Debian] and
https://ubuntu.com/[Ubuntu].

Edit [.path]#`/etc/apt/sources.list.d/rackslab.sources`# to change distribution
from _slurmweb-5_ to _slurmweb-6_:

[tabs]
======
Debian 12 _« bookworm »_::
+
====
[source,diff]
----
--- a/etc/apt/sources.list.d/rackslab.sources
+++ b/etc/apt/sources.list.d/rackslab.sources
@@ -1,6 +1,6 @@
 Types: deb
 URIs: https://pkgs.rackslab.io/deb
 Suites: bookworm
-Components: main slurmweb-5
+Components: main slurmweb-6
 Architectures: amd64
 Signed-By: /usr/share/keyrings/rackslab.gpg
----
====

Debian 13 _« trixie »_::
+
====
[source,diff]
----
--- a/etc/apt/sources.list.d/rackslab.sources
+++ b/etc/apt/sources.list.d/rackslab.sources
@@ -1,6 +1,6 @@
 Types: deb
 URIs: https://pkgs.rackslab.io/deb
 Suites: trixie
-Components: main slurmweb-5
+Components: main slurmweb-6
 Architectures: amd64
 Signed-By: /usr/share/keyrings/rackslab.gpg
----
====

Debian unstable _« sid »_::
+
====
[source,diff]
----
--- a/etc/apt/sources.list.d/rackslab.sources
+++ b/etc/apt/sources.list.d/rackslab.sources
@@ -1,6 +1,6 @@
 Types: deb
 URIs: https://pkgs.rackslab.io/deb
 Suites: sid
-Components: main slurmweb-5
+Components: main slurmweb-6
 Architectures: amd64
 Signed-By: /usr/share/keyrings/rackslab.gpg
----
====

Ubuntu 24.04 LTS::
+
====
[source,diff]
----
--- a/etc/apt/sources.list.d/rackslab.sources
+++ b/etc/apt/sources.list.d/rackslab.sources
@@ -1,6 +1,6 @@
 Types: deb
 URIs: https://pkgs.rackslab.io/deb
 Suites: ubuntu24.04
-Components: main slurmweb-5
+Components: main slurmweb-6
 Architectures: amd64
 Signed-By: /usr/share/keyrings/rackslab.gpg
----
====
======

Run this command to update repositories and packages:

[source,console]
----
# apt update && apt upgrade
----

=== Zypper

This procedure works on
https://www.suse.com/products/server/[SUSE Linux Entreprise Server (SLES)] and
https://www.opensuse.org/[openSUSE LEAP].

Rename file [.path]#`/etc/zypp/repos.d/rackslab-slurmweb-5.repo`# to
[.path]#`/etc/zypp/repos.d/rackslab-slurmweb-6.repo`# and edit its content to
change repository from _slurmweb-5_ to _slurmweb-6_:

[tabs]
======
SLES 15::
+
====
[source,diff]
----
--- /etc/zypp/repos.d/rackslab-slurmweb-5.repo
+++ /etc/zypp/repos.d/rackslab-slurmweb-6.repo
@@ -1,7 +1,7 @@
-[rackslab-slurmweb-5]
+[rackslab-slurmweb-6]
 enabled=1
 autorefresh=1
-baseurl=https://pkgs.rackslab.io/rpm/suse15/slurmweb-5/x86_64
+baseurl=https://pkgs.rackslab.io/rpm/suse15/slurmweb-6/x86_64
 type=rpm-md
 gpgcheck=1
 repo_gpgcheck=0
----
====

SLES 16::
+
====
[source,diff]
----
--- /etc/zypp/repos.d/rackslab-slurmweb-5.repo
+++ /etc/zypp/repos.d/rackslab-slurmweb-6.repo
@@ -1,7 +1,7 @@
-[rackslab-slurmweb-5]
+[rackslab-slurmweb-6]
 enabled=1
 autorefresh=1
-baseurl=https://pkgs.rackslab.io/rpm/suse16/slurmweb-5/x86_64
+baseurl=https://pkgs.rackslab.io/rpm/suse16/slurmweb-6/x86_64
 type=rpm-md
 gpgcheck=1
 repo_gpgcheck=0
----
====
======

Run this command to update repositories and packages:

[source,console]
----
# zypper update
----
