Revision of last six sessions
- To deploy applications in various test and prod environments
- We need to have or create servers
- Once the server is available we need to execute set of steps to configure the application
- Configuration Management is all about automating set of steps to configure the application in an environment
- Set of steps automation
- Scripting
- This is procedural (we have to specify how and what has to be done)
- Executing same script multiple times on same machine for different versions of the deployment might not give same results
- Configuration Management
- This is declarative (we have to specify what has to be done)
- Executing same script multiple times on same machine for different versions of the deployment will give same result (idempotance is supported in CM)
- Scripting
- Architecture of Configuration Management
- We will have nodes which are servers where the application has to be deployed
- We will have a server for configuration management
- We have two possibilities in CM
- PUSH based CM
- Example: Ansible, Salt Stack
- PULL based CM
- Example: Chef, Puppet
- PUSH based CM
- Since Chef is a PULL Based CM, we need to install agents on nodes (bootstrapping)

- We can install chef server on a linux machine or go with hosted chef Refer Here
- we have learnt how to bootstrap nodes using chef dk (knife), upload cookbooks (berkshelf)
- We have started looking at hosted chef server and came to following conclusion

- We have to learn the chef cookbook development workflow
- Gather all the steps required to manually configure the application
- Take each step and try to find the equivalent chef resource to perform the step
- organize the steps in the recipes
- Test the developed recipes using test kitchen
- Test Kitchen helps in creating linux/windows machines in
- AWS
- Azure
- Docker
- Virtual Machines in vmware, virtual box or hyperv using Vagrant Refer Here
Test Kitchen Configuration
- Lets take the the following scenario
- Linux Apache Server and mysql (LAMP Stack)
- Ubuntu Refer Here
- Centos 7 Refer Here
- Steps:
- Try executing manual steps on a machine to verify if they are working or not
- Now create a chef cookbook
chef generate cookbook -b mylamp- Now try configuring test kitchen to test your recipes in desired environments
- In this case lets try to configure test kitchen to create an ubuntu instance in aws Refer Here
