Skip to content

Commit 1ea4350

Browse files
committed
docs: upgrade guide to migration v5 to v6
1 parent 56a9f6f commit 1ea4350

File tree

2 files changed

+62
-234
lines changed

2 files changed

+62
-234
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
9696
- Update references to `slurm-web-*` commands with new `slurm-web` unified
9797
command and subcommand.
9898
- Update quickstart guide with skipped unique clusters list with permission.
99+
- Update upgrade guide for migration from v5 to v6.
99100
- cli:
100101
- All `/usr/libexec/slurm-web/slurm-web-*` executables are replaced by
101102
`slurm-web` command in `$PATH` with subcommands (eg.

docs/modules/install/pages/update.adoc

Lines changed: 61 additions & 234 deletions
Original file line numberDiff line numberDiff line change
@@ -99,37 +99,25 @@ Services must be *active* and *running*.
9999
Connect to Slurm-web web interface with your browser to check it is
100100
up-and-running.
101101

102-
== Notes for Slurm-web 5
102+
== Notes for Slurm-web 6
103103

104-
To update Slurm-web from version 4 to version 5, some manual additional steps
105-
must be performed because default `slurmrestd` authentication method has been
106-
changed from _local_ to _jwt_.
104+
To update Slurm-web from version 5 to version 6, some manual additional steps
105+
must be performed.
107106

108-
NOTE: This breaking change has been introduced because Slurm 25.05 dropped
109-
support of running `slurmrestd` as _slurm_ system user, which is a requirement
110-
for using _local_ authentication in Slurm-web.
107+
To avoid impacting users with automatic upgrades, Slurm-web 6 packages are
108+
published to a separate repository. Package repositories settings must be
109+
updated to install this version.
111110

112-
It is *highly recommended* to
113-
xref:update.adoc#migrate-jwt[migrate your Slurm-web installation to _jwt_ authentication].
114-
However, documentation is also provided to
115-
xref:update.adoc#keep-local[keep using _local_ authentication]
116-
despite the recommendation.
117-
118-
To avoid impacting users with automatic upgrades, Slurm-web 5 packages have been
119-
moved to a separate repository. Packages repositories settings must be updated
120-
to install this version.
121-
122-
=== Package Repositories
123-
124-
==== DNF
111+
=== DNF
125112

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

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

134122
[tabs]
135123
======
@@ -140,16 +128,18 @@ RHEL 8::
140128
----
141129
--- a/etc/yum.repos.d/rackslab.repo
142130
+++ b/etc/yum.repos.d/rackslab.repo
143-
@@ -3,3 +3,9 @@
144-
baseurl=https://pkgs.rackslab.io/rpm/el8/main/$basearch/
131+
@@ -4,8 +4,8 @@
132+
gpgcheck=1
133+
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-Rackslab
134+
135+
-[rackslab-slurmweb-5]
136+
-name=Rackslab slurmweb-5
137+
-baseurl=https://pkgs.rackslab.io/rpm/el8/slurmweb-5/$basearch/
138+
+[rackslab-slurmweb-6]
139+
+name=Rackslab slurmweb-6
140+
+baseurl=https://pkgs.rackslab.io/rpm/el8/slurmweb-6/$basearch/
145141
gpgcheck=1
146142
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-Rackslab
147-
+
148-
+[rackslab-slurmweb-5]
149-
+name=Rackslab slurmweb-5
150-
+baseurl=https://pkgs.rackslab.io/rpm/el8/slurmweb-5/$basearch/
151-
+gpgcheck=1
152-
+gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-Rackslab
153143
----
154144
====
155145
@@ -161,15 +151,18 @@ RHEL 9::
161151
--- a/etc/yum.repos.d/rackslab.repo
162152
+++ b/etc/yum.repos.d/rackslab.repo
163153
@@ -3,3 +3,9 @@
164-
baseurl=https://pkgs.rackslab.io/rpm/el9/main/$basearch/
154+
@@ -4,8 +4,8 @@
155+
gpgcheck=1
156+
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-Rackslab
157+
158+
-[rackslab-slurmweb-5]
159+
-name=Rackslab slurmweb-5
160+
-baseurl=https://pkgs.rackslab.io/rpm/el9/slurmweb-5/$basearch/
161+
+[rackslab-slurmweb-6]
162+
+name=Rackslab slurmweb-6
163+
+baseurl=https://pkgs.rackslab.io/rpm/el9/slurmweb-6/$basearch/
165164
gpgcheck=1
166165
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-Rackslab
167-
+
168-
+[rackslab-slurmweb-5]
169-
+name=Rackslab slurmweb-5
170-
+baseurl=https://pkgs.rackslab.io/rpm/el9/slurmweb-5/$basearch/
171-
+gpgcheck=1
172-
+gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-Rackslab
173166
----
174167
====
175168
@@ -180,16 +173,19 @@ Fedora 41::
180173
----
181174
--- a/etc/yum.repos.d/rackslab.repo
182175
+++ b/etc/yum.repos.d/rackslab.repo
183-
@@ -3,3 +3,9 @@
184-
baseurl=https://pkgs.rackslab.io/rpm/fc41/main/$basearch/
176+
@@ -4,8 +4,8 @@
185177
gpgcheck=1
186178
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-Rackslab
187-
+
188-
+[rackslab-slurmweb-5]
189-
+name=Rackslab slurmweb-5
190-
+baseurl=https://pkgs.rackslab.io/rpm/fc41/slurmweb-5/$basearch/
191-
+gpgcheck=1
192-
+gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-Rackslab
179+
180+
-[rackslab-slurmweb-5]
181+
-name=Rackslab slurmweb-5
182+
-baseurl=https://pkgs.rackslab.io/rpm/fc41/slurmweb-5/$basearch/
183+
+[rackslab-slurmweb-6]
184+
+name=Rackslab slurmweb-6
185+
+baseurl=https://pkgs.rackslab.io/rpm/fc41/slurmweb-6/$basearch/
186+
gpgcheck=1
187+
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-Rackslab
188+
193189
----
194190
====
195191
@@ -198,18 +194,18 @@ Fedora 42::
198194
====
199195
[source,diff]
200196
----
201-
--- a/etc/yum.repos.d/rackslab.repo
202-
+++ b/etc/yum.repos.d/rackslab.repo
203-
@@ -3,3 +3,9 @@
204-
baseurl=https://pkgs.rackslab.io/rpm/fc42/main/$basearch/
197+
@@ -4,8 +4,8 @@
198+
gpgcheck=1
199+
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-Rackslab
200+
201+
-[rackslab-slurmweb-5]
202+
-name=Rackslab slurmweb-5
203+
-baseurl=https://pkgs.rackslab.io/rpm/fc42/slurmweb-5/$basearch/
204+
+[rackslab-slurmweb-6]
205+
+name=Rackslab slurmweb-6
206+
+baseurl=https://pkgs.rackslab.io/rpm/fc42/slurmweb-6/$basearch/
205207
gpgcheck=1
206208
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-Rackslab
207-
+
208-
+[rackslab-slurmweb-5]
209-
+name=Rackslab slurmweb-5
210-
+baseurl=https://pkgs.rackslab.io/rpm/fc42/slurmweb-5/$basearch/
211-
+gpgcheck=1
212-
+gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-Rackslab
213209
----
214210
====
215211
======
@@ -221,12 +217,13 @@ Run this command to update repositories and packages:
221217
# dnf update
222218
----
223219

224-
==== APT
220+
=== APT
225221

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

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

231228
[tabs]
232229
======
@@ -241,8 +238,8 @@ Debian 12 _« bookworm »_::
241238
Types: deb
242239
URIs: https://pkgs.rackslab.io/deb
243240
Suites: bookworm
244-
-Components: main
245-
+Components: main slurmweb-5
241+
-Components: main slurmweb-5
242+
+Components: main slurmweb-6
246243
Architectures: amd64
247244
Signed-By: /usr/share/keyrings/rackslab.gpg
248245
----
@@ -259,8 +256,8 @@ Debian 13 _« trixie »_::
259256
Types: deb
260257
URIs: https://pkgs.rackslab.io/deb
261258
Suites: trixie
262-
-Components: main
263-
+Components: main slurmweb-5
259+
-Components: main slurmweb-5
260+
+Components: main slurmweb-6
264261
Architectures: amd64
265262
Signed-By: /usr/share/keyrings/rackslab.gpg
266263
----
@@ -277,8 +274,8 @@ Debian unstable _« sid »_::
277274
Types: deb
278275
URIs: https://pkgs.rackslab.io/deb
279276
Suites: sid
280-
-Components: main
281-
+Components: main slurmweb-5
277+
-Components: main slurmweb-5
278+
+Components: main slurmweb-6
282279
Architectures: amd64
283280
Signed-By: /usr/share/keyrings/rackslab.gpg
284281
----
@@ -295,8 +292,8 @@ Ubuntu 24.04 LTS::
295292
Types: deb
296293
URIs: https://pkgs.rackslab.io/deb
297294
Suites: ubuntu24.04
298-
-Components: main
299-
+Components: main slurmweb-5
295+
-Components: main slurmweb-5
296+
+Components: main slurmweb-6
300297
Architectures: amd64
301298
Signed-By: /usr/share/keyrings/rackslab.gpg
302299
----
@@ -309,173 +306,3 @@ Run this command to update repositories and packages:
309306
----
310307
# apt update && apt upgrade
311308
----
312-
313-
=== Already using JWT?
314-
315-
You were already using slurmrest JWT authentication with Slurm-web 4? Then you
316-
can do some cleanup in your configuration.
317-
318-
You can edit [.path]#`/etc/slurm-web/agent.ini`# to remove `[slurmrestd]` >
319-
`auth` setting as _jwt_ is the new default value:
320-
321-
[source,diff]
322-
----
323-
--- a/etc/slurm-web/agent.ini
324-
+++ b/etc/slurm-web/agent.ini
325-
@@ -3,5 +3,2 @@
326-
327-
-[slurmrestd]
328-
-auth=jwt
329-
-
330-
[cache]
331-
----
332-
333-
If you are using Slurm-web default native service, you can also remove the
334-
override that was used to force running the agent as _slurm_ system user:
335-
336-
[source,console]
337-
----
338-
# rm /etc/systemd/system/slurm-web-agent.service.d/override.conf
339-
----
340-
341-
New system service file [.path]#`/lib/systemd/system/slurm-web-agent.service`#
342-
can be used without override.
343-
344-
[#migrate-jwt]
345-
=== Migrate to JWT authentication
346-
347-
==== Setup Slurm JWT
348-
349-
include::conf:partial$slurm-jwt.adoc[]
350-
351-
==== Setup `slurmrestd`
352-
353-
Edit [.path]#`/etc/systemd/system/slurmrestd.service.d/slurm-web.conf`# with
354-
these settings:
355-
356-
[source,ini]
357-
----
358-
[Service]
359-
# Unset vendor unit ExecStart and Environment to avoid cumulative definition
360-
ExecStart=
361-
Environment=
362-
Environment="SLURM_JWT=daemon"
363-
ExecStart=/usr/sbin/slurmrestd $SLURMRESTD_OPTIONS -a rest_auth/jwt unix:/run/slurmrestd/slurmrestd.socket
364-
RuntimeDirectory=slurmrestd
365-
RuntimeDirectoryMode=0755
366-
User=slurmrestd
367-
Group=slurmrestd
368-
DynamicUser=yes
369-
----
370-
371-
NOTE: With this configuration, `slurmrestd` listens for incoming connections on
372-
Unix socket with _jwt_ authentication method. It is also possible to configure
373-
`slurmrestd` to listen on TCP/IP socket. Please refer to
374-
xref:conf:slurmrestd.adoc[`slurmrestd` configuration page] for more details.
375-
376-
Make `systemd` reload units changes on disk:
377-
378-
[source,console]
379-
----
380-
# systemctl daemon-reload
381-
----
382-
383-
Enable and start `slurmrestd` service:
384-
385-
[source,console]
386-
----
387-
# systemctl restart slurmrestd.service
388-
----
389-
390-
To check `slurmrestd` daemon is properly running with JWT authentication, run
391-
this command:
392-
393-
[source,console,subs=attributes]
394-
----
395-
# export $(scontrol token)
396-
# curl -H X-SLURM-USER-TOKEN:$SLURM_JWT --unix-socket /run/slurmrestd/slurmrestd.socket http://slurm/slurm/v{api_version}/diag
397-
{
398-
"meta": {
399-
"plugin": {
400-
"type": "openapi\/slurmctld",
401-
"name": "Slurm OpenAPI slurmctld",
402-
"data_parser": "data_parser\/v{api_version}",
403-
"accounting_storage": "accounting_storage\/slurmdbd"
404-
},
405-
}
406-
407-
}
408-
----
409-
410-
==== Slurm JWT signing key
411-
412-
For Slurm-web authentication to `slurmrestd`, copy Slurm JWT signing key:
413-
414-
[source,console]
415-
----
416-
# cp /var/spool/slurm/jwt_hs256.key /var/lib/slurm-web/slurmrestd.key
417-
----
418-
419-
Restrict access to this sensitive file with read permission to _slurm-web_
420-
system user only:
421-
422-
[source,console]
423-
----
424-
# chown slurm-web:slurm-web /var/lib/slurm-web/slurmrestd.key
425-
# chmod 400 /var/lib/slurm-web/slurmrestd.key
426-
----
427-
428-
NOTE: With this configuration, Slurm-web agent automatically generates its
429-
tokens with short lifespan for authentication to `slurmrestd`. As an
430-
alternative, Slurm-web supports _static_ tokens. Please refer to
431-
xref:conf:slurmrestd.adoc[`slurmrestd` configuration page] for more details.
432-
433-
To test Slurm-web agent and `slurmrestd` service configuration parameters, you
434-
can run xref:usage:manpages/slurm-web-connect-check.adoc[`slurm-web connect-check`]
435-
utility. It tries to send HTTP request to `slurmrestd` with Slurm-web agent
436-
configuration parameters and reports the status. For example:
437-
438-
[source,console]
439-
----
440-
# slurm-web connect-check
441-
✅ connection successful! (cluster: hpc, slurm: 25.11.0, api: 0.0.44)
442-
----
443-
444-
==== Agent uWSGI service
445-
446-
If you are using Slurm-web with
447-
xref:conf:wsgi/index.adoc[production HTTP servers], update uWSGI agent service
448-
file:
449-
450-
[source,console]
451-
----
452-
# cp -v /usr/share/slurm-web/wsgi/agent/slurm-web-agent-uwsgi.service /etc/systemd/system/
453-
----
454-
455-
Reload systemd services:
456-
457-
[source,console]
458-
----
459-
# systemctl daemon-reload
460-
----
461-
462-
Restart the service to apply changes:
463-
464-
[source,console]
465-
----
466-
# systemctl restart slurm-web-agent-uwsgi.service
467-
----
468-
469-
[#keep-local]
470-
=== Keep using local authentication
471-
472-
You want to keep using `slurmrestd` local authentication despite the
473-
recommendation?
474-
475-
include::conf:partial$agent-local.adoc[]
476-
477-
include::conf:partial$agent-privileged.adoc[]
478-
479-
include::conf:partial$slurmrestd-test.adoc[]
480-
481-
include::conf:partial$agent-restart.adoc[]

0 commit comments

Comments
 (0)