default stop for auto-daemonized; bug fixes
[god.git] / Announce.txt
blob4ac05f5c45ef9bae0bfce3e971cc376df00c4527
1 Subject: [ANN] god 0.3.0 released
3 Plenty of big changes and improvements in this release of god. Most noticeable is a simplification of the config file. Sadly, we must say goodbye to the much loved God.meddle and promote God.watch to top level. This change allows you to easily load in other god config files and have them work as expected. There's even a God.load that takes a glob-style file path string and expands it to load multiple files.
5 PID file support is now baked in so you don't have to set the pid_file attribute on conditions anymore. This also allows god to support processes that aren't already daemons. If you don't specify a PID file for the watch, god will auto-daemonize and keep track of your process for you! To use this feature, you must either run as root (pid files will be stored by default in /var/run/god) or set the pid_file_directory attribute in a God.init block (see docs).
7 For anyone that had problems installing the 0.2.0 release because of the events system not compiling, god 0.3.0 will now allow you to install without event support. Most systems are capable of supporting events, but it requires some dedication to get the headers in place and make sure your kernel is new enough. To determine if your god installation has event support you can run "sudo god -V" (this MUST be run as root on Linux, as netlink connector requires root permissions).
9 Using the god binary you can now control your watches from the command line. You can start/stop/restart/monitor/unmonitor watches at your demand.
11 New watch attributes now available:
12   pid_file: sets the watch process' PID file location
13   uid/gid: start processes as someone else (requires root access)
14   group: assign a watch to a group (to control them all at once)
15   autostart: prevent auto start on god start if false
17 Updated documentation is now available on the website:
19   http://god.rubyforge.org/
22 WHAT IS GOD?
24 God is an easy to configure, easy to extend monitoring framework written in Ruby.
26 Keeping your server processes and tasks running should be a simple part of your deployment process. God aims to be the simplest, most powerful monitoring application available.
29 DISCLAIMER
31 God is still very young, I'd love to get feedback and bug reports, but I do not yet recommend you use it for mission critical tasks. I personally use it in production but then I'm a daring fellow.
34 INSTALL
36 sudo gem install god
39 FEATURES
41 * Config file is written in Ruby
42 * Easily write your own custom conditions in Ruby
43 * Supports both poll and event based conditions
44 * Different poll conditions can have different intervals
45 * Easily control non-daemonized processes
48 EXAMPLE
50 The easiest way to understand how god will make your life better is by looking at a sample config file. The following configuration file is what I use at gravatar.com to keep the mongrels running:
52 # file:      gravatar.god
53 # run with:  god -c /path/to/gravatar.god
54
55 # This is the actual config file used to keep the mongrels of
56 # gravatar.com running.
58 RAILS_ROOT = "/var/www/gravatar2/current"
60 %w{8200 8201 8202}.each do |port|
61   God.watch do |w|
62     w.name = "gravatar2-mongrel-#{port}"
63     w.interval = 30.seconds # default
64     w.start = "mongrel_rails cluster::start --only #{port} \
65       -C #{RAILS_ROOT}/config/mongrel_cluster.yml"
66     w.stop = "mongrel_rails cluster::stop --only #{port} \
67       -C #{RAILS_ROOT}/config/mongrel_cluster.yml"
68     w.grace = 10.seconds
69     w.pid_file = File.join(RAILS_ROOT, "log/mongrel.#{port}.pid")
70     
71     w.behavior(:clean_pid_file)
73     w.start_if do |start|
74       start.condition(:process_running) do |c|
75         c.interval = 5.seconds
76         c.running = false
77       end
78     end
79     
80     w.restart_if do |restart|
81       restart.condition(:memory_usage) do |c|
82         c.above = 150.megabytes
83         c.times = [3, 5] # 3 out of 5 intervals
84       end
85     
86       restart.condition(:cpu_usage) do |c|
87         c.above = 50.percent
88         c.times = 5
89       end
90     end
91   end
92 end
95 DOCS
97 Detailed documentation is available at http://god.rubyforge.org/
100 CHANGES
102 == 0.3.0 / 2007-08-17
104 * Fix netlink header problem on Ubuntu Edgy [Dan Sully]
105 * Add uid/gid setting for processes [kevinclark]
106 * Add autostart flag for watches so they don't necessarily startup with god [kevinclark]
107 * Change command line call options for god binary to accommodate watch start/stop functionality
108 * Add individual start/stop/restart grace periods for finer grained control
109 * Change default DRb port to 17165 ('god'.to_i(32))
110 * Implement command line control to start/restart/stop/monitor/unmonitor watches/groups by name
111 * Watches can now belong to a group that can be controlled as a whole
112 * Allow god to be installed (sans events) on systems that don't support events
113 * Daemonize and handle PID files for non-daemonizing scripts [kevinclark]
114 * Fix simple mode lifecycle gap
115 * Remove necessity to specify pid_file for conditions
116 * Change config file to use God.init and God.watch directly instead of God.meddle block
117 * Move god binary command logic to main library
118 * Enhance god binary with better reporting
119 * Fix synchronization bug in Timer (reported by Srini Panguluri)
120 * Add Lambda condition for easy custom conditions [Mike Mintz]
121 * Add sugar for numerics (seconds, minutes, kilobytes, megabytes, percent, etc)
122 * Add optional PID and log file generation to god binary for daemon mode
123 * Add God.load to do glob enabled loading
124 * Add -V option to god binary for detailed version/build info
127 AUTHORS
129 Tom Preston-Werner
130 Kevin Clark