This folder contains the resources needed by the Kubeflow DevRel team to setup a public demo of the GitHub Issue Summarization Example.
We currently run a public instance of the ui at gh-demo.kubeflow.org
The current setup is as follows
PROJECT=kubecon-gh-demo-1
CLUSTER=gh-demo-1003
ZONE=us-east1-d
- gh-app - This contains the ksonnet for deploying the public instance of the model and ui.
- gh-demo-1003 - This is the app created by kfctl
Here are the instructions for setting up the demo.
-
Follow the GKE instructions for deploying Kubeflow
- If you are using PROJECT kubecon-gh-demo-1 you can reuse the existing OAuth client
-
Use the Cloud console to lookup Client ID and secret and set the corresponding environment variables
-
You will also need to add an authorized redirect URI for the new Kubeflow deployment
-
- If you are using PROJECT kubecon-gh-demo-1 you can reuse the existing OAuth client
-
Follow the instructions to Setup an NFS share
- This is needed to do distributed training with the TF estimator example
-
Create static IP for serving gh-demo.kubeflow.org
gcloud --project=${PROJECT} deployment-manager deployments create --config=gh-demo-dm-config.yaml gh-public-ui
-
Update the Cloud DNS record gh-demo.kubeflow.org in project kubeflow-dns to use the new static ip.
-
Create a namespace for serving the UI and model
kubectl create namespace gh-public
-
Deploy Seldon controller in the namespace that will serve the public model
- This is a work around for kubeflow/kubeflow#1712
cd gh-demo-1003/ks_app ks env add gh-public --namespace=gh-public ks generate seldon seldon ks apply gh-public -c seldon
-
Create a secret with a GitHub token
-
Follow GitHub's instructions to create a token
-
Then run the following command to create the secret
kubectl -n gh-public create secret generic github-token --from-literal=github-token=${GITHUB_TOKEN}
-
-
Deploy the public UI and model
cd gh-app ks env add gh-public --namespace=gh-public ks apply gh-public
We use the ksonnet app in github/kubeflow/examples/github_issue_summarization/ks_app
The current environment is
export ENV=gh-demo-1003
Set a bucket for the job output
DAY=$(date +%Y%m%d)
ks param set --env=${ENV} tfjob output_model_gcs_bucket kubecon-gh-demo
ks param set --env=${ENV} tfjob output_model_gcs_path gh-demo/${DAY}/output
Run the job
ks apply ${ENV} -c tfjob
-
Copy the data to the GCFS mount by launching a notebook and then running the following commands
!mkdir -p /mnt/kubeflow-gcfs/gh-demo/data !gcloud auth activate-service-account --key-file=${GOOGLE_APPLICATION_CREDENTIALS} !gsutil cp gs://kubeflow-examples/github-issue-summarization-data/github-issues.zip /mnt/kubeflow-gcfs/gh-demo/data !unzip /mnt/kubeflow-gcfs/gh-demo/data/github-issues.zip !cp github_issues.csv /mnt/kubeflow-gcfs/gh-demo/data/
- TODO(jlewi): Can we modify the existing job that downloads data to a PVC to do this?
-
Run the estimator job
ks apply ${ENV} -c tfjob-estimator
-
Run TensorBoard
ks apply ${ENV} -c tensorboard-pvc-tb