broham 0.0.2 → 0.0.3
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/README.textile +6 -6
- data/VERSION +1 -1
- data/bin/broham-register_as_next +13 -0
- data/broham.gemspec +3 -2
- metadata +4 -2
data/README.textile
CHANGED
@@ -50,20 +50,20 @@ Alternate interface:
|
|
50
50
|
h4. Commandline Interface
|
51
51
|
|
52
52
|
<pre><code>
|
53
|
-
$ broham-register chad nfs_server
|
54
|
-
Registering as nfs_server in chad cluster, with {:
|
55
|
-
{"timestamp":["
|
53
|
+
$ broham-register chad nfs_server --set-server_path=/home --set-client_path=/home
|
54
|
+
Registering as nfs_server in chad cluster, with {:server_path=>"/home", :client_path=>"/home"}
|
55
|
+
{"timestamp":["20100405093238"],"fqdn":["nfs.infochimps.org"],"client_path":["/home"],"server_path":["/home"],"role":["nfs_server"],"private_ip":["10.123.156.231"],"default_ip":["10.123.156.231"],"public_ip":["104.136.251.50"]}
|
56
56
|
|
57
57
|
$ broham-host chad nfs_server
|
58
|
-
{"timestamp":["
|
58
|
+
{"timestamp":["20100405093238"],"fqdn":["nfs.infochimps.org"],"client_path":["/home"],"server_path":["/home"],"role":["nfs_server"],"private_ip":["10.123.156.231"],"default_ip":["10.123.156.231"],"public_ip":["104.136.251.50"]}
|
59
59
|
|
60
60
|
# Alternative interface works too.
|
61
61
|
$ broham-sup chad nfs_server
|
62
|
-
{"timestamp":["
|
62
|
+
{"timestamp":["20100405093238"],"fqdn":["nfs.infochimps.org"],"client_path":["/home"],"server_path":["/home"],"role":["nfs_server"],"private_ip":["10.123.156.231"],"default_ip":["10.123.156.231"],"public_ip":["104.136.251.50"]}
|
63
63
|
|
64
64
|
$ broham-unregister-all chad nfs_server
|
65
65
|
Removing nfs_server from chad cluster
|
66
|
-
{"timestamp":["
|
66
|
+
{"timestamp":["20100405093238"],"fqdn":["nfs.infochimps.org"],"client_path":["/home"],"server_path":["/home"],"role":["nfs_server"],"private_ip":["10.123.156.231"],"default_ip":["10.123.156.231"],"public_ip":["104.136.251.50"]}
|
67
67
|
</code></pre>
|
68
68
|
|
69
69
|
h4. Setup
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.0.
|
1
|
+
0.0.3
|
@@ -0,0 +1,13 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
require 'rubygems'
|
3
|
+
require 'broham'
|
4
|
+
require 'broham/script'
|
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
|
+
|
7
|
+
cluster = Broham.get_cluster_settings
|
8
|
+
cluster_name, role_name, broham_args = [Settings[:cluster_name], Settings[:role_name], Settings[:set]||{}]
|
9
|
+
|
10
|
+
$stderr.puts %Q{Registering as next #{role_name} in #{cluster_name} cluster, with #{broham_args.inspect}}
|
11
|
+
resp = cluster.register_as_next role_name, broham_args
|
12
|
+
$stderr.puts resp.to_pretty_json
|
13
|
+
|
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.3"
|
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-05}
|
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-host", "broham-register", "broham-unregister-all"]
|
15
|
+
s.executables = ["broham-host", "broham-register", "broham-register_as_next", "broham-unregister-all"]
|
16
16
|
s.extra_rdoc_files = [
|
17
17
|
"LICENSE",
|
18
18
|
"README.textile"
|
@@ -26,6 +26,7 @@ Gem::Specification.new do |s|
|
|
26
26
|
"VERSION",
|
27
27
|
"bin/broham-host",
|
28
28
|
"bin/broham-register",
|
29
|
+
"bin/broham-register_as_next",
|
29
30
|
"bin/broham-unregister-all",
|
30
31
|
"broham.gemspec",
|
31
32
|
"lib/broham.rb",
|
metadata
CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
|
|
5
5
|
segments:
|
6
6
|
- 0
|
7
7
|
- 0
|
8
|
-
-
|
9
|
-
version: 0.0.
|
8
|
+
- 3
|
9
|
+
version: 0.0.3
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
12
|
- Philip (flip) Kromer
|
@@ -48,6 +48,7 @@ email: flip@infochimps.org
|
|
48
48
|
executables:
|
49
49
|
- broham-host
|
50
50
|
- broham-register
|
51
|
+
- broham-register_as_next
|
51
52
|
- broham-unregister-all
|
52
53
|
extensions: []
|
53
54
|
|
@@ -63,6 +64,7 @@ files:
|
|
63
64
|
- VERSION
|
64
65
|
- bin/broham-host
|
65
66
|
- bin/broham-register
|
67
|
+
- bin/broham-register_as_next
|
66
68
|
- bin/broham-unregister-all
|
67
69
|
- broham.gemspec
|
68
70
|
- lib/broham.rb
|