KJBweb

Technical Notes & How To's
Menu
  • Blog
  • How-To
Home
Blog
Chef Knife Node Bootstrap Example Command

Chef Knife Node Bootstrap Example Command

Karl November 28, 2016

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.

Share
Tweet
Email
Prev Article
Next Article
Tags:chef example

About The Author

Karl

Related Articles

In a quest to make it easier for myself and …

Looping through Attributes within Chef Recipes

Leave a Reply

Cancel reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Recent Posts

  • 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
  • How to Perform a GET Request with CURL via the Command Line

Recent Comments

  • 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)
  • FC on How to Install rar/unrar on Ubuntu 16.04 LTS (Xenial)

Archives

  • February 2019
  • August 2018
  • November 2016

Categories

  • Blog
  • How-To

KJBweb

Technical Notes & How To's
Copyright © 2021 KJBweb
Hello Huginn