jupyterhub / systemdspawner

Spawn JupyterHub single-user notebook servers with systemd
BSD 3-Clause "New" or "Revised" License
92 stars 45 forks source link

Add simple slice support to systemd spawner #49

Closed mariusvniekerk closed 5 years ago

mariusvniekerk commented 5 years ago

Let jupyterhub to configured to spawn users into a given predefined slice.

This allows an administrator of a jupyerhub instance to limit memory/cpu usage as well as constrain access to devices etc for all users collectively under a given spawner.

Quite useful for example to limit all of jupyterhub to 1GB less than the total system memory for example

yuvipanda commented 5 years ago

This is great, @mariusvniekerk! I like it.

Can you add a test and docs (in the README)?

mariusvniekerk commented 5 years ago

@yuvipanda do we have a test ci set up for this somewhere?

yuvipanda commented 5 years ago

Unfortunately there's no CI yet - at the time, there was no OSS CI setups available that had systemd on them (this has changed since). Would love someone setting up CI! <3

I ran the tests locally and it worked fine. Thank you so much for the PR! Hopefully will see more ;)

Thanks for the review, @RohitK89!