News for hackers. Stuff that matters.
Re:Rapid growth, lessons learned and improvements at Fly.io by notpushkin on Monday March 06, 2023 @06:37PM (#35049453)
I'll start with the Swarm since it's a major point actually: Docker's Swarm mode is comparable to Kubernetes or Nomad: you can launch a cluster of servers and run your application there.

Unlike Kubernetes or Nomad though, it uses mostly the same concepts Docker Compose does, to the point that your development docker-compose.yml file will likely just work there (with some minimal tweaks). I love this website that talks more about it: https://dockerswarm.rocks/

> I would much rather have an automated deployment process that doesn't require human input, that way it can be scripted as part of CI/CD, etc.

This is almost doable with Lunni. This guide will walk through setting up a CI for a typical webapp that packages it in a Docker image and pushes to a registry: https://lunni.dev/docs/deploy/from-git/ (currently for GitLab CI + Registry, and GitHub Actions + GHCR only)

As for the continuous delivery, we're gonna have a webhook that you can call when your CI pipeline is finished. It's not exposed in the UI yet but I'll try to prioritize it (now that I remember I wanted to do it :')

`git push production` feels a bit easier, but I'm a bit concerned about bloat: for this to work, we'll have to bundle some sort of CI and container registry with Lunni. I think sticking with third-party CI is a more elegant approach here.

Re:Rapid growth, lessons learned and improvements at Fly.io by Aeolun on Monday March 06, 2023 @08:06PM (#35050156)
You can set up a git hook on repositories that listens for the completion of the docker_build task and then redeploys the app while pulling new images?
Re:Rapid growth, lessons learned and improvements at Fly.io by notpushkin on Tuesday March 07, 2023 @04:30AM (#35053381)
Not a git hook, but you can do that as a part of CI workflow. So, you can have a script like:

    docker buildx build --push ...
    curl -X POST https://lunni.example.com/api/webhooks/c8aaa9b8-1bda-4a99-820c-36a75d31f8a7
that will rebuild a Docker image, then trigger the redeploy.
Re:Rapid growth, lessons learned and improvements at Fly.io by moondev on Monday March 06, 2023 @09:56PM (#35050992)
> Most important though, it would allow you to add more nodes later on, and it will then scale your services across the whole swarm – so you can start with just one server and scale to hundreds if needed.

Have you in all honesty and with first hand experience, deployed and supported in prod on swarm over hundreds of servers?

Re:Rapid growth, lessons learned and improvements at Fly.io by notpushkin on Tuesday March 07, 2023 @04:37AM (#35053416)
Nope :') I do know a guy though, and I've heard good things. I'd love to hear about your experience too!

I know that it is possible to outgrow Swarm – I think that's a nice problem to have actually. We might include some tools for “graduating” from Lunni to something more serious like Kubernetes at some point.