Skip to content
Snippets Groups Projects
Verified Commit fb2456cb authored by Dorian Koch's avatar Dorian Koch
Browse files

Add instructions on how to test job_controller

parent 7b912ff5
Branches
No related tags found
No related merge requests found
# Job controller # Job controller
![job states](doc/job_states.drawio.png) ![job states](doc/job_states.drawio.png)
## 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`
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment