opswalrus 1.0.45 → 1.0.47
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/opswalrus/app.rb +1 -3
- data/lib/opswalrus/bootstrap.ops +11 -1
- data/lib/opswalrus/host.rb +5 -2
- data/lib/opswalrus/version.rb +1 -1
- 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: 9d9a70d6f9200acd372ab13f63628a04cffd1cd4509e3ac24af448b179a6f192
|
4
|
+
data.tar.gz: 750f7704aa249784a9261b2910a1c8b3786ba03b32e52fe16d07c8de82cced06
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4774c0ec9370ecb0e7251131bcc8e6a192c6009e7d7200fbd93dacdddbcec68cf3b2042b086cb8be1f7310721a2303b9f3fd04e40a52c3aecc557ff711b060b6
|
7
|
+
data.tar.gz: 8a7c15b5c16182b806efc85e8e307d9d98f29715aa2e84b4067413b90484c9f19fc94b7e9c294845f48623c2cd776bc8d284ee2bde6e74d76af1d6f38d925345
|
data/Gemfile.lock
CHANGED
data/lib/opswalrus/app.rb
CHANGED
@@ -219,9 +219,7 @@ module OpsWalrus
|
|
219
219
|
set_pwd(__FILE__.to_pathname.dirname)
|
220
220
|
bootstrap_ops_file = OpsFile.new(self, __FILE__.to_pathname.dirname.join("bootstrap.ops"))
|
221
221
|
op = OperationRunner.new(self, bootstrap_ops_file)
|
222
|
-
|
223
|
-
info "Bootstrap results:"
|
224
|
-
info result
|
222
|
+
op.run([], params_json_hash: @params)
|
225
223
|
end
|
226
224
|
|
227
225
|
# args is of the form ["github.com/davidkellis/my-package/sub-package1", "operation1", "arg1:val1", "arg2:val2", "arg3:val3"]
|
data/lib/opswalrus/bootstrap.ops
CHANGED
@@ -1,5 +1,15 @@
|
|
1
1
|
# ssh_noprep in: :sequence do
|
2
2
|
ssh_noprep do
|
3
3
|
puts "Bootstrapping #{to_s} (alias=#{self.alias})"
|
4
|
-
_bootstrap_host()
|
4
|
+
stdout, stderr, exit_status = _bootstrap_host()
|
5
|
+
if exit_status == 0
|
6
|
+
puts "Success - #{to_s} (alias=#{self.alias})"
|
7
|
+
else
|
8
|
+
stdout_report = stdout.lines.last(3).map {|line| " #{line}" }.join()
|
9
|
+
stderr_report = stderr.lines.last(3).map {|line| " #{line}" }.join()
|
10
|
+
report = "Failure - #{to_s} (alias=#{self.alias})"
|
11
|
+
report << "\n stdout:\n#{stdout_report}" unless stdout_report.empty?
|
12
|
+
report << "\n stderr:\n#{stderr_report}" unless stderr_report.empty?
|
13
|
+
puts report
|
14
|
+
end
|
5
15
|
end
|
data/lib/opswalrus/host.rb
CHANGED
@@ -81,6 +81,7 @@ module OpsWalrus
|
|
81
81
|
@_host.to_s
|
82
82
|
end
|
83
83
|
|
84
|
+
# returns [stdout, stderr, exit_status]
|
84
85
|
def _bootstrap_host
|
85
86
|
# copy over bootstrap shell script
|
86
87
|
# io = StringIO.new(bootstrap_shell_script)
|
@@ -89,8 +90,10 @@ module OpsWalrus
|
|
89
90
|
io.close
|
90
91
|
raise Error, "Unable to upload bootstrap shell script to remote host #{to_s} (alias=#{self.alias})" unless upload_success
|
91
92
|
@_host.execute(:chmod, "755", "tmpopsbootstrap.sh")
|
92
|
-
@_host.
|
93
|
-
|
93
|
+
sshkit_cmd = @_host.execute_cmd(:sh, "tmpopsbootstrap.sh")
|
94
|
+
[sshkit_cmd.full_stdout, sshkit_cmd.full_stderr, sshkit_cmd.exit_status]
|
95
|
+
ensure
|
96
|
+
@_host.execute(:rm, "-f", "tmpopsbootstrap.sh") rescue nil
|
94
97
|
end
|
95
98
|
|
96
99
|
def _zip_copy_and_run_ops_bundle(local_host, block)
|
data/lib/opswalrus/version.rb
CHANGED