Commit Graph

242 Commits

Author SHA1 Message Date
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
yuvipanda
0d0dbc828c Fix typo in tljh-config 2018-07-27 22:57:19 -07:00
yuvipanda
70785f9fd3 Add tljh-config command
We do not want users to hand-edit YAML files. This has been a
major source of bugs and confusion for users in z2jh. Doing so
in a terminal text editor makes it even worse.

This lets users type commands directly to modify config.yaml file
rather than edit files directly. This makes it a lot less error
prone and user friendly.

Advanced users can still edit config.yaml manually.

Fixes #38
2018-07-27 21:36:29 -07:00
yuvipanda
e97b81fe7a Require miniconda to be installed for conda. to work
We can no longer assume that sys.executable has conda
installed. Instead, we require that prefix has conda installed.
This requires miniconda to be installed into prefix.
2018-07-20 11:30:11 -07:00
yuvipanda
8ff0befe00 Re-instate conda version check fix
Lost https://github.com/jupyterhub/the-littlest-jupyterhub/pull/58
to a rebase. Put it back!
2018-07-20 11:12:03 -07:00
yuvipanda
6a1f73c2b5 Run apt-get update before installing if required 2018-07-19 18:51:55 -07:00
yuvipanda
e609a840c7 Install gpg2 if required when adding apt keys
Not installed by default in many docker containers
2018-07-19 18:38:58 -07:00
yuvipanda
fc0ecb6699 Use venv for base hub environment
- TLJH should support raspberry pi, which runs ARM. conda does
  not support ARM.
- Get nodejs from nodesource instead of conda or default repositories.
  Default repositories get out of date pretty quickly.
- Install CHP from npm
2018-07-19 18:01:30 -07:00
Bastian Greshake Tzovaras
1364305fee fix typo in installer 2018-07-19 16:04:16 -07:00
Yuvi Panda
27f9d10724 Merge pull request #59 from minrk/state-outside
move state outside envs
2018-07-19 10:33:24 -07:00
Min RK
1799732e50 jupyterhub 0.9.1, notebook 5.6.0 2018-07-19 01:42:21 -07:00
Min RK
bcf31a979c fix permissions on initial install
running installer as root allows some file ownership from the archive to be set as a user other than root
2018-07-19 01:30:04 -07:00
Min RK
00797b404c move state outside envs
so it can be managed separately more easily
2018-07-18 23:15:47 -07:00
Min RK
24b535d524 move proxy secret to state dir 2018-07-18 23:12:18 -07:00
yuvipanda
d1bb4c8a1d Install nbgitpuller by default 2018-07-18 15:48:40 -07:00
yuvipanda
3d74ee71b3 Add option to install requirements.txt file on install
Also add docs about --admin option

Refer #49
2018-07-18 01:01:37 -07:00
yuvipanda
0385f8e5f7 Add LDAP & OAuthenticator to initial install 2018-07-16 16:19:16 -07: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
3b6a964a4d Install all python packages in hub environment with pip 2018-07-16 01:28:18 -07:00
Romain Primet
61a7f80df2 handle 404 and 503 transient errors 2018-07-13 14:56:00 +00:00
Romain Primet
c24b536bd9 handle 503 as well 2018-07-13 16:29:30 +02:00
Romain Primet
baef6d0bd9 handle transient 404 2018-07-13 15:55:41 +02:00
Romain Primet
7c245d0868 remove hard-coded constant from retry loop 2018-07-13 15:36:44 +02:00
yuvipanda
e4a059a81a Bump systemdspawner version 2018-07-12 16:56:20 -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
6d3efffcb5 Upgrade systemdspawner to v0.10 2018-07-11 14:29:24 -07:00
yuvipanda
76ddc5b047 Bump version of conda installed in user environment 2018-07-11 13:07:45 -07:00
yuvipanda
6e6ecdb26b Fix checking for JupyterHub service being up
Would always fail before, since we never returned on
success
2018-07-11 13:01:57 -07:00
yuvipanda
54ebfbce23 Check JupyterHub is running before finishing installer
Integration CI failures were probably caused by us testing
too soon. This should make that less likely
2018-07-11 12:56:52 -07:00
yuvipanda
35d892a26e Don't handle merging lists
Doesn't work clearly
2018-07-10 11:45:07 -07:00
yuvipanda
49ea4665c6 Explicitly create user home directory when creating user 2018-07-03 17:51:32 -07:00