staugaard-cloudmaster 0.1.4 → 0.1.5
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/VERSION.yml +1 -1
- data/app/pool_runner.rb +0 -3
- data/bin/cloudmaster +39 -30
- metadata +13 -4
data/VERSION.yml
CHANGED
data/app/pool_runner.rb
CHANGED
data/bin/cloudmaster
CHANGED
@@ -1,45 +1,54 @@
|
|
1
1
|
#!/usr/bin/ruby
|
2
2
|
$:.unshift File.expand_path('../app', File.dirname(__FILE__))
|
3
3
|
|
4
|
+
require 'rubygems'
|
5
|
+
require 'daemons'
|
4
6
|
require 'configuration'
|
5
7
|
require 'aws_context'
|
6
8
|
require 'configuration'
|
7
9
|
require 'pool_runner'
|
8
10
|
require 'pp'
|
9
11
|
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
12
|
+
options = {
|
13
|
+
:dir_mode => :system,
|
14
|
+
:multiple => false,
|
15
|
+
:ontop => false,
|
16
|
+
:mode => :load,
|
17
|
+
:backtrace => true,
|
18
|
+
:monitor => false,
|
19
|
+
:log_output => true,
|
20
|
+
}
|
21
|
+
|
22
|
+
Daemons.run_proc('cloudmaster', options) do
|
23
|
+
# Get optional args specifying what server to manage.
|
24
|
+
verbose = false
|
25
|
+
config_files = []
|
26
|
+
opts = []
|
27
|
+
args = ARGV
|
28
|
+
while args.size > 0
|
29
|
+
a = args.shift
|
30
|
+
case a
|
31
|
+
when "-?": puts "usage: cloudmaster [-v] [-l logfile] [-c configfile] [-p pool]"
|
32
|
+
exit 1
|
33
|
+
when "-v": verbose = true
|
34
|
+
when "-l": logfile = args.shift
|
35
|
+
when "-c": config_files << args.shift
|
36
|
+
when "-p": opts << args.shift.to_sym
|
37
|
+
end
|
24
38
|
end
|
25
|
-
|
26
|
-
opts.uniq!
|
39
|
+
opts.uniq!
|
27
40
|
|
28
|
-
LoggerFactory.setup(logfile, 'cloudmaster')
|
29
|
-
AwsContext.setup(:retry)
|
41
|
+
LoggerFactory.setup(logfile, 'cloudmaster')
|
42
|
+
AwsContext.setup(:retry)
|
30
43
|
|
31
|
-
config = Cloudmaster::Configuration.new(config_files, opts)
|
44
|
+
config = Cloudmaster::Configuration.new(config_files, opts)
|
32
45
|
|
33
|
-
if verbose
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
end
|
46
|
+
if verbose
|
47
|
+
puts "Environment: #{config.aws[:aws_env]}" if config.aws[:aws_env]
|
48
|
+
puts "Log file: #{logfile}" if logfile
|
49
|
+
puts "Config file: #{config_files.join(' ')}" if config_files.size > 0
|
50
|
+
end
|
38
51
|
|
39
|
-
|
40
|
-
|
41
|
-
config.refresh
|
52
|
+
# Run a pool supervisor
|
53
|
+
Cloudmaster::PoolRunner.new(config).run
|
42
54
|
end
|
43
|
-
|
44
|
-
# Run a pool supervisor
|
45
|
-
Cloudmaster::PoolRunner.new(config).run
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: staugaard-cloudmaster
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- cchayden
|
@@ -11,10 +11,19 @@ autorequire:
|
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
13
|
|
14
|
-
date: 2009-04-
|
14
|
+
date: 2009-04-22 00:00:00 -07:00
|
15
15
|
default_executable: cloudmaster
|
16
|
-
dependencies:
|
17
|
-
|
16
|
+
dependencies:
|
17
|
+
- !ruby/object:Gem::Dependency
|
18
|
+
name: daemons
|
19
|
+
type: :runtime
|
20
|
+
version_requirement:
|
21
|
+
version_requirements: !ruby/object:Gem::Requirement
|
22
|
+
requirements:
|
23
|
+
- - ">="
|
24
|
+
- !ruby/object:Gem::Version
|
25
|
+
version: 1.0.10
|
26
|
+
version:
|
18
27
|
description:
|
19
28
|
email: mick@staugaard.com
|
20
29
|
executables:
|