Configuration Management (CM)
- CM is set of engineering practices for managing the software delivery of applications to customers.
- Before we deliver the applications to customers we need to perform QA, so we need to create some local QA Environments
- System Testing
- Component Testing
- Performance Testing
- UAT
- There is redundancy in work, so we need some tool which helps in automating this redundancy.
- CM is all about defining a state, which we refer as desired state.
- Some of modern CM Tools include
- CFEngine
- Puppet
- Ansible
- Chef
- Salt Stack
- Powershell DSC
Our Organization
-
Lets understand our Organization, teams & Their responsibilities
- Jenny: Project Manager responsible for QT-HMS (QT – Hospital Management Systems)
- James & Team: Responsible for developing the applications
- John & Team: Responsible for QA
- Jack & Team: Responsible for the delivery of the application to customers & to John & Team.
-
All of these teams join together as a workforce to deliver QT-HMS to the customers (Hospitals)
-
Now lets look at typical workflow for the code submitted by the Dev Team (James & Team)
-
Jack & Team have to automate the environment creation.
-
How can environment creation be done
- Manual approach:
- Make a list of commands to be executed
- Ask an engineer to execute the same set of commands with slight variations on different environments
- We are ruling this out as it is manual & time consuming
- Develop Shell/Powershell script for deployment:
- Here we write scripts describing what & how it has to be done
- Handling changes is difficult
- Develop a CM Desired State Configuration:
- We develop a configuration describing what has to be done (Desired state)
- Handling changes is simple
- Manual approach:
-
Comparing shell & CM in plain english
- file creation when file is not present
Shell script create a file at C:\test.txt CM Script Ensure a file is present at C:\test.txt
- file creation when file is present
Shell script if the file is not present create a file at C:\test.txt CM Script Ensure a file is present at C:\test.txt
Configuration Management Generalized Architecture
-
We use CM to deploy applications on servers
-
Node: Node is a server where application has to be deployed
-
Configuration Management Server: This is a server where CM software is installed & it has responsibility of deploying applications to the nodes
-
Architectural Models
- Push Based CM: CM Server communicates with the nodes
- Pull Based CM: Nodes communicate with Servers
- Push Based CM: CM Server communicates with the nodes
-
Chef is a Pull Based CM Architecture.
-
Pull Based Architecture:
- Will nodes automatically know that they have to speak to server, No In pull based architectures, nodes will have agents installed in them which initiate communication with server.
- Agents will be verified by servers & only if they are valid server responds with the jobs to be done.
- Will nodes automatically know that they have to speak to server, No In pull based architectures, nodes will have agents installed in them which initiate communication with server.
-
In pull based Architecture,
- Installing agents on nodes is called as bootstrapping.
-
Now, James & His team will develop configuration Management scripts and upload to server
-
After the team has bootstrapped the nodes, nodes will start communication with CM Server and as response to that, the CM Script developed by Jack & Team gets executed