Lightweight Environment, Round 2

Further adventures with hosted Git, Drone, and Haproxy on a tiny VPS environment (now in Ubuntu 19)


It was time. An overdue SSL encryption layer and an unavailable storage volume put me deep into an upgrade of my over-engineered cheapskate server infrastructure. Here's some notes from the ride, and how my decisions held up over time.

VPS Environment

Then: Digital Ocean

Now: Digital Ocean is still great! They've doubled the RAM and added an extra 5GB on their smallest droplet, which is still priced the same. I've also moved all my DNS hosting fully to their stack - it's nice to be consolidated.

Notes: Digital Ocean doesn't offer their full range of services across the board. I was interested in an additional storage volume for an upcoming project, but it wasn't available on the datacenter I'd selected years ago. This problem helped drive the need for the environment upgrade. Know before you go: https://www.digitalocean.com/docs/platform/availability-matrix/

Verdict: Win.

Git Hosting

Then: Gogs, a superb lightweight client with (apparently?) one maintainer.

Now: Gitea, a fork of Gogs to encourage community development. They've got a great contribution model, recent contributions, improved file structure, and faster issue resolutions - while still fast, lightweight, and free.

Notes: An interesting problem arose during this switch: first, I had started backing the Git clients using Redis. Unfortunately, for such tiny instances, an in-memory database quickly hit the wall - and Linux starts killing processes to free memory. Postgres became the backing data store.

Verdict: Win.

Load Balancing

Then: HAProxy.

Now: HAProxy. Hard to go wrong with the classics.

Verdict: Win.

SSL Encryption

Then: Nothing.

Now: Certbot, with an interesting HAProxy strategy: https://serversforhackers.com/c/letsencrypt-with-haproxy.

Verdict: Win.

Continuous Deployment

Then: Drone 0.4, lightweight, with Gogs

Now: Drone 1.0. Still lightweight, and recommended Gitea support - but configuration was a pain. The debug logs can be pretty miserable (I swear, if I see one more invalid character '<' looking for beginning of value...) and the use of Docker means lots of environments to keep straight.

Notes: Be sure to turn on logging for the Drone Docker container. You must install a runner. Make sure your RPC keys match. Turn on debugging in the runner. Keep a straitjacket nearby. Lead dev is nice enough though, and seems very communicative, so +1 there.

Verdict: Loss. This was no fun to set up, a real character builder. I ended up persevering mostly because I already had it set up before, but in the end, it really took the enjoyment out of overengineering stuff.

Closing Thoughs

We end our story here, with 4 wins and 1 loss - ye who seek the lands of inexpensive, lightweight server infrastructure, venture forth in confidence!