diff --git a/.vscode/extensions.json b/.vscode/extensions.json index 7482b35..5888953 100644 --- a/.vscode/extensions.json +++ b/.vscode/extensions.json @@ -1,3 +1,3 @@ { - "recommendations": ["esbenp.prettier-vscode", "ms-azuretools.vscode-docker"] + "recommendations": ["esbenp.prettier-vscode", "ms-azuretools.vscode-docker", "github.vscode-github-actions"] } diff --git a/README.md b/README.md index 2e82e8e..5f9c3d2 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,11 @@ -# `owntube/peertube-runner` +# [`owntube/peertube-runner`](https://github.com/OwnTube-tv/peertube-runner) -Containerized [@peertube/peertube-runner](https://www.npmjs.com/package/@peertube/peertube-runner) for remote execution of transcoding jobs in Kubernetes. +Containerized [@peertube/peertube-runner](https://www.npmjs.com/package/@peertube/peertube-runner) for remote execution +of transcoding jobs in Kubernetes. -## `owntube/peertube-runner:v521` PeerTube v5.2.1 Runner +## Container Image Variants + +### Image Variant 1: `owntube/peertube-runner:v521` PeerTube v5.2.1 Runner Build the container image: @@ -20,7 +23,7 @@ docker run -it --rm -u root --name v521-runner-server \ owntube/peertube-runner:v521 peertube-runner server ``` -## `owntube/peertube-runner:v603` PeerTube v6.0.3 Runner +### Image Variant 2: `owntube/peertube-runner:v603` (`:latest`) PeerTube v6.0.3 Runner Build the container image: @@ -37,3 +40,192 @@ docker run -it --rm -u root --name v603-runner-server \ -v $PWD/dot-cache:/home/peertube/.cache/peertube-runner-nodejs \ owntube/peertube-runner:v603 peertube-runner server ``` + +## Kubernetes Deployment + +**Prerequisites:** Have a Kubernetes cluster with internet connectivity and persistent storage; the _StorageClass_ +should support `.spec.accessModes[]` `ReadWriteMany` (e.g. [MicroK8s HostPath Storage](https://microk8s.io/docs/addon-hostpath-storage)), +as different container runtimes need to mount the PeerTube runner server socket as their mechanism of Inter-Process +Communication (IPC). + +### Setup Step 1: Configure Persistent Storage + +We need the following _PersistentVolumeClaims_ (PVCs): + +1. `peertube-runner-local` for things persisted in `/home/peertube/.local/share/peertube-runner-nodejs` +2. `peertube-runner-config` for the tool's internal configs in `/home/peertube/.config/peertube-runner-nodejs` +3. `peertube-runner-cache` for file storage during task execution in `/home/peertube/.cache/peertube-runner-nodejs` + +If we had a namespace named "peertube" and a storage class named "microk8s-hostpath", it could look like this: + +```bash +kubectl apply -f - <