Installing Chef Server
Enterprise Scenario
-
Lets have a look at our team again

-
Refer Here for understanding teams
-
QT HMS Application Architecture

-
QA Process of QT-HMS
- Component Env => Automated Unit Tests
- System ENV => Automated Functional Tests/Manual Test Engineer
- Stress ENV => Automated Stress Tests using Load runner/JMeter
- Pre-Staging (UAT) => Manual Tests Before production
- Production/Live => Customers
-
Chef Workflow
- Create cookbooks for
- loadbalancer
- appserver-1 (tomcat based app component)
- appserver-2 (nodejs based app component)
- redisserver
- database
- Boot strap nodes
- bootstrap nodes of all environments
- edit run list of each node
- Apply run list
- Wait for convergence
- Create cookbooks for
-
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
- Lets manage 3 environments
