berkshelf-solo 0.0.2 → 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
data/README.md CHANGED
@@ -1,4 +1,79 @@
1
- berkshelf-solo
2
- ==============
1
+ # Berkshelf Solo
3
2
 
4
- Generate Chef solo JSON file
3
+ berkshelf-solo is an experimental project that acts as an adapter between [Berkshelf](http://berkshelf.com/) and [chef-solo](http://docs.opscode.com/chef_solo.html), it works by generating a chef-solo style layout and configuration files when executing the `berks vendor` command.
4
+
5
+ ## Dependencies
6
+ * Ruby 1.9+
7
+ * latest Berkshelf beta ( currently 3.0.0.beta2 )
8
+ * Berksfile
9
+
10
+ ## Installation
11
+ with `bundler` just add this line to your `Gemfile` and then execute `bundle install`
12
+ ```
13
+ gem 'berkshelf-solo'
14
+ ```
15
+ else you can manually install it by running
16
+ ```
17
+ gem install berkshelf-solo
18
+ ```
19
+
20
+ ## Usage
21
+ ### Compile cookbooks and prepare chef-solo layout
22
+ add this line at the top of your Berksfile
23
+ ```ruby
24
+ require 'berkshelf-solo'
25
+ ```
26
+
27
+ after loading berkshelf-solo you will able to specify recipes that you want to install, for example lets say we want to install mysql server and client
28
+ ```ruby
29
+ cookbook 'mysql', :recipes => ["client", "server"]
30
+ ```
31
+ run the berks vendor command and specify the cookbooks output folder, in this example we save the cookbooks under the chef/cookbooks directory inside our current directory
32
+ ```
33
+ berks vendor chef/cookbooks
34
+ ```
35
+ after the command was successfully run, look for the `chef-solo` configuration files and folders layout under the chef directory, should look something like this
36
+
37
+ ```
38
+ $ ls -lrth chef/
39
+ drwxr-xr-x 2 wheel 68B Aug 14 15:52 roles
40
+ drwxr-xr-x 2 wheel 68B Aug 14 15:52 environments
41
+ drwxr-xr-x 2 wheel 68B Aug 14 15:52 data_bags
42
+ drwxr-xr-x 11 wheel 374B Aug 14 16:21 cookbooks
43
+ -rw-r--r-- 1 wheel 289B Aug 14 17:42 solo.rb
44
+ -rw-r--r-- 1 wheel 313B Aug 14 17:42 solo.json
45
+
46
+ $ cat chef/solo.json
47
+ {
48
+ "run_list": [
49
+ "recipe[mysql::client]",
50
+ "recipe[mysql::server]"
51
+ ]
52
+ }
53
+ ```
54
+
55
+ To override attributes just place them inside the `solo.json` at the root level, for example setting the root password for our mysql server
56
+
57
+ ```
58
+ {
59
+ "run_list": [
60
+ "recipe[nginx::default]",
61
+ "recipe[mysql::default]",
62
+ "recipe[mysql::server]"
63
+ ],
64
+ "mysql": {
65
+ "server_root_password": "password",
66
+ "server_debian_password": "password",
67
+ "server_repl_password": "password"
68
+ }
69
+ }
70
+ ```
71
+
72
+ ### Install cookbooks using chef-solo on your target machine
73
+ Now to actually install the recipes using chef-solo you will need to run this command on your target machine ( inside the main project folder, on `Berksfile` location )
74
+ ```
75
+ chef-client -c `pwd`/chef/solo.rb -j `pwd`/chef/solo.json`
76
+ ```
77
+
78
+ ## Warranty
79
+ This software is provided “as is” and without any express or implied warranties, including, without limitation, the implied warranties of merchantability and fitness for a particular purpose.
data/Rakefile CHANGED
@@ -9,11 +9,11 @@ Gem::PackageTask.new(eval File.read('berkshelf-solo.gemspec')) do |pkg|
9
9
  pkg.need_tar = false
10
10
  end
11
11
 
12
- task :build => [:compile] do
12
+ task :build do
13
13
  `rake gem`
14
14
  end
15
15
 
16
16
  task :install => [:build] do
17
17
  sh "gem install pkg/berkshelf-solo"
18
18
  Rake::Task['clobber_package'].execute
19
- end
19
+ end
@@ -1,5 +1,5 @@
1
1
  module Berkshelf
2
2
  module Solo
3
- VERSION="0.0.2"
3
+ VERSION="0.0.3"
4
4
  end
5
5
  end
@@ -82,4 +82,4 @@ set_trace_func proc { |_,file,_,_,binding,_|
82
82
  }
83
83
  set_trace_func(nil)
84
84
  end
85
- }
85
+ }
metadata CHANGED
@@ -1,18 +1,20 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: berkshelf-solo
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
+ prerelease:
5
6
  platform: ruby
6
7
  authors:
7
8
  - Eran Barak Levi
8
9
  autorequire:
9
10
  bindir: bin
10
11
  cert_chain: []
11
- date: 2013-08-14 00:00:00.000000000 Z
12
+ date: 2014-02-25 00:00:00.000000000 Z
12
13
  dependencies:
13
14
  - !ruby/object:Gem::Dependency
14
15
  name: minitest
15
16
  requirement: !ruby/object:Gem::Requirement
17
+ none: false
16
18
  requirements:
17
19
  - - ~>
18
20
  - !ruby/object:Gem::Version
@@ -20,6 +22,7 @@ dependencies:
20
22
  type: :development
21
23
  prerelease: false
22
24
  version_requirements: !ruby/object:Gem::Requirement
25
+ none: false
23
26
  requirements:
24
27
  - - ~>
25
28
  - !ruby/object:Gem::Version
@@ -27,6 +30,7 @@ dependencies:
27
30
  - !ruby/object:Gem::Dependency
28
31
  name: mocha
29
32
  requirement: !ruby/object:Gem::Requirement
33
+ none: false
30
34
  requirements:
31
35
  - - ~>
32
36
  - !ruby/object:Gem::Version
@@ -34,6 +38,7 @@ dependencies:
34
38
  type: :development
35
39
  prerelease: false
36
40
  version_requirements: !ruby/object:Gem::Requirement
41
+ none: false
37
42
  requirements:
38
43
  - - ~>
39
44
  - !ruby/object:Gem::Version
@@ -41,17 +46,19 @@ dependencies:
41
46
  - !ruby/object:Gem::Dependency
42
47
  name: berkshelf
43
48
  requirement: !ruby/object:Gem::Requirement
49
+ none: false
44
50
  requirements:
45
51
  - - '='
46
52
  - !ruby/object:Gem::Version
47
- version: 3.0.0.beta2
53
+ version: 3.0.0.beta7
48
54
  type: :runtime
49
55
  prerelease: false
50
56
  version_requirements: !ruby/object:Gem::Requirement
57
+ none: false
51
58
  requirements:
52
59
  - - '='
53
60
  - !ruby/object:Gem::Version
54
- version: 3.0.0.beta2
61
+ version: 3.0.0.beta7
55
62
  description: Makes Berkshelf more friendly to chef-solo by generating chef-solo folder
56
63
  layout
57
64
  email: eran@kontera.com
@@ -65,25 +72,26 @@ files:
65
72
  - lib/berkshelf/solo.rb
66
73
  homepage: http://www.kontera.com
67
74
  licenses: []
68
- metadata: {}
69
75
  post_install_message:
70
76
  rdoc_options: []
71
77
  require_paths:
72
78
  - lib
73
79
  required_ruby_version: !ruby/object:Gem::Requirement
80
+ none: false
74
81
  requirements:
75
- - - '>='
82
+ - - ! '>='
76
83
  - !ruby/object:Gem::Version
77
84
  version: 1.9.1
78
85
  required_rubygems_version: !ruby/object:Gem::Requirement
86
+ none: false
79
87
  requirements:
80
- - - '>='
88
+ - - ! '>='
81
89
  - !ruby/object:Gem::Version
82
90
  version: '0'
83
91
  requirements: []
84
92
  rubyforge_project: berkshelf-solo
85
- rubygems_version: 2.0.3
93
+ rubygems_version: 1.8.24
86
94
  signing_key:
87
- specification_version: 4
95
+ specification_version: 3
88
96
  summary: Makes Berkshelf more friendly to chef-solo
89
97
  test_files: []
checksums.yaml DELETED
@@ -1,7 +0,0 @@
1
- ---
2
- SHA1:
3
- metadata.gz: 71406d7854eb29e1407c4765a1cedf155058db41
4
- data.tar.gz: dfcd6cda0be4444778c2aed1061090effa49bae4
5
- SHA512:
6
- metadata.gz: 316e28826dc4fe529458fdba082d39618a1b30559e89597a03a5194ed378a14b6f7bbb54a51240a1d518dd9d9eb15c0c3a7df6b19e1b8f1cced67f021c4bb0dd
7
- data.tar.gz: 54040b3f2797526a305e0831228da5e13f9810b8b418505bcaa13dec77e307f3b48c9f0887e9b52e0078300d827dc3f3b30e402c2d715180e4ab776ade3f5707