Recommended ways to use Chef-Solo
In many cases, we need some default system configuration on many servers. Instead of repeating the same code again and again, it is always better to use roles.
As we have an example of web_server
in the previous chapter, we can create roles for web servers, databases, and so on, depending on the nature of the infrastructure.
Generally, we come across this scenario when things work perfectly when we are developing applications, but in a live environment, some bugs always show up. Most of the time, these kinds of problems occur because of the inconsistent behavior of the production and staging environments. It is true that we cannot overcome all the issues with Chef, but we can avoid the problems by checking for issues at every step.
The following two methods are usually implemented to develop cookbooks and recipes:
To finish the application and start writing the recipe: The problem with this approach is that during the development of an application, you install...