1
0
Fork 0
 
 
Go to file
Ambrose Chua 00b3c3cf86 Minor updates 2020-05-20 10:24:26 +08:00
ansible Minor updates 2020-05-20 10:24:26 +08:00
scripts Add some scripts used in post-production 2020-03-26 23:16:54 +08:00
.gitmodules Add node_exporter role 2020-03-09 01:01:16 +08:00
LICENSE Initial commit 2019-12-05 22:53:27 +08:00
README.md Add cheat sheet snapshot 2020-05-12 18:07:18 +08:00
cheatsheet.pdf Add cheat sheet snapshot 2020-05-12 18:07:18 +08:00
dashboard.json Initial commits for lecture theatre audio source 2020-03-16 23:01:10 +08:00

README.md

fossasia-video

The experimental FOSSASIA video recording setup

Looking for the video recorder's guide? The collaborative version is on Google Docs and a PDF is available in this repository.

There is also the video equipment sheet

Overview

Installing Debian

For the recording machines, get a fresh copy of Debian, and install it with the following settings:

  • Keyboard: American
  • Username: opentech
  • Hostname: model-increment
    • Example: x220-01
  • Add GNOME Desktop
  • Add OpenSSH Server
  • Leave Print & System Utilities enabled

If a GNOME Desktop and SSH daemon is already installed, a reinstall is not required but recommended.

WireGuard

To set up the overlay WireGuard network to manage machines everywhere, a server needs to be set up. wireguard-negotiator is a tool written to automate some of the key exchange, that must be run on a publicly accessible server as root:

# Create WireGuard interface
ip link add dev wg1 type wireguard
ip addr add fd11:f055:a514:0000::1/64 dev wg1
# Configure the interface once. Assumes the configuration file exists
# See WireGuard docs on how to write this configuraion file
wg setconf wg1 /etc/wireguard/wg1.conf
# Bring up the interface
ip link set wg1 up
wireguard-negotiator server -i wg1 -e [hostname] -l :8080 -I -B

On every recording machine, the client can be easily configured like so:

# For now, we have to manually install WireGuard
echo "deb http://deb.debian.org/debian/ unstable main" | sudo tee /etc/apt/sources.list.d/unstable.list
printf 'Package: *\nPin: release a=unstable\nPin-Priority: 90\n' | sudo tee /etc/apt/preferences.d/limit-unstable
sudo apt update
sudo apt install wireguard
# TODO: validate this section
sudo systemctl enable --now systemd-networkd
wget -O wgn http://[hostname]:8080
chmod +x wgn
sudo ./wgn request -s http://[hostname]:8080

Configuring Rooms

To specify the room for a specific host, do the following:

echo the_room_id > ~opentech/room_id
echo teh_room_type > ~opentech/room_type
# Example for Event Hall 2-1:
echo EH2 > ~opentech/room_type
echo EH2-1 > ~opentech/room_id

See the Video Equipment Google Sheet for the specific IDs. To get edit access, DM @serverwentdown on Telegram.

This step is optional. This and the following steps should be done for every change in room or setup of the laptop.

Exporting Hosts

Export all hosts on the overlay network from WireGuard configuration:

wireguard-negotiator dump > wireguard.list

This list of IPs can be exported into our Ansible hosts format as such:

go run event-generate.go opentech < wireguard.list > event

The script event-fetch-generate.sh does the exporting and generating of the event inventory.

Running Playbooks

Before running any Playbooks, switch to SSH authentication:

ansible-playbook -Kf 8 -kc paramiko -i event ssh-key.yml
ansible -Kf 8 -kc paramiko -b -i event all -a reboot

Now, plays can be run like so:

ansible-playbook -Kf 4 -i [inventory] [playbook]
# Example:
ansible-playbook -Kf 4 -i event recorders.yml
ansible-playbook -Kf 4 -i event recorders-stop.yml
ansible-playbook -Kf 4 -i event reboot.yml
ansible-playbook -Kf 4 -i event upgrade.yml

And run commands like so:

ansible -Kf 8 -b -i event all -a 'apt install firmware-iwlwifi'