After a week of working on re architecting the QOTO servers I'm mostly there. I had to write a whole new load-balancer from the ground up. The old one didnt work with docker-swarm.

The load balancer is now automated like before AND distributed. So basically I never need to worry about obtaining or configuring ssl certs or even fussing with nginx configuration. When i bring a new service up into the swarm I simply add some labels to the service and the load balancer I wrote will automatically detect it and rewrite its own nginx configuration, obtain new certs (or renew existing ones) and automatically route itself to the new service.

This was the bulk of the work, I put the source code up for it (its three containers) here for anyone who might want to steal it, I'll be documenting it and cleaning it up tomorrow:

git.qoto.org/modjular/swarm-pr

I also automated the process of bringing up new nodes in the swarm so I wrote a whole bunch of scripts for that in a separate repo (I'll share that tomorrow). So at this point its just a matter of actually bringing the services up in the new framework. So far I've tested it with two services and works great.

So starting tomorrow I can start migrating QOTO services to the new framework hopefully. Its amazing how easy this is going to make my life.

Sign in to participate in the conversation
Qoto Mastodon

QOTO: Question Others to Teach Ourselves
An inclusive, Academic Freedom, instance
All cultures welcome.
Hate speech and harassment strictly forbidden.