the-maestro 0.3.0 → 0.3.1

Sign up to get free protection for your applications and to get access to all the features.
data/README.rdoc CHANGED
@@ -317,6 +317,19 @@ Your recipes should be placed in <code>YOUR_RAILS_APP/config/maestro/cookbooks</
317
317
 
318
318
  For a more in depth explanation of Chef, please consult {the Chef documentation}[http://wiki.opscode.com/display/chef/Home].
319
319
 
320
+ === Logging
321
+
322
+ Maestro will log cloud-wide workflow messages to STDOUT. In addition, log files will be created for your cloud, as well as each of the nodes in your cloud. These
323
+ can be found at the following location:
324
+
325
+ YOUR_RAILS_APP/log/maestro/clouds/<i>cloud-name</i>/
326
+ YOUR_RAILS_APP/log/maestro/clouds/<i>cloud-name</i>/<i>cloud-name</i>.log
327
+ YOUR_RAILS_APP/log/maestro/clouds/<i>cloud-name</i>/<i>node-name</i>.log
328
+
329
+ Node-specific messages are not logged to STDOUT, but only to the node's log file. For troubleshooting problems configuring your nodes, please
330
+ consult the individual node log files for information.
331
+
332
+
320
333
  == Using Maestro with a stand alone Ruby application
321
334
 
322
335
  sudo gem install the-maestro
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.3.0
1
+ 0.3.1
data/lib/maestro/cloud.rb CHANGED
@@ -243,11 +243,25 @@ module Maestro
243
243
  session = open_ssh_session
244
244
  close_session = true
245
245
  end
246
- commands =
247
- ["sudo chef-solo -c /tmp/chef-solo.rb -r '#{chef_assets_url()}'"]
248
246
  # shut off the stdout outputter and only log to the nodes' log files
249
247
  @configurable_nodes.each_pair {|name, node| node.disable_stdout}
250
- commands.each do |cmd|
248
+ # clean up existing cookbooks and roles directories if they exist
249
+ cleanup_cmds =
250
+ ["sudo rm -rf /tmp/chef-solo/cookbooks",
251
+ "sudo rm -rf /tmp/chef-solo/roles",
252
+ "sudo mkdir -p /tmp/chef-solo/cookbooks",
253
+ "sudo mkdir -p /tmp/chef-solo/roles"]
254
+ cleanup_cmds.each do |str|
255
+ session.open_channel do |channel|
256
+ channel.request_pty {|ch, success| abort "could not obtain pty" if !success}
257
+ channel.exec(str)
258
+ end
259
+ session.loop(60)
260
+ end
261
+ # run chef-solo
262
+ chef_solo_commands =
263
+ ["sudo chef-solo -c /tmp/chef-solo.rb -r '#{chef_assets_url()}'"]
264
+ chef_solo_commands.each do |cmd|
251
265
  session.open_channel do |channel|
252
266
  channel.request_pty {|ch, success| abort "could not obtain pty" if !success}
253
267
  # Find the node for this channel's host
data/the-maestro.gemspec CHANGED
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{the-maestro}
8
- s.version = "0.3.0"
8
+ s.version = "0.3.1"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Brian Ploetz"]
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: the-maestro
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brian Ploetz