stackit 0.3.6 → 0.3.7

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: 373ce527c2a053aa1489bf77aebee2f0697c96dd
4
- data.tar.gz: ad0332111443fb1ef5557abf486d844613a2364d
3
+ metadata.gz: adce33d2a5ecead93eae89893531c47e182a84a3
4
+ data.tar.gz: 4ee05a5601797cb3295088cd6cb8baaf42a8c9b7
5
5
  SHA512:
6
- metadata.gz: e9537d7b1bc44e76f2d473dedfbc774e7b1fda5f4ed660361f81d1257728f3a22a26f47e60de2f8557e560e59f7d36c5b6df801a3e50e2311ebe46e932667afb
7
- data.tar.gz: 2e4d16c31fe74147fc8efae5b3adc78bca7525c4295c35378870fd14ebff8f685150ed1e4685f9c62adb0735ab778e7c864990764a491ac305e7b3c5e4ecbcfe
6
+ metadata.gz: 5107099dbd1473014f413162c3a9af3ab72fc4109bfbdd25312c19914d171dae755805b6c883c575b8ada07f409aeb54478a4d1544ce8c42625ab05ce4a748d6
7
+ data.tar.gz: 2246c6937dcf7c5f9e5c25c489bcde5274ad3761a8a51ab2e6d1f02323f60af0857948e72ff7413f010ff03063e31aaecba176d040e68c65ea120edde06d6da9
data/README.md CHANGED
@@ -42,7 +42,7 @@ File parameters work just like the default AWS CLI parameters file. Simply speci
42
42
 
43
43
  ##### Existing CloudFormation Stacks
44
44
 
45
- Your stack can `--depend` on existing stacks. Any resource, output, or parameter whose ID matches a parameter key in the template will automatically have it's value passed into the stack during management.
45
+ Your stack can `--depends` on existing stacks. Any resource, output, or parameter whose ID matches a parameter key in the template will automatically have it's value passed into the stack during creation/update.
46
46
 
47
47
  > Parameter values mapped using `--depends` override parameters defined in the parameter file.
48
48
 
@@ -95,7 +95,7 @@ You may optionally map parameters that don't have matching keys. For example, le
95
95
 
96
96
  ### Library
97
97
 
98
- StackIT can be used as library in your own automation tools.
98
+ StackIT can be used as a library in your own automation tools.
99
99
 
100
100
  ```ruby
101
101
  ManagedStack.new({
@@ -109,6 +109,63 @@ StackIT can be used as library in your own automation tools.
109
109
  }).create!
110
110
  ```
111
111
 
112
+ ```ruby
113
+ module MyToolkit::MyStack
114
+
115
+ class Service < Stackit::OpsWorksManagedStackService
116
+
117
+ def initialize(options = {})
118
+ super(options)
119
+ end
120
+
121
+ def stack_name
122
+ options[:stack_name] || "#{Stackit.environment}-mystack"
123
+ end
124
+
125
+ def template
126
+ options[:template] || "#{Stackit.home}/mytoolkit/mystack/template.json"
127
+ end
128
+
129
+ def user_defined_parameters
130
+ {
131
+ :StackEnvironment => Stackit.environment,
132
+ :KeyPair => "#{Stackit.environment}-myapp",
133
+ :OpsWorksStackName => stack_name,
134
+ :OpsWorksServiceRoleArn => opsworks_service_role_arn,
135
+ :UseOpsworksSecurityGroups => "false",
136
+ :OpsWorksDefaultOs => "Amazon Linux 2016.03",
137
+ :OpsWorksDefaultRootDeviceType => 'ebs',
138
+ :OpsWorksConfigureRunlist => "mycookbook::configure",
139
+ :OpsWorksDeployRunlist => "mycookbook::deploy",
140
+ :OpsWorksSetupRunlist => "mycookbook::setup",
141
+ :OpsWorksShutdownRunlist => "mycookbook::shutdown",
142
+ :OpsWorksUndeployRunlist => "mycookbook::undeploy",
143
+ :S3CookbookSource => 'https://s3.amazonaws.com/devops-automation/cookbooks.tar.gz',
144
+ :EbsVolumeType => 'gp2',
145
+ :EbsVolumeSize => 140 # GB
146
+ }
147
+ end
148
+
149
+ def opsworks_stack_id
150
+ Stackit::ParameterResolver.new(stack).resolve(:OpsWorksStack)
151
+ end
152
+
153
+ def opsworks_layer_id
154
+ Stackit::ParameterResolver.new(stack).resolve(:OpsWorksLayer)
155
+ end
156
+
157
+ end
158
+ end
159
+
160
+ service = MyToolkit::MyStack::Service.new
161
+ service.create! # creates the stack
162
+ service.update! # updates the stack
163
+ service.delete! # deletes the stack
164
+
165
+ ```
166
+
167
+ At this point, you may be interested in my [awskit](https://github.com/jeremyhahn/awskit) project that generates a DevOps toolkit based on stackit.
168
+
112
169
  ## Development
113
170
 
114
171
  After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
@@ -1,3 +1,3 @@
1
1
  module Stackit
2
- VERSION = "0.3.6"
2
+ VERSION = "0.3.7"
3
3
  end
data/stackit.gemspec CHANGED
@@ -9,7 +9,7 @@ Gem::Specification.new do |spec|
9
9
  spec.email = ["mail@jeremyhahn.com"]
10
10
 
11
11
  spec.summary = %q{Simple, elegant CloudFormation dependency management.}
12
- spec.description = %q{Use existing stack values (output, resource, or parameters) as input parmeters to CloudFormation templates.}
12
+ spec.description = %q{CloudFormation stack management and instance provisioning toolkit for AWS. Provides dynamic parameter mapping and the ability to pass existing stack values (output, resource, or parameters) as input parameters to templates. Supports multiple AWS environments.}
13
13
  spec.homepage = "https://github.com/jeremyhahn/stackit"
14
14
  spec.license = "GPLv3"
15
15
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: stackit
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.6
4
+ version: 0.3.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jeremy Hahn
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-06-06 00:00:00.000000000 Z
11
+ date: 2016-06-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -122,8 +122,10 @@ dependencies:
122
122
  - - "~>"
123
123
  - !ruby/object:Gem::Version
124
124
  version: '4.2'
125
- description: Use existing stack values (output, resource, or parameters) as input
126
- parmeters to CloudFormation templates.
125
+ description: CloudFormation stack management and instance provisioning toolkit for
126
+ AWS. Provides dynamic parameter mapping and the ability to pass existing stack values
127
+ (output, resource, or parameters) as input parameters to templates. Supports multiple
128
+ AWS environments.
127
129
  email:
128
130
  - mail@jeremyhahn.com
129
131
  executables: []