Bypassing login and passing env variables as url param in Jupyterhub kubernetes google cloud deployment

7/5/2018

Let me tell you about my application.

WHAT I WANT TO DO :

I have to open my notebook in iframe so it should just bypass all the steps like login and start the server.

I am using docker-stack/datascience-notebook image after updating its entry-point.

WHAT I HAVE DONE TILL NOW :

  • By following zero-to-jupyterhub-with-kubernetes documentation i was able to host jupyterhub server on google cloud platform (zero-to-jupyterhub-with-kubernetes documentation use jupyterhub/jupyterhub helm chart to deploy the application on kubernetes).
  • I am bypassing login and start of the server using TmpAuthentication. For now, I am defining my env variables in extraEnv for helm-chart config.yaml file.

My helm chart config file looks like this.

hub:
    cookieSecret: "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
    extraConfig: |
        import tmpauthenticator
        c.JupyterHub.authenticator_class = tmpauthenticator.TmpAuthenticator
        c.Authenticator.auto_login = True
proxy:
    secretToken: "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
cull:
    timeout: 60
    every: 30
singleuser:
  storage:
    type: none
  image:
    name: kushalgupta/datascience-notebook
    tag: '0.35'
  extraEnv:
    POLLY_FUNC: "open_new_notebook"
    POLLY_NOTEBOOK_NAME: "my-notebook-custom-on-gcloud"
    POLLY_PROJECT_ID: 1172
    POLLY_TYPE: "http://testpolly.elucidata.io"

NEED HELP IN :

I am new to the backend technologies and don't know how to this. Can anyone knows or have some idea how can I achieve this. Thanks.

-- kushal gupta
docker
google-cloud-platform
jupyterhub
kubernetes
kubernetes-helm

0 Answers