cloud66-bluepill 0.0.62
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/.gitignore +10 -0
- data/.rspec +1 -0
- data/DESIGN.md +10 -0
- data/Gemfile +10 -0
- data/LICENSE +22 -0
- data/README.md +349 -0
- data/Rakefile +38 -0
- data/bin/bluepill +124 -0
- data/bin/bpsv +3 -0
- data/bin/sample_forking_server +53 -0
- data/bluepill.gemspec +37 -0
- data/examples/example.rb +87 -0
- data/examples/new_example.rb +89 -0
- data/examples/new_runit_example.rb +29 -0
- data/examples/runit_example.rb +26 -0
- data/lib/bluepill.rb +38 -0
- data/lib/bluepill/application.rb +215 -0
- data/lib/bluepill/application/client.rb +8 -0
- data/lib/bluepill/application/server.rb +23 -0
- data/lib/bluepill/condition_watch.rb +51 -0
- data/lib/bluepill/controller.rb +122 -0
- data/lib/bluepill/dsl.rb +12 -0
- data/lib/bluepill/dsl/app_proxy.rb +25 -0
- data/lib/bluepill/dsl/process_factory.rb +122 -0
- data/lib/bluepill/dsl/process_proxy.rb +44 -0
- data/lib/bluepill/group.rb +72 -0
- data/lib/bluepill/logger.rb +63 -0
- data/lib/bluepill/process.rb +514 -0
- data/lib/bluepill/process_conditions.rb +14 -0
- data/lib/bluepill/process_conditions/always_true.rb +18 -0
- data/lib/bluepill/process_conditions/cpu_usage.rb +19 -0
- data/lib/bluepill/process_conditions/file_time.rb +26 -0
- data/lib/bluepill/process_conditions/http.rb +58 -0
- data/lib/bluepill/process_conditions/mem_usage.rb +32 -0
- data/lib/bluepill/process_conditions/process_condition.rb +22 -0
- data/lib/bluepill/process_journal.rb +219 -0
- data/lib/bluepill/process_statistics.rb +27 -0
- data/lib/bluepill/socket.rb +58 -0
- data/lib/bluepill/system.rb +265 -0
- data/lib/bluepill/trigger.rb +60 -0
- data/lib/bluepill/triggers/flapping.rb +56 -0
- data/lib/bluepill/util/rotational_array.rb +20 -0
- data/lib/bluepill/version.rb +4 -0
- data/local-bluepill +129 -0
- data/spec/lib/bluepill/logger_spec.rb +3 -0
- data/spec/lib/bluepill/process_spec.rb +96 -0
- data/spec/lib/bluepill/process_statistics_spec.rb +24 -0
- data/spec/lib/bluepill/system_spec.rb +36 -0
- data/spec/spec_helper.rb +15 -0
- metadata +302 -0
data/local-bluepill
ADDED
@@ -0,0 +1,129 @@
|
|
1
|
+
#! /usr/bin/env ruby
|
2
|
+
|
3
|
+
require 'rubygems'
|
4
|
+
require 'bundler/setup'
|
5
|
+
$LOAD_PATH.unshift(File.expand_path('lib', File.dirname(__FILE__)))
|
6
|
+
|
7
|
+
require 'optparse'
|
8
|
+
require 'bluepill'
|
9
|
+
|
10
|
+
begin
|
11
|
+
require 'rbconfig'
|
12
|
+
rescue LoadError
|
13
|
+
end
|
14
|
+
|
15
|
+
RbConfig = Config unless Object.const_defined?(:RbConfig)
|
16
|
+
|
17
|
+
# Default options
|
18
|
+
options = {
|
19
|
+
:log_file => "/var/log/bluepill.log",
|
20
|
+
:base_dir => "/var/run/bluepill",
|
21
|
+
:privileged => true,
|
22
|
+
:timeout => 10,
|
23
|
+
:attempts => 1
|
24
|
+
}
|
25
|
+
|
26
|
+
OptionParser.new do |opts|
|
27
|
+
opts.banner = "Usage: bluepill [app] cmd [options]"
|
28
|
+
opts.on('-l', "--logfile LOGFILE", "Path to logfile, defaults to #{options[:log_file]}") do |file|
|
29
|
+
options[:log_file] = file
|
30
|
+
end
|
31
|
+
|
32
|
+
opts.on('-c', "--base-dir DIR", "Directory to store bluepill socket and pid files, defaults to #{options[:base_dir]}") do |base_dir|
|
33
|
+
options[:base_dir] = base_dir
|
34
|
+
end
|
35
|
+
|
36
|
+
opts.on("-v", "--version") do
|
37
|
+
puts "bluepill, version #{Bluepill::VERSION}"
|
38
|
+
exit
|
39
|
+
end
|
40
|
+
|
41
|
+
opts.on("--[no-]privileged", "Allow/disallow to run #{$0} as non-privileged process. disallowed by default") do |v|
|
42
|
+
options[:privileged] = v
|
43
|
+
end
|
44
|
+
|
45
|
+
opts.on('-t', '--timeout Seconds', Integer, "Timeout for commands sent to the daemon, in seconds. Defaults to 10.") do |timeout|
|
46
|
+
options[:timeout] = timeout
|
47
|
+
end
|
48
|
+
|
49
|
+
opts.on('--attempts Count', Integer, "Attempts for commands sent to the daemon, in seconds. Defaults to 1.") do |attempts|
|
50
|
+
options[:attempts] = attempts
|
51
|
+
end
|
52
|
+
|
53
|
+
help = proc do
|
54
|
+
puts opts
|
55
|
+
puts
|
56
|
+
puts "Commands:"
|
57
|
+
puts " load CONFIG_FILE\t\tLoads new instance of bluepill using the specified config file"
|
58
|
+
puts " status\t\t\tLists the status of the proceses for the specified app"
|
59
|
+
puts " start [TARGET]\t\tIssues the start command for the target process or group, defaults to all processes"
|
60
|
+
puts " stop [TARGET]\t\tIssues the stop command for the target process or group, defaults to all processes"
|
61
|
+
puts " restart [TARGET]\t\tIssues the restart command for the target process or group, defaults to all processes"
|
62
|
+
puts " unmonitor [TARGET]\t\tStop monitoring target process or group, defaults to all processes"
|
63
|
+
puts " log [TARGET]\t\tShow the log for the specified process or group, defaults to all for app"
|
64
|
+
puts " quit\t\t\tStop bluepill"
|
65
|
+
puts
|
66
|
+
puts "See http://github.com/arya/bluepill for README"
|
67
|
+
exit
|
68
|
+
end
|
69
|
+
|
70
|
+
opts.on_tail('-h','--help', 'Show this message', &help)
|
71
|
+
help.call if ARGV.empty?
|
72
|
+
end.parse!
|
73
|
+
|
74
|
+
# Check for root
|
75
|
+
if options[:privileged] && ::Process.euid != 0
|
76
|
+
$stderr.puts "You must run bluepill as root or use --no-privileged option."
|
77
|
+
exit(3)
|
78
|
+
end
|
79
|
+
|
80
|
+
APPLICATION_COMMANDS = %w(status start stop restart unmonitor quit log)
|
81
|
+
|
82
|
+
controller = Bluepill::Controller.new(options.slice(:base_dir, :log_file))
|
83
|
+
|
84
|
+
if controller.running_applications.include?(File.basename($0)) && File.symlink?($0)
|
85
|
+
# bluepill was called as a symlink with the name of the target application
|
86
|
+
options[:application] = File.basename($0)
|
87
|
+
elsif controller.running_applications.include?(ARGV.first)
|
88
|
+
# the first arg is the application name
|
89
|
+
options[:application] = ARGV.shift
|
90
|
+
elsif APPLICATION_COMMANDS.include?(ARGV.first)
|
91
|
+
if controller.running_applications.length == 1
|
92
|
+
# there is only one, let's just use that
|
93
|
+
options[:application] = controller.running_applications.first
|
94
|
+
elsif controller.running_applications.length > 1
|
95
|
+
# There is more than one, tell them the list and exit
|
96
|
+
$stderr.puts "You must specify an application name to run that command. Here's the list of running applications:"
|
97
|
+
controller.running_applications.each_with_index do |app, index|
|
98
|
+
$stderr.puts " #{index + 1}. #{app}"
|
99
|
+
end
|
100
|
+
$stderr.puts "Usage: bluepill [app] cmd [options]"
|
101
|
+
exit(1)
|
102
|
+
else
|
103
|
+
# There are none running AND they aren't trying to start one
|
104
|
+
$stderr.puts "Error: There are no running bluepill daemons.\nTo start a bluepill daemon, use: bluepill load <config file>"
|
105
|
+
exit(2)
|
106
|
+
end
|
107
|
+
end
|
108
|
+
|
109
|
+
options[:command] = ARGV.shift
|
110
|
+
|
111
|
+
if options[:command] == "load"
|
112
|
+
file = ARGV.shift
|
113
|
+
if File.exists?(file)
|
114
|
+
# Restart the ruby interpreter for the config file so that anything loaded here
|
115
|
+
# does not stay in memory for the daemon
|
116
|
+
ruby = File.join(RbConfig::CONFIG['bindir'], RbConfig::CONFIG['ruby_install_name'])
|
117
|
+
load_path = File.expand_path("#{File.dirname(__FILE__)}/../lib")
|
118
|
+
file_path = File.expand_path(file)
|
119
|
+
|
120
|
+
exec(ruby, "-I#{load_path}", '-rbluepill', file_path)
|
121
|
+
|
122
|
+
else
|
123
|
+
$stderr.puts "Can't find file: #{file}"
|
124
|
+
end
|
125
|
+
else
|
126
|
+
target = ARGV.shift
|
127
|
+
controller.handle_command(options[:application], options[:command], target)
|
128
|
+
end
|
129
|
+
|
@@ -0,0 +1,96 @@
|
|
1
|
+
describe Bluepill::Process do
|
2
|
+
subject do
|
3
|
+
Bluepill::Process.new(:proc_name, [],
|
4
|
+
:logger => Bluepill::Logger.new,
|
5
|
+
)
|
6
|
+
end
|
7
|
+
describe "#initialize" do
|
8
|
+
context "defaults" do
|
9
|
+
[
|
10
|
+
:start_command, :stop_command, :restart_command, :stdout, :stderr, :stdin,
|
11
|
+
:daemonize, :pid_file, :working_dir, :uid, :gid, :child_process_factory,
|
12
|
+
:pid_command, :auto_start, :supplementary_groups, :stop_signals
|
13
|
+
].each do |attr|
|
14
|
+
its(attr) { should be_nil }
|
15
|
+
end
|
16
|
+
its(:monitor_children) { should be_false }
|
17
|
+
its(:cache_actual_pid) { should be_true }
|
18
|
+
its(:start_grace_time) { should eq 3 }
|
19
|
+
its(:stop_grace_time) { should eq 3 }
|
20
|
+
its(:restart_grace_time) { should eq 3 }
|
21
|
+
its(:on_start_timeout) { should eq "start" }
|
22
|
+
its(:environment) { should eq Hash[] }
|
23
|
+
end
|
24
|
+
|
25
|
+
context "overrides" do
|
26
|
+
subject { Bluepill::Process.new(:proc_name, [], :start_grace_time => 17) }
|
27
|
+
its(:start_grace_time) { should eq 17 }
|
28
|
+
end
|
29
|
+
end
|
30
|
+
|
31
|
+
describe "#start_process" do
|
32
|
+
it "functions" do
|
33
|
+
subject.stub(:start_command) { "/etc/init.d/script start" }
|
34
|
+
subject.stub(:on_start_timeout) { "freakout" }
|
35
|
+
subject.logger.stub(:warning)
|
36
|
+
subject.stub(:daemonize?) { false }
|
37
|
+
|
38
|
+
subject.should_receive(:with_timeout)
|
39
|
+
.with(3, "freakout")
|
40
|
+
.and_yield
|
41
|
+
|
42
|
+
Bluepill::System.should_receive(:execute_blocking)
|
43
|
+
.with("/etc/init.d/script start", subject.system_command_options)
|
44
|
+
.and_return(exit_code: 0)
|
45
|
+
|
46
|
+
subject.start_process
|
47
|
+
end
|
48
|
+
|
49
|
+
describe "#stop_process" do
|
50
|
+
it "functions" do
|
51
|
+
subject.stub(:stop_command) { "/etc/init.d/script stop" }
|
52
|
+
subject.logger.stub(:warning)
|
53
|
+
subject.should_receive(:with_timeout)
|
54
|
+
.with(3, "stop")
|
55
|
+
.and_yield
|
56
|
+
|
57
|
+
Bluepill::System.should_receive(:execute_blocking)
|
58
|
+
.with("/etc/init.d/script stop", subject.system_command_options)
|
59
|
+
.and_return(exit_code: 0)
|
60
|
+
|
61
|
+
subject.stop_process
|
62
|
+
end
|
63
|
+
end
|
64
|
+
|
65
|
+
describe "#restart_process" do
|
66
|
+
it "functions" do
|
67
|
+
subject.stub(:restart_command) { "/etc/init.d/script restart" }
|
68
|
+
subject.logger.stub(:warning)
|
69
|
+
subject.should_receive(:with_timeout)
|
70
|
+
.with(3, "restart")
|
71
|
+
.and_yield
|
72
|
+
|
73
|
+
Bluepill::System.should_receive(:execute_blocking)
|
74
|
+
.with("/etc/init.d/script restart", subject.system_command_options)
|
75
|
+
.and_return(exit_code: 0)
|
76
|
+
|
77
|
+
subject.restart_process
|
78
|
+
end
|
79
|
+
end
|
80
|
+
end
|
81
|
+
|
82
|
+
describe "#with_timeout" do
|
83
|
+
let(:block) { proc { nil } }
|
84
|
+
|
85
|
+
before(:each) do
|
86
|
+
subject.logger.stub(:err)
|
87
|
+
Timeout.should_receive(:timeout).with(3.to_f, &block).and_raise(Timeout::Error)
|
88
|
+
end
|
89
|
+
|
90
|
+
it "proceeds to next_state on timeout." do
|
91
|
+
subject.should_receive(:dispatch!).with("state_override")
|
92
|
+
subject.with_timeout(3, "state_override", &block)
|
93
|
+
end
|
94
|
+
end
|
95
|
+
|
96
|
+
end
|
@@ -0,0 +1,24 @@
|
|
1
|
+
describe Bluepill::ProcessStatistics do
|
2
|
+
before(:each) do
|
3
|
+
@stats = Bluepill::ProcessStatistics.new
|
4
|
+
end
|
5
|
+
|
6
|
+
it "should record events" do
|
7
|
+
@stats.record_event('some event', 'some reason')
|
8
|
+
@stats.record_event('another event', 'another reason')
|
9
|
+
@stats.events.should have(2).events
|
10
|
+
end
|
11
|
+
|
12
|
+
it "should record #EVENTS_TO_PERSIST events" do
|
13
|
+
(2 * Bluepill::ProcessStatistics::EVENTS_TO_PERSIST).times do
|
14
|
+
@stats.record_event('some event', 'some reason')
|
15
|
+
end
|
16
|
+
@stats.events.should have(Bluepill::ProcessStatistics::EVENTS_TO_PERSIST).events
|
17
|
+
end
|
18
|
+
|
19
|
+
it "should return event history" do
|
20
|
+
@stats.record_event('some event', 'some reason')
|
21
|
+
@stats.to_s.should match(/some reason/)
|
22
|
+
@stats.to_s.should match(/event history/)
|
23
|
+
end
|
24
|
+
end
|
@@ -0,0 +1,36 @@
|
|
1
|
+
describe Bluepill::System do
|
2
|
+
describe :pid_alive? do
|
3
|
+
it "should be true if process responds to zero signal" do
|
4
|
+
Process.should_receive(:kill).with(0, 555).and_return(0)
|
5
|
+
Bluepill::System.should be_pid_alive(555)
|
6
|
+
end
|
7
|
+
|
8
|
+
it "should be false if process throws exception on zero signal" do
|
9
|
+
Process.should_receive(:kill).with(0, 555).and_raise(Errno::ESRCH)
|
10
|
+
Bluepill::System.should_not be_pid_alive(555)
|
11
|
+
end
|
12
|
+
end
|
13
|
+
|
14
|
+
describe :store do
|
15
|
+
it "should be Hash" do
|
16
|
+
Bluepill::System.store.should be_kind_of(Hash)
|
17
|
+
end
|
18
|
+
|
19
|
+
it "should return same Hash or every call" do
|
20
|
+
Bluepill::System.store.should be_equal(Bluepill::System.store)
|
21
|
+
end
|
22
|
+
|
23
|
+
it "should store assigned pairs" do
|
24
|
+
Bluepill::System.store[:somekey] = 10
|
25
|
+
Bluepill::System.store[:somekey].should be_eql(10)
|
26
|
+
end
|
27
|
+
end
|
28
|
+
|
29
|
+
describe :reset_data do
|
30
|
+
it 'should clear the #store' do
|
31
|
+
Bluepill::System.store[:anotherkey] = Faker::Lorem.sentence
|
32
|
+
Bluepill::System.reset_data
|
33
|
+
Bluepill::System.store.should be_empty
|
34
|
+
end
|
35
|
+
end
|
36
|
+
end
|
data/spec/spec_helper.rb
ADDED
@@ -0,0 +1,15 @@
|
|
1
|
+
if RUBY_VERSION >= '1.9'
|
2
|
+
if ENV['ENABLE_SIMPLECOV']
|
3
|
+
require 'simplecov'
|
4
|
+
SimpleCov.start
|
5
|
+
end
|
6
|
+
else
|
7
|
+
require 'rubygems'
|
8
|
+
end
|
9
|
+
|
10
|
+
require 'faker'
|
11
|
+
require 'rspec/core'
|
12
|
+
|
13
|
+
$LOAD_PATH.unshift(File.expand_path('../lib', File.dirname(__FILE__)))
|
14
|
+
|
15
|
+
require 'bluepill'
|
metadata
ADDED
@@ -0,0 +1,302 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: cloud66-bluepill
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.62
|
5
|
+
prerelease:
|
6
|
+
platform: ruby
|
7
|
+
authors:
|
8
|
+
- Arya Asemanfar
|
9
|
+
- Gary Tsang
|
10
|
+
- Rohith Ravi
|
11
|
+
- Cloud66
|
12
|
+
autorequire:
|
13
|
+
bindir: bin
|
14
|
+
cert_chain: []
|
15
|
+
date: 2013-04-19 00:00:00.000000000 Z
|
16
|
+
dependencies:
|
17
|
+
- !ruby/object:Gem::Dependency
|
18
|
+
name: daemons
|
19
|
+
requirement: !ruby/object:Gem::Requirement
|
20
|
+
none: false
|
21
|
+
requirements:
|
22
|
+
- - ~>
|
23
|
+
- !ruby/object:Gem::Version
|
24
|
+
version: 1.1.4
|
25
|
+
type: :runtime
|
26
|
+
prerelease: false
|
27
|
+
version_requirements: !ruby/object:Gem::Requirement
|
28
|
+
none: false
|
29
|
+
requirements:
|
30
|
+
- - ~>
|
31
|
+
- !ruby/object:Gem::Version
|
32
|
+
version: 1.1.4
|
33
|
+
- !ruby/object:Gem::Dependency
|
34
|
+
name: state_machine
|
35
|
+
requirement: !ruby/object:Gem::Requirement
|
36
|
+
none: false
|
37
|
+
requirements:
|
38
|
+
- - ~>
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: 1.1.0
|
41
|
+
type: :runtime
|
42
|
+
prerelease: false
|
43
|
+
version_requirements: !ruby/object:Gem::Requirement
|
44
|
+
none: false
|
45
|
+
requirements:
|
46
|
+
- - ~>
|
47
|
+
- !ruby/object:Gem::Version
|
48
|
+
version: 1.1.0
|
49
|
+
- !ruby/object:Gem::Dependency
|
50
|
+
name: activesupport
|
51
|
+
requirement: !ruby/object:Gem::Requirement
|
52
|
+
none: false
|
53
|
+
requirements:
|
54
|
+
- - ! '>='
|
55
|
+
- !ruby/object:Gem::Version
|
56
|
+
version: 3.0.0
|
57
|
+
type: :runtime
|
58
|
+
prerelease: false
|
59
|
+
version_requirements: !ruby/object:Gem::Requirement
|
60
|
+
none: false
|
61
|
+
requirements:
|
62
|
+
- - ! '>='
|
63
|
+
- !ruby/object:Gem::Version
|
64
|
+
version: 3.0.0
|
65
|
+
- !ruby/object:Gem::Dependency
|
66
|
+
name: i18n
|
67
|
+
requirement: !ruby/object:Gem::Requirement
|
68
|
+
none: false
|
69
|
+
requirements:
|
70
|
+
- - ! '>='
|
71
|
+
- !ruby/object:Gem::Version
|
72
|
+
version: 0.5.0
|
73
|
+
type: :runtime
|
74
|
+
prerelease: false
|
75
|
+
version_requirements: !ruby/object:Gem::Requirement
|
76
|
+
none: false
|
77
|
+
requirements:
|
78
|
+
- - ! '>='
|
79
|
+
- !ruby/object:Gem::Version
|
80
|
+
version: 0.5.0
|
81
|
+
- !ruby/object:Gem::Dependency
|
82
|
+
name: bundler
|
83
|
+
requirement: !ruby/object:Gem::Requirement
|
84
|
+
none: false
|
85
|
+
requirements:
|
86
|
+
- - ! '>='
|
87
|
+
- !ruby/object:Gem::Version
|
88
|
+
version: 1.0.10
|
89
|
+
type: :development
|
90
|
+
prerelease: false
|
91
|
+
version_requirements: !ruby/object:Gem::Requirement
|
92
|
+
none: false
|
93
|
+
requirements:
|
94
|
+
- - ! '>='
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: 1.0.10
|
97
|
+
- !ruby/object:Gem::Dependency
|
98
|
+
name: rake
|
99
|
+
requirement: !ruby/object:Gem::Requirement
|
100
|
+
none: false
|
101
|
+
requirements:
|
102
|
+
- - ! '!='
|
103
|
+
- !ruby/object:Gem::Version
|
104
|
+
version: 0.9.0
|
105
|
+
type: :development
|
106
|
+
prerelease: false
|
107
|
+
version_requirements: !ruby/object:Gem::Requirement
|
108
|
+
none: false
|
109
|
+
requirements:
|
110
|
+
- - ! '!='
|
111
|
+
- !ruby/object:Gem::Version
|
112
|
+
version: 0.9.0
|
113
|
+
- !ruby/object:Gem::Dependency
|
114
|
+
name: rspec
|
115
|
+
requirement: !ruby/object:Gem::Requirement
|
116
|
+
none: false
|
117
|
+
requirements:
|
118
|
+
- - ~>
|
119
|
+
- !ruby/object:Gem::Version
|
120
|
+
version: 2.12.0
|
121
|
+
type: :development
|
122
|
+
prerelease: false
|
123
|
+
version_requirements: !ruby/object:Gem::Requirement
|
124
|
+
none: false
|
125
|
+
requirements:
|
126
|
+
- - ~>
|
127
|
+
- !ruby/object:Gem::Version
|
128
|
+
version: 2.12.0
|
129
|
+
- !ruby/object:Gem::Dependency
|
130
|
+
name: rspec-core
|
131
|
+
requirement: !ruby/object:Gem::Requirement
|
132
|
+
none: false
|
133
|
+
requirements:
|
134
|
+
- - ~>
|
135
|
+
- !ruby/object:Gem::Version
|
136
|
+
version: 2.12.0
|
137
|
+
type: :development
|
138
|
+
prerelease: false
|
139
|
+
version_requirements: !ruby/object:Gem::Requirement
|
140
|
+
none: false
|
141
|
+
requirements:
|
142
|
+
- - ~>
|
143
|
+
- !ruby/object:Gem::Version
|
144
|
+
version: 2.12.0
|
145
|
+
- !ruby/object:Gem::Dependency
|
146
|
+
name: rspec-expectations
|
147
|
+
requirement: !ruby/object:Gem::Requirement
|
148
|
+
none: false
|
149
|
+
requirements:
|
150
|
+
- - ~>
|
151
|
+
- !ruby/object:Gem::Version
|
152
|
+
version: 2.12.0
|
153
|
+
type: :development
|
154
|
+
prerelease: false
|
155
|
+
version_requirements: !ruby/object:Gem::Requirement
|
156
|
+
none: false
|
157
|
+
requirements:
|
158
|
+
- - ~>
|
159
|
+
- !ruby/object:Gem::Version
|
160
|
+
version: 2.12.0
|
161
|
+
- !ruby/object:Gem::Dependency
|
162
|
+
name: rspec-mocks
|
163
|
+
requirement: !ruby/object:Gem::Requirement
|
164
|
+
none: false
|
165
|
+
requirements:
|
166
|
+
- - ~>
|
167
|
+
- !ruby/object:Gem::Version
|
168
|
+
version: 2.12.0
|
169
|
+
type: :development
|
170
|
+
prerelease: false
|
171
|
+
version_requirements: !ruby/object:Gem::Requirement
|
172
|
+
none: false
|
173
|
+
requirements:
|
174
|
+
- - ~>
|
175
|
+
- !ruby/object:Gem::Version
|
176
|
+
version: 2.12.0
|
177
|
+
- !ruby/object:Gem::Dependency
|
178
|
+
name: faker
|
179
|
+
requirement: !ruby/object:Gem::Requirement
|
180
|
+
none: false
|
181
|
+
requirements:
|
182
|
+
- - ~>
|
183
|
+
- !ruby/object:Gem::Version
|
184
|
+
version: '0.9'
|
185
|
+
type: :development
|
186
|
+
prerelease: false
|
187
|
+
version_requirements: !ruby/object:Gem::Requirement
|
188
|
+
none: false
|
189
|
+
requirements:
|
190
|
+
- - ~>
|
191
|
+
- !ruby/object:Gem::Version
|
192
|
+
version: '0.9'
|
193
|
+
- !ruby/object:Gem::Dependency
|
194
|
+
name: yard
|
195
|
+
requirement: !ruby/object:Gem::Requirement
|
196
|
+
none: false
|
197
|
+
requirements:
|
198
|
+
- - ~>
|
199
|
+
- !ruby/object:Gem::Version
|
200
|
+
version: '0.7'
|
201
|
+
type: :development
|
202
|
+
prerelease: false
|
203
|
+
version_requirements: !ruby/object:Gem::Requirement
|
204
|
+
none: false
|
205
|
+
requirements:
|
206
|
+
- - ~>
|
207
|
+
- !ruby/object:Gem::Version
|
208
|
+
version: '0.7'
|
209
|
+
description: Bluepill keeps your daemons up while taking up as little resources as
|
210
|
+
possible. After all you probably want the resources of your server to be used by
|
211
|
+
whatever daemons you are running rather than the thing that's supposed to make sure
|
212
|
+
they are brought back up, should they die or misbehave. Forked from http://github.com/arya/bluepill
|
213
|
+
email:
|
214
|
+
- entombedvirus@gmail.com
|
215
|
+
executables:
|
216
|
+
- bluepill
|
217
|
+
- bpsv
|
218
|
+
- sample_forking_server
|
219
|
+
extensions: []
|
220
|
+
extra_rdoc_files:
|
221
|
+
- LICENSE
|
222
|
+
- README.md
|
223
|
+
files:
|
224
|
+
- .gitignore
|
225
|
+
- .rspec
|
226
|
+
- DESIGN.md
|
227
|
+
- Gemfile
|
228
|
+
- LICENSE
|
229
|
+
- README.md
|
230
|
+
- Rakefile
|
231
|
+
- bin/bluepill
|
232
|
+
- bin/bpsv
|
233
|
+
- bin/sample_forking_server
|
234
|
+
- bluepill.gemspec
|
235
|
+
- examples/example.rb
|
236
|
+
- examples/new_example.rb
|
237
|
+
- examples/new_runit_example.rb
|
238
|
+
- examples/runit_example.rb
|
239
|
+
- lib/bluepill.rb
|
240
|
+
- lib/bluepill/application.rb
|
241
|
+
- lib/bluepill/application/client.rb
|
242
|
+
- lib/bluepill/application/server.rb
|
243
|
+
- lib/bluepill/condition_watch.rb
|
244
|
+
- lib/bluepill/controller.rb
|
245
|
+
- lib/bluepill/dsl.rb
|
246
|
+
- lib/bluepill/dsl/app_proxy.rb
|
247
|
+
- lib/bluepill/dsl/process_factory.rb
|
248
|
+
- lib/bluepill/dsl/process_proxy.rb
|
249
|
+
- lib/bluepill/group.rb
|
250
|
+
- lib/bluepill/logger.rb
|
251
|
+
- lib/bluepill/process.rb
|
252
|
+
- lib/bluepill/process_conditions.rb
|
253
|
+
- lib/bluepill/process_conditions/always_true.rb
|
254
|
+
- lib/bluepill/process_conditions/cpu_usage.rb
|
255
|
+
- lib/bluepill/process_conditions/file_time.rb
|
256
|
+
- lib/bluepill/process_conditions/http.rb
|
257
|
+
- lib/bluepill/process_conditions/mem_usage.rb
|
258
|
+
- lib/bluepill/process_conditions/process_condition.rb
|
259
|
+
- lib/bluepill/process_journal.rb
|
260
|
+
- lib/bluepill/process_statistics.rb
|
261
|
+
- lib/bluepill/socket.rb
|
262
|
+
- lib/bluepill/system.rb
|
263
|
+
- lib/bluepill/trigger.rb
|
264
|
+
- lib/bluepill/triggers/flapping.rb
|
265
|
+
- lib/bluepill/util/rotational_array.rb
|
266
|
+
- lib/bluepill/version.rb
|
267
|
+
- local-bluepill
|
268
|
+
- spec/lib/bluepill/logger_spec.rb
|
269
|
+
- spec/lib/bluepill/process_spec.rb
|
270
|
+
- spec/lib/bluepill/process_statistics_spec.rb
|
271
|
+
- spec/lib/bluepill/system_spec.rb
|
272
|
+
- spec/spec_helper.rb
|
273
|
+
homepage: http://github.com/arya/bluepill
|
274
|
+
licenses: []
|
275
|
+
post_install_message:
|
276
|
+
rdoc_options: []
|
277
|
+
require_paths:
|
278
|
+
- lib
|
279
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
280
|
+
none: false
|
281
|
+
requirements:
|
282
|
+
- - ! '>='
|
283
|
+
- !ruby/object:Gem::Version
|
284
|
+
version: '0'
|
285
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
286
|
+
none: false
|
287
|
+
requirements:
|
288
|
+
- - ! '>='
|
289
|
+
- !ruby/object:Gem::Version
|
290
|
+
version: '0'
|
291
|
+
requirements: []
|
292
|
+
rubyforge_project:
|
293
|
+
rubygems_version: 1.8.24
|
294
|
+
signing_key:
|
295
|
+
specification_version: 3
|
296
|
+
summary: A process monitor written in Ruby with stability and minimalism in mind.
|
297
|
+
test_files:
|
298
|
+
- spec/lib/bluepill/logger_spec.rb
|
299
|
+
- spec/lib/bluepill/process_spec.rb
|
300
|
+
- spec/lib/bluepill/process_statistics_spec.rb
|
301
|
+
- spec/lib/bluepill/system_spec.rb
|
302
|
+
- spec/spec_helper.rb
|