3 ms·
I agree that Kubernetes for personal projects is likely going to be totally overkill for many, but I disagree that containers themselves are overkill, which thi
by giobox 8y ago
I agree that Kubernetes for personal projects is likely going to be totally overkill for many, but I disagree that containers themselves are overkill, which this author also suggests. These are arguably two separate issues entirely, and lumping them together is extremely misleading. I happily run all my (very small) side projects in containers without Kubernetes and it's really pretty simple to do so.
As soon as this author mentioned he was happy with using Ansible, Systemd etc instead (which are all reasonable tools for what they are) he lost me - this is collectively much more work for me as the sole developer than a simple Docker container setup for virtually all web app projects in my experience. If you understand these relatively complex tools, you can likely learn Docker well enough in about an hour or two, the payoff in time savings in the future will make this time well spent.
In my experience "Dockerising" a web app is much, much less time consuming than trying to script it in Ansible (or Chef, Puppet, <name your automation tool>) and of course much less error prone too. I've yet to meet an Ansible setup that didn't become brittle or require maintenance eventually. If you are using straight forward technologies (Ruby, Java, Node, Whatever) your Dockerfile is often just a handful of lines at most. You can even configure it as a "service" without having to bother with Systemd service definitions and the like at all.
- imhoguy 8y agoAnsible + Docker play well together and are both a weekend effort to learn and use on side-project. Both work fine for me on cheap dedicated machine. Ansible is a good documentation of how the bare metal host is configured including Docker setup and compose like config[0]. Docker handles apps setup, isolation and local networking nicely. Then playing with Kubernetes on private project would have only Résumé-value for me. [0] https://docs.ansible.com/ansible/latest/modules/docker_container_module.html https://docs.ansible.com/ansible/latest/modules/docker_conta... (check other docker modules too)
- ngrilly 8y agoOut of curiosity, how do you deploy new versions of your without downtime (start new containers, wait for new containers to be ready, switch traffic to new containers, shutdown old containers)?
- giobox 8y agoFor me personally zero downtime upgrades are a little beyond the scope of "personal project" and veering into something more production quality. If I really had to for one of these, I'd probably just do something at the loadbalancer to start routing users to the new container stack then shutdown the old ones, much as you might have in the pre-container days. I can just wait the old fashioned way (by sitting in my chair for a minute) for them to start.
- ngrilly 8y agoOk, this is basically what I do with an Ansible script, but I see it as a bit messy and non-standard, which is why I'm attracted to Docker swarm mode and Kubernetes (and maybe Nomad).
- giobox 8y agoFair, but I think it's arguable there isn't really a "standard" way for container orchestration, and Docker Swarm to me is starting to feel like a dead horse, despite protestations to the contrary from Docker. The requirements of different software always make each project's needs for zero downtime upgrades different enough, especially if you are dealing with legacy software. Pick the one that works best for you and your projects goals (within reason...).
- ngrilly 8y agoRight, there isn't really a "standard". There are so much existing solutions: Kubernetes, Docker swarm mode, Nomad, Spinnaker, etc. What I meant by "standard" is something used by more than one team :-) Agreed by Docker swarm mode feeling a bit abandoned. Do you have any recommendation for a solution that I would have missed?