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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: ec263031a8d6a6619934045ec286e400ddf00a72
4
- data.tar.gz: f1b69d4f681dc1551986be9f505540dd17337f1b
3
+ metadata.gz: 8bc46bd401c62d97d7cd8171ebe4ba40ab529417
4
+ data.tar.gz: d9ee68d839c1892fd29d32a7384d046428c26bfb
5
5
  SHA512:
6
- metadata.gz: ce14b0078feac91d303e3b313ce9f33eab39afb966bdf11ee52efdee6f6e9e4380ce330b7daa8ea203b7651d580e41d3d7409c1494cf09139ed4be390a1c1bed
7
- data.tar.gz: 47a828370761ca394473cea460a2b337d2f9c2a3990ca96ae701317dde6ebf467b523a4408a4632b2b60859b683470567259d428fcd8366c475feb98e1d539b8
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.2$
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 extract your own copy of demo case `i` configuration, run rake task
152
- `demo:bootstrap-i` with command line arguments defining template
153
- directory and configuration directory. For example, to copy demo case
154
- `3` templates to directory `tmp/tmpl` and configurations to
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
- Instances created in demo cases `7,8,...` can be connected using ssh.
205
- Demo target `demo:stack-ssh` locates an ip address from stack output
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
- For example to use ip address in demo stack output variable `IP1`, and
210
- with the identity `~/.ssh/demo-key/demo-key`, run
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
- * `IP1` : is the name of stack output variable holding IP address
217
- (cf. Outputs array in `rake demo:stack-status`)
218
- * `~/.ssh/demo-key/demo-key` is the file path of ssh private key for
219
- [Amazon SSH-key pair](http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-key-pairs.html)
220
- `demo-key`.
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
@@ -2,5 +2,4 @@
2
2
 
3
3
 
4
4
  description: "demo/2: a simple Amazon EC2 instance created using
5
- aws-must tool. Added 'description' tag in
6
- `root.mustache`"
5
+ aws-must tool. Added Description tag in root.mustache"
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
- prev = c[:id].to_i() -1
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]}"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: aws-must
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - jarjuk