updated docs, remove daemons dependency; update manifest
[god.git] / Announce.txt
blobebe9594ae536d01f3bf80eb7fc9b069c31b3fa96
1 Subject: [ANN] god 0.3.0 released
3 Wow, there are some really 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 a pid_file attribute on any conditions. 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 you have 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 will now be able to 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   uid/gid: start processes as someone else (requires root access)
13   group: assign a watch to a group
14   autostart: prevent auto start on god start
16 Updated documentation is now available on the website:
18   http://god.rubyforge.org/
21 WHAT IS GOD?
23 God is an easy to configure, easy to extend monitoring framework written in Ruby.
25 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.
28 DISCLAIMER
30 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.
33 INSTALL
35 sudo gem install god
37 * note: currently tested only on Redhat Linux and Darwin (won't work on Windows)
40 FEATURES
42 * Config file is written in Ruby
43 * Easily write your own custom conditions in Ruby
44 * Supports both poll and event based conditions
45 * Different poll conditions can have different intervals
46 * Easily control non-daemonized processes
49 EXAMPLE
51 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:
53 # file:      gravatar.god
54 # run with:  god -c /path/to/gravatar.god
55
56 # This is the actual config file used to keep the mongrels of
57 # gravatar.com running.
59 RAILS_ROOT = "/var/www/gravatar2/current"
61 %w{8200 8201 8202}.each do |port|
62   God.watch do |w|
63     w.name = "gravatar2-mongrel-#{port}"
64     w.interval = 30.seconds # default
65     w.start = "mongrel_rails cluster::start --only #{port} \
66       -C #{RAILS_ROOT}/config/mongrel_cluster.yml"
67     w.stop = "mongrel_rails cluster::stop --only #{port} \
68       -C #{RAILS_ROOT}/config/mongrel_cluster.yml"
69     w.grace = 10.seconds
70     w.pid_file = File.join(RAILS_ROOT, "log/mongrel.#{port}.pid")
71     
72     w.behavior(:clean_pid_file)
74     w.start_if do |start|
75       start.condition(:process_running) do |c|
76         c.interval = 5.seconds
77         c.running = false
78       end
79     end
80     
81     w.restart_if do |restart|
82       restart.condition(:memory_usage) do |c|
83         c.above = 150.megabytes
84         c.times = [3, 5] # 3 out of 5 intervals
85       end
86     
87       restart.condition(:cpu_usage) do |c|
88         c.above = 50.percent
89         c.times = 5
90       end
91     end
92   end
93 end
96 DOCS
98 Detailed documentation is available at http://god.rubyforge.org/
101 CHANGES
103 == 0.3.0 / 2007-08-17
105 * Fix netlink header problem on Ubuntu Edgy [Dan Sully]
106 * Add uid/gid setting for processes [kevinclark]
107 * Add autostart flag for watches so they don't necessarily startup with god [kevinclark]
108 * Change command line call options for god binary to accommodate watch start/stop functionality
109 * Add individual start/stop/restart grace periods for finer grained control
110 * Change default DRb port to 17165 ('god'.to_i(32))
111 * Implement command line control to start/restart/stop/monitor/unmonitor watches/groups by name
112 * Watches can now belong to a group that can be controlled as a whole
113 * Allow god to be installed (sans events) on systems that don't support events
114 * Daemonize and handle PID files for non-daemonizing scripts [kevinclark]
115 * Fix simple mode lifecycle gap
116 * Remove necessity to specify pid_file for conditions
117 * Change config file to use God.init and God.watch directly instead of God.meddle block
118 * Move god binary command logic to main library
119 * Enhance god binary with better reporting
120 * Fix synchronization bug in Timer (reported by Srini Panguluri)
121 * Add Lambda condition for easy custom conditions [Mike Mintz]
122 * Add sugar for numerics (seconds, minutes, kilobytes, megabytes, percent, etc)
123 * Add optional PID and log file generation to god binary for daemon mode
124 * Add God.load to do glob enabled loading
125 * Add -V option to god binary for detailed version/build info
128 AUTHORS
130 Tom Preston-Werner
131 Kevin Clark