There are multiple ways to manage environments in Chef. They are described in the following subsections.
Knife can be used to create, edit, delete, show information about a particular environment, or list all available environments. It can be used to push the configuration concerned with an environment through a file containing code written using Ruby DSL and eventually this file can be maintained in the version control system.
knife environment create ENVIRONMENT_NAME command can be used to create a new environment. Let's use it to create a new environment called
production and see the command in action:
$ knife environment create production
As soon as you execute this command, an editor ...