DevOps Classroom Series – 11/Sept/2020

Installing Chef Server

Enterprise Scenario

  • Lets have a look at our team again Preview

  • Refer Here for understanding teams

  • QT HMS Application Architecture Preview

  • QA Process of QT-HMS

    1. Component Env => Automated Unit Tests
    2. System ENV => Automated Functional Tests/Manual Test Engineer
    3. Stress ENV => Automated Stress Tests using Load runner/JMeter
    4. Pre-Staging (UAT) => Manual Tests Before production
    5. Production/Live => Customers
  • Chef Workflow

    1. Create cookbooks for
      • loadbalancer
      • appserver-1 (tomcat based app component)
      • appserver-2 (nodejs based app component)
      • redisserver
      • database
    2. Boot strap nodes
      • bootstrap nodes of all environments
      • edit run list of each node
      • Apply run list
    3. Wait for convergence
  • Challenges/Problems

    • Chef server always applies latest cookbook to node while convergence. To solve this we need to put restrictions on version of cookbook. This is where Chef environment comes into play
    • For every node we have to create a run_list and this is redundant job. if the run_list changes then apply changes to all the nodes applicable. It would be better if we can create some optimization over here. This can be achieved using Chef roles
    • Consider this scenario:
      • tomcat app in the dev might require java 11 and in all other environments it might be java 8
      • for one app server in the production we might need java 8 and for other server we might need java 9
      • so we need to learn how to apply attributes at different levels (environment, roles)
      • This is where chef attribute precedence comes into play
    • We need some kind of approach to hide sensitive content (like passwords). This is where chef data bags come into play
  • Lab Setup:

    • Lets manage 3 environments
      • QA
      • UAT
      • PROD
    • In QA lets use same machine for app server and db server
    • UAT & PROD will have two servers each
    • Lets create two cookbooks
      • qthms-app
      • qthms-db
    • Create 3 ubuntu & 2 redhat servers and ensure they are bootstrapped. (Exercise)
    • Lets create qthms-app Refer Here

Leave a Reply

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

About learningthoughtsadmin