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

BinderHub as a backend #83

Closed
jtpio opened this issue Oct 30, 2019 · 6 comments · Fixed by #86
Closed

BinderHub as a backend #83

jtpio opened this issue Oct 30, 2019 · 6 comments · Fixed by #86

Comments

@jtpio
Copy link
Member

jtpio commented Oct 30, 2019

TLDR: It would be great for the Voila Gallery to use a BinderHub (mybinder.org) as a backend.

BinderHub as a backend for the gallery

The proposal is as follows:

  • The Voila Gallery is nothing more but a collection of links to pre-built Binders
  • It uses the BinderHub API to spawn the examples
  • Static website built with Jekyll
  • Hosted on GitHub Pages
  • The examples stay in a yaml file (or multiple files)

Demo

Here is a repo that already implements this idea. The end result is relatively simple and minimal:

voila-gallery-binder

Why

It's simpler, and simpler to operate.

This would fix #57, #55, #31, potentially #49 and close voila-gallery/voila-gallery.org-deploy#1.

For #21, we would make voila-gallery.org point to voila-dashboards.github.io and add a CNAME file that contains voila-gallery.org.

Also since making the example work on Binder is part of the steps to add it to the gallery, it sounds reasonable to launch that Binder image directly.

TLJH plugin

We can keep the TLJH plugin for the users who want to deploy the gallery on their own on a single machine using TLJH.

This proposed change is for the public facing gallery, with mybinder.org as the BinderHub. But the BinderHub host could technically be changed to something else in the config.

The repo for the public facing gallery would be https://github.com/voila-dashboards/voila-gallery.org and the content would be the same as https://github.com/jtpio/voila-gallery-binderhub.

The current repo would be renamed to https://voila-dashboards/tljh-voila-gallery, and the gallery.yaml simplified (less examples). The tljh_voila_gallery package could also be published to pypi.org.

Adding a new example

Pretty much the same as before:

Pros

  • Simpler setup
  • Static web site
  • Hosted on GitHub pages
  • We can still keep the plugin for those who want to deploy the gallery on one machine using TLJH
  • The gallery can have links to dashboards deployed on Heroku
  • Opening a PR to add a new example will make sure the ref has been built by Binder before it can be merged
  • Very low maintenance (no need to deploy changes and manage servers)
  • Save $100/month that could be invested in the OVH Binder cluster instead

Cons

  • Slightly longer to launch the examples
  • Puts the load on mybinder.org? The number of concurrent users isn't high so that might not be such an issue. Also the gallery will only link to repos that have already been built (pinned commit hash)

Transition

Here are the steps to transition voila-gallery.org to this setup:

I would be happy to hear other opinions on this proposal!

cc @pbugnion @yuvipanda @SylvainCorlay

Also pinging @betatim since it's related to mybinder.org (event though this is not a lot of traffic)

@betatim
Copy link

betatim commented Oct 31, 2019

Sounds good to me. Can different voila gallery entries use the same repo? Then you could perform two optimisations:

  1. reuse an already running binder when the user clicks on an example that uses the same repo (the second example would start more or less instant)
  2. get faster launch times because chances are higher that someone else launched the same repo already

@SylvainCorlay
Copy link
Member

Transition

Here are the steps to transition voila-gallery.org to this setup:

I would be happy to hear other opinions on this proposal!

I am +1 on this plan. This all sounds really reasonable.

Quick note on the hosting on github pages, since voila-dashboards.github.io is already used for the team compass, we may want to use voila-gallery.github.io instead.

@SylvainCorlay
Copy link
Member

Do we want to only allow for one version of a binder to be on the gallery? (i.e. should people be able to update the ref for an accepted dashboard without approval from the gallery maintainers)

@jtpio
Copy link
Member Author

jtpio commented Oct 31, 2019

Thanks @betatim for your input!

Sounds good to me. Can different voila gallery entries use the same repo?

Yes they can.

Then you could perform two optimisations:

1. reuse an already running binder when the user clicks on an example that uses the same repo (the second example would start more or less instant)

2. get faster launch times because chances are higher that someone else launched the same repo already

Reusing binders sounds like a great idea. And indeed we get much faster launch times (since there is nothing to launch).

But that also means keeping track of the url and the token? And making sure that binder is up before redirecting.

@jtpio
Copy link
Member Author

jtpio commented Oct 31, 2019

Quick note on the hosting on github pages, since voila-dashboards.github.io is already used for the team compass, we may want to use voila-gallery.github.io instead.

I was under the impression that GitHub handles the redirect like this:

Would need to double check that. Otherwise happy to use voila-gallery.github.io too.

Do we want to only allow for one version of a binder to be on the gallery? (i.e. should people be able to update the ref for an accepted dashboard without approval from the gallery maintainers)

But if they update the ref, that means the gallery should point to the new one?

It would be great if they could update it independently yes. We would need to make sure the binder is built before exposing it in the gallery though.

@jtpio
Copy link
Member Author

jtpio commented Oct 31, 2019

Transition

...

* Move https://github.com/jtpio/voila-gallery-binderhub to https://github.com/voila-dashboards/voila-gallery.org

For the transition, instead of just moving the POC repo, we should extract the files that we need, so we keep the git history and the contributors are still credited in the new repo.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants