From eceee88f7af7bf427f5742a670390de9771600f4 Mon Sep 17 00:00:00 2001 From: Carol Willing Date: Thu, 12 Apr 2018 15:11:59 -0700 Subject: [PATCH] Change naming from jupyter to jupyterhub when referring to hub (#642) * Change naming from jupyter to jupyterhub when referencing the hub * Change jupyter to jupyterhub when referring to the hub * Change references to jupyter to jupyterhub when hub is being used * Rename jupyterhub spawner to kubeform_spawner * update docs for name changes --- components/jupyterhub/README.md | 3 ++- docs_dev/releasing.md | 2 +- kubeflow/core/all.libsonnet | 4 ++-- kubeflow/core/jupyterhub.libsonnet | 2 +- ...yterhub_spawner.py => kubeform_spawner.py} | 0 kubeflow/core/tests/jupyterhub_test.jsonnet | 2 +- testing/test_deploy.py | 4 ++-- .../kubeflow/core/prototypes/all.jsonnet | 22 +++++++++---------- 8 files changed, 20 insertions(+), 19 deletions(-) rename kubeflow/core/{jupyterhub_spawner.py => kubeform_spawner.py} (100%) diff --git a/components/jupyterhub/README.md b/components/jupyterhub/README.md index b160fc46a75..1766fb7b2d9 100644 --- a/components/jupyterhub/README.md +++ b/components/jupyterhub/README.md @@ -42,7 +42,8 @@ Jupyter notebooks. JupyterHub delegates the launching of single-user notebooks to pluggable components called “spawners”. JupyterHub has a sub-project named kubespawner, maintained by the community, that enables users to provision single-user Jupyter notebooks backed by Kubernetes pods - the notebooks themselves are -Kubernetes pods. +Kubernetes pods. kubeform_spawner extends kubespawner to enable users to have +a form to specify cpu, memory, gpu, and desired image. ## Quick Start diff --git a/docs_dev/releasing.md b/docs_dev/releasing.md index 0b5319ee244..1e02ac744c8 100644 --- a/docs_dev/releasing.md +++ b/docs_dev/releasing.md @@ -126,7 +126,7 @@ ks param set --env=${ENV} workflows prow_env \ ks apply ${ENV} -c workflows ``` -Create a PR to update [jupyterhub_spawner.py](https://github.com/kubeflow/kubeflow/blob/master/kubeflow/core/jupyterhub_spawner.py#L15) +Create a PR to update [kubeform_spawner.py](https://github.com/kubeflow/kubeflow/blob/master/kubeflow/core/kubeform_spawner.py#L15) to point to the newly built Jupyter notebook images. ## Create a release branch (if necessary) diff --git a/kubeflow/core/all.libsonnet b/kubeflow/core/all.libsonnet index ad766374a6a..f705d73496d 100644 --- a/kubeflow/core/all.libsonnet +++ b/kubeflow/core/all.libsonnet @@ -1,14 +1,14 @@ { parts(params):: { local ambassador = import "kubeflow/core/ambassador.libsonnet", - local jupyter = import "kubeflow/core/jupyterhub.libsonnet", + local jupyterhub = import "kubeflow/core/jupyterhub.libsonnet", local nfs = import "kubeflow/core/nfs.libsonnet", local tfjob = import "kubeflow/core/tf-job.libsonnet", local spartakus = import "kubeflow/core/spartakus.libsonnet", local centraldashboard = import "kubeflow/core/centraldashboard.libsonnet", local version = import "kubeflow/core/version.libsonnet", - all:: jupyter.all(params) + all:: jupyterhub.all(params) + tfjob.all(params) + ambassador.all(params) + nfs.all(params) diff --git a/kubeflow/core/jupyterhub.libsonnet b/kubeflow/core/jupyterhub.libsonnet index 6372b792a18..1df3b45c988 100644 --- a/kubeflow/core/jupyterhub.libsonnet +++ b/kubeflow/core/jupyterhub.libsonnet @@ -19,7 +19,7 @@ kubeSpawner(authenticator, volumeClaims=[]): { // TODO(jlewi): We should make whether we use PVC configurable. - local baseKubeConfigSpawner = importstr "jupyterhub_spawner.py", + local baseKubeConfigSpawner = importstr "kubeform_spawner.py", authenticatorOptions:: { diff --git a/kubeflow/core/jupyterhub_spawner.py b/kubeflow/core/kubeform_spawner.py similarity index 100% rename from kubeflow/core/jupyterhub_spawner.py rename to kubeflow/core/kubeform_spawner.py diff --git a/kubeflow/core/tests/jupyterhub_test.jsonnet b/kubeflow/core/tests/jupyterhub_test.jsonnet index f1b63463c1b..f40231f39f5 100644 --- a/kubeflow/core/tests/jupyterhub_test.jsonnet +++ b/kubeflow/core/tests/jupyterhub_test.jsonnet @@ -8,7 +8,7 @@ local params = { jupyterNotebookPVCMount: "/home/jovyan/work", }; -local baseSpawner = importstr "../jupyterhub_spawner.py"; +local baseSpawner = importstr "../kubeform_spawner.py"; // TODO(jlewi): We should be able to use std.startsWidth in later versions of jsonnet. // diff --git a/testing/test_deploy.py b/testing/test_deploy.py index 7f75b989f6b..8d33f92b85b 100644 --- a/testing/test_deploy.py +++ b/testing/test_deploy.py @@ -238,9 +238,9 @@ def deploy_kubeflow(args): util.wait_for_deployment(api_client, namespace, tf_job_deployment_name) # Verify that JupyterHub is actually deployed. - jupyter_name = "tf-hub" + jupyterhub_name = "tf-hub" logging.info("Verifying TfHub started.") - util.wait_for_statefulset(api_client, namespace, jupyter_name) + util.wait_for_statefulset(api_client, namespace, jupyterhub_name) def deploy_model(args): diff --git a/testing/workflows/vendor/kubeflow/core/prototypes/all.jsonnet b/testing/workflows/vendor/kubeflow/core/prototypes/all.jsonnet index a633133c2b0..da93dd99427 100644 --- a/testing/workflows/vendor/kubeflow/core/prototypes/all.jsonnet +++ b/testing/workflows/vendor/kubeflow/core/prototypes/all.jsonnet @@ -15,7 +15,7 @@ // because ksonnet doesn't support inheriting it from the environment yet. local k = import "k.libsonnet"; -local jupyter = import "kubeflow/core/jupyterhub.libsonnet"; +local jupyterhub = import "kubeflow/core/jupyterhub.libsonnet"; local tfjob = import "kubeflow/core/tf-job.libsonnet"; local nfs = import "kubeflow/core/nfs.libsonnet"; @@ -32,9 +32,9 @@ local diskNames = if diskParam != "null" && std.length(diskParam) > 0 then std.split(diskParam, ",") else []; -local jupyterConfigMap = if std.length(diskNames) == 0 then - jupyter.parts(namespace).jupyterHubConfigMap -else jupyter.parts(namespace).jupyterHubConfigMapWithVolumes(diskNames); +local jupyterHubConfigMap = if std.length(diskNames) == 0 then + jupyterhub.parts(namespace).jupyterHubConfigMap +else jupyterhub.parts(namespace).jupyterHubConfigMapWithVolumes(diskNames); local tfJobImage = import "param://tfJobImage"; local tfDefaultImage = import "param://tfDefaultImage"; @@ -64,13 +64,13 @@ local nfsComponents = std.prune(k.core.v1.list.new([ // jupyterHub components - jupyterConfigMap, - jupyter.parts(namespace).jupyterHubService, - jupyter.parts(namespace).jupyterHubLoadBalancer(jupyterHubServiceType), - jupyter.parts(namespace).jupyterHub(jupyterHubImage), - jupyter.parts(namespace).jupyterHubRole, - jupyter.parts(namespace).jupyterHubServiceAccount, - jupyter.parts(namespace).jupyterHubRoleBinding, + jupyterHubConfigMap, + jupyterhub.parts(namespace).jupyterHubService, + jupyterhub.parts(namespace).jupyterHubLoadBalancer(jupyterHubServiceType), + jupyterhub.parts(namespace).jupyterHub(jupyterHubImage), + jupyterhub.parts(namespace).jupyterHubRole, + jupyterhub.parts(namespace).jupyterHubServiceAccount, + jupyterhub.parts(namespace).jupyterHubRoleBinding, // TfJob controller tfjob.parts(namespace).tfJobDeploy(tfJobImage),