diff --git a/README.md b/README.md index 201fa2281a59dd3e4b1c4fa0c28aeeaeaab082ef..1ff2ef8c2104e6f61e486ca0b4f2e6ed73a35778 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,53 @@ # Job controller  + +## Developing + +These are instructions for running job_controlller on your own computer ("outside" the k8s cluster). + +Install python, kubectl, minikube + +Log into your cluster context of choice (you can start minikube and it _should_ set everything up for you) + +Create a voume and volumeclaim `video-data-claim`, here is an example: + +``` +apiVersion: v1 +kind: PersistentVolume +metadata: + name: video-data + labels: + app: video-data +spec: + accessModes: + - ReadWriteMany + capacity: + storage: 100Gi + hostPath: + type: Directory + path: /mnt/video-data/ + +--- +apiVersion: v1 +kind: PersistentVolumeClaim +metadata: + name: video-data-claim + namespace: videoag-prod +spec: + accessModes: + - ReadWriteMany + volumeMode: Filesystem + resources: + requests: + storage: 100Gi + selector: + matchLabels: + app: video-data +``` + +This mounts the volume inside the "host" minikube container. To access this folder from your actual host computer, run `minikube mount /mnt/video_data:/tmp/hostpath-provisioner/videoag-prod/video-data-claim`. In this case I mounted it to /mnt/video_data on my computer because the job_controller expects it to be there (at the time of writing this). You should probably make sure that you don't use that directory for something else already. + +You can now start the job controller on your host computer. + +`python3 src/main.py --purge_existing_jobs`