Saturday, June 02, 2012

DevOps and remote IT provisioning through POB / POS

I Just released Remoto-IT, a Plain Old Bash (POB) script to perform Remote IT Management.

There has been a lot of talks in the last couple of years about the DevOps movement. To achieve agility in a software development team it is crucial to get an agile infrastructure team. Collaboration towards Automation is the answer.

A wiki can help and should be used for collaboration but a scripting language is needed for automation. Developers should be able to write scripts to configure and deploy applications, sysadmins should be able to write them to manage the OS. Ultimately both sides meet and share code that contribute to continuous automation delivery. Just in terms of security alone DevOps allow to have a second pair of eyes on what the server should host as everything ultimately resides in scripts (recipes). Continuous delivery is impossible without a great level of automation.

There are many products out there which standardize the way you organize server scripts to do remote provisioning. I personally like POB or more generally speaking Plain Old Shell (POS) provisioning. Yes, the kind ISPs have been doing for more than a decade. After all how can you be a linux sysadmin without knowing bash? I rather do not ask for ksh and csh experience right ;-) ?

The most important quality of good provisioning scripts is that they should be idempotent, a difficult property to achieve but yet not impossible to get accomplished in any programming language because after all it all comes down to the algorithm (system stories if you like).

Idempotence is not easily achievable in bash but I do not believe it is impossible either, especially when you want an all or nothing outcome and you are not interested in "starting from where I left it" POB can be definitely used to provide automated provisioning.

This is of course not a claim to ignore really great tools like Chef or Puppet. POS will always be useful in any case. Just be aware there are commands in bash that are not idempotent so you will need to do checks and cleanups by yourself. For example curl and tar are idempotent while mkdir is not.

Anything you manually do with computers should be scriptable and so applying bootstrapping further automated. That includes building a VM, starting it, configuring networking, installing packages, starting services etc.

When a sysadmin is at the beginning of the journey to configure machines ( especially in Unix/Linux but increasingly in Windows ) the interactions with the shell are the very first step. I have been trying to educate teams about the fact that we do not need to write a paragraph or a statement per command unless we get cryptic. It looks to me that POB can be clear enough to not only do the manual configuration but also to provide automation and documentation together in the form of a script.

Nowadays scripts are called recipes which from some kind of DevOps framework your developers or sysadmin will use.

No comments: