alpha_omega 0.0.176 → 0.0.177
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 +1 -1
- data/lib/alpha_omega/utils.rb +9 -4
- metadata +4 -4
data/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
0.0.
|
|
1
|
+
0.0.177
|
data/lib/alpha_omega/utils.rb
CHANGED
|
@@ -3,6 +3,7 @@ require 'yaml'
|
|
|
3
3
|
require 'deep_merge'
|
|
4
4
|
|
|
5
5
|
$this_pod = nil
|
|
6
|
+
$this_host = nil
|
|
6
7
|
$opsdb = nil
|
|
7
8
|
$pods_config = nil
|
|
8
9
|
|
|
@@ -89,7 +90,11 @@ module AlphaOmega
|
|
|
89
90
|
|
|
90
91
|
config.task "#{task_name}.#{pod_name}.app" do # task host.pod1.app
|
|
91
92
|
cap_roles.each do |cap_role, cap_preds|
|
|
92
|
-
|
|
93
|
+
if $this.node["local_pods"] && $this.node["local_pods"].member? this_host["env_pod"]
|
|
94
|
+
role cap_role, task_name, cap_preds
|
|
95
|
+
else
|
|
96
|
+
role cap_role, remote_name, cap_preds
|
|
97
|
+
end
|
|
93
98
|
end
|
|
94
99
|
set :dna, node_dna[remote_name]
|
|
95
100
|
end
|
|
@@ -171,10 +176,10 @@ module AlphaOmega
|
|
|
171
176
|
$this_pod = File.read("/etc/podname").strip
|
|
172
177
|
config.set :current_pod, $this_pod
|
|
173
178
|
|
|
174
|
-
this_host = Socket.gethostname.chomp.split(".")[0]
|
|
175
|
-
dna_base = "#{node_home}/pods/#{$this_pod}/#{this_host}"
|
|
179
|
+
$this_host = Socket.gethostname.chomp.split(".")[0]
|
|
180
|
+
dna_base = "#{node_home}/pods/#{$this_pod}/#{$this_host}"
|
|
176
181
|
dna = File.exists?("#{dna_base}.yaml") ? YAML.load(File.read("#{dna_base}.yaml")) : JSON.load(File.read("#{dna_base}.json"))
|
|
177
|
-
this_node = AlphaOmega.node_defaults(dna, $this_pod, this_host)
|
|
182
|
+
this_node = AlphaOmega.node_defaults(dna, $this_pod, $this_host)
|
|
178
183
|
|
|
179
184
|
((this_node["pods"] || []) + [$this_pod]).inject({}) do |pods, pod_name|
|
|
180
185
|
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: 381
|
|
5
5
|
prerelease:
|
|
6
6
|
segments:
|
|
7
7
|
- 0
|
|
8
8
|
- 0
|
|
9
|
-
-
|
|
10
|
-
version: 0.0.
|
|
9
|
+
- 177
|
|
10
|
+
version: 0.0.177
|
|
11
11
|
platform: ruby
|
|
12
12
|
authors:
|
|
13
13
|
- David Nghiem
|
|
@@ -182,7 +182,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
182
182
|
requirements: []
|
|
183
183
|
|
|
184
184
|
rubyforge_project:
|
|
185
|
-
rubygems_version: 1.8.
|
|
185
|
+
rubygems_version: 1.8.17
|
|
186
186
|
signing_key:
|
|
187
187
|
specification_version: 3
|
|
188
188
|
summary: alpha_omega capistrano recipes
|