Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Automated deployment #57

Closed
jtpio opened this issue Jul 10, 2019 · 4 comments · Fixed by #81
Closed

Automated deployment #57

jtpio opened this issue Jul 10, 2019 · 4 comments · Fixed by #81
Labels
deployment Issues related to deploying the gallery

Comments

@jtpio
Copy link
Member

jtpio commented Jul 10, 2019

Currently:

  • the gallery runs on a single machine using TLJH provisioned using this bootstrap command
  • when the hooks have changed we need to run this command on the instance: sudo python3 the-littlest-jupyterhub/bootstrap/bootstrap.py --plugin tljh-voila-gallery/
  • systemd units are periodically rebuilding the Docker images and resintalling the gallery package (Update the gallery package before building new images #50)

It should be possible to automate all of this while keeping the single instance setup:

@jtpio
Copy link
Member Author

jtpio commented Jul 10, 2019

cc @yuvipanda

@jtpio
Copy link
Member Author

jtpio commented Jul 12, 2019

@jtpio
Copy link
Member Author

jtpio commented Jul 12, 2019

There could be different options for building the Docker images:

  1. trigger the build in the post_install hook. This will add a few minutes before the instance is ready
  2. let CI build the images and push to DockerHub, and let the gallery pull them in the post_install hook (using latest or a specific tag from a ref field in gallery.yaml).

Option 1 might still be more adequate (at least for now), especially if we want to keep the gallery generic enough for those who want to deploy their own gallery and don't want to deal with container registries.

This again follows the idea of having an immutable TLJH instance with a specific set of examples. If the examples change they a new instance should be created.

@jtpio
Copy link
Member Author

jtpio commented Jul 12, 2019

Just thinking out loud here.

Another option could be:

  • only keep one instance alive
  • when the gallery package is updated (code update or new example added), update the current instance
  • ssh to the existing instance, update the gallery package and execute the bootstrap command (or with ansible)
  • trigger the docker build only once
  • restart JupyterHub to take the changes into account

@jtpio jtpio closed this as completed in #81 Oct 28, 2019
@jtpio jtpio added the deployment Issues related to deploying the gallery label Oct 28, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
deployment Issues related to deploying the gallery
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant