Skip to content
This repository has been archived by the owner on Mar 19, 2022. It is now read-only.

Commit

Permalink
Merge pull request #199 from matschaffer/issue/knife-rb-configuration…
Browse files Browse the repository at this point in the history
…-199

- Generate solo.rb from knife.rb settings. Fixes #86, #125, #128, #177, #197.
- Read protect the uploaded directory. Fixes #1.
- Convert chef-solo-search as a submodule and upgrade it to v0.4.0. Should fix #216.
  • Loading branch information
tmatilai committed Apr 6, 2013
2 parents 30af6d9 + ae904d2 commit 84edc5f
Show file tree
Hide file tree
Showing 20 changed files with 175 additions and 471 deletions.
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "lib/knife-solo/resources/patch_cookbooks/chef-solo-search"]
path = lib/knife-solo/resources/patch_cookbooks/chef-solo-search
url = https://github.com/edelight/chef-solo-search.git
13 changes: 11 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
# 0.3.0 / _In progress_

**NOTE**: This release includes breaking changes. See [upgrade instructions](https://github.com/matschaffer/knife-solo/wiki/Upgrading-to-0.3.0) for more information.

## Changes and new features

* Moved root path configuration into `knife[:solo_path]` and use $HOME/chef-solo by default ([197])
* [BREAKING] Generate solo.rb based on knife.rb settings ([199])
* [BREAKING] Set root path with `--provisioning-path` or `knife[:provisioning_path]` and use ~/chef-solo by default ([1], [86], [125], [128], [177], [197])
* Read protect the provision directory from the world ([1])
* `--prerelease` option to allow pre-release versions of chef omnibus or rubygem to be installed ([205])
* Prepare/bootstrap now installs the same version of Chef that the workstation is running ([186])
* Remove hard dependency on Librarian-Chef ([211])
Expand All @@ -28,9 +32,15 @@
* [Naoya Ito][naoya]
* [David Radcliffe][dwradcliffe]

[1]: https://github.com/matschaffer/knife-solo/issues/1
[86]: https://github.com/matschaffer/knife-solo/issues/86
[125]: https://github.com/matschaffer/knife-solo/issues/125
[128]: https://github.com/matschaffer/knife-solo/issues/128
[177]: https://github.com/matschaffer/knife-solo/issues/177
[185]: https://github.com/matschaffer/knife-solo/issues/185
[186]: https://github.com/matschaffer/knife-solo/issues/186
[197]: https://github.com/matschaffer/knife-solo/issues/197
[199]: https://github.com/matschaffer/knife-solo/issues/199
[200]: https://github.com/matschaffer/knife-solo/issues/200
[204]: https://github.com/matschaffer/knife-solo/issues/204
[205]: https://github.com/matschaffer/knife-solo/issues/205
Expand Down Expand Up @@ -62,7 +72,6 @@
* Drop support for Debian 5.0 Lenny (#172)
* Integration tests for Debian 6 and 7 (74c6ed1 - f299a6)
* Travis tests for both Chef 10 and 11 (#183)
* Remove solo.rb and transfer cookbooks to user-owned path (#1, #86, #125, #128, #177). See https://github.com/matschaffer/knife-solo/wiki/Upgrading-to-0.2.0

## Fixes

Expand Down
31 changes: 26 additions & 5 deletions Manifest.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@ Rakefile
lib/chef/knife/bootstrap_solo.rb
lib/chef/knife/cook.rb
lib/chef/knife/kitchen.rb
lib/chef/knife/patches/parser.rb
lib/chef/knife/patches/search.rb
lib/chef/knife/prepare.rb
lib/chef/knife/solo_bootstrap.rb
lib/chef/knife/solo_clean.rb
Expand All @@ -20,12 +18,13 @@ lib/knife-solo/bootstraps/darwin.rb
lib/knife-solo/bootstraps/freebsd.rb
lib/knife-solo/bootstraps/linux.rb
lib/knife-solo/bootstraps/sun_os.rb
lib/knife-solo/config.rb
lib/knife-solo/deprecated_command.rb
lib/knife-solo/gitignore.rb
lib/knife-solo/info.rb
lib/knife-solo/node_config_command.rb
lib/knife-solo/resources/solo.rb
lib/knife-solo/resources/knife.rb
lib/knife-solo/resources/patch_cookbooks/chef-solo-search
lib/knife-solo/resources/solo.rb.erb
lib/knife-solo/ssh_command.rb
lib/knife-solo/tools.rb
test/bootstraps_test.rb
Expand All @@ -49,7 +48,6 @@ test/integration/ubuntu10_04_test.rb
test/integration/ubuntu12_04_bootstrap_test.rb
test/integration/ubuntu12_04_test.rb
test/integration_helper.rb
test/knife-solo/config_test.rb
test/knife_bootstrap_test.rb
test/minitest/parallel.rb
test/node_config_command_test.rb
Expand Down Expand Up @@ -77,3 +75,26 @@ test/support/test_case.rb
test/support/validation_helper.rb
test/test_helper.rb
test/tools_test.rb
lib/knife-solo/resources/patch_cookbooks/chef-solo-search/.travis.yml
lib/knife-solo/resources/patch_cookbooks/chef-solo-search/CHANGELOG
lib/knife-solo/resources/patch_cookbooks/chef-solo-search/LICENSE
lib/knife-solo/resources/patch_cookbooks/chef-solo-search/NOTICE
lib/knife-solo/resources/patch_cookbooks/chef-solo-search/README.md
lib/knife-solo/resources/patch_cookbooks/chef-solo-search/libraries/search.rb
lib/knife-solo/resources/patch_cookbooks/chef-solo-search/libraries/search/overrides.rb
lib/knife-solo/resources/patch_cookbooks/chef-solo-search/libraries/search/parser.rb
lib/knife-solo/resources/patch_cookbooks/chef-solo-search/libraries/vendor/chef/solr_query/lucene.treetop
lib/knife-solo/resources/patch_cookbooks/chef-solo-search/libraries/vendor/chef/solr_query/lucene_nodes.rb
lib/knife-solo/resources/patch_cookbooks/chef-solo-search/libraries/vendor/chef/solr_query/query_transform.rb
lib/knife-solo/resources/patch_cookbooks/chef-solo-search/metadata.rb
lib/knife-solo/resources/patch_cookbooks/chef-solo-search/recipes/default.rb
lib/knife-solo/resources/patch_cookbooks/chef-solo-search/tests/Gemfile
lib/knife-solo/resources/patch_cookbooks/chef-solo-search/tests/data/data_bags/node/alpha.json
lib/knife-solo/resources/patch_cookbooks/chef-solo-search/tests/data/data_bags/node/beta.json
lib/knife-solo/resources/patch_cookbooks/chef-solo-search/tests/data/data_bags/node/without_json_class.json
lib/knife-solo/resources/patch_cookbooks/chef-solo-search/tests/data/data_bags/users/jerry.json
lib/knife-solo/resources/patch_cookbooks/chef-solo-search/tests/data/data_bags/users/lea.json
lib/knife-solo/resources/patch_cookbooks/chef-solo-search/tests/data/data_bags/users/mike.json
lib/knife-solo/resources/patch_cookbooks/chef-solo-search/tests/data/data_bags/users/tom.json
lib/knife-solo/resources/patch_cookbooks/chef-solo-search/tests/test_data_bags.rb
lib/knife-solo/resources/patch_cookbooks/chef-solo-search/tests/test_search.rb
11 changes: 6 additions & 5 deletions README.rdoc
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,13 @@ The init command simply takes a name of the directory to store the kitchen struc
Currently the directory structure looks like this, but could change as development continues.

mychefrepo/
├── .chef
│ └── knife.rb
├── cookbooks
├── data_bags
├── nodes
├── roles
├── site-cookbooks
└── solo.rb
└── site-cookbooks

=== Prepare command

Expand Down Expand Up @@ -71,7 +72,7 @@ The cook command uploads the current kitchen to the server and runs chef-solo on

This uploads all of your cookbooks in addition to a patch that allows you to use data_bags in a read-only fashion from the +data_bags+ folder.

This also supports encrypted data bags. To use them, place your key in +data_bag_key+ in the root of your kitchen (or if you move it make sure to update +solo.rb+ to reflect the new path).
This also supports encrypted data bags. To use them, set the path to your key with +encrypted_data_bag_secret+ in .chef/knife.rb.

The knife command for creating encrypted data bags doesn't work well without a Chef server, so use {this gist}[https://gist.github.com/2896172] as an example on how to create encrypted data bag items on your local file system.

Expand Down Expand Up @@ -99,9 +100,9 @@ The clean command removes an uploaded kitchen completely from the target host. T

The cook command will work on Windows node if you meet the following howto:

==== Init then tweak
==== Init as normally

- run <tt>knife solo init</tt> then edit solo.rb to use Windows path-naming (see https://gist.github.com/1773854)
- run <tt>knife solo init</tt>

==== Prepare the node manually

Expand Down
6 changes: 4 additions & 2 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ require File.join(File.dirname(__FILE__), 'lib', 'knife-solo', 'info')
MANIFEST_IGNORES = %w[
.travis.yml
.gitignore
.gitmodules
Gemfile
Gemfile.lock
Manifest.txt
Expand All @@ -24,10 +25,11 @@ namespace :manifest do

desc 'Updates Manifest.txt with a list of files from git'
task :update do
git_files = `git ls-files`.split("\n")
git_files = `git ls-files`.split("\n")
submodule_files = `git submodule foreach -q 'for f in $(git ls-files); do echo $path/$f; done'`.split("\n")

File.open('Manifest.txt', 'w') do |f|
f.puts((git_files - MANIFEST_IGNORES).join("\n"))
f.puts((git_files + submodule_files - MANIFEST_IGNORES).join("\n"))
end
end
end
Expand Down
1 change: 1 addition & 0 deletions knife-solo.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,5 @@ Gem::Specification.new do |s|

s.add_dependency 'chef', chef_version
s.add_dependency 'net-ssh', '>= 2.2.2', '< 3.0'
s.add_dependency 'erubis', '~> 2.7.0'
end
223 changes: 0 additions & 223 deletions lib/chef/knife/patches/parser.rb

This file was deleted.

Loading

0 comments on commit 84edc5f

Please sign in to comment.