chake 0.8 → 0.9
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.
- checksums.yaml +4 -4
- data/ChangeLog.md +7 -0
- data/README.md +29 -11
- data/Rakefile +1 -1
- data/lib/chake.rb +13 -0
- data/lib/chake/version.rb +1 -1
- data/man/.gitignore +1 -0
- data/man/Rakefile +22 -0
- data/man/readme2man.sed +4 -0
- metadata +6 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: eec019d457b4b3b898996c028f7110da77fc8846
|
4
|
+
data.tar.gz: 24ce8d67959f35786d2cea082a518dc9d17f5597
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 40af976047cf7d6a07bf6c47f599e9f8a0edbd3db240e413e306e1b05a28fe20435ffc13ba69dfdaeb5609303e65f31d91402cdcb009598fa6c52a0f77140168
|
7
|
+
data.tar.gz: 29ef77beb5bd171dac487ec5e3aa3563f886719e8ee6ca61f4e2e3bcd9a780e982c64b170a644b4e9ec90e0fd1f1c5475c6d83686c0ef46a598fbfc0c1128fb4
|
data/ChangeLog.md
CHANGED
@@ -1,3 +1,10 @@
|
|
1
|
+
# 0.9
|
2
|
+
|
3
|
+
* fix build step for obs uploads
|
4
|
+
* add infrastructure to build and install a manpage
|
5
|
+
* Add support for a nodes.d/ directory; very useful when dealing with a larger
|
6
|
+
amount of nodes.
|
7
|
+
|
1
8
|
# 0.8
|
2
9
|
|
3
10
|
* gemspec: minor improvements in the long description
|
data/README.md
CHANGED
@@ -1,6 +1,11 @@
|
|
1
|
-
|
1
|
+
chake(1) - serverless configuration with chef
|
2
|
+
=============================================
|
2
3
|
|
3
|
-
|
4
|
+
chake is a tool that helps you manage multiple hosts with, without the need for
|
5
|
+
a chef server. Configuration is managed in a local directory, which should
|
6
|
+
probably be under version control with **git(1)** or anything else.
|
7
|
+
Configuration is usually deployed via rsync over SSH, and applied by invoking
|
8
|
+
**chef-solo(1)** over SSH on each host.
|
4
9
|
|
5
10
|
## Installation
|
6
11
|
|
@@ -11,6 +16,7 @@ Simple host management with chef and rake. No chef server required.
|
|
11
16
|
```
|
12
17
|
$ chake init
|
13
18
|
[create] nodes.yaml
|
19
|
+
[ mkdir] nodes.d/
|
14
20
|
[create] config.rb
|
15
21
|
[ mkdir] config/roles
|
16
22
|
[ mkdir] cookbooks/basics/recipes/
|
@@ -23,6 +29,7 @@ A brief explanation of the created files:
|
|
23
29
|
|File|Description|
|
24
30
|
|----|-----------|
|
25
31
|
| `nodes.yaml` | where you will list the hosts you will be managing, and what recipes to apply to each of them. |
|
32
|
+
| `nodes.d` | a directory with multiple files in the same format as nodes.yaml. All files matching `*.yaml` in it will be added to the list of nodes. |
|
26
33
|
| `config.rb` | contains the chef-solo configuration. You can modify it, but usually you won't need to. |
|
27
34
|
| `config/roles` | directory is where you can put your role definitions. |
|
28
35
|
| `cookbooks` | directory where you will store your cookbooks. A sample cookbook called "basics" is created, but feel free to remove it and add actual cookbooks. |
|
@@ -202,15 +209,26 @@ local://laptop:
|
|
202
209
|
When you run `rake converge` on `desktop`, `laptop` will be skipped, and
|
203
210
|
vice-versa.
|
204
211
|
|
205
|
-
|
206
|
-
|
207
|
-
|
208
|
-
|
209
|
-
|
210
|
-
|
211
|
-
|
212
|
-
|
213
|
-
|
212
|
+
## Environment variables
|
213
|
+
|
214
|
+
* `$CHAKE_SSH_CONFIG`:
|
215
|
+
Local SSH configuration file. Defaults to `.ssh_config`.
|
216
|
+
* `$CHAKE_SSH_PREFIX`:
|
217
|
+
Command to prefix SSH (and rsync over SSH) calls with.
|
218
|
+
* `$CHAKE_RSYNC_OPTIONS`:
|
219
|
+
extra options to pass to `rsync`. Useful to e.g. exclude large files from
|
220
|
+
being upload to each server.
|
221
|
+
* `$CHAKE_NODES`:
|
222
|
+
File containing the list of servers to be managed. Default: `nodes.yaml`.
|
223
|
+
* `$CHAKE_NODES_D`:
|
224
|
+
Directory containing node definition files servers to be managed. Default: `nodes.d`.
|
225
|
+
* `$CHAKE_TMPDIR`:
|
226
|
+
Directory used to store temporary cache files. Default: `tmp/chake`.
|
227
|
+
|
228
|
+
## See also
|
229
|
+
|
230
|
+
* **rake(1)**, **chef-solo(1)**
|
231
|
+
* Chef documentation: https://docs.chef.io/
|
214
232
|
|
215
233
|
## Contributing
|
216
234
|
|
data/Rakefile
CHANGED
data/lib/chake.rb
CHANGED
@@ -9,7 +9,11 @@ require 'chake/node'
|
|
9
9
|
require 'chake/readline'
|
10
10
|
|
11
11
|
nodes_file = ENV['CHAKE_NODES'] || 'nodes.yaml'
|
12
|
+
nodes_directory = ENV['CHAKE_NODES_D'] || 'nodes.d'
|
12
13
|
node_data = File.exists?(nodes_file) && YAML.load_file(nodes_file) || {}
|
14
|
+
Dir.glob(File.join(nodes_directory, '*.yaml')).sort.each do |f|
|
15
|
+
node_data.merge!(YAML.load_file(f))
|
16
|
+
end
|
13
17
|
$nodes = node_data.map { |node,data| Chake::Node.new(node, data) }.reject(&:skip?).uniq(&:hostname)
|
14
18
|
$chake_tmpdir = ENV.fetch('CHAKE_TMPDIR', 'tmp/chake')
|
15
19
|
|
@@ -28,6 +32,15 @@ EOF
|
|
28
32
|
puts "[create] nodes.yaml"
|
29
33
|
end
|
30
34
|
end
|
35
|
+
|
36
|
+
if File.exist?('nodes.d')
|
37
|
+
puts '[exists] nodes.d/'
|
38
|
+
else
|
39
|
+
FileUtils.mkdir_p 'nodes.d'
|
40
|
+
puts '[ mkdir] nodes.d/'
|
41
|
+
end
|
42
|
+
|
43
|
+
|
31
44
|
if File.exists?('config.rb')
|
32
45
|
puts '[exists] config.rb'
|
33
46
|
else
|
data/lib/chake/version.rb
CHANGED
data/man/.gitignore
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
chake.1*
|
data/man/Rakefile
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
task :default => 'man/chake.1'
|
2
|
+
|
3
|
+
file 'man/chake.1' => ['man/chake.1.ronn', 'man/readme2man.sed'] do
|
4
|
+
sh 'ronn --roff man/chake.1.ronn'
|
5
|
+
end
|
6
|
+
|
7
|
+
file 'man/chake.1.ronn' => 'README.md' do |t|
|
8
|
+
sh "sed -f man/readme2man.sed README.md > #{t.name} || (rm -f #{t.name}; false)"
|
9
|
+
end
|
10
|
+
|
11
|
+
task :install => 'man/chake.1' do
|
12
|
+
prefix = ENV['PREFIX'] || File.exists?('debian/rules') && '/usr' || '/usr/local'
|
13
|
+
target = [ENV["DESTDIR"], prefix , 'man/man1'].compact
|
14
|
+
man = File.join(*target)
|
15
|
+
sh 'install', '-d', '-m', '0755', man
|
16
|
+
sh 'install', '-m', '0644', 'man/chake.1', man
|
17
|
+
end
|
18
|
+
|
19
|
+
task :clean do
|
20
|
+
rm_f 'man/chake.1'
|
21
|
+
rm_f 'man/chake.1.ronn'
|
22
|
+
end
|
data/man/readme2man.sed
ADDED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: chake
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: '0.
|
4
|
+
version: '0.9'
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Antonio Terceiro
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-09-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -88,6 +88,9 @@ files:
|
|
88
88
|
- lib/chake/node.rb
|
89
89
|
- lib/chake/readline.rb
|
90
90
|
- lib/chake/version.rb
|
91
|
+
- man/.gitignore
|
92
|
+
- man/Rakefile
|
93
|
+
- man/readme2man.sed
|
91
94
|
- spec/chake/backend/local_spec.rb
|
92
95
|
- spec/chake/backend/ssh_spec.rb
|
93
96
|
- spec/chake/backend_spec.rb
|
@@ -113,7 +116,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
113
116
|
version: '0'
|
114
117
|
requirements: []
|
115
118
|
rubyforge_project:
|
116
|
-
rubygems_version: 2.4.5
|
119
|
+
rubygems_version: 2.4.5.1
|
117
120
|
signing_key:
|
118
121
|
specification_version: 4
|
119
122
|
summary: serverless configuration management tool for chef
|