hansolo 0.1.2 → 0.1.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/hansolo/providers/aws/solo.rb +13 -14
- data/lib/hansolo/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ca20af294048508c5a7b377be0dec607fb18f971
|
4
|
+
data.tar.gz: 45723316304d1c66e72246d1455a9af9951394a1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 31a1ee39e3e8245fbe2bd1658bebc268c326ba069704bed76b0bd3b46bb904910cd20a5aa51131771cda16e8cb348f9afada615bcf8f1bbc65936e3ee591f6f0
|
7
|
+
data.tar.gz: 49d965a15e31f88902b201ff62766a64a1815d1018647602583ea3b96dbf416d4855f3fb0b980265f621c9ea5835493a7409e336e9b480ad82cf0a991736ac0c
|
@@ -1,28 +1,27 @@
|
|
1
1
|
module Hansolo::Providers::AWS
|
2
2
|
module Solo
|
3
3
|
def sync_data_bags
|
4
|
-
|
5
|
-
Thread.new do
|
6
|
-
ssh = connect(host)
|
4
|
+
items = bucket.objects.with_prefix(Hansolo.app)
|
7
5
|
|
8
|
-
|
9
|
-
|
10
|
-
|
6
|
+
command = items.inject([]) do |cmd, object|
|
7
|
+
key = object.key.sub("#{Hansolo.app}/", '')
|
8
|
+
path = Pathname.new('/tmp/data_bags').join(key)
|
9
|
+
|
10
|
+
cmd << "mkdir -p #{path.dirname}"
|
11
|
+
cmd << "echo '#{object.read}' > #{path}"
|
12
|
+
end
|
11
13
|
|
12
|
-
|
13
|
-
cmd << "echo '#{object.read}' > #{path}"
|
14
|
-
end
|
14
|
+
command = command.join('; ')
|
15
15
|
|
16
|
-
|
16
|
+
threads = hosts.map do |host|
|
17
|
+
Thread.new do
|
18
|
+
ssh = connect(host)
|
19
|
+
ssh.exec! command
|
17
20
|
ssh.close
|
18
21
|
end
|
19
22
|
end
|
20
23
|
|
21
24
|
threads.map(&:join)
|
22
25
|
end
|
23
|
-
|
24
|
-
def data_bag_items
|
25
|
-
bucket.objects.with_prefix(Hansolo.app)
|
26
|
-
end
|
27
26
|
end
|
28
27
|
end
|
data/lib/hansolo/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: hansolo
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Brian Kaney
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-07-
|
11
|
+
date: 2013-07-31 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: aws-sdk
|