Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

Chef for Junos OS Deployment Overview


A Chef for Junos OS deployment consists of the following major components:

  • Chef server—The server acts as a hub for configuration data. The server stores cookbooks and the node object metadata that describes each registered node managed by the Chef client.

  • Workstations—You can perform most of your work on a workstation. Use the Chef CLI, called knife, to develop cookbooks and recipes and store them in a local Chef repository. From the workstation, you can synchronize the local repository with your version-control system, upload cookbooks to the Chef server, and perform operations on nodes.

  • Nodes—A node is any physical or virtual device that is configured for the Chef client to manage. Ruby Interpreter, Native Ohai and junos-ez-stdlib (Ruby Gems) are also installed on all nodes to aid the Chef client in managing the node.

    To manage a node, the Chef client running on the node obtains the configuration details, such as recipes, templates, and file distributions, from the Chef server. It also collects detailed data about a node, such as hardware properties, memory and processor usage, networking statistics, kernel data, and hostname using Ohai. The Chef client performs as much of the configuration as possible on the node using Ruby Interpreter and junos-ez-stdlib to help interpret Chef recipes into configuration details.

    For a Juniper Networks device to be a Chef node, it must have the Chef client installed and configured on it. See the Chef for Junos OS Release Notes for information about Juniper Networks devices running Junos OS that support the Chef client.

Figure 1 shows the major components of a Chef for Junos OS deployment. For more details about all the components that constitute a Chef deployment, see the Chef documentation at

Figure 1: Major Components of a Chef for Junos OS Deployment
Major Components of a Chef
for Junos OS Deployment

Chef for Junos OS Deployment Overview

The following major steps describe how you deploy Chef for Junos OS:

  1. Set up the Chef server. For more information on setting up the Chef server, see the Chef documentation at
  2. Set up the Chef workstation. The major steps for doing so are:
    1. Install the Chef client from and Ruby Interpreter on your workstation. You can install both at the same time by using the Chef installer. install the Chef Client for the Workstation installation

    2. Set up the Chef repository (chef-repro) and the version-control system.

    3. Install authentication keys and verify that you can connect to the Chef server from your workstation.

      For more information about setting up the Chef workstation, see the Chef documentation at

    4. After you have set up the workstation, download the netdev cookbook to the chef-repro repository and extract the cookbook files.

      knife cookbook site download netdev

      tar -zxvf netdev-n.n.n.tar.gz -C cookbooks

      The netdev cookbook is available at the Chef supermarket website at

  3. If the Chef client is not already installed on the Junos OS nodes, install the client by using the Chef for Junos OS installation package as described in Installing or Uninstalling the Chef Client on Juniper Networks Devices Running Junos OS. Note

    On Juniper Networks switches running Junos OS with Junos Automation Enhancements, you do not need to install the Chef client because the Chef client and related components are installed with the Junos OS software.

    For more information on Junos Automation Enhancements, see Junos Automation Enhancements Documentation.

  4. Configure the Chef client on the Junos OS nodes so that it can connect with the Chef server. For more information, see Configuring the Chef Client on Juniper Networks Devices Running Junos OS.