Commit Graph

100 Commits

Author SHA1 Message Date
GeorgianaElena
2bc44e672b pin conda version in tests 2019-08-26 15:13:19 +03:00
Yuvi Panda
f952e4e590 Merge pull request #399 from GeorgianaElena/add_append_to_arg
Allow adding multiple admins during install
2019-07-15 09:24:46 -07:00
GeorgianaElena
55e9aa2c29 Test multiple admins on install 2019-07-15 12:02:18 +03:00
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
a6dee394aa Fixed test 2019-06-12 17:32:33 +03:00
GeorgianaElena
5ec046716a More idle culler tests 2019-06-12 17:05:13 +03:00
yuvipanda
f5ecce77a1 Add unit tests for run_subprocess 2019-05-29 11:27:53 -07:00
GeorgianaElena
bc9aa45b49 Add unset property option 2019-05-28 16:13:42 +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
407dc3abd4 Merge branch 'master' into replace_chp_traefik 2019-02-22 12:33:55 +01: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
af36ee73e4 no longer need to mock out generate_traefik_api_credentials 2019-02-22 11:39:40 +01:00
Leticia Portella
d41347f933 Add NativeAuth as an optional authenticator 2019-02-20 20:16:12 +00:00
GeorgianaElena
84d8000114 Removed chp service 2019-02-18 15:08:53 +02:00
GeorgianaElena
ffa635dda3 Fixed tests 2019-02-13 14:59:57 +02:00
GeorgianaElena
e8b303d01b Generate random traefik api password 2019-02-13 14:23:02 +02:00
GeorgianaElena
f7f686f540 Fixed unit test 2019-02-13 14:23:02 +02:00
GeorgianaElena
956c95e527 Fixed minor issues 2019-02-13 14:23:02 +02:00
GeorgianaElena
03b4c6218b Fixed cfg runtime entry in test 2019-02-13 14:23:02 +02:00
GeorgianaElena
3ee387cd3b Fixed some issues 2019-02-13 14:23:02 +02:00
GeorgianaElena
eee29a0957 Replace chp with traefik-proxy 2019-02-13 14:23:02 +02:00
Min RK
d331936812 consolidate yaml configuration
workaround ruamel.yaml issue 255,
where once an empty dict or list has been written,
'flow' style is used thereafter, using dense `{key: value}` form
instead of traditional yaml block style.
2018-11-01 11:34:16 +01:00
Tim Head
c67f34daca Add tests for per user memory limit 2018-10-15 16:31:16 +02: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
Matthias Bussonnier
5bbba2bd7c add test 2018-08-31 18:15:56 -07:00
Min RK
5df106fa82 move config migration to its own file 2018-08-31 12:17:16 +02:00
Min RK
3c082a3fd6 ensure config_dir exists in unittests 2018-08-29 09:45:15 +02:00
Min RK
4b79993ea0 test config dir setup
including upgrading old config files
2018-08-28 14:16:09 +02:00
Min RK
4522917c23 fix manual ssl config test 2018-08-03 16:17:22 +02:00
Min RK
f0a0d2f20d limit traefik permission check to ugo
ignores possible sticky bits, etc.
2018-08-03 16:11:49 +02:00
Min RK
51299e619b unittests for traefik 2018-08-03 16:09:25 +02:00
Min RK
7b1dcc8b99 move tljh_dir fixture to conftest
so it can be used everywhere
2018-08-01 17:05:43 +02: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
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
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
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
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
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
395b6543da Add tests for configurer.py 2018-07-16 01:39:59 -07:00
yuvipanda
d015b33f77 Fix home directory test
How did I not see this before
2018-07-10 11:51:44 -07:00
yuvipanda
f90a0fa540 Use classic unix users rather than systemd dynamic users
Dynamic Users are neat and probably very useful for a tmpnb
style situation. However, for regular use they have the following
problems:

1. Can't set ProtectHome=no, so you can never apt install or
   similar from inside admin accounts.
2. Dynamic uid / gid makes it hard to write sudo rules. We want
   admin users to have sudo.
3. Persistent uids / gids are very useful for ad-hoc ACLs between
   users. gid sharing isn't the most flexible sharing mechanism,
   but it is well known & quite useful.
4. /etc/skel is pretty useful!
2018-06-26 23:50:07 -07:00
yuvipanda
f7813a9385 Add function to install packages from pip too 2018-06-26 17:38:56 -07:00
yuvipanda
92558e913e Add unit test for conda environment management
- Also fix a bug caught by unit test!
2018-06-26 04:40:39 -07:00