Skip to main content

Declarative State Management (DSM)

The Chef Declarative State Management (DSM) service acts as a central repository for configuration data. It manages cookbooks, policies, and metadata for nodes managed by Chef Infra Client. DSM enables nodes to efficiently request and receive configuration details, ensuring streamlined deployment and management processes.

DSM Nodes

The DSM Nodes page (within the DSM section) only displays nodes that have been bootstrapped using the DSM Command Line Interface (CLI).

A node is any device—physical, virtual, cloud, network device, etc.—that’s under management by Chef Infra.

The DSM Nodes table lists the nodes and it contains the following columns:

  • Name
  • Platform
  • FQDN
  • Environment

You can perform Actions on each of the nodes:

  • Update Run List
  • Update Attributes
  • Update Environment
  • Reset Key
  • Manage Tags
  • Delete

For further details, refer to the relevant sub-section.

Update the run list for a node

A run list is a set of instructions to execute on a specific node, in order.

To update the run list for a node, follow these steps in the Nodes page (of the DSM section):

  1. Select the three dots in the Actions column and select Update Run List.
  2. The available Roles and Recipes (specific to DSM) are displayed. Select a role or recipe on the left and select the right arrow button to add it to the Current Run List.
  3. You can drag and drop items in the Current Run List to change the order of execution.
  4. You can also select items in the Current Run List and click the left arrow to remove them from the Current Run List.
  5. Select Update Node Run List.

Update the attributes for a node

An attribute is a specific detail about a node. Attributes are used by Chef Infra Client to understand:

  • The current state of the node
  • What the state of the node was at the end of the previous Chef Infra Client run
  • What the state of the node should be at the end of the current Chef Infra Client run

To update node attributes, follow these steps in the Nodes page (of the DSM section):

  1. Select the three dots in the Actions column and select Update Attributes.
  2. Update the node attributes (in valid JSON format) as needed.
  3. Select Update Node Attributes.

Update the environment of a node

To update the environment of the node (for example, dev, staging or production), follow these steps in the Nodes page (of the DSM section):

  1. Select the three dots in the Actions column and select Update Environment.
  2. A list of available environments is provided in the Environment drop-down list. Select the relevant Environment.
  3. Select Update Node Environment.

Reset the validation key for a node

To reset the validation key for a node, follow these steps in the Nodes page (of the DSM section):

  1. Select the three dots in the Actions column and select Reset Key.

    Note

    The current key for the client will no longer be accepted after resetting its key.

  2. Select Reset Key to proceed.

  3. The new SSH key PEM file is displayed. Ensure to copy or download the key to a safe location because you can’t access the key again after it’s displayed.

Manage the tags applied to a node

A tag is a custom description that’s applied to a node, for example environment_dev. A tag can be helpful when managing nodes using knife or when building recipes by providing alternate methods of grouping similar types of information.

To manage tags for a node, follow these steps in the Nodes page (of the DSM section):

  1. Select the three dots in the Actions column and select Manage Tags.
  2. You can remove an existing tag by selecting the x icon to the right of it.
  3. You can Remove All tags, if desired.
  4. Select Add More to add another tag.
  5. Select Update Node Tags to apply the changes.

When a new tag is applied, it will show in the tags within the node attributes.

Delete a node

To delete a node, follow these steps in the Nodes page (of the DSM section):

  1. Select the three dots in the Actions column and select Delete.

    Note

    The node will be permanently deleted and can’t be recovered.
  2. Select Delete Node to proceed.

Cookbooks

The Cookbooks page lists all cookbooks that exist in the organization. You can manage cookbooks using the CLI.

Select a cookbook to see further details about it.

If there is an older version of a cookbook, you can select an older version in the Version drop-down list to view details about it.

When viewing a cookbook, there is a README tab and a Cookbook Content tab.

The README tab displays some metadata about the cookbook, such as the Platforms and Versions.

The Cookbook Content tab shows each of the files in the cookbook, for example, the Libraries, Resources, Root Files, and Templates. You can select each file to view the code in it.

Roles

Roles let you define patterns and processes that exist across nodes in an organization as belonging to a single job function. Each role consists of zero (or more) attributes and a run-list.

Create a role

To create a role, follow these steps in the Roles page (within the DSM section):

  1. Select Create Role.

  2. Enter a Role Name.

    Note

    Role names must be unique. The Role Name can only contain letters, numbers, hyphens, and underscores.
  3. Enter a Description.

  4. Select Next.

  5. Create a Run List by selecting Roles and Recipes and selecting the right arrow to move them to the Current Run List. You can drag and drop items in the Current Run List to change the order.

  6. Select Next.

  7. Specify any Default Attributes using JSON formatting.

  8. Select Next.

  9. Specify any Override Attributes using JSON formatting. This lets you change attributes that are in the recipe.

  10. Select Save.

  11. Select Save Role.

View the roles

The Roles table shows a list of the existing roles. The columns displayed include:

  • Role Name
  • Description
  • Environment Name

Update the run list

To update the run list for a role, follow these steps in the Roles page (within the DSM section):

  1. Select the three dots in the Actions column and select Update Run List.
  2. Create a Run List by selecting Roles and Recipes and selecting the right arrow to move them to the Current Run List. You can drag and drop items in the Current Run List to change the order.
  3. Select Update Run List.

Update the default attributes of a role

To update the default attributes for a role, follow these steps in the Roles page (within the DSM section):

  1. Select the three dots in the Actions column and select Update Default Attributes.
  2. Update the default attributes as needed (using JSON formatting).
  3. Select Update Role Default Attributes.

Update the override attributes of a role

To update the override attributes for a role, follow these steps in the Roles page (within the DSM section):

  1. Select the three dots in the Actions column and select Update Override Attributes.
  2. Update the override attributes as needed (using JSON formatting).
  3. Select Update Role Override Attributes.

Delete a role

To delete a role, follow these steps in the Roles page (within the DSM section):

  1. Select the three dots in the Actions column and select Delete.

    Note

    The role will be permanently deleted and can’t be recovered.
  2. Select Delete Role to proceed.

Data bags

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. A data bag can have multiple items.

Create a data bag

To create a new data bag, follow these steps in the Data Bags page (within the DSM section):

  1. Select Create Data Bag.
  2. Specify a Data Bag Name.
  3. Select Add Data Bag Item.
  4. Specify a Name for the data bag item.
  5. Specify the Data in JSON format (using key/value pairs).
  6. Select Save Data Bag Item.

Create a data bag item

To create a new data bag item, follow these steps in the Data Bags page (within the DSM section):

  1. Select the three dots in the Actions column and select Create Data Bag Item.
  2. Specify a Name for the data bag item.
  3. Specify the Data for the data bag item in JSON format.
  4. Select Save Data Bag Item.

Delete a data bag

To delete a data bag, follow these steps in the Data Bags page (within the DSM section):

  1. Select the three dots in the Actions column and select Delete.

    Note

    The data bag and all its items will be permanently deleted and can’t be recovered.
  2. Select Delete Data Bag.

Environments

You can use an environment to map an organization’s real-life workflow to what can be configured and managed when using Chef 360 Platform. This mapping is accomplished by setting attributes and pinning cookbooks at the environment level.

Create an environment

To create an environment, follow these steps in the Environments page (within the DSM section):

  1. Select Create Environment.
  2. Specify an Environment Name.
  3. Optional: Specify a Description for the environment.
  4. Select Next.
  5. To configure Cookbook Constraints, follow these steps:
    1. Select a Cookbook from the drop-down list.
    2. Select the relevant Operator to specify what versions to be included or excluded in this environment:
      • ~>: Approximately greater than or equal to
      • >=: Greater than or equal to
      • >: Greater than
      • =: Equals
      • <: Less than
    3. Specify the Version, for example, 2.1.1.
    4. You can select Add More to add additional cookbook constraints.
    5. You can select Remove All to remove the cookbook constraints.
  6. Select Next.
  7. Specify any Default Attributes in JSON format.
  8. Select Next.
  9. Specify any Override Attributes in JSON format.
  10. Select Save.
  11. Select Save Environment.

Update cookbook constraints for an environment

To update cookbook constraints for an environment, follow these steps in the Environments page (within the DSM section):

  1. Select the three dots in the Actions column and select Update Cookbook Constraints.
  2. Select a Cookbook from the drop-down list.
  3. Select the relevant Operator to specify what versions to be included or excluded in this environment.
  4. Specify the Version, for example, 2.1.1.
  5. You can select Add More to add additional cookbook constraints.
  6. You can select Remove All to remove the cookbook constraints.
  7. Select Save.

Update the default attributes of an environment

To update the default attributes for an environment, follow these steps in the Environments page (within the DSM section):

  1. Select the three dots in the Actions column and select Update Default Attributes.
  2. Specify any Default Attributes in JSON format.
  3. Select Update Environment Default Attributes.

Update the override attributes of an environment

To update the override attributes for an environment, follow these steps in the Environments page (within the DSM section):

  1. Select the three dots in the Actions column and select Update Override Attributes.
  2. Specify any Override Attributes in JSON format.
  3. Select Update Environment Override Attributes.

Delete an environment

To delete an environment, follow these steps in the Environments page (within the DSM section):

  1. Select the three dots in the Actions column and select Delete.

    Note

    The environment will be permanently deleted and can’t be recovered.
  2. Select Delete Environment.

Clients

Clients have secure API access to Chef 360 Platform.

Add a client

To add a client, follow these steps in the Clients page (within the DSM section):

  1. Select Create Client.

  2. Specify a Client Name.

  3. Specify whether or not this is a Validation Client.

    Note

    A Validation Client is a legacy Chef mechanism that’s only used during initial node registration. It allows new nodes to create their own client credentials and shouldn’t be used for normal configuration runs.
  4. Select Create Client.

  5. The key is displayed. Ensure to Copy or Download the key somewhere safe before closing this page. The key isn’t stored by DSM.

Reset a client key

To reset a client key, for example, if you don’t have the existing key or you want to rotate it for security reasons, follow these steps in the Clients page (within the DSM section):

  1. Select the three dots in the Actions column and select Reset Client Key.

    Note

    The existing key for the client will no longer be accepted after you reset the key.
  2. Select Reset Key to proceed.

  3. The new key is displayed. Ensure to Copy or Download the key somewhere safe before closing this page. The key isn’t stored by DSM.

Delete a client

To delete a client, follow these steps in the Clients page (within the DSM section):

  1. Select the three dots in the Actions column and select Delete.

    Note

    The client will be permanently deleted and can’t be recovered.
  2. Select Delete Client to proceed.

Thank you for your feedback!

×