DevOps Classroom Series – Chef – 19/Nov/2019

Configuration Management

Example Scenario

  • 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

  • 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 mvn package
  • Result of Build/Package will be a file with jar/war extension
  • To deploy application in server
    • Pre-requisites:
      • JDK 1.8 needs to be Installed
      • tomcat 8 needs to be installed
    • Deployment
      • Copy the package into some folder
      • restart tomcat
    • Post-Deployment:
      • Clean up temp directories

Possible ways of deployment

  • Manual:

    • Administrator executes the pre-requisites, deployment and post-deployment steps
    • Problems:
      • Time Consuming
      • Humans are not good at repetition
      • We cannot guarantee all admins will give same result
  • Scripting:

    • We tend to write shell/PowerShell scripts to solve the deployment
    • In scripts we write instructions about how the deployment has to be done
    • Problems:
      • Scripting is generally based out of assumptions
      • Scripting is mostly unreadable.
  • Configuration Management:

    • 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.
    • Problems:
      • Learning Curve

Configuration Management Architecture

  • Configuration Management Server:

    • This server has CM scripts all the necessary infrastructure.
  • Nodes:

    • These are servers/machines where you want to apply configuration
  • Models:

    • 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.

Preview

PULL Based Configuration Management.

  • Agent:
    • 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
      

Preview

  • Bootstrap:
    • Process of installing agent on node is called as Boot-straping
  • Convergence:
    • 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.

By continuous learner

devops & cloud enthusiastic learner

Leave a Reply

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

Please turn AdBlock off
Plugin for Social Media by Acurax Wordpress Design Studio

Discover more from Direct DevOps from Quality Thought

Subscribe now to keep reading and get access to the full archive.

Continue reading

Visit Us On FacebookVisit Us On LinkedinVisit Us On Youtube