Using knife bootstrap on Cumulus Linux

Follow

This article describes how to use the knife bootstrap command to install the Chef client on a switch running Cumulus Linux.

Requirements

  • A working Chef server
  • A working knife client
  • A Cumulus Linux switch

Using knife bootstrap

With Chef, you can configure a node from another machine using the knife bootstrap command. This command automates the process of installing the Chef client and registering the new node with the Chef server.

As part of this process the command attempts to download a suitable Chef omnibus package from the official Chef server. The official server does not recognize Cumulus Linux as a supported platform, which causes the bootstrap process to fail with a 500 or 404 HTTP error. For example, you may see:

root@wbench:~# knife bootstrap leaf2
Connecting to leaf2
leaf2 Installing Chef Client...
leaf2 --2015-03-18 14:36:52-- https://www.opscode.com/chef/install.sh
leaf2 Resolving www.opscode.com (www.opscode.com)... 184.106.28.91
leaf2 Connecting to www.opscode.com (www.opscode.com)|184.106.28.91|:443... connected.
leaf2 HTTP request sent, awaiting response... 200 OK
leaf2 Length: 18378 (18K) [application/x-sh]
leaf2 Saving to: `STDOUT'
leaf2
100%[======================================>] 18,378 --.-K/s in 0.007s
leaf2
leaf2 2015-03-18 14:36:56 (2.51 MB/s) - written to stdout [18378/18378]
leaf2
leaf2 Downloading Chef 11 for "cumulus networks"...
leaf2 downloading https://www.opscode.com/chef/metadata?v=11&prerelease=false&nightlies=false&p="cumulus networks"&pv=2.5.1&m=ppc
leaf2 to file /tmp/install.sh.5340/metadata.txt
leaf2 trying wget...
leaf2 trying perl...
leaf2 trying python...
leaf2 Unable to retrieve a valid package!
leaf2 Version: 11
leaf2
leaf2 Please file a Bug Report at https://github.com/opscode/opscode-omnitruck/issues/new
leaf2 Alternatively, feel free to open a Support Ticket at https://www.getchef.com/support/tickets
leaf2 More Chef support resources can be found at https://www.getchef.com/support
leaf2
leaf2 Please include as many details about the problem as possible i.e., how to reproduce
leaf2 the problem (if possible), type of the Operating System and its version, etc.,
leaf2 and any other relevant details that might help us with troubleshooting.

In order to make the knife bootstrap process work on a Cumulus Networks switch, you must tell knife bootstrap to install the Chef package from the Cumulus Networks repository:

root@wbench:~# knife bootstrap --bootstrap-install-command 'apt-get update -y && apt-get install -y chef' <HOSTNAME>
Have more questions? Submit a request

Comments

Powered by Zendesk