tinychef 0.0.3 → 0.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/README.md +24 -2
- data/files/solo.rb +8 -0
- data/lib/tinychef/new_directory.rb +8 -0
- data/lib/tinychef/version.rb +1 -1
- metadata +2 -1
data/README.md
CHANGED
@@ -1,6 +1,14 @@
|
|
1
1
|
# Tinychef
|
2
2
|
|
3
|
-
|
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
|
-
|
46
|
+
$ tinychef run nodes/another\_node.json username@mynode.example.org "recipe\[mybook::myrecipe]"
|
25
47
|
|
26
48
|
## Contributing
|
27
49
|
|
data/files/solo.rb
ADDED
@@ -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
|
data/lib/tinychef/version.rb
CHANGED
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.
|
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
|