petasos 0.4.1 → 0.4.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/petasos/distributor.rb +2 -0
- data/lib/petasos/location.rb +1 -1
- data/lib/petasos/node.rb +5 -3
- data/lib/petasos.rb +2 -0
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0abd063cdacfb24b5876edc9608043694df00a102f143cc49b688b0e2678728e
|
4
|
+
data.tar.gz: f1393df6f212332660f6acb72cef96562270e9f326e105086ae2a8dc5bc350bc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ef0d35c61eb1de183ea9638a7ac526bf18e87d48cef269eba38ab369a510f9c6d452d058f489dd673916eebf8876e287b79846c82d217e925f449cf3642a9ef8
|
7
|
+
data.tar.gz: 2c6d55f20670cb8000f9d26f22eb5838597d13fe92db650c84db57b3b17a485aea9bea8792f7abd45f39b27562bb9971f6c5c145e284ae6acefd0de7e6f8addc
|
data/lib/petasos/distributor.rb
CHANGED
@@ -46,6 +46,7 @@ class Petasos::Distributor
|
|
46
46
|
}
|
47
47
|
}
|
48
48
|
|
49
|
+
puts "petasos: compiling manifests"
|
49
50
|
@manifests.each_pair do |node_name, manifest_list|
|
50
51
|
manifest_list.each do |manifest|
|
51
52
|
manifest["imports"].each_pair do |pool_name, import_hash|
|
@@ -69,6 +70,7 @@ class Petasos::Distributor
|
|
69
70
|
# "canonical_exporters"=>[["petasos-node-a", "linux-laptop-source"]]}}
|
70
71
|
|
71
72
|
# Process the exports files and return them as completed.
|
73
|
+
puts "petasos: processing exports"
|
72
74
|
FileList.new(File.join(Dir.pwd, "**/exports_*")).each do |exports_file_path|
|
73
75
|
from_node_name = File.basename(File.dirname(exports_file_path))
|
74
76
|
from_node = find_node(from_node_name)
|
data/lib/petasos/location.rb
CHANGED
@@ -97,7 +97,7 @@ class Petasos::Location
|
|
97
97
|
pool_imports[pool["name"]]["import_path"] = File.join(pool["path"], pool_import_path)
|
98
98
|
pool_imports[pool["name"]]["backfill"] = pool["backfill"] ? true : false
|
99
99
|
end
|
100
|
-
if pool["export"]
|
100
|
+
if pool["export"] || pool["canonical"]
|
101
101
|
pool_exports[pool["name"]]["path"] = pool["path"]
|
102
102
|
pool_exports[pool["name"]]["canonical"] = pool["canonical"] ? true : false
|
103
103
|
end
|
data/lib/petasos/node.rb
CHANGED
@@ -23,9 +23,11 @@ class Petasos::Node
|
|
23
23
|
end
|
24
24
|
|
25
25
|
def grab_manifest_and_exports
|
26
|
-
`
|
27
|
-
|
28
|
-
`rsync
|
26
|
+
`scp #{config["host"]}:#{config["path"]}/manifest* #{config["name"]}/`
|
27
|
+
`scp #{config["host"]}:#{config["path"]}/exports* #{config["name"]}/`
|
28
|
+
# `rsync #{config["host"]}:#{config["path"]}/manifest* #{config["name"]}/`
|
29
|
+
# rsync_path = "--rsync-path=#{config["rsync_path"]}"
|
30
|
+
# `rsync --ignore-missing-args #{rsync_path} --ignore-existing #{config["host"]}:#{config["path"]}/exports* #{config["name"]}/`
|
29
31
|
end
|
30
32
|
|
31
33
|
def grab_seen_file_for_location(location_name, pool_name)
|
data/lib/petasos.rb
CHANGED
@@ -12,6 +12,7 @@ class Petasos
|
|
12
12
|
end
|
13
13
|
|
14
14
|
def process_locations
|
15
|
+
puts "petasos: processing locations"
|
15
16
|
# look for petasos_location-*.yaml files
|
16
17
|
# and pass each one to a petasos location manager
|
17
18
|
FileList.new("petasos_location-*.yaml").each do |location_file|
|
@@ -22,6 +23,7 @@ class Petasos
|
|
22
23
|
end
|
23
24
|
|
24
25
|
def process_distribution
|
26
|
+
puts "petasos: processing distribution"
|
25
27
|
# look for petasos_distribution-*.yaml files
|
26
28
|
# and pass each one to a petasos distribution
|
27
29
|
FileList.new("petasos_distribution-*.yaml").each do |distribution_file|
|