chake 0.93 → 0.93.2
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 +10 -0
- data/README.md +5 -3
- data/Rakefile +28 -1
- data/lib/chake/config_manager/itamae.rb +3 -0
- data/lib/chake/connection/ssh.rb +1 -1
- data/lib/chake/connection.rb +1 -1
- data/lib/chake/node.rb +1 -1
- data/lib/chake/version.rb +1 -1
- data/lib/chake.rb +4 -4
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 8d0f86aa2668f7ed10209e4c2cbd7f93b8ef91692e6367761de0f513e56792d6
|
|
4
|
+
data.tar.gz: 94cfb76752108b360e87f113e6540eb498d0e0af82ee67ee80f31c92c6afd5d7
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 8cda49eebf38e00bcb0d445f1b0d909f7cad5e9cb62bccda65bd6105aefb7e743f241c376e8e745f3a22f2fd995389dbfd2deed43ea418ceec5318ce4dc200f5
|
|
7
|
+
data.tar.gz: 8db81e5c3a31d0dc6783affa82faf944970ef12b7bbdca3a618aabe3816a15cb6403d389ea6cb118a08cc755299e3876d142b169d15c299d3eb3770f77380e75
|
data/ChangeLog.md
CHANGED
|
@@ -1,3 +1,13 @@
|
|
|
1
|
+
# 0.93.2
|
|
2
|
+
|
|
3
|
+
- rake check: don't require sudo if connecting as root
|
|
4
|
+
- Rename method that provides the base rsync command
|
|
5
|
+
- Add task to automated new releases
|
|
6
|
+
|
|
7
|
+
# 0.93.1
|
|
8
|
+
|
|
9
|
+
- Fix NoMethodError in preview task
|
|
10
|
+
|
|
1
11
|
# 0.93
|
|
2
12
|
|
|
3
13
|
- Chef::ConfigManager: add support for inheritance
|
data/README.md
CHANGED
|
@@ -124,11 +124,13 @@ To check whether hosts are correctly configured, you can use the `check` task:
|
|
|
124
124
|
$ rake check
|
|
125
125
|
```
|
|
126
126
|
|
|
127
|
-
That will run the the `
|
|
128
|
-
you having to type any passwords, it means
|
|
127
|
+
That will run the the `true` command as root on each host (using sudo is
|
|
128
|
+
necessary). If that pass without you having to type any passwords, it means
|
|
129
|
+
that:
|
|
129
130
|
|
|
130
131
|
* you have SSH access to each host; and
|
|
131
|
-
* the user you are connecting as has password-less sudo correctly
|
|
132
|
+
* the user you are connecting as is root or has password-less sudo correctly
|
|
133
|
+
setup.
|
|
132
134
|
|
|
133
135
|
## Applying configuration
|
|
134
136
|
|
data/Rakefile
CHANGED
|
@@ -90,6 +90,33 @@ task :manifest do
|
|
|
90
90
|
end
|
|
91
91
|
end
|
|
92
92
|
|
|
93
|
+
desc 'Starts a new release'
|
|
94
|
+
task :new_release do
|
|
95
|
+
last_tag = `git tag | sort -V`.split.last
|
|
96
|
+
last_version = last_tag.sub(/^v/, '')
|
|
97
|
+
v = last_tag.sub(/^v/, '').split('.').map(&:to_i)
|
|
98
|
+
v[-1] += 1
|
|
99
|
+
suggested_version = v.join('.')
|
|
100
|
+
printf "Next version [#{suggested_version}]: "
|
|
101
|
+
version = $stdin.gets.strip
|
|
102
|
+
if version == ''
|
|
103
|
+
version = suggested_version
|
|
104
|
+
end
|
|
105
|
+
mv 'ChangeLog.md', 'ChangeLog.orig'
|
|
106
|
+
sh "(echo '# #{version}' && echo) > ChangeLog.md"
|
|
107
|
+
sh "git log --oneline --no-merges --reverse --format='- %s' #{last_tag}.. >> ChangeLog.md"
|
|
108
|
+
sh '(echo && cat ChangeLog.orig) >> ChangeLog.md && rm -f ChangeLog.orig'
|
|
109
|
+
sh "sed -i -e 's/#{last_version}/#{version}/' lib/chake/version.rb"
|
|
110
|
+
sh 'git diff'
|
|
111
|
+
printf 'Confirm [y/N]? '
|
|
112
|
+
if $stdin.gets.strip.downcase != 'y'
|
|
113
|
+
next
|
|
114
|
+
end
|
|
115
|
+
|
|
116
|
+
sh "git commit -a -m 'New release'"
|
|
117
|
+
sh 'rake release'
|
|
118
|
+
end
|
|
119
|
+
|
|
93
120
|
desc 'Makes a release'
|
|
94
121
|
task release: [:check_tag, :check_changelog, :default, 'bundler:release']
|
|
95
122
|
|
|
@@ -100,7 +127,7 @@ end
|
|
|
100
127
|
|
|
101
128
|
desc 'Check spelling in the source code'
|
|
102
129
|
task :codespell do
|
|
103
|
-
sh 'codespell', '--skip=.git', '--skip=coverage', '--skip=*.asc', '--skip=*.swp', '--skip=tags', '--skip=*.1', '--skip=pkg'
|
|
130
|
+
sh 'codespell', '--skip=.git', '--skip=coverage', '--skip=*.asc', '--skip=*.swp', '--skip=tags', '--skip=*.1', '--skip=pkg', '--skip=man'
|
|
104
131
|
end
|
|
105
132
|
|
|
106
133
|
task default: [:test, :style, :codespell]
|
|
@@ -21,6 +21,9 @@ module Chake
|
|
|
21
21
|
case node.connection
|
|
22
22
|
when Chake::Connection::Ssh
|
|
23
23
|
cmd << 'ssh' << "--user=#{node.username}" << "--host=#{node.hostname}"
|
|
24
|
+
if node.username == 'root'
|
|
25
|
+
cmd << '--no-sudo'
|
|
26
|
+
end
|
|
24
27
|
cmd += ssh_config
|
|
25
28
|
when Chake::Connection::Local
|
|
26
29
|
if node.username == 'root'
|
data/lib/chake/connection/ssh.rb
CHANGED
data/lib/chake/connection.rb
CHANGED
data/lib/chake/node.rb
CHANGED
|
@@ -37,7 +37,7 @@ module Chake
|
|
|
37
37
|
@connection ||= Chake::Connection.get(@connection_name).new(self)
|
|
38
38
|
end
|
|
39
39
|
|
|
40
|
-
def_delegators :connection, :run, :run_as_root, :run_shell, :
|
|
40
|
+
def_delegators :connection, :run, :run_as_root, :run_shell, :rsync_cmd, :rsync_dest, :scp, :scp_dest, :skip?
|
|
41
41
|
|
|
42
42
|
def config_manager
|
|
43
43
|
@config_manager ||= Chake::ConfigManager.get(self)
|
data/lib/chake/version.rb
CHANGED
data/lib/chake.rb
CHANGED
|
@@ -148,7 +148,7 @@ Chake.nodes.each do |node|
|
|
|
148
148
|
rsync_excludes << '--exclude' << 'nodes/'
|
|
149
149
|
rsync_excludes << '--exclude' << 'local-mode-cache/'
|
|
150
150
|
|
|
151
|
-
rsync = node.
|
|
151
|
+
rsync = node.rsync_cmd + ['-ap'] + ENV.fetch('CHAKE_RSYNC_OPTIONS', '').split
|
|
152
152
|
rsync_logging = (Rake.application.options.trace && '--verbose') || '--quiet'
|
|
153
153
|
|
|
154
154
|
hash_files = Dir.glob(File.join(Chake.tmpdir, '*.sha1sum'))
|
|
@@ -187,7 +187,7 @@ Chake.nodes.each do |node|
|
|
|
187
187
|
desc "Preview changes when converging #{hostname}"
|
|
188
188
|
task "preview:#{hostname}" => converge_dependencies do
|
|
189
189
|
maybe_decrypt(node) do
|
|
190
|
-
node.
|
|
190
|
+
node.preview
|
|
191
191
|
end
|
|
192
192
|
end
|
|
193
193
|
|
|
@@ -211,7 +211,7 @@ Chake.nodes.each do |node|
|
|
|
211
211
|
|
|
212
212
|
desc 'checks connectivity and setup on all nodes'
|
|
213
213
|
task "check:#{hostname}" => [:connect_common, "connect:#{hostname}"] do
|
|
214
|
-
node.
|
|
214
|
+
node.run_as_root('echo OK')
|
|
215
215
|
end
|
|
216
216
|
|
|
217
217
|
# needs to be overridden in user projects
|
|
@@ -284,7 +284,7 @@ desc 'checks connectivity and setup on all nodes'
|
|
|
284
284
|
multitask check: (Chake.nodes.map { |node| "check:#{node.hostname}" }) do
|
|
285
285
|
puts '✓ all hosts OK'
|
|
286
286
|
puts ' - ssh connection works'
|
|
287
|
-
puts ' - password-less sudo works'
|
|
287
|
+
puts ' - password-less sudo (if needed) works'
|
|
288
288
|
end
|
|
289
289
|
|
|
290
290
|
desc 'runs a Ruby console in the chake environment'
|