Adoptable Cookbooks List

Looking for a cookbook to adopt? You can now see a list of cookbooks available for adoption!
List of Adoptable Cookbooks

Supermarket Belongs to the Community

Supermarket belongs to the community. While Chef has the responsibility to keep it running and be stewards of its functionality, what it does and how it works is driven by the community. The chef/supermarket repository will continue to be where development of the Supermarket application takes place. Come be part of shaping the direction of Supermarket by opening issues and pull requests or by joining us on the Chef Mailing List.

Select Badges

Select Supported Platforms

Select Status


topo (6) Versions 0.1.3

Sets node configuration from a topology data bag

cookbook 'topo', '= 0.1.3', :supermarket
cookbook 'topo', '= 0.1.3'
knife supermarket install topo
knife supermarket download topo
Quality 100%

topo Cookbook

This cookbook supports unattended bootstrap of nodes when
using the knife-topo plugin
to configure single or multi-node topologies.
This can be useful in combination with CloudFormation or other
provisioning tools.

The source for this cookbook is on Github.

setup_node recipe

Upload a topology definition to the Chef Server using knife-topo:

knife topo import test1.json
knife topo create test1

Use a single attribute in a first-boot json file of each node to specify
the topology name, and optionally a node type:

  "topo": {
    "name": "test1",
    "node_type": "appserver"

Trigger the unattended bootstrap by running:

chef-client -o topo::setup_node --json firstboot.json

The first chef-client run will set the configuration (runlist, chef
environment, tags and attributes) based on the uploaded topology
and either the node name or the node type; the second run will apply
that configuration.

setup_chef_cleanup recipe

Use the 'setup_chef_cleanup' recipe to create a script that will invoke
the run_chef_cleanup recipe when the node is shutdown.

This recipe is platform-specific has only been tested on Ubuntu 14.04.

run_chef_cleanup recipe

Use the 'run_chef_cleanup' recipe to delete the chef node and client from
the Chef server, and also delete the validation and client keys.

To keep the validation key, set node['topo']['delete_validation_key']
to never.


  • node['topo']['name'] - Name of the topology to be used to configure the node
  • node['topo']['node_type'] - If is not found in the topology, then this attribute will be used to find a match.
  • node['topo']['blueprint_name'] - If no topology data bag item matching node['topo']['name'] is found, then this attribute is used as an alternative.


Author:: Christine Draper (

Copyright:: Copyright (c) 2015 ThirdWave Insights, LLC

License:: Apache License, Version 2.0

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
See the License for the specific language governing permissions and
limitations under the License.

Dependent cookbooks

This cookbook has no specified dependencies.

Contingent cookbooks

There are no cookbooks that are contingent upon this one.

topo Cookbook Changelog

v0.1.2 (2015-12-01)

  • Do not raise error when no topology data bag is found
  • Set node attribute to the actual topology name, even if blueprint data bag is used

v0.1.3 (2015-12-28)

  • Add recipes to cleanup the node, client and keys
  • Add an example CloudFormation template that uses the recipes

Foodcritic Metric

0.1.3 passed this metric