Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/owntube-tv/peertube-runner

Containerized PeerTube runner for remote execution of transcoding jobs in Kubernetes
https://github.com/owntube-tv/peertube-runner

kubernetes peertube peertube-runner

Last synced: 5 days ago
JSON representation

Containerized PeerTube runner for remote execution of transcoding jobs in Kubernetes

Awesome Lists containing this project

README

        

# [`owntube/peertube-runner`](https://github.com/OwnTube-tv/peertube-runner)

Containerized Node [`@peertube/peertube-runner`](https://www.npmjs.com/package/@peertube/peertube-runner) for
remote execution of transcoding jobs in Kubernetes.

## Container Image Variants

### Image Variant 1: `owntube/peertube-runner:v521` from PeerTube v5.2.1 with Runner v0.0.11

Build the container image:

```bash
docker buildx build --platform linux/amd64 -f Dockerfile.bullseye -t owntube/peertube-runner:v521 .
```

Test running the PeerTube runner server:

```bash
docker run -it --rm -u root --name v521-runner-server \
-v $PWD/dot-local:/home/peertube/.local/share/peertube-runner-nodejs \
-v $PWD/dot-config:/home/peertube/.config/peertube-runner-nodejs \
-v $PWD/dot-cache:/home/peertube/.cache/peertube-runner-nodejs \
owntube/peertube-runner:v521 peertube-runner server
```

### Image Variant 2: `owntube/peertube-runner:v632` (`latest`) from PeerTube v6.3.2 with Runner v0.0.21

Build the container image:

```bash
docker buildx build --platform linux/amd64 -f Dockerfile.bookworm -t owntube/peertube-runner:v632 .
docker tag owntube/peertube-runner:v632 owntube/peertube-runner:latest
```

Test running the PeerTube runner server:

```bash
docker run -it --rm -u 999 --name v632-runner-server \
-v $PWD/dot-local:/home/peertube/.local/share/peertube-runner-nodejs \
-v $PWD/dot-config:/home/peertube/.config/peertube-runner-nodejs \
-v $PWD/dot-cache:/home/peertube/.cache/peertube-runner-nodejs \
owntube/peertube-runner:v632 npx 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 internals in `/home/peertube/.config/peertube-runner-nodejs`
3. `peertube-runner-cache` for temp file storage 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 - <