Commit Graph

43 Commits

Author SHA1 Message Date
Erik Sundell
e0aaa4f995 pre-commit: run black with string normalization 2021-11-03 23:55:34 +01:00
Erik Sundell
771ae59636 pre-commit: run black without string normalization 2021-11-03 23:53:41 +01:00
Erik Sundell
c2c4d708f5 pyupgrade fixes 2021-10-31 11:26:40 +01:00
Min RK
d3412a1c81 remove addressed FIXMEs in update_auth
These are both addressed by the use of traitlets.config

- an informative error is raised if the auth class cannot be imported
- only configurable traits can be set, not any attribute on any object

also fix a couple of typos in the docstring that I introduced during review
2021-10-27 09:12:24 +02:00
Min RK
0cd6b2a8b0 raise on ignored config in auth
Co-authored-by: Erik Sundell <erik.i.sundell@gmail.com>
2021-10-27 08:46:46 +02:00
Erik Sundell
efb8ee0ffc Add back FIXME notes unchanged 2021-10-27 01:53:55 +02:00
Erik Sundell
a32ec5ee04 Apply suggestions from code review
Co-authored-by: Min RK <benjaminrk@gmail.com>
2021-10-27 01:53:55 +02:00
Erik Sundell
5c8e5678ac Apply TLJH auth config with less assumptions 2021-10-27 01:53:55 +02:00
GeorgianaElena
3ff80378c9 Make configurator disabled by default 2021-04-05 21:43:10 +03:00
GeorgianaElena
32e0f99c3c Add the jupyterhub-configurator service 2021-04-05 21:43:10 +03:00
Jean-Marc Alkazzi
66cd578d75 Adding update_base_url from tljh config 2020-11-04 14:32:48 +02:00
YuviPanda
474005cbd1 Use idle culler from jupyterhub-idle-culler package
The idle culler lives as a script in at least 3 different
places:

- In the JupyterHub repo, as an 'example'
  d126baa443/examples/cull-idle
- In the TLJH repo, as a core part of the service
  01ba34857d/tljh/cull_idle_servers.py.
  This is an import from a specific version of the JupyterHub repo,
  and has had a couple of changes made to it since.
- In the z2jh repo, as a core part of the service
  c3f3be25f8/jupyterhub/files/hub/cull_idle_servers.py
  This is also an import from a specific version of the JupyterHub
  repo, but has had a lot more work done on it. Most had been sync'd
  back the JupyterHub repo, but some had not been. See
  9c15a42b12/images/hub/cull_idle_servers.py
  and https://github.com/jupyterhub/zero-to-jupyterhub-k8s/commits/master/jupyterhub/files/hub/cull_idle_servers.py

The idle culler is a core integral part of every JupyterHub deployment
these days. It would be great if it was maintained separately on
its own, without being split across multiple repos.

The latest changes had been to the version in the JupyterHub repo, so I
copied it (while preserving commit history, because credit is important)
to a new repository: https://github.com/yuvipanda/jupyterhub-idle-culler

I looked through z2jh and tljh copies, and cherry-picked the following
changes manually

ae80fb5163
836f19a4c7
a0787c64f1
b230ef8156
20374db7c6 (diff-f00cd100e9f673285208aaa6fc0c3212)

There were a few from 9c15a42b12/images/hub/cull_idle_servers.py
I could not apply, but mostly because those features had been
re-implemented already.

Right now, the package is a direct port of the code we had. Once
this settles in, I am hopefull we can iterate faster and make cool
new changes.
2020-05-03 16:00:07 +05:30
Min RK
7d30501fc5 Merge pull request #382 from GeorgianaElena/issue349
Allow adding users to specific groups
2019-07-12 09:38:21 +02:00
GeorgianaElena
be388ab68a Run idle culler as a tljh module 2019-06-24 13:34:51 +03:00
GeorgianaElena
88a09285d2 Renamed group config option 2019-06-21 11:38:26 +03:00
GeorgianaElena
da443ebd4b Allow adding users to specific groups 2019-06-20 21:54:51 +03:00
GeorgianaElena
20374db7c6 Enforce the type of idle culler options 2019-06-12 17:05:13 +03:00
GeorgianaElena
0b18b49cbc Fix services init 2019-06-12 17:05:13 +03:00
GeorgianaElena
efe9853b85 Added Idle Culler 2019-06-12 17:05:13 +03:00
yuvipanda
f4831f051f Use c.Spawner to set mem_limit & cpu_limit
mem_limit & cpu_limit are traitlets on the parent
Spawner class. Setting these here allows plugins to
do the dangerous job of swapping the SystemdSpawner
out for something else
2019-05-18 14:39:34 -07:00
Min RK
7c9bea377f add load_secrets as an explicit stage
during load_config

rather than applying directly to defaults, which should be left static
2019-02-22 11:41:50 +01:00
Min RK
23ea539b28 move generating traefik basic auth to traefik.py
compute this when we write the template, not when we load config
2019-02-22 10:53:36 +01:00
GeorgianaElena
e8b303d01b Generate random traefik api password 2019-02-13 14:23:02 +02:00
GeorgianaElena
3ee387cd3b Fixed some issues 2019-02-13 14:23:02 +02:00
Min RK
13648050ae single yaml implementation
consolidate to a single yaml implementation,
removing pyyaml
2019-02-11 13:29:01 +01:00
yuvipanda
0812b1c5d1 Don't set a memory limit by default
Users should set up their own memory limits after install.
Better than a surprise when they try using more than 1G.
2018-10-15 15:53:39 +02:00
Min RK
2760e1adcd consolidate paths in config.py 2018-07-31 12:04:40 +02:00
Min RK
000ac05e14 Add traefik in front of CHP
introduces configuration for manual tls and letsencrypt
2018-07-30 14:04:35 +02:00
Min RK
2cb7d10ac7 add load_config top-level function to configurer
for easy loading of the full config
2018-07-30 14:01:43 +02:00
yuvipanda
cc5622995d Do not special case *any* authenticator
No two ways to set authenticator options - just one way.
It's slightly 'ugly' because of the mixing of camel case &
snake case, but is worth the massive reductions in complexity!
2018-07-16 16:05:44 -07:00
yuvipanda
2c7f99b57c Support arbitrary authenticators
- Removes all need for special casing authenticators.
- Install them in hub environment, directly start using them.
- Consider if we should special case any *at all*
2018-07-16 12:03:45 -07:00
yuvipanda
66de7bb038 Make authenticator class assigning code more generic 2018-07-16 01:39:59 -07:00
yuvipanda
9bf4a64826 Dynamically set authenticator properties from YAML
We don't wanna explicitly map keys from the YAML to traitlet
config for the authentication - that's a lot of busywork for no
gain. We instead switch to using snake_case everywhere, and
dynamically set traitlet config from YAML config!
2018-07-16 01:39:59 -07:00
yuvipanda
9e1bf84647 Prefix user accounts we create
- Helps protect against users named 'root'
- Makes it clearer that you should not rely on these users
  for general PAM work, because they are prefixed.

Fixes #9
2018-07-12 13:33:24 -07:00
yuvipanda
c749d1a09f Fix dictionary merging order
We want to override defaults with config, not the other way around
2018-07-11 18:58:11 -07:00
yuvipanda
35d892a26e Don't handle merging lists
Doesn't work clearly
2018-07-10 11:45:07 -07:00
yuvipanda
d7ddbf2a32 Disable user creation by default
With firstuseauthenticator, users need to be manually created
in the admin console before they can log in. This makes for a
far more secure default experience.
2018-07-03 16:28:20 -07:00
yuvipanda
2b20a0b766 Make firstuseauthenticator the default
Fixes #14
2018-07-03 11:54:42 -07:00
yuvipanda
aab0f8e036 Temporary fix for mergeing dictionary bug
This was not working with admin users
2018-07-01 11:54:26 -07:00
yuvipanda
78c9be32ab Allow configuring default notebook interface from config.yaml
Also fix bug in how overrides were being done in config.yaml
2018-06-29 00:47:08 -07:00
yuvipanda
c1fcf414d5 Handle config.yaml file missing 2018-06-27 03:20:02 -07:00
yuvipanda
6fcc5cd357 Support user resource limits
Set default limit to 1G. Possibly controversial!
2018-06-27 01:30:34 -07:00
yuvipanda
459b985a19 Load user lists & auth config from a YAML file
- Load config only once at startup.
  A lot of jupyterhub config (like user lists) take effect only at
  startup, so live reload is not super useful. It will make the
  software more complex, so let's not do it.
- Add pyyaml as a dependency of tljh.
- Remove escapism dependency since it is not actually used
2018-06-27 01:19:10 -07:00