breeze 0.0.2 → 0.0.3

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 CHANGED
@@ -53,7 +53,7 @@ These tasks call app tasks with fixed parameters.
53
53
 
54
54
  configuration
55
55
  -------------
56
- thor configuration:deploy_to_localhost # Transform and deploy server configuration files to the local file system based on...
56
+ thor configuration:deploy_to_localhost # Transform and deploy server configuration files to the local file system based...
57
57
 
58
58
  db
59
59
  --
@@ -1,6 +1,6 @@
1
1
  module Breeze
2
2
 
3
- VERSION = "0.0.2"
3
+ VERSION = "0.0.3"
4
4
  autoload :Veur, 'breeze/veur'
5
5
 
6
6
  end
@@ -59,7 +59,7 @@ module Breeze
59
59
  if ask("Ready to continue and move the elastic_ip for #{public_server_name} to the new server? [YES/rollback] >") =~ /r|n/i
60
60
  new_server.destroy
61
61
  else
62
- remote("sudo shutdown -h +#{CONFIGURATION[:rollback_window]} &", :host => ip(old_server))
62
+ remote("nohup sudo shutdown -h +#{CONFIGURATION[:rollback_window]} > /dev/null 2>&1 &", :host => ip(old_server))
63
63
  old_server.spare_for_rollback!
64
64
  move_addresses(old_server, new_server)
65
65
  end
@@ -80,7 +80,7 @@ module Breeze
80
80
  remote('sudo shutdown -c', :host => ip(old_server))
81
81
  new_server = active_servers(public_server_name).first
82
82
  remote(disable_app_command, :host => ip(new_server))
83
- thor("server:address:release #{temp_ip}") if temp_ip
83
+ thor("server:address:release #{temp_ip} --force") if temp_ip
84
84
  move_addresses(new_server, old_server)
85
85
  old_server.breeze_state('reactivated')
86
86
  new_server.breeze_state('abandoned_due_to_rollback')
@@ -116,11 +116,13 @@ module Breeze
116
116
  end
117
117
 
118
118
  def disable_app_command
119
- "cd #{CONFIGURATION[:app_path]} && mkdir -p public/system && cp config/breeze/maintenance.html public/system/"
119
+ file = "#{CONFIGURATION[:app_path]}/config/breeze/maintenance.html"
120
+ dir = "#{CONFIGURATION[:app_path]}/public/system"
121
+ "sudo mkdir -p #{dir} && sudo cp #{file} #{dir}"
120
122
  end
121
123
 
122
124
  def enable_app_command
123
- "rm #{CONFIGURATION[:app_path]}/public/system/maintenance.html"
125
+ "sudo rm #{CONFIGURATION[:app_path]}/public/system/maintenance.html"
124
126
  end
125
127
 
126
128
  def db_endpoint(db_server_name)
@@ -52,7 +52,7 @@ module Breeze
52
52
  def report(title, columns, rows)
53
53
  table = capture_table([columns] + rows)
54
54
  title = "=== #{title} "
55
- title << "=" * [(table.lines.max{|s| s.size }.size - title.size), 3].max
55
+ title << "=" * [(table.split($/).max{|a,b| a.size <=> b.size }.size - title.size), 3].max
56
56
  puts title
57
57
  puts table
58
58
  end
@@ -127,7 +127,7 @@ set daemon 45 # check services at 45-second intervals
127
127
  ## usage. Each test specifies a resource, conditions and the action to be
128
128
  ## performed should a test fail.
129
129
  #
130
- check system <%= host_name %>
130
+ check system <%= ENV['PUBLIC_SERVER_NAME'] %>--<%= host_name %>
131
131
  if loadavg (1min) > 4 then alert
132
132
  if loadavg (5min) > 2 then alert
133
133
  if memory usage > 75% then alert
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 0
8
- - 2
9
- version: 0.0.2
8
+ - 3
9
+ version: 0.0.3
10
10
  platform: ruby
11
11
  authors:
12
12
  - Markus Bengts
@@ -14,7 +14,7 @@ autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
16
 
17
- date: 2011-03-22 00:00:00 +01:00
17
+ date: 2011-03-23 00:00:00 +01:00
18
18
  default_executable:
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency