Configuration info for running and maintaining Whitney.
Certbot helps me keep my letsencrypt certificates up to date for whitney.rip.
Covid 19 app from https://github.com/KevRunAmok/Covid19app
& dockerized by me to build both the app and the dependancy mysql container.
Jenkins instance for automating things on Whitney.
Grafana instance for Whitney. Creates a Grafana and Node-Exporter instance that interface with the Prometheus instance.
Served at grafana.whitney.rip
.
Minecraft servers, dockerized. Emits metrics that are read by Prometheus, and shown in grafana. Responsible for spinning up the servers that run at mc.whitney.rip
and minecraft.whitney.rip
. Metrics are emitted for both servers to Grafana.
A simple node server from https://github.com/runyanjake/node_whitney, dockerized for ease of use.
Self-hosted plex instance.
Admin console for monitoring docker containers.
Central Prometheus instance responsible for gathering metrics and exposing them to Grafana.
- Sometimes on startup mysql/minecraft containers may fail due to lock files persisting after shutoff. Happens mainly when server is hard powered off but can still happen if soft poweroff. Fix by removing (/data/covid/mysql/mysql.sock.lock for mysql, /data/minecraft_xxxx folders for minecraft servers.
- These steps assume a fresh install of Ubuntu Server. Complete this with default selections.
- Install Docker. Do NOT install it from the installer (snap), instead follow https://www.digitalocean.com/community/tutorials/how-to-install-and-use-docker-on-ubuntu-20-04.
- We also are gonna need Docker Compose: https://www.digitalocean.com/community/tutorials/how-to-install-and-use-docker-compose-on-ubuntu-20-04
- Install OpenSSH (
apt-get install openssh-server
) and make sure the server is reachable over the local internet. - Install Github CLI (gh). Add the library and install with apt rather than installing another package manager: https://www.techiediaries.com/install-github-cli-ubuntu-20/
- Authenticate with Github (
gh auth login
) with SSH, using a personal access token. Create in settings > developer settings > personal access token. It needs workflow, admin::publickey, and read::org privs. - Set up Portainer. Ensure that the container is running successfully, then allow the port through the ubuntu firewall (ufw) and check it's visible from another computer on the same network.
- Set up Grafana and Prometheus. Since there is a circular network dependency for them, you might need to re-run the commands until all the dependencies are set up or create the networks ahead of time. Dependencies are like grafana <--> prometheus --> minecraft.
- Verify Prometheus is reachable on port 9090. Check that status > targets shows items as green.
- Verify Grafana is reachable on port 3000. Log in as admin:admin (default creds) and change the admin password. Create a new Grafana data source to read from Prometheus (see whitney/grafana for more) and import the dashboard with id
1860
as a starting point. - Set up Jenkins. Reset the admin password and configure any jobs that templates have been saved for.
- Set up CertBot. Generate certs for all websites we want to have certs for.
- Set up Nginx. Make sure any dependent website repos are cloned to /var/www/html/ (made by first unsuccessful run of nginx, or manually)