• Skip to main content
  • Skip to secondary menu
  • Skip to primary sidebar

KJBweb

Technical Notes & How To's

  • Home
  • How-to
  • Quick Fixes
  • Examples
  • Hardware
You are here: Home / Examples / Chef Knife Node Bootstrap Example Command

Chef Knife Node Bootstrap Example Command

November 28, 2016Leave a Comment

Whilst the documentation around the knife bootstrap command is brilliant, I learn better by example/doing, so here’s an example of the syntax I use when bootstrapping new nodes within my infrastructure.

There are variants to this which don’t use the password in the command line, and there are certainly pre-requisites that need to be satisfied before you can just go ahead and register a node against your Chef server, however with that said here’s the command I’ve used most recently:

knife bootstrap {NODE_IP_ADDRESS} -x {USER} -P {PASSWORD}-E {ENVIRONMENT} -N {NODE_NAME} -r 'role[webserver]'

A complete command would look something similar to this:

knife bootstrap 20.65.222.124 -x root -P Jhgt5iJ8y -E production -N web-interface02 -r 'role[webserver]'

Hope this helps someone in a pinch, the mental block can be strong at times.

Filed Under: Examples Tagged With: chef, example

Reader Interactions

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Primary Sidebar

Recent Posts

  • How To Get SMETS1/2 Smart Meter Data into HomeAssistant the Easy Way
  • How to Install 7zip on Ubuntu 18.04 LTS (Bionic Beaver)
  • How to Install the NewRelic MySQL Plugin
  • Repair “Repository Error: database disk image is malformed” YUM Issue
  • How to Check NTP Connectivity and Function on the Command Line

Recent Comments

  • himanshu on How to Test Memcached Connectivity
  • moun on How to Perform a GET Request with CURL via the Command Line
  • Karl on How to Install rar/unrar on Ubuntu 18.04 LTS (Bionic Beaver)
  • John on How to Install rar/unrar on Ubuntu 18.04 LTS (Bionic Beaver)
  • How to Install rar/unrar on Ubuntu 16.04 LTS (Xenial) - KJBweb on How to Install rar/unrar on Ubuntu 18.04 LTS (Bionic Beaver)

Archives

  • November 2022
  • February 2019
  • August 2018
  • November 2016

Categories

  • Examples
  • Hardware
  • How-to
  • Quick Fixes

Copyright © 2023 · WordPress · Log in