Skip to content
davis278 edited this page Sep 3, 2019 · 42 revisions

There are many ways to deploy VCDAT on your system

From Source

To install VCDAT 2.0 on your own computer or a local network, clone the jupyter-vcdat github repo:

git clone https://github.com/CDAT/jupyter-vcdat.git

Change into the directory containing the repo and type in the following commands:

./install_script.sh

For more info see our README file.

Launch VCDAT 2.0 on your computer

If you haven't already, activate the jupyter-vcdat environment since it includes the code to run JupyterLab and your base environment likely does not have it installed.

conda activate jupyter-vcdat

If this command fails, try:

source activate jupyter-vcdat

Navigate to a parent folder that contains data you want to examine or notebooks you want to run, then type:

jupyter-lab

This should launch a web page which displays the JupyterLab interface. If this does not occur, look at the message that is displayed, copy the URL in the message and paste it into your browser.

Note: you must launch JupyterLab from the highest level folder you want to be able to access. Jupyter can see folders below the directory from which it was launched, but it cannot see directories above its launch directory.

For a system-wide deployment

Use:

jupyterhub --Spawner.cmd="['jupyter-labhub']" --port 8888

And then point your browser to:

http://localhost:8888

Using Docker

First install docker on your system.

Here we choose port 8890 just in case you already have a local one running at the default 8888 Then run:

docker run -p 8081:8081  -p 8890:8890 -it  cdoutrix/vcdat:latest jupyter-lab --port=8890

Look in the output for the token value, for example:

Serving notebooks from local directory: /home/jovyan
0 active kernels
The Jupyter Notebook is running at:
http://(55161a793285 or 127.0.0.1):8890/?token=20bbbe820ddf95d0e269cbec61e131ead96e3ea3020db8c2

Point your browser to:

http://localhost:8888/?token=INSERT_YOUR_TOKEN_VALUE_HERE

for example:

http://localhost:8888/?token=20bbbe820ddf95d0e269cbec61e131ead96e3ea3020db8c2

Make sure to match the token value.

NOTE: Google Chrome is the preferred browser.

To access your local files simply mount them in the docker command line:

docker run -p 8081:8081  -p 8888:8888 -v $PWD:/home/jovyan/my_data -it  cdoutrix/vcdat:latest jupyter-lab

This will mount your current directory into ~/my_data in the container.

Using kubernetes

Setup kubernetes and helm following steps from this page.

We provide an example of config.yaml.

On a mac after installing docker edge version (or doing a factory reset of docker) I enable kubernetes and run

curl https://raw.githubusercontent.com/kubernetes/helm/master/scripts/get | bash
kubectl --namespace kube-system create serviceaccount tiller
kubectl create clusterrolebinding tiller --clusterrole cluster-admin --serviceaccount=kube-system:tiller
helm init --service-account tiller --wait
kubectl patch deployment tiller-deploy --namespace=kube-system --type=json --patch='[{"op": "add", "path": "/spec/template/spec/containers/0/command", "value": ["/tiller", "--listen=localhost:44134"]}]'
helm repo add jupyterhub https://jupyterhub.github.io/helm-chart/
helm repo update
# Suggested values: advanced users of Kubernetes and Helm should feel
# free to use different values.
RELEASE=jhub
NAMESPACE=jhub

helm upgrade --install $RELEASE jupyterhub/jupyterhub \
  --namespace $NAMESPACE  \
  --version=0.8.2 \
  --values kube/config.yaml

Then wait for

kubectl get pod --namespace jhub

to show something like this:

NAME                     READY   STATUS    RESTARTS   AGE
hub-5f9d768d8d-7zpvv     1/1     Running   0          2m58s
proxy-86dd4bd45c-q9pqg   1/1     Running   0          3m1s

On my mac the result of the following line of code

kubectl get service --namespace jhub

seems to always point to localhost

NAME           TYPE           CLUSTER-IP       EXTERNAL-IP   PORT(S)                      AGE
hub            ClusterIP      10.98.59.251     <none>        8081/TCP                     6m5s
proxy-api      ClusterIP      10.99.32.208     <none>        8001/TCP                     6m5s
proxy-public   LoadBalancer   10.102.182.171   localhost     80:30720/TCP,443:30990/TCP   6m5s

At this point simply point your browser to: http://localhost/

You can’t perform that action at this time.