Worker
Workers are responsible for recording your lecture halls, transcoding recordings and pushing these to your shared storage.
Add a Worker to the GoCast network​
- Docker
- Manually
- Using a cloud provider
-
Run the TUM-Live-Worker docker container with the organization token and make sure to include its hostname and address:
docker run -d \
-p 50051:50051 \
-p 8060:8060 \
-p 8085:8085 \
-p 1935:1935 \
-e Token=<your-organization-token> \
-e MainBase=live.rbg.tum.de \
-e Host=$(hostname) \
-e Address=<your-worker-addr>
-e LrzUploadUrl=<your-vod-service-addr>:8089 \
-e LogLevel=debug \
-e PersistDir=/persist \
-e VodURLTemplate=<your-edge-server-addr>/vod/%s.mp4/playlist.m3u8 \
-v /path/to/recordings:/recordings \
-v /path/to/persist:/persist \
-v /path/to/mass:/mass \
-v /path/to/workerlog:/var/log/stream \
ghcr.io/tum-dev/gocast/worker:latest -
Optional: Join your docker node cluster:
# Refer to your manager node on which token to use here:
docker swarm join --token ABC-1243-DEFG 1.2.3.4:2377
-
Clone the GoCast repository:
git clone https://github.com/tum-Dev/gocast
-
Change into the runner directory:
cd gocast && cd worker
-
Start the Worker with the organization token and make sure to include its hostname:
Token=<your-organization-token> \
MainBase=live.rbg.tum.de \
Host=$(hostname) \
LrzUploadUrl=<your-vod-service-addr>:8089 \
LogLevel=debug \
PersistDir=/persist \
VodURLTemplate=<your-edge-server-addr>/vod/%s.mp4/playlist.m3u8 \
go run ./cmd/worker/main.go
-
Create a new instance on your cloud provider.
-
Install Docker on the instance.
-
Follow the instructions for the Docker tab to run the worker and make sure to expose the necessary ports.
Verify successful deployment​
Once a Worker has been added successfully, you should be able to see it in the "resources"-tab of the admin dashboard.
Here's an example of how it should look, if you added three Workers (one of which didn't start successfully):