This repo contains Ansible playbooks and tasks for configuring and administering the uncletopia server cluster.
The adduser role will set up the user that the game instance runs under.
The caddy role configured the frontend http server that exposes all the internal services such as the gbans website and grafana.
The gbans roles downloads and configures the gbans (and postgres) docker instances. gbans is a tools that provides centralized bans, appeals and other simple community components.
The metrics role is responsible for configuring the grafana & prometheus stacks.
The sourcemod role is responsible for configuring the metamod and sourcemod installation used in the srcds role. It will automatically download the latest metamod and source versions and fully rebuild the entire plugin tree to ensure compatibility.
srcds is responsible for downloading and configuring each games docker instance. We do not use steamcmd nor its auto update mechanics. Containers should not auto update themselves, so instead we use depot downloader to download the latest build, then rebuild the images. To save on download/rebuild times, the base tf2 image is cached untouched so subsequent updates only pull deltas.
srcdsup downloads and configures the srcdsup container. This allows demos to be uploaded out of band from the game instance to the gbans central instance for long term storage.
The system role installs base os dependencies we rely on. This includes things such as 32bit library support, docker, dotnet.
The tf2 role is responsible for configuring and bringing up the srcds docker images. This is the last step in deploying the game servers.
Install Ansible & Clone playbooks
sudo apt-add-repository --yes --update ppa:ansible/ansible
apt install ansible make git git-lfs sshpass -y
or for macOSgit clone git@github.com:leighmacdonald/uncletopia
pip install rcon
- Watch for game update triggers via
watcher/watcher.py
usingwss://update.uncletopia.com
- Trigger srcds build & upload image to docker hub.
- Trigger TF2 deploy.
If you are on a 64bit machine you will want 32bit libs for spcomp to execute.
sudo apt get install libc6:i386 lib32stdc++6
There is a pre-commit hook that you should enable to ensure you don't commit any unencrypted secret.
ln .hooks/pre-commit .git/hooks/pre-commit