small-ops 0.0.9 → 0.0.10
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/bin/docker2etcd +4 -1
- data/bin/fige +4 -0
- data/lib/small-setup.rb +4 -0
- metadata +1 -1
data/bin/docker2etcd
CHANGED
|
@@ -20,9 +20,12 @@ require 'small-setup'
|
|
|
20
20
|
end
|
|
21
21
|
container.keys.each {|key|
|
|
22
22
|
if container[key] != nil then
|
|
23
|
-
|
|
23
|
+
if @verbose then
|
|
24
|
+
puts "#{key} = #{container[key]}"
|
|
25
|
+
end
|
|
24
26
|
http_put("#{@etcd}/v2/keys#{@prefix}#{key}","value=#{URI.encode(container[key])}")
|
|
25
27
|
end
|
|
26
28
|
}
|
|
29
|
+
puts "-> #{name} : #{container["/#{name}/url"]}"
|
|
27
30
|
}
|
|
28
31
|
|
data/bin/fige
CHANGED
data/lib/small-setup.rb
CHANGED
|
@@ -35,6 +35,9 @@ OptionParser.new do |opts|
|
|
|
35
35
|
opts.on("-u","--as_url","Make url as host/name instead of host:port") do |u|
|
|
36
36
|
options[:as_url]=u
|
|
37
37
|
end
|
|
38
|
+
opts.on("-v","--verbose","verboser") do |v|
|
|
39
|
+
options[:verbose]=v
|
|
40
|
+
end
|
|
38
41
|
end.parse!
|
|
39
42
|
|
|
40
43
|
|
|
@@ -47,6 +50,7 @@ end.parse!
|
|
|
47
50
|
@cmd = options[:cmd] || false
|
|
48
51
|
@target = options[:target] || false
|
|
49
52
|
@as_url = options[:as_url] || false
|
|
53
|
+
@verbose = options[:verbose] || false
|
|
50
54
|
|
|
51
55
|
def http_get(uri)
|
|
52
56
|
JSON.parse(Net::HTTP.get(URI(uri)))
|