aws-must 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +20 -24
- data/demo/2/conf.yaml +1 -2
- data/lib/tasks/demo.rake +6 -4
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8bc46bd401c62d97d7cd8171ebe4ba40ab529417
|
4
|
+
data.tar.gz: d9ee68d839c1892fd29d32a7384d046428c26bfb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c52c2bb51dc2e9dbb9139cb5880840ed4b8646d999990e46d41f66d2c95b6a1bbdc8eb0a51171743d9e46a45d3ef1c8d62ccefefc024b43d38fa5f26c8a7cfac
|
7
|
+
data.tar.gz: 82226a0afeda175d83abeb84ba75083b729b321eab5885ab8f6b0c1a66dc683b8bb8653a3132c0757fb13eaf6ed0f93fd104c7732f7fb42ec00b283f27037bba
|
data/README.md
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
# aws-must - Minimum Viable Solution to Manage CloudFormation Templates - $Release:0.0.
|
1
|
+
# aws-must - Minimum Viable Solution to Manage CloudFormation Templates - $Release:0.0.3$
|
2
2
|
|
3
3
|
`aws-must` is a tool, which allows separating infrastructure
|
4
4
|
configuration and Amazon related syntax using
|
@@ -148,11 +148,11 @@ line argument `browser`, e.g. `rake demo:html-3[chromium-browser]`.
|
|
148
148
|
|
149
149
|
#### Use Demo to Bootstrap Own Configuration
|
150
150
|
|
151
|
-
To
|
152
|
-
`demo:bootstrap-i`
|
153
|
-
directory and configuration directory. For example,
|
154
|
-
`3` templates to directory `tmp/tmpl` and
|
155
|
-
`tmp/conf`, run
|
151
|
+
To create a copy templates and YAML configuration for demo case `i`,
|
152
|
+
run rake task `demo:bootstrap-i` and pass command line arguments
|
153
|
+
defining template directory and configuration directory. For example,
|
154
|
+
to copy demo case `3` templates to directory `tmp/tmpl` and
|
155
|
+
configurations to `tmp/conf`, run
|
156
156
|
|
157
157
|
rake demo:bootstrap-3[tmp/tmpl,tmp/conf]
|
158
158
|
|
@@ -174,7 +174,7 @@ Prerequisites:
|
|
174
174
|
* [Install Amazon AWS Command Line Interface](http://docs.aws.amazon.com/cli/latest/userguide/installing.html)
|
175
175
|
* [Configure AWS Command Line Interface](http://docs.aws.amazon.com/cli/latest/userguide/cli-chap-getting-started.html)
|
176
176
|
|
177
|
-
To demo targets, which provision Amazon, run
|
177
|
+
To list demo targets, which provision Amazon, run
|
178
178
|
|
179
179
|
rake -T demo:stack-create
|
180
180
|
|
@@ -183,10 +183,6 @@ of the templates use fixed AMI configuration, which means that they
|
|
183
183
|
work only if aws -tool defines correct region (typically in set in
|
184
184
|
`~/.aws/config` file).
|
185
185
|
|
186
|
-
**NOTICE**: Demo-case `7,8, ...` make use of public ssh-key
|
187
|
-
`demo-key`. See
|
188
|
-
[Amazon EC2 Key Pairs](http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-key-pairs.html),
|
189
|
-
which explains how to upload your own key to Amazon platform.
|
190
186
|
|
191
187
|
To create a `demo` stack for demo case `i`, for example demo case 7
|
192
188
|
run
|
@@ -201,23 +197,23 @@ To show status of `demo` stack run
|
|
201
197
|
|
202
198
|
rake demo:stack-status
|
203
199
|
|
204
|
-
|
205
|
-
|
206
|
-
variable, and launches ssh command with the ip and the identity given
|
207
|
-
as a parameter.
|
200
|
+
EC2 instances created in demo cases `7,8,...` accept ssh
|
201
|
+
connections.
|
208
202
|
|
209
|
-
|
210
|
-
|
203
|
+
Demo target `demo:stack-ssh` locates an ip address from a stack output
|
204
|
+
variable given as a parameter, and makes ssh connection to this ip
|
205
|
+
using the ssh identity given as a parameter.
|
206
|
+
|
207
|
+
For example, to use ip address in demo stack output variable `IP1`,
|
208
|
+
and the ssh private key in `~/.ssh/demo-key/demo-key`, run
|
211
209
|
|
212
210
|
rake demo:stack-ssh[IP1,~/.ssh/demo-key/demo-key]
|
213
|
-
|
214
|
-
where
|
215
211
|
|
216
|
-
|
217
|
-
|
218
|
-
|
219
|
-
|
220
|
-
|
212
|
+
**NOTICE**: Use `rake demo:stack-status` to show stack output variables.
|
213
|
+
|
214
|
+
**NOTICE**: The identity used must correspond to an existing
|
215
|
+
[Amazon EC2 Key Pair](http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-key-pairs.html)
|
216
|
+
with the name `demo-key`.
|
221
217
|
|
222
218
|
|
223
219
|
To delete `demo` stack
|
data/demo/2/conf.yaml
CHANGED
data/lib/tasks/demo.rake
CHANGED
@@ -42,12 +42,14 @@ namespace "demo" do |ns|
|
|
42
42
|
sh "#{cmd} json #{demo_dir}/#{c[:id]}/conf.yaml"
|
43
43
|
end
|
44
44
|
|
45
|
-
desc "Check the difference between version '#{c[:id]}' and '#{c[:id].to_i() -1}' "
|
46
|
-
task "diff-#{c[:id]}" do
|
47
|
-
|
45
|
+
desc "Check the difference between version '#{c[:id]}' and :prev (default '#{c[:id].to_i() -1}') "
|
46
|
+
task "diff-#{c[:id]}", :prev do |t,args|
|
47
|
+
|
48
|
+
args.with_defaults( prev: c[:id].to_i() -1 )
|
49
|
+
|
48
50
|
# use bash temporary names pipes to diff two stdouts
|
49
51
|
# Use `jq` to create canonical pretty print json
|
50
|
-
sh "bash -c \"diff <(#{cmd} gen -t #{demo_dir}/#{c[:id]} #{demo_dir}/#{c[:id]}/conf.yaml | jq . ) <(#{cmd} gen -t #{demo_dir}/#{prev} #{demo_dir}/#{prev}/conf.yaml | jq . ) || true \""
|
52
|
+
sh "bash -c \"diff <(#{cmd} gen -t #{demo_dir}/#{c[:id]} #{demo_dir}/#{c[:id]}/conf.yaml | jq . ) <(#{cmd} gen -t #{demo_dir}/#{args.prev} #{demo_dir}/#{args.prev}/conf.yaml | jq . ) || true \""
|
51
53
|
end
|
52
54
|
|
53
55
|
desc "Create stack #{stack} for demo case #{c[:id]}, supported regions=#{c[:region]}"
|