Using environments
Having separate environments for development, testing, and production is a good way to be able to develop and test cookbook updates, and other configuration changes in isolation. Chef enables you to group your nodes into separate environments so as to support an ordered development flow.
Getting ready
For the following examples, let's assume that you have a node named server in the _default
environment and that you have at least one cookbook (I'll use the ntp
cookbook) registered with your Chef server.
How to do it…
Let's see how to manipulate environments using knife:
Note
This is only a good idea if you want to play around. For serious work, please create files describing your environments and put them under version control as described ...
Get Chef Cookbook - Third Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.