Scenario of an Organization (LT)
- LT is working on a project towards Health Care Software MRS
- The architecture of the project
- To work on this project we have 3 developer teams
- Front end
- django/mrs developers
- java/radiology developers
- We also have a
- QA Team
- LT according to their QA policy wants to build
- Day build environment (Component test)
- System Test (Nightly build)
- Performance test (Weekly build)
- Customer Demo (Release build)
- So doing the deployment of the applications manually is no longer the option.
- LT already has servers available for all the environments, We need a solution to deploy the applications and/or configure the applications so that stake holders can use it.
Possible Solutions:
- Lets take the following analogy
- Now lets apply the same to scripting vs configuration management
- Example:
- Install apache server on ubuntu
- shell/bash:
sudo apt update && sudo apt install apache2 -y
- configuration management: we will be writing in some syntax which implies
Ensure apache2 is installed
- shell/bash:
- Create a file at /usr/share/ltmrs/info.config
- shell/bash:
touch /usr/share/ltmrs/info.config
orecho "" > /usr/share/ltmrs/info.config
- configuration management: we will be writing in some syntax which implies
Ensure file is present at /usr/share/ltmrs/info.config
- shell/bash:
- Install apache server on ubuntu
- Configuration management are designed to be idempotent. Idempotance is a property which ensures you will get the same result irrespective of how many time you executed the script.
- If we use shell/Powershell scripts the developer of the script needs to write conditional statements almost for every step to ensure idempotance which becomes difficult to read & maintain.
- With Configuration management tools we use declarative approach to automate where we will mention our desired state (Ensure apache2 is installed), whereas in shell scripts we follow procedural approach.
Exercise:
- Azure Free tier Account Creation Refer Here
- AWS Free tier Account Creation Refer Here
- Necessary Software Installation Refer Here
- For Windows 10 and above configure Windows Terminal Refer Here
- Create an account in manage.chef.io Refer Here