jupyterhub / the-littlest-jupyterhub

Simple JupyterHub distribution for 1-100 users on a single server
https://tljh.jupyter.org
BSD 3-Clause "New" or "Revised" License
1.04k stars 341 forks source link

Document an upgrade procedure for an active TLJH deployment #204

Closed betatim closed 1 year ago

betatim commented 6 years ago

Has there been any discussion on the best way to upgrade a running TLJH?

Having some documentation with recommended steps and/or questions to ask yourself would be good.

If you have upgraded a TLJH maybe you could post here and we can use it to create some documentation. Should people try and keep up-to-date with developments each week or wait for releases or ...? Also interesting would be the trade-offs between wiping your hub and installing one from scratch. I think this could be an attractive, low hassle way of dealing with hubs for courses or other setups that have a natural end/swap of users.

choldgraf commented 6 years ago

I think this could be done by simply re-running the TLJH install script from an admin account, no? I feel like I've done this before in deployments but it wasn't in the context of explicitly trying to upgrade.

I'd be +1 on a "How to upgrade a TLJH deployment" section here: https://the-littlest-jupyterhub.readthedocs.io/en/latest/#administration-and-security

betatim commented 6 years ago

That would be super convenient!

I wasn't sure what the promises around re-running the installer (say) 4months apart were or if we needed a way to "make a copy, re-run installer, check nothing broke, run it on the real thing" kind of workflow. The point of the docs would be to give others confidence that they are doing it the right way.

To make life easier I think it would be fine to recommend a way that leads to a short downtime where people can't login. More important to have a predictable length of time than trying to make it as short as possible but with large spread.

I will try out upgrading by rerunning the installer.

choldgraf commented 6 years ago

Makes sense to me - we should also start releasing versions of TLJH so that we can say things like "to upgrade minor versions of TLJH, do XXX, to upgrade major versions do YYY"

kannes commented 5 years ago

This is kind of a dupe of https://github.com/jupyterhub/the-littlest-jupyterhub/issues/81 :)

kevmk04 commented 5 years ago

@betatim Were you successful in upgrading by rerunning the installer? I'm in a similar situation where I'd like to update the version of JupyterLab running to the latest version (v1.0.1). It might just work with sudo -E pip install --upgrade jupyterlab, but not sure.

kevmk04 commented 5 years ago

As an update here, I was able to successfully update JupyterLab to v1.0.1 by running the sudo -E pip install --upgrade jupyterlab command.

consideRatio commented 3 years ago

I don't think TLJH has documentation recommending any approach or describing any way to upgrade TLJH without setting it up again from scratch.

I think the answer is that one should re-run the bootstrap script as one did when installing TLJH from the beginning, like this:

curl -L https://tljh.jupyter.org/bootstrap.py | sudo -E python3

The downloaded bootstrap script is made to accept being run multiple times, and when it runs, it will download the latest TLJH repo and install based on that.

I think a great first step that this issue can represent, is to document that, and that we are still working to provide versioning (#724), and that we haven't yet come up with a clear upgrade policy (#81).

t3chbg commented 2 years ago

curl -L https://tljh.jupyter.org/bootstrap.py | sudo -E python3

As per installation instructions we are reminded to add username, does this apply to upgrades as well? e.g. curl -L https://tljh.jupyter.org/bootstrap.py | sudo -E python3 - --admin <admin-user-name>