Unimpressive-as-a-Service No images? Click here Recently publishedWhy use a database? (video, under 2 min) Can't Find a CMS (blog post) JobsNo job postings right now. I am very keen to talk to more companies that want to hire in Elixir as I've had good success connecting companies with great candidates. Reach out at lars@underjord.io :) I'm missing a piece of stackIn my tongue-in-cheek video on The Perfect Stack I did note that there were some bits that I'm not sold on. The tech for deployment and releases is something I have the loosest hold on. You will need to pry hard and bring a lot of leverage to get me to use a different option in programming language. But Ansible? Just show me another option that makes better sense. Systemd? Eh, I'd only use it because it is there. When I was on Ship It! to argue with Gerhard about why Kubernetes seems unnecessary for many things he pressed me on some relevant questions. How do you update the OS? How do you deploy your software? The way I want to (but rarely do) run software is generally on dedicated hardware. I don't prefer containers unless they serve a specific purpose. I'd bring them in to constrain sprawling ML projects for example but I see no reason why my purpose-built apps should need a standardization-format. Let's consider how a Platform-as-a-Service like Fly.io would run things. They run on Nomad which for all intents and purposes does the Kubernetes thing but keeps it comparatively lean. Now if you check the requirements for Nomad in production I'm suddenly concerned as it sounds like a decent chunk of overhead. It may be that they are considering a larger deployment. Anyhow, with Nomad in place your application shouldn't care very much what it is running on and it will typically run in a container. Nomad is a bit special in that it doesn't require it to be containerized. It can orchestrate straight binaries. That appeals to me. I'm assuming that Fly would also run something like Terraform to set up their servers to the desired initial state. But I'm not sure. Because Terraform typically integrates with cloud providers to help you provision resources but when you are dealing with data centers and hardware that might not be as much of an option. Gerhard's question remains. How do you update the OS? For my small-time operations it might work to just occasionally log in and run the apt commands. How do I test that before doing it? I'd have to run another server with a similar enough config and try it there first. Is the manual strategy reliable? Eh, maybe. I'm not sure how Kubernetes solves this, I don't get the sense that it takes responsibility for the underlying OS it runs on either so I guess it would require occasional re-Terraforming. I don't know, haven't operated it. If my application is to run on one (for simplicity) or two+ (for availability) physical hosts I need a good approach for shipping the code over there, running it, maintaining the environment. The thing is, I think this is how you end up trying to build Kubernetes. By putting every need in the absolute requirements pile. And then getting absolutely murdered by the last 10% of effort. And before you know it you've built a general API for everything. I will have CI, and right now I'd look closer at Earthly since it allows local runs. Gerhard has promised that I'll like/threatened me with Dagger which he works on and I'll certainly hear him out. In the end CI can just produce an artifact for me. For Elixir that could just as well be a tar.gz of an Erlang release from running "mix release". I want CD and that's where we find some trouble. If you are running against a PaaS you push a container or some code and that triggers a deployment flow. They do rolling or blue-green deployment and roll back on failure and all of that. That's why I should at least experiment with Nomad. Get some of that nuance handled. If it turns out to be simple enough. Wherever I turn with this stuff I end up back at not wanting general solutions that bring a lot of complexity and I think Kelsey Hightowers thoughts (also from Ship It) ring true. Manual instructions for humans are the first implementation, then scripts and further automation going from there. And for me manual or scripts is probably enough. If I'm running on physical hardware I will rarely replace it and updates should probably be an occasional manual effort. Or scripted. I don't think I can motivate why I should have a framework or platform involved there. Maybe some convenient tooling for the scripting. And that's where I brush up against Ansible. Declarative-ish scripting and SSH. I do need to set up some fundamentals on any machine. Firewall rules, systemd scripts, an approach for switching to a new version of an app and keeping downtime low. How would you run at small scale? What setup would you enjoy managing? Suggestions very welcome at lars@underjord.io or find me on Twitter as @lawik. Thanks for reading. |