eoas-ubc / eoas_tlef

developing jupyter courseware for eoas 2020
BSD 3-Clause "New" or "Revised" License
4 stars 6 forks source link

Write cookie-cutter templates for jupyterhub, Docker and docker-compose files #50

Open phaustin opened 4 years ago

phaustin commented 4 years ago

Looks like cookie-cutter might would allow us to parameterize our setup for #47-- simpler than ansible?

https://cookiecutter.readthedocs.io/en/1.7.2/advanced/suppressing_prompts.html#advanced-example-defaults-extra-context

slemonide commented 4 years ago

Well I think pretty much all configuration can be done by copying .env.dist to .env and filling in the blanks: https://github.com/slemonide/simple_jupyterhub/blob/main/.env.dist

That's pretty much like cookie-cutter, but with no interactivity.

I think the hardest part is actually setting up github OAuth (have to do it by hand), and setting up user on backup server (also for now have to do it by hand -- and need sudo).

Also, current configuration doesn't really explain to say how to run several jupyterhubs on the same host.

The hardest part is having to setup nginx to forward say https://\<host>/course_i to jupyterhub_i for that course. I think traefik would be much simpler -- since all configuration can be done directly in docker-compose using container labels. I guess that's sort of what I am doing with nginx right now anyway (using nginx-proxy docker image...), but I think traefik has more elaborate configuration options for that. And doesn't need stuff like nginx-proxy-companion to automatically update certificates. I.e. less containers, simpler configuration.

slemonide commented 4 years ago

I think if we really want to run several hubs on the same machine, we should run backup and reverse-proxy containers separately from the hubs.

I.e. there will be only one backup container, and one reverse-proxy container, and many jupyterhub containers.

This makes it very easy to setup new hubs -- don't need to create a new user on backup server for every hub we setup.