Skip to main content
  • Place orders quickly and easily
  • View orders and track your shipping status
  • Enjoy members-only rewards and discounts
  • Create and access a list of your products
  • Manage your Dell EMC sites, products, and product-level contacts using Company Administration.

Article Number: 000133309


Chef cookbooks to manage the DellEMC servers.

Summary: Dell EMC Custom Solutions Engineering

Article Content


Symptoms

Are you looking to create Chef cookbooks to manage your Dell EMC servers ? This blog talks about how to write a cookbook module to manage DellEMC machines.

What is Chef?

SLN311293_en_US__1i_chef_fig1_cr_v1

Figure 1: Chef

Chef is a powerful automation platform that transforms infrastructure into code. Whether you’re operating in the cloud, on-premises, or in a hybrid environment, Chef automates how infrastructure is configured, deployed, and managed across your network, no matter its size.

This diagram shows how you develop, test, and deploy your Chef code.

  • The Chef DK workstation is the location where users interact with Chef. On the workstation users write and test cookbooks using tools like Test Kitchen and interact with the Chef server using the knife and chef command line tools.
  • Chef client nodes are the machines that are managed by Chef. The Chef client is installed on each node and is used to configure the node to its desired state.
  • The Chef server acts as a hub for configuration data. The Chef server stores cookbooks, the policies that are applied to nodes, and metadata that describes each registered node managed by Chef. Nodes use the Chef client to ask the Chef server for configuration details, such as recipes, templates, and files.

Let's first review the basic system requirements for installing ChefDK workstation, Chef client nodes, & Chef server:

  • Ensure that each machine that will be a node is running a platform
  • Ensure that the machine that will run the Chef server is sufficiently powerful
  • Ensure that any network and firewall settings are configured correctly

More detailed system requirements are listed below.

http://windows.microsoft.com/en-us/windows-8/restore-refresh-reset-pc

A simple Hello World Chef recipe file.

A simple hello world cookbook to create a file in the local server look like this: (Click on the below JPG image to view it in Full Screen)

SLN311293_en_US__2i_hello_world_cr_v1

Figure 2: Hello World

As you can see the file.rb didn’t throw an error but gave the output as "up to date". This is because the file we are attempting to create already exists. When removing the file, the Chef-apply command successfully executes the recipe locally creating the specific file.

Chef maintains different folders as part of metadata and more than one recipe can also be part of the cookbook. Below is an example on how to Power Off a DellEMC machine using a recipe.

Case 1: Power Off a server (Click on the below JPG image to view it in Full Screen)

SLN311293_en_US__3i_power_off_cr_v1

Figure 3: Power Off

Executing the following recipe turns the server off:(Click on the below JPG image to view it in Full Screen)

SLN311293_en_US__4i_execute_recipe_cr_v1

Figure 4: Executing the recipe

Additional Chef Recipes for Dell Systems can be found on the Chef Supermarket.

Disclaimer :- This Chef Recipe modules are not officially supported on any Dell Servers.

To learn more about Dell Custom Solutions Engineering visit www.dell.com/customsolutions

Article Properties


Last Published Date

21 Feb 2021

Version

3

Article Type

Solution