seesaw 0.2.0 → 0.2.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. data/README.txt +39 -6
  2. data/lib/seesaw/init.rb +4 -2
  3. metadata +2 -2
data/README.txt CHANGED
@@ -4,24 +4,57 @@ seesaw
4
4
 
5
5
  == DESCRIPTION:
6
6
 
7
- FIX (describe your package)
8
-
9
- == FEATURES/PROBLEMS:
7
+ seesaw: [verb] to change rapidly from one state or condition to another and back again.
8
+
9
+ Seesaw is a replacement/addition to the mongrel_cluster gem and allows you to perform a safe rippling restart of your mongrel cluster without dropping any requests.
10
10
 
11
- * FIX (list of features or problems)
11
+ Let's say you have a mongrel cluster setup with 7 individual mongrels on your server. Let's also say that you have to deploy a code update and restart all of your mongrels but your site is really busy and you cannot afford any downtime whatsoever.
12
+
13
+ When you execute:
14
+
15
+ mongrel_rails seesaw::ripple
16
+
17
+ This will happen:
18
+
19
+ 1. your webserver configuration is switched to only use the front half of your mongrel pack (mongrels 1-4)
20
+ 2. the webserver (apache or nginx) is gracefully restarted
21
+ 3. the back half of your mongrel pack (mongrels 5-7) is restarted
22
+ 4. your webserver configuration is switched to only use the back half of the pack
23
+ 5. the webserver is gracefully restarted
24
+ 6. front half mongrels are restared
25
+ 7. webserver configuration switched back to full cluster configuration
26
+ 8. webserver restarted one last time
27
+
28
+ Halfway through the process, your site is only running on half of the mongrels, but that will only result in reduced performance for a small amount of time, rather than downtime.
12
29
 
13
30
  == SYNOPSIS:
14
31
 
15
- FIX (code sample of usage)
32
+ * mongrel_rails::ripple
33
+ perform a rippling restart of the mongrel cluster
34
+
35
+ * mongrel_rails::switch --cluster CLUSTER
36
+ transfers the cluster into a guaranteed running configuration. CLUSTER can be one of [1|2|all], starting the front half, back half or full cluster respectively. If only a half cluster is started, the mongrels for the other half will be shut down.
37
+
38
+ * mongrel_rails::configure --server TYPE
39
+ generate a starting configuration for the chosen webserver [nginx|apache]. Default is apache.
16
40
 
17
41
  == REQUIREMENTS:
18
42
 
19
- * FIX (list of requirements)
43
+ * mongrel installation
44
+ * mongrel_cluster installed and configured for the application
20
45
 
21
46
  == INSTALL:
22
47
 
23
48
  sudo gem install seesaw
24
49
 
50
+ == CONFIGURATION
51
+
52
+ === seesaw.yml
53
+
54
+ The seesaw configuration looks like this:
55
+
56
+
57
+
25
58
  == LICENSE:
26
59
 
27
60
  (The MIT License)
@@ -6,9 +6,10 @@ require 'seesaw/mongrel_cluster_patch'
6
6
  require "erb"
7
7
 
8
8
  module Seesaw
9
- VERSION = '0.2.0'
9
+ VERSION = '0.2.1'
10
10
 
11
11
  module CommandBase
12
+
12
13
  def log(message)
13
14
  puts message
14
15
  end
@@ -135,6 +136,7 @@ module Seesaw
135
136
 
136
137
  class Configure < GemPlugin::Plugin "/commands"
137
138
  include Mongrel::Command::Base
139
+ include CommandBase
138
140
 
139
141
  def configure
140
142
  options [
@@ -142,7 +144,7 @@ module Seesaw
142
144
  ['-C', '--config PATH', "Path to seesaw configuration file", :@config_file, 'config/seesaw.yml'],
143
145
  ['-M', '--mongrel PATH', "Path to mongrel cluster configuration file", :@mongrel_config_file, 'config/mongrel_cluster.yml'],
144
146
  ['', '--http_config PATH', "Path to the http server configuration includes", :@http_config_path, "config/http_cluster"],
145
- ['', '--server TYPE', "Webserver to generate example configuration for. TYPE can be nginx or apache. Default is nginx.", :@server, 'nginx']
147
+ ['', '--server TYPE', "Webserver to generate example configuration for. TYPE can be nginx or apache. Default is apache.", :@server, 'apache']
146
148
  ]
147
149
  end
148
150
 
metadata CHANGED
@@ -3,7 +3,7 @@ rubygems_version: 0.9.4
3
3
  specification_version: 1
4
4
  name: seesaw
5
5
  version: !ruby/object:Gem::Version
6
- version: 0.2.0
6
+ version: 0.2.1
7
7
  date: 2007-08-19 00:00:00 +10:00
8
8
  summary: Ripple-restart a mongrel cluster with no downtime
9
9
  require_paths:
@@ -11,7 +11,7 @@ require_paths:
11
11
  email: max@muermann.org
12
12
  homepage: " by Matt Allen and Max Muermann"
13
13
  rubyforge_project: seesaw
14
- description: "== FEATURES/PROBLEMS: * FIX (list of features or problems) == SYNOPSIS: FIX (code sample of usage) == REQUIREMENTS:"
14
+ description: "When you execute: mongrel_rails seesaw::ripple This will happen: 1. your webserver configuration is switched to only use the front half of your mongrel pack (mongrels 1-4) 2. the webserver (apache or nginx) is gracefully restarted 3. the back half of your mongrel pack (mongrels 5-7) is restarted 4. your webserver configuration is switched to only use the back half of the pack 5. the webserver is gracefully restarted 6. front half mongrels are restared 7. webserver configuration switched back to full cluster configuration 8. webserver restarted one last time"
15
15
  autorequire: seesaw/init.rb
16
16
  default_executable:
17
17
  bindir: bin