sparkle-guides 0.1.4 → 0.1.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/docs/apply-and-nested.md +25 -8
- data/docs/getting-started.md +14 -7
- data/sparkle-guides.gemspec +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: 1f04bb4a6026891d6f8c468a1c6e880238605994
|
4
|
+
data.tar.gz: b8f10b89284f3390ec13ea9e648be1f33ff5765f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 609346d36b4974a68eab22b9c0b308ab9e2a5efc7f7dde88ea31e580cab963c63f073bf46b302fbfd731644ad49cd2acccb083d6722844fb192d95836f82cd3f
|
7
|
+
data.tar.gz: 58fd492797e2c62431f922dd68671b40b995a2e70ca94a0001dcbc2488c2c0853cf6319178225ce536b60131117c8b130cff6a03bb4067bacfb3021a0e879850
|
data/CHANGELOG.md
CHANGED
data/docs/apply-and-nested.md
CHANGED
@@ -83,7 +83,7 @@ SparkleFormation.new(:network) do
|
|
83
83
|
|
84
84
|
dynamic!(:ec2_vpc, :network) do
|
85
85
|
properties do
|
86
|
-
cidr_block join!(ref!(:cidr_prefix, '.0.0/24')
|
86
|
+
cidr_block join!(ref!(:cidr_prefix), '.0.0/24')
|
87
87
|
enable_dns_support true
|
88
88
|
enable_dns_hostnames true
|
89
89
|
end
|
@@ -127,7 +127,7 @@ SparkleFormation.new(:network) do
|
|
127
127
|
dynamic!(:ec2_subnet, :network) do
|
128
128
|
properties do
|
129
129
|
availability_zone select!(0, azs!)
|
130
|
-
cidr_block join!(ref!(:cidr_prefix, '.0.0/24')
|
130
|
+
cidr_block join!(ref!(:cidr_prefix), '.0.0/24')
|
131
131
|
vpc_id ref!(:network_ec2_vpc)
|
132
132
|
end
|
133
133
|
end
|
@@ -143,7 +143,7 @@ SparkleFormation.new(:network) do
|
|
143
143
|
network_vpc_id.value ref!(:network_ec2_vpc)
|
144
144
|
network_subnet_id.value ref!(:network_ec2_subnet)
|
145
145
|
network_route_table.value ref!(:network_ec2_route_table)
|
146
|
-
network_cidr.value join!(ref!(:cidr_prefix, '.0.0/24')
|
146
|
+
network_cidr.value join!(ref!(:cidr_prefix), '.0.0/24')
|
147
147
|
end
|
148
148
|
|
149
149
|
end
|
@@ -173,6 +173,10 @@ SparkleFormation.new(:computes) do
|
|
173
173
|
ssh_key_name.type 'String'
|
174
174
|
network_vpc_id.type 'String'
|
175
175
|
network_subnet_id.type 'String'
|
176
|
+
image_id_name do
|
177
|
+
type 'String'
|
178
|
+
default 'ami-63ac5803'
|
179
|
+
end
|
176
180
|
end
|
177
181
|
|
178
182
|
dynamic!(:ec2_security_group, :compute) do
|
@@ -190,8 +194,8 @@ SparkleFormation.new(:computes) do
|
|
190
194
|
|
191
195
|
dynamic!(:ec2_instance, :micro) do
|
192
196
|
properties do
|
193
|
-
image_id
|
194
|
-
|
197
|
+
image_id ref!(:image_id_name)
|
198
|
+
instance_type 't2.micro'
|
195
199
|
key_name ref!(:ssh_key_name)
|
196
200
|
network_interfaces array!(
|
197
201
|
->{
|
@@ -206,8 +210,8 @@ SparkleFormation.new(:computes) do
|
|
206
210
|
|
207
211
|
dynamic!(:ec2_instance, :small) do
|
208
212
|
properties do
|
209
|
-
image_id
|
210
|
-
|
213
|
+
image_id ref!(:image_id_name)
|
214
|
+
instance_type 't2.micro'
|
211
215
|
key_name ref!(:ssh_key_name)
|
212
216
|
network_interfaces array!(
|
213
217
|
->{
|
@@ -277,6 +281,13 @@ During the create process, the SparkleFormation CLI will prompt for parameters.
|
|
277
281
|
default values for the VPC ID and subnet ID will be automatically inserted, matching
|
278
282
|
the outputs from the `sparkle-guide-network`.
|
279
283
|
|
284
|
+
You can destroy the sparkle-guide-compute and sparkle-guide-network stacks as they will not be used in the next section.
|
285
|
+
|
286
|
+
~~~
|
287
|
+
$ sfn destroy sparkle-guide-computes
|
288
|
+
$ sfn destroy sparkle-guide-network
|
289
|
+
~~~
|
290
|
+
|
280
291
|
## Nested stack implementation
|
281
292
|
|
282
293
|
Now that our infrastructure has been successfully created using disparate stacks, lets
|
@@ -372,4 +383,10 @@ $ bundle exec sfn create sparkle-guide-computes-infra --file computes --apply-st
|
|
372
383
|
~~~
|
373
384
|
|
374
385
|
The ability to apply nested stacks to disparate stacks make it easy to provide resources to new
|
375
|
-
stacks, or to test building new stacks in isolation before being nested into the root stack.
|
386
|
+
stacks, or to test building new stacks in isolation before being nested into the root stack.
|
387
|
+
|
388
|
+
You can destroy the all the `infrastructure` related stacks with the command:
|
389
|
+
|
390
|
+
~~~
|
391
|
+
sfn destroy sparkle-guide-infrastructure
|
392
|
+
~~~
|
data/docs/getting-started.md
CHANGED
@@ -160,7 +160,7 @@ SparkleFormation.new(:compute, :provider => :heat) do
|
|
160
160
|
sparkle_ssh_key_name.type 'String'
|
161
161
|
sparkle_flavor do
|
162
162
|
type 'String'
|
163
|
-
default '
|
163
|
+
default 't2.small'
|
164
164
|
allowed_values ['m1.small', 'm1.medium']
|
165
165
|
end
|
166
166
|
end
|
@@ -334,7 +334,7 @@ Create a new file at `./sparkleformation/registry/instance_flavor.rb`
|
|
334
334
|
|
335
335
|
~~~ruby
|
336
336
|
SfnRegistry.register(:instance_flavor) do
|
337
|
-
['
|
337
|
+
['t2.micro', 't2.small']
|
338
338
|
end
|
339
339
|
~~~
|
340
340
|
|
@@ -411,7 +411,7 @@ SparkleFormation.dynamic(:node) do |name, opts={}|
|
|
411
411
|
set!("#{name}_ssh_key_name".to_sym).type 'String'
|
412
412
|
set!("#{name}_flavor".to_sym) do
|
413
413
|
type 'String'
|
414
|
-
default '
|
414
|
+
default 't2.small'
|
415
415
|
allowed_values registry!(:instance_flavor)
|
416
416
|
end
|
417
417
|
end
|
@@ -442,7 +442,7 @@ SparkleFormation.dynamic(:node) do |name, opts={}|
|
|
442
442
|
set!("#{name}_ssh_key_name".to_sym).type 'String'
|
443
443
|
set!("#{name}_flavor".to_sym) do
|
444
444
|
type 'String'
|
445
|
-
default '
|
445
|
+
default 't2.small'
|
446
446
|
allowed_values registry!(:instance_flavor)
|
447
447
|
end
|
448
448
|
end
|
@@ -623,14 +623,21 @@ The `--defaults` flag will suppress prompts for stack parameters and use the exi
|
|
623
623
|
stack. The result of this command will either explicitly state that no updates were performed, or the event stream
|
624
624
|
will show that no resources were modified depending on the provider.
|
625
625
|
|
626
|
+
At the end of the run it will ask:
|
627
|
+
|
628
|
+
~~~
|
629
|
+
[Sfn]: Apply this stack update? (Y/N):
|
630
|
+
~~~
|
631
|
+
|
632
|
+
You can answer Y.
|
633
|
+
|
626
634
|
### The real update (parameters)
|
627
635
|
|
628
636
|
Now lets update the stack by modifying the paramters of the running stack. We will change the flavor of the instance
|
629
|
-
which will result in the resource being replaced within the stack. Run the update command but do not provide
|
630
|
-
flags:
|
637
|
+
which will result in the resource being replaced within the stack. Run the update command but do not provide the `--defaults` flag:
|
631
638
|
|
632
639
|
~~~
|
633
|
-
$ sfn update sparkle-guide-compute
|
640
|
+
$ sfn update sparkle-guide-compute --file compute
|
634
641
|
~~~
|
635
642
|
|
636
643
|
Now `sfn` will prompt for parameter values. Notice that the default values are the values used when creating the
|
data/sparkle-guides.gemspec
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sparkle-guides
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Chris Roberts
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-04-20 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: SparkleFormation Usage Guides
|
14
14
|
email: chrisroberts.code@gmail.com
|