auster 0.3.0 → 0.3.1
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.
- checksums.yaml +4 -4
- data/README.md +9 -1
- data/example-repo/tasks/show-exports.rb +3 -1
- data/lib/cfer/auster/aws_utils.rb +23 -0
- data/lib/cfer/auster/script_executor.rb +3 -1
- data/lib/cfer/auster/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1a079cdca48d8097e9130f73cb272dd2db90e71f
|
4
|
+
data.tar.gz: c202d2f51aab98c0c61bfed79cdcf47b95d31e69
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1afa1cb528894042e90cf0b6d9957d2ae01db0ed23c07c56a89dd174b324668ee0a05cb49b3ae4acf4faac41f0064de454048968de4a5ca9108c9ef8d96d19ab
|
7
|
+
data.tar.gz: 64fe5f8cb7737d1c0cb3df01630ffb011710b742a0e9310fae73a08606a589379d79569bf63bcf093a7cefc1b15d6c305a98526f653ba6de4bf570b55289daec
|
data/README.md
CHANGED
@@ -25,7 +25,15 @@ $ auster apply us-west-2/dev-ed1 dependent
|
|
25
25
|
|
26
26
|
If you read through the Auster output, you'll see that it's creating S3 buckets (as you'd expect--it's still CloudFormation under the hood) and registering them as region-wide exports, prefixed with the plan ID `dev1-ed`.
|
27
27
|
|
28
|
-
|
28
|
+
Auster also provides functionality for running tasks with `auster task` (and listing them with `auster tasks`). Let's look at our exports, for example:
|
29
|
+
|
30
|
+
```bash
|
31
|
+
$ auster task us-west-2/dev-ed1 show-exports
|
32
|
+
```
|
33
|
+
|
34
|
+
This'll print out a JSON breakdown of the exports from this stack (S3 bucket names, because we are very cheap.)
|
35
|
+
|
36
|
+
Anyhoo, all done. Let's clean up.
|
29
37
|
|
30
38
|
```bash
|
31
39
|
$ auster nuke us-west-2/dev-ed1
|
@@ -0,0 +1,23 @@
|
|
1
|
+
module Cfer
|
2
|
+
module Auster
|
3
|
+
module AwsUtils
|
4
|
+
def self.all_from_pager(operation, paged_field)
|
5
|
+
ret = []
|
6
|
+
|
7
|
+
resp = operation
|
8
|
+
|
9
|
+
loop do
|
10
|
+
ret << resp.send(paged_field)
|
11
|
+
|
12
|
+
if resp.next_page?
|
13
|
+
resp = resp.next_page
|
14
|
+
else
|
15
|
+
break
|
16
|
+
end
|
17
|
+
end
|
18
|
+
|
19
|
+
ret.flatten
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
@@ -1,3 +1,5 @@
|
|
1
|
+
require "cfer/auster/aws_utils"
|
2
|
+
|
1
3
|
module Cfer
|
2
4
|
module Auster
|
3
5
|
class ScriptExecutor
|
@@ -40,7 +42,7 @@ module Cfer
|
|
40
42
|
# this call isn't super fast, so we cache a little bit.
|
41
43
|
@exports ||= {}
|
42
44
|
@exports[export_plan_id] ||=
|
43
|
-
cfn_client.list_exports
|
45
|
+
AwsUtils.all_from_pager(cfn_client.list_exports, :exports).map do |cfn_export|
|
44
46
|
tokens = cfn_export.name.split("--", 2)
|
45
47
|
|
46
48
|
if tokens.length != 2 || tokens[0] != export_plan_id
|
data/lib/cfer/auster/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: auster
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ed Ropple
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-06-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -229,6 +229,7 @@ files:
|
|
229
229
|
- example-repo/tasks/sub/test-script.rb
|
230
230
|
- example-repo/tasks/test-script1.rb
|
231
231
|
- lib/cfer/auster.rb
|
232
|
+
- lib/cfer/auster/aws_utils.rb
|
232
233
|
- lib/cfer/auster/cfer_evaluator.rb
|
233
234
|
- lib/cfer/auster/cfer_helpers.rb
|
234
235
|
- lib/cfer/auster/cli.rb
|