- Developer => submits code to git (VCS)
- CI/CD Engine picks up the code and does build/package
- CI/CD Engine Executes the Unit Tests
- CI/CD Engine needs to create Test Environments (System Test/Load Test/Performance Test) and execute the test cases
- Once tests are successful then post approval , you go live.
- Creating Environments is Deploying applications into servers.
- It might also include creating virtual Servers
Sample Java Based application
- Developer commits the Code
- Build and package is done by build tools like maven
- Result of Build/Package will be a file with jar/war extension
- To deploy application in server
- JDK 1.8 needs to be Installed
- tomcat 8 needs to be installed
- Copy the package into some folder
- restart tomcat
- Clean up temp directories
Possible ways of deployment
- Administrator executes the pre-requisites, deployment and post-deployment steps
- Time Consuming
- Humans are not good at repetition
- We cannot guarantee all admins will give same result
- We tend to write shell/PowerShell scripts to solve the deployment
- In scripts we write instructions about how the deployment has to be done
- Scripting is generally based out of assumptions
- Scripting is mostly unreadable.
- We use Declarative Way, which means you will write what has to done but not how it has to done
- CM scripts are idempotent. Executing CM Scripts will always give the same state
- In CM you write the desired state to be achieved.
- Learning Curve
Configuration Management Architecture
Configuration Management Server:
- This server has CM scripts all the necessary infrastructure.
- These are servers/machines where you want to apply configuration
- Push: In case of Push based CM, Server will initiate communications to the nodes
- PULL: In this case, nodes will initiated communications with the server.
PULL Based Configuration Management.
- Agent has to installed on all the nodes.
- Agent will have information about server
- Agent will communicate with the Server
- This agent needs to verified by server, we will have some security mechanism.
- Once Agent is authorized, the conversation might look like
Do i have any work to be done
- Process of installing agent on node is called as Boot-straping
- Is the time (periodic) when agent communicates to the server and gets the CM done.
- Configuration Drift:
- Deviation between desired state and actual state on the node.