DevOps Classroom Series – 05/Jan/2021

Scenario of LT-Payroll Management System

  • Learning Thoughts has developed a Payroll Management System
  • The High level architecture of Payroll management System is Preview
  • Now lets look at implementation details Preview
  • Now lets look at their customers Preview
  • Now Learning Thoughts wants to add lot of features for their customers
    • EPFO Balance (401k)
    • Personal finance module
    • Integration with Banks for quick loan approvals
    • Insurance Purchase options
  • Learning thoughts will be deploying small feature every two weeks with zero or minimal downtime
  • Lets look at learning thoughts QA process before deploying Preview
  • Now to do this LT DevOps team has to perform lot of actions on different test environments
  • For running tests we have scripts, all DevOps team needs to do is
    • to install application
    • run the scripts
  • Our assumption is for every testing environment we have servers with operating system already available
  • Now to install the application
    • we need to install some softwares
    • change some configurations
    • modify environmental variables etc.
    • install our application on top of it
  • Since it has to be automated, lets see the possibilities
  • Lets take a scenario of manager as shown below Preview
  • Lets take this analogy and apply to devops Preview
  • So, it will be easier for a devops engineer to work with configuration management tools like Ansible, chef, salt stack, puppet, cfengine … where devops engineer can express what has to be done in terms of configuring the system.
  • The approach to speak looks like
ensure packages are upto date
ensure java is installed
ensure tomcat is installed
ensure tomcat service is running
ensure the file from https://lt-payroll/internals/app.war is downloaded to tomcat webapps folder
  • Desired State: Desired state in CM is what you want
  • Configuration Managment tools will always work to meet the desired state expressed
  • In the case of procedural way
# ensure packages are upto date
sudo apt-get update
#ensure java is installed
sudo apt-get install openjdk-8-jdk -y
# ensure tomcat is installed
sudo apt-get install tomcat8 -y
# ensure tomcat service is running
sudo service start tomcat
#ensure the file from https://lt-payroll/internals/app.war is downloaded to tomcat webapps folder
cd /var/lib/tomcat8/webapps
wget https://lt-payroll/internals/app.war

  • When we run declarative approach on the system where everything is configured
ensure packages are upto date  ---> packages are already upto date so i will not do anything
ensure java is installed   ---> Java is already installed so skipping this step
ensure tomcat is installed  ---> Since tomcat is already installed skipping this step
  • when you run declarative approch on the same system multiple times the result will be same (Idempotance)

  • In the procedural approach the result may or may not be the same on multiple executions

  • Note:

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

About learningthoughtsadmin