alpha_omega 0.0.178 → 0.0.179
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/lib/alpha_omega/utils.rb +6 -5
- metadata +3 -3
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.0.
|
1
|
+
0.0.179
|
data/lib/alpha_omega/utils.rb
CHANGED
@@ -90,8 +90,8 @@ module AlphaOmega
|
|
90
90
|
|
91
91
|
config.task "#{task_name}.#{pod_name}.app" do # task host.pod1.app
|
92
92
|
cap_roles.each do |cap_role, cap_preds|
|
93
|
-
if $this_host["local_pods"] && $this_host["local_pods"].member?(
|
94
|
-
role cap_role,
|
93
|
+
if $this_host["local_pods"] && $this_host["local_pods"].member?(node["env_pod"])
|
94
|
+
role cap_role, node["node_name"], cap_preds
|
95
95
|
else
|
96
96
|
role cap_role, remote_name, cap_preds
|
97
97
|
end
|
@@ -176,10 +176,11 @@ module AlphaOmega
|
|
176
176
|
$this_pod = File.read("/etc/podname").strip
|
177
177
|
config.set :current_pod, $this_pod
|
178
178
|
|
179
|
-
|
180
|
-
dna_base = "#{node_home}/pods/#{$this_pod}/#{
|
179
|
+
this_host = Socket.gethostname.chomp.split(".")[0]
|
180
|
+
dna_base = "#{node_home}/pods/#{$this_pod}/#{this_host}"
|
181
181
|
dna = File.exists?("#{dna_base}.yaml") ? YAML.load(File.read("#{dna_base}.yaml")) : JSON.load(File.read("#{dna_base}.json"))
|
182
|
-
this_node = AlphaOmega.node_defaults(dna, $this_pod,
|
182
|
+
this_node = AlphaOmega.node_defaults(dna, $this_pod, this_host)
|
183
|
+
$this_host = this_node
|
183
184
|
|
184
185
|
((this_node["pods"] || []) + [$this_pod]).inject({}) do |pods, pod_name|
|
185
186
|
pods[pod_name] = {
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: alpha_omega
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 377
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 0.0.
|
9
|
+
- 179
|
10
|
+
version: 0.0.179
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- David Nghiem
|