{"action":"created","issue":{"url":"https://api.github.com/repos/jupyter-incubator/contentmanagement/issues/13","labels_url":"https://api.github.com/repos/jupyter-incubator/contentmanagement/issues/13/labels{/name}","comments_url":"https://api.github.com/repos/jupyter-incubator/contentmanagement/issues/13/comments","events_url":"https://api.github.com/repos/jupyter-incubator/contentmanagement/issues/13/events","html_url":"https://github.com/jupyter-incubator/contentmanagement/issues/13","id":120092300,"number":13,"title":"Pluggable Deploy As / Download As options","user":{"login":"parente","id":153745,"avatar_url":"https://avatars.githubusercontent.com/u/153745?v=3","gravatar_id":"","url":"https://api.github.com/users/parente","html_url":"https://github.com/parente","followers_url":"https://api.github.com/users/parente/followers","following_url":"https://api.github.com/users/parente/following{/other_user}","gists_url":"https://api.github.com/users/parente/gists{/gist_id}","starred_url":"https://api.github.com/users/parente/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/parente/subscriptions","organizations_url":"https://api.github.com/users/parente/orgs","repos_url":"https://api.github.com/users/parente/repos","events_url":"https://api.github.com/users/parente/events{/privacy}","received_events_url":"https://api.github.com/users/parente/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-12-03T04:30:34Z","updated_at":"2015-12-03T15:11:19Z","closed_at":null,"body":"The jupyter-incubator/dashboards project currently adds a server handler and menu items for triggering dashboard-specific download and deployment. There's a PR against jupyter-incubator/kernel_gateway is about turning notebooks into microservices. It makes sense for that, too, to have both download and deployment options, but adding Notebook extensions to the kernel_gateway makes little sense. Moreover, deployment is something that needs to be tailored endlessly for specific use cases, cloud providers, on-prem environments, etc.\r\n\r\nInstead of having lots of extensions implement both the frontend triggering and a custom notebook server handler, it would be better to implement these once in a generic way and then have much lighter weight extensions do the following:\r\n\r\n1. Declare an ID (e.g., deploy_dashboards_on_mycloud)\r\n2. Declare one or more menu item labels and contexts (e.g., Deploy As -> Dashboard on My Cloud)\r\n3. Declare a Python module with a `deploy(notebook_filename)` function\r\n\r\nThen a central dispatcher could simply map clicks on deploy / download menu items in the frontend to modules in the backend.\r\n\r\nIt would be great if the Jupyter Notebook provided this simple extension point. For starters, we can prototype it here in this extension, and use the dashboard / microservice deployment use cases as drivers for plugging into it. For example:\r\n\r\n* jupyter-incubator/dashboards_download_bundle - Pulls the download option out of jupyter-incubator/dashboards into a new, tiny extension that better separates the dashboard authoring from *one* type of deployment (currently using Thebe, nbconvert, etc.; later using dashboards_nodejs_app below)\r\n* jupyter-incubator/dashboards_deploy_local - Pulls the option of deploying a dashboard as a static pae within the Jupyter notebook server itself out of jupyter-incubator/dashboards for the same reason as above\r\n* jupyter-incubator/dashboards_nodejs_app - New nodejs dashboard backend that is more secure than the existing thebe-based prototype\r\n* jupyter-incubator/dashboards_deploy_docker - Example deployment mechanism that uses a local docker client to build and deploy the dashboards_nodejs_app to a docker host\r\n* jupyter-incubator/kernel_gateway_download_bundle - New tiny extension that downloads a zip containing the open notebook plus a Dockerfile configured to combine the notebook + kernel kernel gateway for deployment\r\n* etc.\r\n\r\nOnce we prove out the idea, we can try porting it to the new Jupyter Workbench framework and see if it still makes sense as a plugin that allows other plugins, or if it should be part of the core wokrbench menu bar and Jupyter Notebook backend."},"comment":{"url":"https://api.github.com/repos/jupyter-incubator/contentmanagement/issues/comments/161670007","html_url":"https://github.com/jupyter-incubator/contentmanagement/issues/13#issuecomment-161670007","issue_url":"https://api.github.com/repos/jupyter-incubator/contentmanagement/issues/13","id":161670007,"user":{"login":"parente","id":153745,"avatar_url":"https://avatars.githubusercontent.com/u/153745?v=3","gravatar_id":"","url":"https://api.github.com/users/parente","html_url":"https://github.com/parente","followers_url":"https://api.github.com/users/parente/followers","following_url":"https://api.github.com/users/parente/following{/other_user}","gists_url":"https://api.github.com/users/parente/gists{/gist_id}","starred_url":"https://api.github.com/users/parente/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/parente/subscriptions","organizations_url":"https://api.github.com/users/parente/orgs","repos_url":"https://api.github.com/users/parente/repos","events_url":"https://api.github.com/users/parente/events{/privacy}","received_events_url":"https://api.github.com/users/parente/received_events","type":"User","site_admin":false},"created_at":"2015-12-03T15:11:18Z","updated_at":"2015-12-03T15:11:18Z","body":"One more note: I know I need to do due diligence on looking at if this could be solved with the existing nbconvert support in notebook and plugging in exports to nbconvert itself. It feels a little weird on the face of it to have nbconvert doing things like invoking docker build and pushing an image to a registry or writing a Cloud Foundry manifest alongside a notebook converted to a dashboard or ... But maybe it would work?"}}