What is Configuration Management and why do we need automation?
Let’s try to understand Configuration Management with a simple and classic example of a server administrator. Suppose in an organization, the task of updating or installing software on several machines is given to a server administrator. If there are five or six machines, then it would be simple. But the complexity increases if there are thousands of machines running and the same task is to be performed on every other machine. This can lead to human errors and also the time required to complete it would be more. In order to automate this task, Configuration Management is used.
Configuration Management (CM) is an efficient method of automating large tasks. In addition to automating tasks and processes, Configuration Management also enables you to keep track of different versions of the software, their updates and any other changes made to them continuously. So, if something goes out of control or if there are any errors, you can always revert the version that was previously stable and working well. In short, Configuration Management is the concept of turning your server infrastructure into code and its implementation calls for the requirement of useful Configuration Management tools.
General architecture of a configuration management tool
Every configuration management tool will have a server where the configuration data is stored and some machines (nodes) whose configuration needs to be maintained. How the nodes get configuration from the main server depends on the type of configuration management tool used.
Basically there are two types of Configuration Management tools:
- Push based configuration management
- Pull based configuration management
Push based management is simple and easy to set up but provides poor scalability. Here, it is the central server or the master node which takes the responsibility to contact the connected nodes and to send updates when they occur. Whenever a change is made to the infrastructure (code), each node is informed of the update and they run the changes. Tools implementing this type of configuration are ‘salt’ and ‘ansible’.
Pull based management provides good scalability but is difficult to manage. The server nodes run an agent daemon that periodically checks from the master node if/when there are any updates to be pulled and applied. A daemon needs to be installed on all machines and a setup of the central authority is required. ‘Chef’ and ‘Puppet’ implement pull based management.
The Configuration Management tools provides several advantages:
· Complete automation
· Increased uptime of servers
· Improvement in performance
· Ensure compliance
· Prevent errors
· Reduce costs
In summary, which tool should you use? The answer depends on what your fundamental need is and how much customization are you willing to do.
A largely static infrastructure will benefit more from Push Based Configuration Management, while an extremely dynamic infrastructure will find Pull Based Configuration more suitable. You could also use a combination of the two — use Pull for initial configuration setup and Push for application deployment. Once you understand the advantages, the possibilities are endless.