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

Allow configuration of solo.rb via knife.rb #199

Merged
merged 34 commits into from
Apr 6, 2013
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
c2bdd7d
A first cut at generating solo.rb from knife.rb
matschaffer Feb 14, 2013
93457f6
Automatically expanding relative paths in solo.rb
matschaffer Feb 14, 2013
dd5a747
Manifest update
matschaffer Feb 14, 2013
9e04f88
WIP: Using knife.rb to configure and generate solo.rb
matschaffer Mar 2, 2013
b742e31
Include submodules in manifest
matschaffer Mar 3, 2013
9d4a164
Update manifest
matschaffer Mar 3, 2013
4267d21
Fix test stub
matschaffer Mar 3, 2013
7786cf2
Use explicit home dir in provisioning path.
matschaffer Mar 3, 2013
a302d79
Don't nest kitchen directories on the node
matschaffer Mar 3, 2013
224cdb6
Include data bag key in default knife.rb
matschaffer Mar 3, 2013
c0de9c4
Don't clobber existing knife.rb
matschaffer Mar 3, 2013
53c1774
Avoid checking data bag secret if option isn't set
matschaffer Mar 3, 2013
84785ef
Pull out config object
matschaffer Mar 3, 2013
9874e48
Fix path to search cookbook submodule
matschaffer Mar 3, 2013
366ba76
Manifest fix
matschaffer Mar 3, 2013
04f485e
Merge branch 'master' into issue/knife-rb-configuration-199
tmatilai Apr 4, 2013
cb9bb4e
Use `config_value` helper for `:provisioning_path`
tmatilai Apr 4, 2013
5c734a1
Add optional mode option to `run_portable_mkdir_p`
tmatilai Apr 4, 2013
d966abe
Restrict permissions of the upload directory
tmatilai Apr 4, 2013
6118304
Ensure unique names for cookbook directories
tmatilai Apr 4, 2013
20b3c14
Lazy load dependencies
tmatilai Apr 4, 2013
e8ddd27
Ensure patch_cookbooks path is a string
tmatilai Apr 4, 2013
f3d61ef
Check that uploaded paths are defined and exist
tmatilai Apr 4, 2013
19a44c3
Add a log message when syncing the kitchen
tmatilai Apr 4, 2013
9f722c8
Upgrade chef-solo-search to v0.4.0
tmatilai Apr 4, 2013
c54e8e4
Remove forgotten solo_config reference
tmatilai Apr 4, 2013
55eacea
Warn if solo.rb exists
tmatilai Apr 5, 2013
6ab97e9
Ensure cookbook_path is an Array
tmatilai Apr 5, 2013
47908c3
Comment out encrypted_data_bag_secret from the generated knife.rb
tmatilai Apr 5, 2013
2952e7f
Warn if the local paths are not found
tmatilai Apr 5, 2013
c3a2468
Update the changelog
tmatilai Apr 5, 2013
147ad53
Update the readme
tmatilai Apr 5, 2013
471f54c
Add trailing slash to only directories when rsyncin
tmatilai Apr 5, 2013
ae904d2
Configure data_bag key on integration tests
tmatilai Apr 5, 2013
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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