automan 2.3.6 → 2.3.7

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.
Files changed (47) hide show
  1. checksums.yaml +4 -4
  2. data/.ruby-gemset +1 -0
  3. data/.ruby-version +1 -0
  4. data/.travis.yml +5 -0
  5. data/Rakefile +5 -0
  6. data/automan.gemspec +3 -3
  7. data/lib/automan/base.rb +7 -3
  8. data/lib/automan/beanstalk/deployer.rb +1 -1
  9. data/lib/automan/beanstalk/package.rb +1 -1
  10. data/lib/automan/beanstalk/router.rb +1 -1
  11. data/lib/automan/cli/snapper.rb +29 -29
  12. data/lib/automan/cli/stacker.rb +19 -0
  13. data/lib/automan/cloudformation/launcher.rb +6 -3
  14. data/lib/automan/cloudformation/replacer.rb +1 -1
  15. data/lib/automan/cloudformation/terminator.rb +1 -1
  16. data/lib/automan/ec2/image.rb +3 -3
  17. data/lib/automan/elasticache/router.rb +79 -0
  18. data/lib/automan/mixins/aws_caller.rb +21 -7
  19. data/lib/automan/rds/snapshot.rb +35 -14
  20. data/lib/automan/s3/downloader.rb +10 -1
  21. data/lib/automan/version.rb +1 -1
  22. data/lib/automan.rb +1 -0
  23. data/spec/beanstalk/application_spec.rb +17 -17
  24. data/spec/beanstalk/configuration_spec.rb +24 -24
  25. data/spec/beanstalk/deployer_spec.rb +65 -65
  26. data/spec/beanstalk/router_spec.rb +18 -19
  27. data/spec/beanstalk/terminator_spec.rb +16 -16
  28. data/spec/beanstalk/uploader_spec.rb +13 -13
  29. data/spec/beanstalk/version_spec.rb +8 -10
  30. data/spec/cloudformation/launcher_spec.rb +63 -65
  31. data/spec/cloudformation/replacer_spec.rb +10 -10
  32. data/spec/cloudformation/terminator_spec.rb +23 -23
  33. data/spec/cloudformation/uploader_spec.rb +13 -13
  34. data/spec/ec2/image_spec.rb +55 -55
  35. data/spec/ec2/instance_spec.rb +17 -17
  36. data/spec/elasticache/router_spec.rb +29 -0
  37. data/spec/mixins/aws_caller_spec.rb +9 -9
  38. data/spec/mixins/utils_spec.rb +27 -28
  39. data/spec/rds/snapshot_spec.rb +44 -46
  40. data/templates/stacker/.env.example +14 -0
  41. data/templates/stacker/.gitignore +2 -0
  42. data/templates/stacker/.ruby-gemset.tt +1 -0
  43. data/templates/stacker/.ruby-version +1 -0
  44. data/templates/stacker/Gemfile +4 -0
  45. data/templates/stacker/bin/%app_name%.tt +62 -0
  46. data/templates/stacker/bin/launch_%app_name%.sh.tt +12 -0
  47. metadata +20 -7
@@ -0,0 +1,4 @@
1
+ source 'https://rubygems.org'
2
+
3
+ gem 'cloudformation-ruby-dsl'
4
+ gem 'automan'
@@ -0,0 +1,62 @@
1
+ #!/usr/bin/env ruby
2
+ require 'bundler/setup'
3
+ require 'cloudformation-ruby-dsl/cfntemplate'
4
+ require 'json'
5
+
6
+ t = template do
7
+ ## CloudFormation template stuff goes here
8
+ ## See https://github.com/bazaarvoice/cloudformation-ruby-dsl
9
+ ##
10
+ ## Here's an example.
11
+ ##
12
+
13
+ # value AWSTemplateFormatVersion: '2010-09-09'
14
+
15
+ # value Description: 'Creates resources for my stack'
16
+
17
+ # parameter 'VpcId',
18
+ # Description: 'The VPC in which to launch',
19
+ # Type: 'String'
20
+
21
+ # parameter 'SubnetId',
22
+ # Description: 'The Subnet in which to launch the instances',
23
+ # Type: 'String'
24
+
25
+ # parameter 'RemoteAccessSG',
26
+ # Description: 'The security group allowing remote access',
27
+ # Type: 'String'
28
+
29
+ # parameter 'KeyPairName',
30
+ # Description: 'Public/private key pairs allow you to securely connect to your instance after it launches',
31
+ # Type: 'String'
32
+
33
+ # parameter 'InstanceType',
34
+ # Description: 'EC2 instance type for training machines',
35
+ # Type: 'String',
36
+ # Default: 't2.small'
37
+
38
+ # parameter 'ImageId',
39
+ # Description: 'Amazon Machine Image Id of pre-baked training machine',
40
+ # Type: 'String'
41
+
42
+ # resource "MyInstance", Type: 'AWS::EC2::Instance',
43
+ # Properties: {
44
+ # ImageId: ref('ImageId'),
45
+ # InstanceType: ref('InstanceType'),
46
+ # NetworkInterfaces: [{
47
+ # AssociatePublicIpAddress: 'true',
48
+ # DeviceIndex: '0',
49
+ # DeleteOnTermination: 'true',
50
+ # SubnetId: ref('SubnetId'),
51
+ # GroupSet: [
52
+ # ref('RemoteAccessSG')
53
+ # ]
54
+ # }],
55
+ # Tags: [
56
+ # { Key: 'Name', Value: "MyInstance" }
57
+ # ],
58
+ # KeyName: ref('KeyPairName')
59
+ # }
60
+ end
61
+
62
+ puts JSON.pretty_generate(t)
@@ -0,0 +1,12 @@
1
+ #!/bin/bash
2
+ # To set template parameters, add the -p options
3
+ # to the end of the stacker command:
4
+ #
5
+ # stacker launch -n <%= @app_name %> -t <%= @app_name %>.json --disable-rollback \
6
+ # -p VpcId:$VPC_ID \
7
+ # SubnetId:$SUBNET_ID \
8
+ # RemoteAccessSG:$REMOTE_ACCESS_SG \
9
+ # KeyPairName:$KEYPAIR_NAME \
10
+ # InstanceType:$INSTANCE_TYPE \
11
+ # ImageId:$IMAGE_ID
12
+ stacker launch -n <%= @app_name %> -t <%= @app_name %>.json --disable-rollback
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: automan
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.3.6
4
+ version: 2.3.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Chris Chalfant
@@ -45,42 +45,42 @@ dependencies:
45
45
  requirements:
46
46
  - - "~>"
47
47
  - !ruby/object:Gem::Version
48
- version: 2.12.2
48
+ version: '3'
49
49
  type: :development
50
50
  prerelease: false
51
51
  version_requirements: !ruby/object:Gem::Requirement
52
52
  requirements:
53
53
  - - "~>"
54
54
  - !ruby/object:Gem::Version
55
- version: 2.12.2
55
+ version: '3'
56
56
  - !ruby/object:Gem::Dependency
57
57
  name: rspec-mocks
58
58
  requirement: !ruby/object:Gem::Requirement
59
59
  requirements:
60
60
  - - "~>"
61
61
  - !ruby/object:Gem::Version
62
- version: 2.12.2
62
+ version: '3'
63
63
  type: :development
64
64
  prerelease: false
65
65
  version_requirements: !ruby/object:Gem::Requirement
66
66
  requirements:
67
67
  - - "~>"
68
68
  - !ruby/object:Gem::Version
69
- version: 2.12.2
69
+ version: '3'
70
70
  - !ruby/object:Gem::Dependency
71
71
  name: rspec-expectations
72
72
  requirement: !ruby/object:Gem::Requirement
73
73
  requirements:
74
74
  - - "~>"
75
75
  - !ruby/object:Gem::Version
76
- version: 2.12.1
76
+ version: '3'
77
77
  type: :development
78
78
  prerelease: false
79
79
  version_requirements: !ruby/object:Gem::Requirement
80
80
  requirements:
81
81
  - - "~>"
82
82
  - !ruby/object:Gem::Version
83
- version: 2.12.1
83
+ version: '3'
84
84
  - !ruby/object:Gem::Dependency
85
85
  name: aws-sdk
86
86
  requirement: !ruby/object:Gem::Requirement
@@ -166,6 +166,9 @@ extensions: []
166
166
  extra_rdoc_files: []
167
167
  files:
168
168
  - ".gitignore"
169
+ - ".ruby-gemset"
170
+ - ".ruby-version"
171
+ - ".travis.yml"
169
172
  - Gemfile
170
173
  - LICENSE.txt
171
174
  - README.md
@@ -204,6 +207,7 @@ files:
204
207
  - lib/automan/ec2/errors.rb
205
208
  - lib/automan/ec2/image.rb
206
209
  - lib/automan/ec2/instance.rb
210
+ - lib/automan/elasticache/router.rb
207
211
  - lib/automan/mixins/aws_caller.rb
208
212
  - lib/automan/mixins/utils.rb
209
213
  - lib/automan/rds/errors.rb
@@ -228,9 +232,17 @@ files:
228
232
  - spec/cloudformation/uploader_spec.rb
229
233
  - spec/ec2/image_spec.rb
230
234
  - spec/ec2/instance_spec.rb
235
+ - spec/elasticache/router_spec.rb
231
236
  - spec/mixins/aws_caller_spec.rb
232
237
  - spec/mixins/utils_spec.rb
233
238
  - spec/rds/snapshot_spec.rb
239
+ - templates/stacker/.env.example
240
+ - templates/stacker/.gitignore
241
+ - templates/stacker/.ruby-gemset.tt
242
+ - templates/stacker/.ruby-version
243
+ - templates/stacker/Gemfile
244
+ - templates/stacker/bin/%app_name%.tt
245
+ - templates/stacker/bin/launch_%app_name%.sh.tt
234
246
  homepage: ''
235
247
  licenses: []
236
248
  metadata: {}
@@ -271,6 +283,7 @@ test_files:
271
283
  - spec/cloudformation/uploader_spec.rb
272
284
  - spec/ec2/image_spec.rb
273
285
  - spec/ec2/instance_spec.rb
286
+ - spec/elasticache/router_spec.rb
274
287
  - spec/mixins/aws_caller_spec.rb
275
288
  - spec/mixins/utils_spec.rb
276
289
  - spec/rds/snapshot_spec.rb