From 54ad44e8d52073ecdfdf63b2145484306478f423 Mon Sep 17 00:00:00 2001 From: Youngsu Kim <youngsu.kim@csusb.edu> Date: Sun, 19 Sep 2021 00:18:34 +0000 Subject: [PATCH] Add readme --- Readme.md | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 Readme.md diff --git a/Readme.md b/Readme.md new file mode 100644 index 0000000..6f00d0b --- /dev/null +++ b/Readme.md @@ -0,0 +1,39 @@ +This page is for Dr. Meyer at CSUSB. + +Download all four YAML files to your local computer. + +In the folder with the YAML files excute the following commands to start Jupyter notebook + +### To start SageMath Jupyer Notebook + +`kubectl create -f pvc-sagemath.yaml -n change-this-to-your-name-space` +`kubectl create -f depolyment-sagemath.yaml -n change-this-to-your-name-space` +`kubectl get pods -n change-this-to-your-name-space` +If the container is created, copy its name (the farest left one). +`kubectl logs put-pod-name -n change-this-to-your-name-space` +If the container is successfully created it will show you token number. +`kubectl create -f service-clusterip.yml -n change-this-to-your-name-space` + +### Two ways to connect (both web-based) +1. If you want to connect it without exposing the IP publically, +`kubectl port-forward service/sagemath 8888:8888` +Open your browser then type `https://localhost:127.0.0.0:8888' +2. If you want to expose the IP publically, +`kubectl create -f ingress-sagemath.yaml -n change-this-to-your-name-space` +Connect to your Jupyer Notebook via https://sagemath.nrp-nautilus.io/ + +### How to release resources +* **pvc-sagemath.yaml** should be kept until the end of your project to store files. +* All other recourses should be release when not in use. +* Use `kubectl get deployment,service,ingress -n change-this-to-your-name-space` to search for resources being used. And use the following to delete each item. + * `kubectl create -f ingress-sagemath.yaml -n change-this-to-your-name-space` + * `kubectl create -f service-clusterip.yml -n change-this-to-your-name-space` + * `kubectl create -f depolyment-sagemath.yaml -n change-this-to-your-name-space` +_Caveat_ if you are running only one project, you can also use +`kubectl delete ingress,service,deployment --all -n change-this-to-your-name-space` +to delete them all except your persistent storage. + +To delete the persistent storage use +`kubectl delete -f pvc-sagemath.yaml -n change-this-to-your-name-space` + + -- GitLab