Manage Data Bags
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
Data bags store global variables as JSON data. Data bags are indexed for searching and can be loaded by a cookbook or accessed during a search.
Manage
Data bags can be managed from the Chef management console web user interface.
Add Data Bag
To add a data bag:
Open the Chef management console.
Click Policy.
Click Data Bags.
Click Create.
-
In the Create a Data Bag dialog box, enter the name of the data bag.
Click Create Data Bag.
Delete Data Bag
To delete a data bag:
Open the Chef management console.
Click Policy.
Click Data Bags.
Select a data bag.
-
Click Delete.
Manage Items
A data bag is a container of related data bag items, where each individual data bag item is a JSON file. knife can load a data bag item by specifying the name of the data bag to which the item belongs and then the filename of the data bag item. The only structural requirement of a data bag item is that it must have an id
:
{
/* This is a supported comment style */
// This style is also supported
"id": "ITEM_NAME",
"key": "value"
}
where
-
key
andvalue
are thekey:value
pair for each additional attribute within the data bag item -
/* ... */
and// ...
show two ways to add comments to the data bag item
Add Item
To add a data bag item:
Open the Chef management console.
Click Policy.
Click Data Bags.
Select a data bag.
Click Create Item.
-
In the Create a Data Bag Item dialog box, enter the data bag identifier, and then JSON data that defines the data bag item.
Click Create Data Bag Item.
Delete Item
To delete a data bag item:
Open the Chef management console.
Click Policy.
Click Data Bags.
Select a data bag.
Select the Items tab.
Select an item.
-
Click Delete.
Edit Item
To edit a data bag item:
Open the Chef management console.
Click Policy.
Click Data Bags.
Select a data bag.
Select the Items tab.
Select an item.
-
Click Edit.
Make your changes.
Click Save Item.
View Item
To view data bag items for a data bag:
- Open the Chef management console.
- Click Policy.
- Click Data Bags.
- Select a data bag.
- Select the Items tab.
Manage Permissions
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. |
Set
To set permissions list for a data bag object:
- Open the Chef management console.
- Click Policy.
- Click Data Bags.
- Select a data bag.
- Click the Permissions tab.
- For each group listed under Name, select or de-select the Read, Update, Delete, and Grant permissions.
Update
To update the permissions list for a data bag object:
- Open the Chef management console.
- Click Policy.
- Click Data Bags.
- Select a data bag.
- Click the Permissions tab.
- Click the + Add button and enter the name of the user or group to be added.
- Select or de-select Read, Update, Delete, and Grant to update the permissions list for the user or group.
View
To view permissions for a data bag object:
- Open the Chef management console.
- Click Policy.
- Click Data Bags.
- Select a data bag.
- Click the Permissions tab.
- Set the appropriate permissions: Read, Update, Delete, and Grant.
© 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_data_bags/