-
Notifications
You must be signed in to change notification settings - Fork 44
Worker Setup
Joscha Henningsen edited this page May 12, 2021
·
1 revision
This guide assumes your workdir is /home/joscha
apt update
sudo apt install git make wget
wget https://golang.org/dl/go1.16.4.linux-amd64.tar.gz # check if there is a newer version of go here: https://golang.org/doc/install
sudo rm -rf /usr/local/go && sudo tar -C /usr/local -xzf go1.16.4.linux-amd64.tar.gz
echo 'PATH="$PATH:/usr/local/go/bin"' >> .profile
Then log back in to your vm
mkdir -p /recordings/vod
chmod 777 /recordings/vod
mkdir /var/log/live-worker
git clone https://github.com/joschahenningsen/TUM-Live-Worker.git
cd TUM-Live-Worker
make all
sudo make install
Use rbg-cert
, Let’s Encrypt or whatever else floats your boat.
Create the file /home/joscha/worker.env
LRZ_USER=Joscha Henningsen
[email protected]
LRZ_PHONE=0158123456
LRZ_SUBDIR=RBG
LRZ_UPLOAD_URL=https://uploadPortal.lrz.de/video_upload.cgi
CERT=/var/lib/rbg-cert/live/my.fullchain.pem
KEY=/var/lib/rbg-cert/live/my.privkey.pem
WORKERID=t9gjgersv98e5mjhtz95ezsjz89nh
MAIN_BASE=https://live.mm.rbg.tum.de
INGEST_BASE=rtmp://user:[email protected]:1935/livetum/
Edit the file /etc/systemd/system/live-worker.service
[Unit]
Description=TUM-Live-Worker
After=network.target
[Service]
EnvironmentFile=/home/joscha/TUM-Live-Worker/worker.env
Type=simple
ExecStart=/bin/liveworker
TimeoutStopSec=5
KillMode=mixed
Restart=on-failure
StandardOutput=append:/var/log/live-worker/logs.log
StandardError=append:/var/log/live-worker/error.log
[Install]
WantedBy=multi-user.target
sudo systemctl daemon-reload
sudo systemctl enable live-worker.service
sudo systemctl start live-worker.service