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
yuvipanda
4c7cd6a4b5
Use gpasswd instead of usermod
...
usermod also calls checkfn, which freaks out when root
password has expired. gpasswd does exactly what we want and
nothing more.
2018-07-03 17:34:57 -07:00
yuvipanda
cb26150820
Use useradd rather than adduser to create users
...
Better suited for scripting use. adduser also seemed to
cause issues when root user's password had expired, so let's see
if useradd fixes that!
2018-07-03 17:20:41 -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
154cc00a31
Add --admin params to bootstrap / installer to set up admin accts
...
This removes a big step requiring file changes from the quickstart
path. You can specify the admin username on the commandline.
2018-07-03 16:18:32 -07:00
yuvipanda
2b20a0b766
Make firstuseauthenticator the default
...
Fixes #14
2018-07-03 11:54:42 -07:00
yuvipanda
715860707b
Rewrite bootstrapper in Python
...
- This was going to get too complex for bash. Only way to
kill those scripts is before they get too complex.
- Better progress messages from bootstrapper.
- Differentiate between bootstrapper & installer
- Cleanup documentation a little bit
2018-07-02 15:12:26 -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
570802ba74
Simplify template used for generating systemd unit names
2018-06-29 01:24:30 -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
82e7fa6cdc
Add nteract to base install too
...
- This gives us two alternative notebook frontends
- Also install as many things from pip as possible, to keep
consistency in the user environment
2018-06-29 00:27:00 -07:00
yuvipanda
2cb286c6f1
Set default shell to bash explicitly
...
sh was being used otherwise
2018-06-28 01:33:28 -07:00
yuvipanda
3e78ea9040
Add trailing newline to sudoers file
...
Required by sudo's config syntax
2018-06-28 01:30:14 -07:00
yuvipanda
3f0c8942cc
Preserve PATH when using sudo -E
...
jupyterhub admins should be able to run `sudo -E pip install numpy`
and install numpy into the user environment. However, since pip
is in the PATH we explicitly set in jupyterhub_config.py and
sudo doesn't preserve PATH, this won't work.
We exempt jupyterhub-admins groups from the PATH restriction,
so sudo -E works. This has some security costs, but we are already
allowing passwordless roots for them with unrestricted paths...
2018-06-28 01:22:27 -07:00
yuvipanda
dd53176889
Start JupyterHub / CHP when system starts
2018-06-28 00:49:36 -07:00
yuvipanda
8401012ab6
Start / Restart JupyterHub / CHP as required
2018-06-28 00:06:11 -07:00
yuvipanda
893c54b79e
Mark systemd dependencies between chp / jupyterhub
...
- Requires= makes success of CHP a hard dependency for JupyterHub
- After= waits for CHP to start before jupyterhub starts
- Start CHP after networking is ready (properly)
2018-06-28 00:04:46 -07:00
yuvipanda
582ef74a61
Restart JupyterHub after each install
...
Restarting JupyterHub should be non-disruptive, and helps
make the config changes come true ASAP.
2018-06-27 18:07:59 -07:00
yuvipanda
8a19b02864
Install conda & jupyterlab explicitly
...
conda was not installed in the user environment explicitly,
so users can't install conda packages themselves.
Also install JupyterLab while we're at it :)
2018-06-27 18:05:20 -07:00
yuvipanda
1a4cf5673b
Use high ports for CHP API + JupyterHub
...
This makes it easier to test this distro out on machines
with JupyterHub running already
2018-06-27 17:38:42 -07:00
yuvipanda
47ef27af96
Read yaml config from config.yaml, not jupyterhub.yaml
...
Consistent with z2jh's nomenclature of config.yaml
2018-06-27 16:04:35 -07:00
yuvipanda
bfd2a8bca3
Store hub state inside install_prefix
...
rm -rf'ing the prefix should get rid of almost everything
2018-06-27 14:21:08 -07:00
yuvipanda
cd38386d25
Set PATH properly when starting configurable-http-proxy
2018-06-27 03:24:28 -07:00
yuvipanda
c1fcf414d5
Handle config.yaml file missing
2018-06-27 03:20:02 -07:00
yuvipanda
12698a20ed
Move all config files inside INSTALL_PREFIX
...
Makes cleanup easier!
2018-06-27 03:17:01 -07:00
yuvipanda
de7fda47db
Install conda packages from conda-forge explicitly
...
I don't think the default channel fields in construct.yaml are
working.
2018-06-27 03:05:24 -07:00
yuvipanda
f03e093b90
Explicitly tell JupyterHub it is running on port 80
...
Because it is!
2018-06-27 02:27:37 -07:00
yuvipanda
ac7bd88105
Hide stdout from pip installs
2018-06-27 02:14:20 -07:00
yuvipanda
aa522faf7f
Don't use tee to write service unit files
...
We are running as root now directly, no need to tee
2018-06-27 02:10:26 -07:00
yuvipanda
e957fc3bf0
Don't use sudo for everything
...
We are running as root, and will rely on dropping privs via
systemd rather than sudo
2018-06-27 02:07:49 -07:00
yuvipanda
cf4bd7e36e
Separate jupyterhub & chp services
...
Allows restarting hub for config changes without disrupting user
service!
2018-06-27 02:03:08 -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
yuvipanda
4bfc04c225
Add escapism as a package dependency
2018-06-27 00:35:17 -07:00