broham 0.0.6 → 0.0.7
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/bin/broham +15 -0
- data/bin/broham-diss +1 -0
- data/bin/broham-fuck_all_yall +1 -1
- data/bin/broham-host +1 -0
- data/bin/broham-register +1 -0
- data/bin/broham-sup +1 -0
- data/bin/broham-unregister +1 -0
- data/bin/broham-unregister-like +1 -1
- data/bin/broham-yo +1 -0
- data/broham.gemspec +4 -3
- data/lib/broham/script.rb +8 -3
- metadata +14 -25
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.0.
|
1
|
+
0.0.7
|
data/bin/broham
ADDED
@@ -0,0 +1,15 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
require 'rubygems'
|
3
|
+
require 'broham'
|
4
|
+
require 'broham/script'
|
5
|
+
|
6
|
+
Broham.get_cluster_settings
|
7
|
+
Broham.get_command_line_args :command, :role_name
|
8
|
+
role_name = Settings[:role_name]
|
9
|
+
|
10
|
+
|
11
|
+
case Settings[:command].to_s
|
12
|
+
when 'public_ips' then puts Broham.hosts_like(role_name).map{|bro| bro[:public_ip]}.join("\n")
|
13
|
+
else raise "Bad command #{Settings[:command]}"
|
14
|
+
end
|
15
|
+
|
data/bin/broham-diss
CHANGED
data/bin/broham-fuck_all_yall
CHANGED
data/bin/broham-host
CHANGED
data/bin/broham-register
CHANGED
@@ -5,6 +5,7 @@ require 'broham/script'
|
|
5
5
|
Settings.define :set, :description => %Q{Any arg prefixed with "--set" will become an extra arg to register: 'broham-register foo --set-path=/path/to/foo' sets :path => '/path/to/foo' as an additional attribute}, :type => Hash
|
6
6
|
|
7
7
|
Broham.get_cluster_settings
|
8
|
+
Broham.get_command_line_args :role_name
|
8
9
|
role_name, broham_args = [Settings[:role_name], Settings[:set]||{}]
|
9
10
|
|
10
11
|
$stderr.puts %Q{Registering as #{role_name} with #{broham_args.inspect}}
|
data/bin/broham-sup
CHANGED
data/bin/broham-unregister
CHANGED
data/bin/broham-unregister-like
CHANGED
data/bin/broham-yo
CHANGED
@@ -5,6 +5,7 @@ require 'broham/script'
|
|
5
5
|
Settings.define :set, :description => %Q{Any arg prefixed with "--set" will become an extra arg to register: 'broham-register foo --set-path=/path/to/foo' sets :path => '/path/to/foo' as an additional attribute}, :type => Hash
|
6
6
|
|
7
7
|
Broham.get_cluster_settings
|
8
|
+
Broham.get_command_line_args :role_name
|
8
9
|
role_name, broham_args = [Settings[:role_name], Settings[:set]||{}]
|
9
10
|
|
10
11
|
$stderr.puts %Q{Registering as #{role_name} with #{broham_args.inspect}}
|
data/broham.gemspec
CHANGED
@@ -5,14 +5,14 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{broham}
|
8
|
-
s.version = "0.0.
|
8
|
+
s.version = "0.0.7"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Philip (flip) Kromer"]
|
12
12
|
s.date = %q{2010-04-08}
|
13
13
|
s.description = %q{Bro! Broham always knows where his bros are, bro. Using broham, a newly-created cloud machine can annouce its availability for a certain role ("nfs_server" or "db_slave-2"), allowing any other interested nodes to discover its public_ip, private_ip, etc. See also: http://j.mp/amongbros}
|
14
14
|
s.email = %q{flip@infochimps.org}
|
15
|
-
s.executables = ["broham-diss", "broham-fuck_all_yall", "broham-host", "broham-register", "broham-register_as_next", "broham-sup", "broham-unregister", "broham-unregister-like", "broham-yo"]
|
15
|
+
s.executables = ["broham", "broham-diss", "broham-fuck_all_yall", "broham-host", "broham-register", "broham-register_as_next", "broham-sup", "broham-unregister", "broham-unregister-like", "broham-yo"]
|
16
16
|
s.extra_rdoc_files = [
|
17
17
|
"LICENSE",
|
18
18
|
"README.textile"
|
@@ -24,6 +24,7 @@ Gem::Specification.new do |s|
|
|
24
24
|
"README.textile",
|
25
25
|
"Rakefile",
|
26
26
|
"VERSION",
|
27
|
+
"bin/broham",
|
27
28
|
"bin/broham-diss",
|
28
29
|
"bin/broham-fuck_all_yall",
|
29
30
|
"bin/broham-host",
|
@@ -43,7 +44,7 @@ Gem::Specification.new do |s|
|
|
43
44
|
s.homepage = %q{http://github.com/mrflip/broham}
|
44
45
|
s.rdoc_options = ["--charset=UTF-8"]
|
45
46
|
s.require_paths = ["lib"]
|
46
|
-
s.rubygems_version = %q{1.3.
|
47
|
+
s.rubygems_version = %q{1.3.5}
|
47
48
|
s.summary = %q{Broham: A simple, global, highly-available, none-too-bright service registry. Broham always knows where his bros are, bro.}
|
48
49
|
s.test_files = [
|
49
50
|
"spec/broham_spec.rb",
|
data/lib/broham/script.rb
CHANGED
@@ -4,12 +4,17 @@ class Broham < RightAws::ActiveSdb::Base
|
|
4
4
|
Configliere.use :commandline, :config_file
|
5
5
|
Settings.read('broham.yaml')
|
6
6
|
Settings.resolve!
|
7
|
-
Settings[:role_name] = Settings.rest.shift
|
8
|
-
check_args!
|
9
7
|
self.establish_connection
|
10
8
|
end
|
11
9
|
|
12
|
-
def self.
|
10
|
+
def self.get_command_line_args *arg_names
|
11
|
+
arg_names.each do |arg_name|
|
12
|
+
Settings[arg_name] = Settings.rest.shift
|
13
|
+
end
|
14
|
+
check_args! *arg_names
|
15
|
+
end
|
16
|
+
|
17
|
+
def self.check_args! *arg_names
|
13
18
|
if Settings[:role_name].blank?
|
14
19
|
warn "Please supply a role as the first argument"
|
15
20
|
exit(-1)
|
metadata
CHANGED
@@ -1,12 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: broham
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
|
5
|
-
segments:
|
6
|
-
- 0
|
7
|
-
- 0
|
8
|
-
- 6
|
9
|
-
version: 0.0.6
|
4
|
+
version: 0.0.7
|
10
5
|
platform: ruby
|
11
6
|
authors:
|
12
7
|
- Philip (flip) Kromer
|
@@ -19,33 +14,28 @@ default_executable:
|
|
19
14
|
dependencies:
|
20
15
|
- !ruby/object:Gem::Dependency
|
21
16
|
name: rspec
|
22
|
-
|
23
|
-
|
17
|
+
type: :development
|
18
|
+
version_requirement:
|
19
|
+
version_requirements: !ruby/object:Gem::Requirement
|
24
20
|
requirements:
|
25
21
|
- - ">="
|
26
22
|
- !ruby/object:Gem::Version
|
27
|
-
segments:
|
28
|
-
- 1
|
29
|
-
- 2
|
30
|
-
- 9
|
31
23
|
version: 1.2.9
|
32
|
-
|
33
|
-
version_requirements: *id001
|
24
|
+
version:
|
34
25
|
- !ruby/object:Gem::Dependency
|
35
26
|
name: yard
|
36
|
-
|
37
|
-
|
27
|
+
type: :development
|
28
|
+
version_requirement:
|
29
|
+
version_requirements: !ruby/object:Gem::Requirement
|
38
30
|
requirements:
|
39
31
|
- - ">="
|
40
32
|
- !ruby/object:Gem::Version
|
41
|
-
segments:
|
42
|
-
- 0
|
43
33
|
version: "0"
|
44
|
-
|
45
|
-
version_requirements: *id002
|
34
|
+
version:
|
46
35
|
description: "Bro! Broham always knows where his bros are, bro. Using broham, a newly-created cloud machine can annouce its availability for a certain role (\"nfs_server\" or \"db_slave-2\"), allowing any other interested nodes to discover its public_ip, private_ip, etc. See also: http://j.mp/amongbros"
|
47
36
|
email: flip@infochimps.org
|
48
37
|
executables:
|
38
|
+
- broham
|
49
39
|
- broham-diss
|
50
40
|
- broham-fuck_all_yall
|
51
41
|
- broham-host
|
@@ -67,6 +57,7 @@ files:
|
|
67
57
|
- README.textile
|
68
58
|
- Rakefile
|
69
59
|
- VERSION
|
60
|
+
- bin/broham
|
70
61
|
- bin/broham-diss
|
71
62
|
- bin/broham-fuck_all_yall
|
72
63
|
- bin/broham-host
|
@@ -95,20 +86,18 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
95
86
|
requirements:
|
96
87
|
- - ">="
|
97
88
|
- !ruby/object:Gem::Version
|
98
|
-
segments:
|
99
|
-
- 0
|
100
89
|
version: "0"
|
90
|
+
version:
|
101
91
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
102
92
|
requirements:
|
103
93
|
- - ">="
|
104
94
|
- !ruby/object:Gem::Version
|
105
|
-
segments:
|
106
|
-
- 0
|
107
95
|
version: "0"
|
96
|
+
version:
|
108
97
|
requirements: []
|
109
98
|
|
110
99
|
rubyforge_project:
|
111
|
-
rubygems_version: 1.3.
|
100
|
+
rubygems_version: 1.3.5
|
112
101
|
signing_key:
|
113
102
|
specification_version: 3
|
114
103
|
summary: "Broham: A simple, global, highly-available, none-too-bright service registry. Broham always knows where his bros are, bro."
|