anyushevai
12aaf382aa
early check if it was called as non-root user
2018-10-23 23:45:33 +03:00
anyushevai
35309d13d0
add warning & abort if tljh-config is called as non-root user
2018-10-21 23:55:47 +03: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
yuvipanda
4a3762d38d
Pass in truncated username to systemdspawner
2018-09-14 12:38:13 -07:00
yuvipanda
9b0248e0c3
Normalize unix usernames to be under 32char
...
JupyterHub usernames do not have this restriction,
causing user creation to fail when usernames are too large.
2018-09-12 16:46:59 -07:00
Yuvi Panda
4eeebc991f
Merge pull request #163 from minrk/config-dir
...
put config in `$tljh/config` directory
2018-09-04 18:04:57 -07:00
yuvipanda
103d4c7933
Bump firstuseauthenticator version
...
Includes https://github.com/yuvipanda/jupyterhub-firstuseauthenticator/pull/7
to fix #105 .
2018-09-04 11:23:09 -07:00
Min RK
5df106fa82
move config migration to its own file
2018-08-31 12:17:16 +02:00
Min RK
37ad207be9
centralize logging initialization
...
so it can be shared across modules
2018-08-31 12:00:42 +02:00
Matthias Bussonnier
552db9f74d
Don't create home publicly readable
...
World-Readable seem to be a surprising default for many people,
especially in teaching context. Switch to a more reasonable rwxr-x---
We have to issue a chmod, as changing at creation time would require
changin /etc/adduser.conf DIR_MODE=0760 (or whatever), but that seem
unwise.
We do not set the exact permission in case the DIR_MODE is more
restrictive.
Closing #158
2018-08-29 14:38:38 -07:00
Yuvi Panda
91b405dee2
Merge pull request #160 from minrk/bumps
...
jupyterhub 0.9.2
2018-08-29 08:41:21 -07:00
Min RK
6e27622f76
set cleanup_servers = False
...
leaves users running when the hub restarts
Tests were relying on a bug in 0.9.1 that prevented cleanup due to improper handling of signals
2018-08-29 16:46:04 +02:00
Min RK
204442d370
fix config.yaml path in jupyterhub_config.py
2018-08-29 16:02:41 +02:00
gyg-github
67243efc60
update installer.py
...
removed formatting symbol f'', since "....x" is considered as a type in the formatting.
actual directory is just "https://github.com/nodesource/distributions/blob/master/deb/setup_8.x "
2018-08-28 21:38:39 -04:00
Min RK
4b79993ea0
test config dir setup
...
including upgrading old config files
2018-08-28 14:16:09 +02:00
Min RK
2bf23f0b28
put config in a single config directory
...
instead of top-level files
- ensure directory is private
- both tljh and jupyterhub config go in there
- move old config.yaml to new location at install time
2018-08-28 14:15:45 +02:00
Min RK
bd2934b73b
jupyterhub 0.9.2
...
fixes TERM shutdown
2018-08-28 12:09:53 +02:00
Matthias Bussonnier
8650aacd57
Fix some typos
...
Using `codespell -q3 -w` that I just discovered.
(https://github.com/codespell-project/codespell , pip install codespell)
2018-08-27 17:58:26 -07:00
yuvipanda
d7e8d64572
Upgrade to latest version of JupyterLab
2018-08-23 07:06:52 -04:00
yuvipanda
7c1cb6d3cb
Don't capture stderr when calling conda
...
conda's stderr is *not* guaranteed to be JSON when you are
passing --json. We let it bleed through for now. In the
longer term, we should capture this separately.
Ref #148 , which I think is caused by this (along with conda
releasing a newer version than what we have)
2018-08-20 14:40:00 -07:00
yuvipanda
8f966ce8c9
Install jupyterhub extension for jupyterlab
2018-08-13 15:36:20 -06:00
yuvipanda
7539c5d946
Use node 8, not 10
...
JupyterLab currently doesn't let you install extensions
with node 10, so move back to 8
2018-08-13 14:17:41 -06:00
yuvipanda
28af89a381
Move tljh-config symlink to /usr/bin
...
Removes a lot of 'sudo -E' usage, and eventually should
let us get rid of the $PATH override for jupyterhub-admins,
which arguably is less secure than just dropping stuff into
/usr/bin
Also remove sudo -E from apt and mkdir calls. Not necessary.
2018-08-12 22:05:18 -07:00
yuvipanda
841c25e1bd
Add plugin hook to modify config.yaml post install
2018-08-12 09:30:37 -07:00
yuvipanda
d12345e72a
Add plugin support to the installer
...
TLJH is a great base to build 'stacks' on top of
for various use cases. These 'stacks' should be built by
people who are domain experts in their fields, and easily
updateable with new TLJH versions. Extension points need
to be very clearly defined & evolvable, so we can modify
TLJH without fear of breaking everything.
[pluggy](https://pluggy.readthedocs.io/ ) is the plugin
mechanism for pytest spun out into its own library,
and fits our requirements well.
There is an experimental pangeo stack in progress at
https://github.com/yuvipanda/tljh-pangeo for an example
of how this would work
2018-08-12 09:30:37 -07:00
Chris Holdgraf
f8526c1a2f
fixing copybutton and maybe the integration bug
2018-08-10 17:26:35 -07:00
yuvipanda
1f4acfead3
Install gcc by default
...
Required by psutil, which is required by nbresuse
2018-08-04 09:58:28 -07:00
yuvipanda
37b3778264
Install nbresuse by default
...
Extremely useful to see how much RAM you are using right now
2018-08-03 15:09:38 -07:00
Yuvi Panda
be01336b95
Merge pull request #96 from minrk/test-https
...
unittests for traefik
2018-08-03 10:54:46 -07:00
Min RK
51299e619b
unittests for traefik
2018-08-03 16:09:25 +02:00
yuvipanda
edfbbd8ae9
Use jupyterhub_config.d rather than config.d for overrides
...
Makes it clearer that these are jupyterhub_config.py snippets
rather than config.yaml snippets
2018-08-02 10:59:26 -07:00
yuvipanda
3124cf1f80
Load arbitrary .py config files from a conf.d dir
...
We want to keep the amount of custom code we support extremely
small. This provides a nice escape hatch for everything else.
2018-08-02 10:59:26 -07:00
yuvipanda
6e29dd5db9
Error out if there's a tljh-config that isn't ours in PATH
2018-08-01 18:53:50 -07:00
yuvipanda
6394652025
Fix ensure_symlinks to use method that actually exists
2018-07-31 13:23:43 -07:00
yuvipanda
a6373200ec
Symlink tljh-config to /usr/local/bin
...
This lets `sudo -E` work when calling tljh-config. It currently
does not, since we do not add the hub venv to PATH
2018-07-31 13:16:57 -07:00
Min RK
a4427068cc
tests and fixes in tljh-config
...
- add remove-item to cli
- fix setting non-string values (int, bool, float)
- show help when no action is given
- test coverage for cli
2018-07-31 13:25:30 +02:00
Min RK
c6654aea08
avoid circular imports
2018-07-31 12:05:47 +02:00
Min RK
2760e1adcd
consolidate paths in config.py
2018-07-31 12:04:40 +02:00
yuvipanda
75ffa91c85
Fix traefik config reload
...
Simply reloading traefik is not enough - we need to actually
write the new traefik.toml file.
2018-07-30 23:59:33 -07:00
Min RK
ad3b08abd8
traefik: only log errors and redact headers
2018-07-30 15:45:37 +02:00
Min RK
8e75a44502
grant traefik write access to state/acme.json
...
and ensure the file exists and is private before launching
2018-07-30 15:26:09 +02:00
Min RK
7f07bfbec4
reload traefik on tljh-config reload proxy
2018-07-30 15:04:37 +02:00
Min RK
581b4969f5
traefik can give 502 while starting up
2018-07-30 14:33:02 +02:00
Min RK
fcdce11cae
ensure state dir exists before putting files in it
2018-07-30 14:04:36 +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
44df8906cb
Create /opt/tljh if it does not exist in installer
...
This helps when you are just running the installer,
without the bootstrap
2018-07-29 02:19:30 -07:00
yuvipanda
414d3932ac
Log bootstrap / installer messages to file as well
...
This enables debugging when a server does not come up as
expected.
Fixes #22
2018-07-29 02:17:12 -07:00
yuvipanda
7e9e2d375c
Add tljh-config remove-item to remove an item from a list
2018-07-28 11:57:11 -07:00
yuvipanda
f0c944aeb8
Add code + tests for adding items to a list
2018-07-28 11:14:53 -07:00