Warning
Chef Manage is deprecated and no longer under active development. It is supported on Chef Automate installations up to version 1.8 and replaced by Chef Automate 2.0. Contact your Chef account representative for information about upgrading your system. See our Automate documentation to learn more about Chef Automate 2.
This document is no longer maintained.
Note
Note
An environment is a way to map an organization’s real-life workflow to what can be configured and managed when using Chef Infra. This mapping is accomplished by setting attributes and pinning cookbooks at the environment level. With environments, you can change cookbook configurations depending on the system’s designation. For example, by designating different staging and production environments, you can then define the correct URL of a database server for each environment. Environments also allow organizations to move new cookbook releases from staging to production with confidence by stepping releases through testing environments before entering production.
Environments can be managed from the Chef management console web user interface.
To add an environment:
Open the Chef management console.
Click Policy.
Click Environments.
Click Create.
In the Create an Environment dialog box, enter the name of the environment and a description.
Click Next.
Optional. Set a constraint by choosing a name, an operator, and a version:
Click Add. Continue this process until all constraints are added. When finished, click Next.
Optional. Add default attributes as JSON data:
Click Next.
Optional. Add override attributes as JSON data:
Click Create Environment.
To delete an environment:
Open the Chef management console.
Click Policy.
Click Environments.
Select an environment.
Click Delete.
To edit the details of an environment:
To set the environment for a node:
Open the Chef management console.
Click Nodes.
Select a node.
Click the Details tab.
In the top right, from the Environment drop-down, select the environment:
Click Save.
To view environment details:
A default attribute is automatically reset at the start of every Chef Infra Client run and has the lowest attribute precedence. Use default attributes as often as possible in cookbooks.
To edit default attributes for an environment:
Open the Chef management console.
Click Policy.
Click Environments.
Select an environment.
Click the Attributes tab.
Under Default Attributes, click Edit.
In the Edit Environment Attributes dialog box, enter the JSON data that defines the attribute (or attributes).
Click Save.
To view default attributes for an environment:
An override attribute is automatically reset at the start of every Chef Infra Client run and has a higher attribute precedence than default, force_default, and normal attributes. An override attribute is most often specified in a recipe, but can be specified in an attribute file, for a role, and/or for an environment. A cookbook should be authored so that it uses override attributes only when required.
To edit override attributes for an environment:
Open the Chef management console.
Click Policy.
Click Environments.
Select an environment.
Click the Attributes tab.
Under Override Attributes, click Edit.
In the Edit Environment Attributes dialog box, enter the JSON data that defines the attribute (or attributes).
Click Save Attributes.
To view override attributes for an environment:
Permissions are used in the Chef Infra Server to define how users and groups can interact with objects on the server. Permissions are configured per-organization.
The Chef Infra Server includes the following object permissions:
| Permission | Description |
|---|---|
| Delete | Use the Delete permission to define which users and groups may delete an object. This permission is required for any user who uses the knife [object] delete [object_name] argument to interact with objects on the Chef Infra Server. |
| Grant | Use the Grant permission to define which users and groups may configure permissions on an object. This permission is required for any user who configures permissions using the Administration tab in the Chef management console. |
| Read | Use the Read permission to define which users and groups may view the details of an object. This permission is required for any user who uses the knife [object] show [object_name] argument to interact with objects on the Chef Infra Server. |
| Update | Use the Update permission to define which users and groups may edit the details of an object. This permission is required for any user who uses the knife [object] edit [object_name] argument to interact with objects on the Chef Infra Server and for any Chef Infra Client to save node data to the Chef Infra Server at the conclusion of a Chef Infra Client run. |
To set permissions list for an environment object:
To update the permissions list for an environment object:
To view permissions for an environment object:
© Chef Software, Inc.
Licensed under the Creative Commons Attribution 3.0 Unported License.
The Chef™ Mark and Chef Logo are either registered trademarks/service marks or trademarks/servicemarks of Chef, in the United States and other countries and are used with Chef Inc's permission.
We are not affiliated with, endorsed or sponsored by Chef Inc.
https://docs.chef.io/server_manage_environments/