Documentation and automation

In addition to my article about documentation and automation, I found an interesting statement in the book "The Practice of System and Network Administration". The author of chapter 9 ("Documentation") stats:

Documentation is the first step to automation: If you don't know exactly how you do something, you can't automate it.

I haven't thought of it this way before. In my opinion he is right, but I think you don't have to write the documentation on paper, but you must have some sort of documentation in your head to automate a task. It can be easier to write a script and test it with a written documentation. You can use your documentation as some sort of pseudo code.
Another sort of documentation, your command history, is also a good starting point for automation (also mentioned in this chapter).

About automation and system adminstration


Hi,


there are a lot of tools for automating multiple tasks in system administration, like puppet, cfengine, spacewalk, kickstart, fai, autoyast, nagios, to only name some examples. But why are they not used by everyone?


I can think of the following arguments to use automation tools:
  • Less work: You will do some tasks only once and after that you gain a lot of time by repeating it automatically.
  • Reproducible results: Automation means scripts, and this way you can reproduce results by just executing a script or a tool for a second, third, ... time.
  • Homogeneous environment: When your work is reproducible you can set up different environments in the same way.
Some people are against automation. The reasons I've heard so far:
  • Why am I still needed when I automated my task?
  • It is not reliable enough.
  • We do not know what is happening.
As I see it with automation you do not get unnecessary, but you are needed for other work. You will have to maintain and improve the automation. And your automation is not unreliable, because you can test it. And with the test you know what is happening, and also because you wrote the scripts and the documentation for the scripts. On the other hand you will get more time for the interesting things at work. I know a lot of people who have a list in their head or written down of tasks they would like to do when they had more time. With automation you get this time.






With automation it is the same as with documentation, when it is done well, you can pass the work to your co-workers. Take a look at this post.


To get another view of this topic, take a look at this post John Willis.