tinychef 0.0.3 → 0.0.4

Sign up to get free protection for your applications and to get access to all the features.
data/README.md CHANGED
@@ -1,6 +1,14 @@
1
1
  # Tinychef
2
2
 
3
- Collection of scripts to manage recipes with Chef Solo easily.
3
+ This is a simple tool to manage Chef Solo recipe without having to deal with
4
+ `knife` command line tool. Tinychef is basically few lines of Ruby code
5
+ wrapping shell scripts I used to run my chef recipes.
6
+
7
+ It aims to be just enough to:
8
+
9
+ * automate node boostrapping just a little bit
10
+ * run recipes on nodes, overriding the run list if necessary
11
+ * make it easy to work with encrypted data bags
4
12
 
5
13
  ## Installation
6
14
 
@@ -20,8 +28,22 @@ This will create a new *dirname* folder with the following structure:
20
28
  ├── nodes
21
29
  ├── roles
22
30
  └── vendor
31
+ └── solo.rb
32
+
33
+
34
+ ### Run a node
35
+
36
+ $ tinychef run username@mynode.example.org
37
+
38
+ This command will look for a `mynode.example.org.json` file in nodes folder
39
+ and execute the run list on that. Alternatively you can run:
40
+
41
+ $ tinychef run nodes/another\_node.json username@mynode.example.org
42
+
43
+ If you want to override the run list defined in the node file, append a
44
+ run list sequence:
23
45
 
24
- TODO: Write usage instructions here
46
+ $ tinychef run nodes/another\_node.json username@mynode.example.org "recipe\[mybook::myrecipe]"
25
47
 
26
48
  ## Contributing
27
49
 
@@ -0,0 +1,8 @@
1
+ cookbook_path [
2
+ File.expand_path("../cookbooks", __FILE__),
3
+ File.expand_path("../imported_cookbooks", __FILE__)
4
+ ]
5
+
6
+ data_bag_path File.expand_path("../data_bags", __FILE__)
7
+ role_path File.expand_path("../roles", __FILE__)
8
+
@@ -1,4 +1,5 @@
1
1
  require 'pathname'
2
+ require 'fileutils'
2
3
 
3
4
  module Tinychef
4
5
  class NewDirectory
@@ -24,6 +25,13 @@ module Tinychef
24
25
  DIR_MAP.each do |key, value|
25
26
  path.join(key).mkpath
26
27
  end
28
+
29
+ copy_solo_file
30
+ end
31
+
32
+ def copy_solo_file
33
+ solo_file = Pathname.new(File.join(File.expand_path('../../../files', __FILE__), 'solo.rb'))
34
+ FileUtils.cp solo_file, path.join('solo.rb')
27
35
  end
28
36
  end
29
37
  end
@@ -1,3 +1,3 @@
1
1
  module Tinychef
2
- VERSION = "0.0.3"
2
+ VERSION = "0.0.4"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tinychef
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -25,6 +25,7 @@ files:
25
25
  - README.md
26
26
  - Rakefile
27
27
  - bin/tinychef
28
+ - files/solo.rb
28
29
  - lib/tinychef.rb
29
30
  - lib/tinychef/boot_script.rb
30
31
  - lib/tinychef/commands.rb