My new employer relies heavily on chef to install and maintain software configurations. I’ve been flying through the new user training classes, when things are slow at work. I’ve have built my own personal chef service to experiment with. Not only am I learning how to use Chef, at the same time I’m having to learn the Ruby programming language as well.
My initial goal is to build recipes to automate building and configuring my Internet servers, so I can recreate them at will, requiring only site backups, starting from scratch, all the way to a fully working website, with just a few commands. I want to do the same thing for my home services, which I’m currently running on hand built LXD containers.
I believe I learn new technology best when I use it to create my own solutions, and then after that, I’ll be able to take that knowledge and use it to better learn, and hopefully improve, the environment my employers have created.
And after just three short weeks, I’ve already started a list of issues that would seem to benefit from some automation. So far, it’s all minor things, like cleaning up /tmp or compressing older log files that consume precious disk space. Why make my team manually repeat the same commands night after night, when chef could just do all that every night, leaving us to fight real fires, when they occur.
When dealing with modern cloud technology, the best practices tell us to treat servers “like cattle, not pets”. Pets, you name, and try to keep alive at all costs. Cattle, well, you usually just number them, and terminate and process them at the end of each season. Then you start over with new cattle at the start of the next season. In other words, you make every server so easy to rebuild that deleting and rebuilding it is actually easier than repairing or maintaining it. Then, when your server acts up, you don’t worry about things like config files being screwed up, you just start over, with a fresh build. Somebody messes up and deletes something critical, or some hardware fails and corrupts a disk? Just delete that server, and start fresh. Need to scale up in a hurry, and add 4 more web servers? No problem.
And then your automation tools become your firms disaster recovery plan too. If you can rebuild all your services in any data center on the planet, you become less “locked in” to any service provider.