Using Chef Client with Cisco NX-OS

About Chef

Chef is an open-source software package that is developed by Chef Software, Inc. The software package is a systems and cloud infrastructure automation framework that deploys servers and applications to any physical, virtual, or cloud location, no matter the size of the infrastructure. Each organization consists of one or more workstations, a single server, and every node that the chef-client has configured and is maintaining. Cookbooks and recipes are used to tell the chef-client how each node should be configured. The chef-client, which is installed on every node, does the actual configuration.

A Chef cookbook is the fundamental unit of configuration and policy distribution. A cookbook defines a scenario and contains everything that is required to support that scenario, including libraries, recipes, files, and more. A Chef recipe is a collection of property definitions for setting state on the device. The details for checking and setting these property states are abstracted away so that a recipe may be used for more than one operating system or platform. While recipes are commonly used for defining configuration settings, they also can be used to install software packages, copy files, start services, and more.

The following references provide more information from Chef:

Topic

Link

Chef home

https://www.chef.io

Chef overview

https://docs.chef.io/chef_overview.html

Chef documentation (all)

https://docs.chef.io/

Prerequisites

The following are prerequisites for Chef:

  • You must have the required disk storage available on the device for Chef deployment:

    • A minimum of 500 MB of free disk space on bootflash

  • You need a Chef server with Chef 12.4.1 or higher.

  • You need Chef Client 12.4.1 or higher.

Chef Client NX-OS Environment

The chef-client software must be installed on a switch in the Guest Shell (the Linux container environment running CentOS). This software provides a secure, open execution environment that is decoupled from the host.

Starting with the Cisco NX-OS Release 9.2(1), the Bash-shell (native WindRiver Linux environment underlying NX-OS) install of chef-client is no longer supported.

The following documents provide step-by-step guidance about agent-software download, installation, and setup:

Topic

Link

Chef Client: Installation and setup on Cisco Nexus platform (manual setup)

cisco-cookbook::README-install-agent.md

Chef Client: Installation and setup on a switch (automated installation using the Chef provisioner)

cisco-cookbook::README-chef-provisioning.md

cisco-cookbook

cisco-cookbook is a Cisco-developed open-source interface between the abstract resources configuration in a Chef recipe and the specific implementation details of the switch. This cookbook is installed on the Chef Server and is required for proper Chef Client operation on switches.

The cisco-cookbook can be found on Chef Supermarket.

The following documents provide more detail for cisco-cookbook and generic cookbook installation procedures:

Topic

Link

cisco-cookbook location

Chef Supermarket Cisco Cookbook

Resource Type Catalog

Resource Catalog (by Technology)

cisco-cookbook: Source Code Repository

Cisco Network Chef Cookbook

cisco-cookbook: Setup and usage

Chef Cookbook Setup and Usage

Chef Supermarket

Chef Supermarket

Chef NX-OS Manifest Examples

Cisco Network Chef Cookbook Recipes