I was reading through the new Gitlab Auth documentation here and had a question on this section where after making changes it tells us to juice install –restart
Why would I not need to rebuild? I thought that the changes made in the orchestration.toml to the jupyter.main_hub would only take effect if I rebuild? I think I do understand only a restart would be needed for the changes to secrets.env.
Note: I have not tried this, just trying to understand rebuild vs restart better.
To understand why sometimes a restart is enough and sometimes a rebuild is required, it’s important to know how the contents of orchestration.toml are applied within Juice. The contents of orchestration.toml are use for two distinct things:
Define the configuration files for specific parts or applications within Juice. For example, specific parts oforchestration.tomlare used to create a JupyterHub configuration file. The configuration file is not part of the image. Instead, it is created on the host system and mounted inside the image. It is read by JupyterHub when the container starts. A restart is thus sufficientin this case.
Define how an image should be built. For example, other parts define that package A, B and C should be installed in the image. These packages are part of the image, and are installed when the image is built. A rebuild is thus requiredin this case.
It’s sometimes hard to know whether the changes you made in orchestration.toml will only affect situations like in 1, or that there could be a change that also affects a situation like in 2. It’s always the safest option to rebuild. On the other hand, you can always try restarting first. Then, if you notice that your change is not applied you can do a rebuild anyway. Still, specific tutorials or examples may instruct you to only restart. In those cases it’s always safe to just restart!