Go Home DevOps, You’re Drunk

Heidar Blocked Unblock Follow Following Apr 3, 2015

I’ve been doing a lot of devops lately at work. We use Chef for our old stack and Ansible + Docker for the new one. Previously a sysadmin, I’m now primarily a Ruby developer by day and a devops engineer by night. This has caused me to hold a few weakly held opinions on devops based on my experience so far.

All developers on a team should do and know how to do basic devops work.

This is opposed to having a single devops engineer who does all of it. If there is a dedicated devops engineer, then make him or her curate the devops repository and make sure everything the developers commit is done correctly.

I think it’s necessary for developers to have knowledge of the infrastructure to be able to develop an app properly. This is perhaps not always the case but it doesn’t hurt. Yes, have a single devops repository.

If you have many projects, having different provisioning code in each of them will easily become messy unless it’s managed properly. Keep it all in one repository and create reusable components (roles) that will save time in the future. Also separate provisioning and app deployment (separation of concerns) into individual components.

This also makes it easy for developers to spin up any project’s stack, all from the same place and using the same methods/tools. Use Vagrant.

Seriously, it’s so simple, just use it. I don’t understand teams who don’t, unless it has been replaced with another tool. Make it easy for developers (especially ones who have just joined the team or frontend developers) to spin up the stack in any environment. I never run different distros in production.

I hate when people tell me that tools which solve this problem are amazing. Sure, it’s cool but in most cases it’s not useful and not something the vast majority of teams need. Docker is one of the tools that solve this problem but I’m not sure it was ever a problem to begin with (not that Docker isn’t great). Running two versions of the same OS in production for the same stack is bad.

Keep your production stack the same for every app you run. If you need a new server and you have an option to run a newer version of FreeBSD when the old servers are still running the previous version just fine then just keep it the same and use the older version for the new server. Devops is a waste of time.

Well not totally. When done well it can save your developers a lot of time. Less and simple is almost always better. I personally find that Chef and Puppet fail badly when it comes to keeping things simple. I’m not sure I’d pick them over shell/Python scripts.

Ansible is very simple and it’s great until you need something really custom. Writing Ansible modules to do very specialized custom tasks can be a pain as modules in Ansible cannot share code.

I don’t know Salt very well so I cannot comment on that Docker is great but…

…it requires a lot of knowledge of the docker ecosystem to do well. I would avoid it unless you have time to learn to use it and its tools properly. The container architecture is almost certainly the future of doing things and immutable infrastructure is definitely the way forward but it’s still early days for these methods.

I hope these are interesting insights. I’m not a devops expert at all and would love to be told differently if I’m wrong anywhere. This is just a collection of the main things I learned from my devops experience, perhaps someone can relate?