Skip to content

Instantly share code, notes, and snippets.

@tmatilai
Last active December 11, 2015 06:28
Show Gist options
  • Save tmatilai/4559333 to your computer and use it in GitHub Desktop.
Save tmatilai/4559333 to your computer and use it in GitHub Desktop.
POC to integrate knife-solo to `knife bootstrap`

knife bootstrap --solo

Description

The knife-bootstrap-solo branch of tmatilai's knife-solo fork has a proof of concept implementation to integrate knife-solo plugin to Opscode Chef's knife bootstrap command, which also plugins like knife-ec2 internally use.

The branch adds "--solo" option to knife bootstrap which triggers knife solo bootstrap for bootstrapping the node. Additionally all "solo bootstrap" options are available.

It is also possible to set the solo mode as a default by declaring knife[:solo] = true in knife.rb. This is currently the only way with knife ec2 server create etc. without monkey patching them, too. (See an earlier POC for that.)

Installation

The preferred method is to use Bundler. Add this to the Gemfile:

gem 'knife-solo',
  :git => 'https://github.com/tmatilai/knife-solo.git',
  :branch => 'knife-bootstrap-solo'

Then bundle exec knife bootstrap -h should list the "--solo" option.

You can prepare a directory for knife-solo usage by bundle exec knife solo init. See the home page for more information.

Development

The branch is subject to be rebased on top of master every now and then. Please inform me if that is a problem.

Any comments are welcome here or in this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment