lono 4.2.7 → 5.0.1

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 (219) hide show
  1. checksums.yaml +4 -4
  2. data/.cody/README.md +6 -0
  3. data/.cody/acceptance.sh +30 -0
  4. data/.cody/buildspec.yml +21 -0
  5. data/.cody/demo.rb +38 -0
  6. data/.cody/project.rb +12 -0
  7. data/.cody/role.rb +1 -0
  8. data/.gitignore +2 -0
  9. data/.gitmodules +6 -3
  10. data/.travis.yml +7 -0
  11. data/CHANGELOG.md +10 -0
  12. data/Gemfile +0 -1
  13. data/LICENSE.txt +1 -22
  14. data/README.md +46 -55
  15. data/lib/lono.rb +20 -27
  16. data/lib/lono/app_file.rb +5 -0
  17. data/lib/lono/app_file/base.rb +19 -0
  18. data/lib/lono/app_file/build.rb +78 -0
  19. data/lib/lono/app_file/registry.rb +14 -0
  20. data/lib/lono/app_file/registry/item.rb +46 -0
  21. data/lib/lono/app_file/upload.rb +39 -0
  22. data/lib/lono/autoloader.rb +22 -0
  23. data/lib/lono/aws_services.rb +46 -0
  24. data/lib/lono/aws_services/util.rb +49 -0
  25. data/lib/lono/blueprint.rb +113 -0
  26. data/lib/lono/blueprint/find.rb +90 -0
  27. data/lib/lono/blueprint/helper.rb +18 -0
  28. data/lib/lono/blueprint/info.rb +10 -0
  29. data/lib/lono/blueprint/list.rb +14 -0
  30. data/lib/lono/blueprint/root.rb +43 -0
  31. data/lib/lono/cfn.rb +31 -19
  32. data/lib/lono/cfn/aws_service.rb +16 -0
  33. data/lib/lono/cfn/base.rb +244 -261
  34. data/lib/lono/cfn/create.rb +36 -32
  35. data/lib/lono/cfn/current.rb +1 -1
  36. data/lib/lono/cfn/delete.rb +2 -2
  37. data/lib/lono/cfn/deploy.rb +11 -0
  38. data/lib/lono/cfn/diff.rb +1 -1
  39. data/lib/lono/cfn/preview.rb +3 -3
  40. data/lib/lono/cfn/rollback.rb +26 -0
  41. data/lib/lono/cfn/status.rb +2 -203
  42. data/lib/lono/cfn/suffix.rb +67 -0
  43. data/lib/lono/cfn/update.rb +61 -53
  44. data/lib/lono/cli.rb +42 -23
  45. data/lib/lono/completer.rb +0 -2
  46. data/lib/lono/configure.rb +37 -0
  47. data/lib/lono/configure/aws_services.rb +18 -0
  48. data/lib/lono/configure/base.rb +94 -0
  49. data/lib/lono/configure/helpers.rb +128 -0
  50. data/lib/lono/conventions.rb +11 -0
  51. data/lib/lono/core.rb +42 -12
  52. data/lib/lono/core/config.rb +5 -4
  53. data/lib/lono/default/settings.yml +0 -11
  54. data/lib/lono/file_uploader.rb +9 -4
  55. data/lib/lono/help.rb +1 -2
  56. data/lib/lono/help/blueprint.md +46 -0
  57. data/lib/lono/help/cfn.md +5 -4
  58. data/lib/lono/help/cfn/create.md +14 -9
  59. data/lib/lono/help/cfn/deploy.md +92 -0
  60. data/lib/lono/help/cfn/diff.md +0 -1
  61. data/lib/lono/help/cfn/update.md +16 -15
  62. data/lib/lono/help/completion.md +3 -3
  63. data/lib/lono/help/generate.md +0 -1
  64. data/lib/lono/help/new.md +40 -34
  65. data/lib/lono/help/param.md +1 -1
  66. data/lib/lono/help/param/generate.md +1 -1
  67. data/lib/lono/help/template.md +2 -2
  68. data/lib/lono/help/xgraph.md +1 -1
  69. data/lib/lono/inspector.rb +1 -1
  70. data/lib/lono/inspector/base.rb +26 -10
  71. data/lib/lono/inspector/graph.rb +7 -3
  72. data/lib/lono/inspector/summary.rb +15 -3
  73. data/lib/lono/md5.rb +46 -0
  74. data/lib/lono/new.rb +40 -28
  75. data/lib/lono/new/helper.rb +2 -3
  76. data/lib/lono/param.rb +12 -11
  77. data/lib/lono/param/generator.rb +96 -42
  78. data/lib/lono/project_checker.rb +27 -8
  79. data/lib/lono/s3.rb +23 -0
  80. data/lib/lono/s3/bucket.rb +123 -0
  81. data/lib/lono/script.rb +4 -8
  82. data/lib/lono/script/base.rb +7 -2
  83. data/lib/lono/script/build.rb +7 -8
  84. data/lib/lono/script/upload.rb +4 -20
  85. data/lib/lono/sequence.rb +19 -16
  86. data/lib/lono/setting.rb +19 -27
  87. data/lib/lono/template.rb +22 -26
  88. data/lib/lono/template/base.rb +13 -0
  89. data/lib/lono/template/context.rb +4 -56
  90. data/lib/lono/template/context/loader.rb +70 -0
  91. data/lib/lono/template/dsl.rb +15 -151
  92. data/lib/lono/template/dsl/builder.rb +60 -0
  93. data/lib/lono/template/dsl/builder/base.rb +14 -0
  94. data/lib/lono/template/dsl/builder/condition.rb +26 -0
  95. data/lib/lono/template/dsl/builder/fn.rb +114 -0
  96. data/lib/lono/template/dsl/builder/helper.rb +64 -0
  97. data/lib/lono/template/dsl/builder/mapping.rb +24 -0
  98. data/lib/lono/template/dsl/builder/output.rb +37 -0
  99. data/lib/lono/template/dsl/builder/parameter.rb +39 -0
  100. data/lib/lono/template/dsl/builder/resource.rb +38 -0
  101. data/lib/lono/template/dsl/builder/section.rb +12 -0
  102. data/lib/lono/template/dsl/builder/syntax.rb +58 -0
  103. data/lib/lono/template/erb.rb +82 -0
  104. data/lib/lono/template/evaluate.rb +39 -0
  105. data/lib/lono/template/generator.rb +29 -0
  106. data/lib/lono/template/helper.rb +7 -29
  107. data/lib/lono/template/post_processor.rb +69 -0
  108. data/lib/lono/template/template.rb +4 -9
  109. data/lib/lono/template/upload.rb +103 -133
  110. data/lib/lono/template/util.rb +48 -0
  111. data/lib/lono/upgrade.rb +5 -3
  112. data/lib/lono/upgrade/upgrade5.rb +55 -0
  113. data/lib/lono/user_data.rb +4 -4
  114. data/lib/lono/version.rb +1 -1
  115. data/lib/templates/blueprint/%blueprint_name%.gemspec.tt +44 -0
  116. data/lib/templates/blueprint/.gitignore +14 -0
  117. data/lib/templates/blueprint/.lono/config.yml.tt +3 -0
  118. data/lib/templates/blueprint/.meta/config.yml.tt +3 -0
  119. data/lib/templates/blueprint/CHANGELOG.md +7 -0
  120. data/lib/templates/blueprint/Gemfile +4 -0
  121. data/lib/templates/blueprint/README.md +37 -0
  122. data/lib/templates/blueprint/Rakefile +6 -0
  123. data/lib/templates/blueprint/setup/configs.rb +54 -0
  124. data/lib/templates/blueprint_configs/configs/%blueprint_name%/params/base.txt +2 -0
  125. data/lib/{starter_projects/skeleton/app/definitions/base.rb → templates/blueprint_configs/configs/%blueprint_name%/params/development.txt} +0 -0
  126. data/lib/templates/blueprint_configs/configs/%blueprint_name%/variables/base.rb +2 -0
  127. data/lib/templates/blueprint_configs/configs/%blueprint_name%/variables/development.rb +0 -0
  128. data/lib/templates/blueprint_types/dsl/app/templates/%blueprint_name%.rb +37 -0
  129. data/lib/templates/blueprint_types/dsl/app/user_data/bootstrap.sh +2 -0
  130. data/lib/templates/blueprint_types/erb/app/definitions/base.rb.tt +1 -0
  131. data/lib/templates/blueprint_types/erb/app/templates/%blueprint_name%.yml +8 -0
  132. data/lib/{starter_projects/autoscaling → templates/skeleton}/.gitignore +1 -0
  133. data/lib/templates/skeleton/Gemfile +3 -0
  134. data/lib/{starter_projects/autoscaling → templates/skeleton}/Guardfile +2 -2
  135. data/lib/templates/skeleton/README.md +58 -0
  136. data/lib/templates/skeleton/configs/settings.yml +17 -0
  137. data/lib/templates/upgrade5/blueprints/main/.lono/config.yml +3 -0
  138. data/lib/templates/upgrade5/blueprints/main/.meta/config.yml +3 -0
  139. data/lono.gemspec +12 -8
  140. data/vendor/cfn-status/CHANGELOG.md +10 -0
  141. data/vendor/cfn-status/Gemfile +4 -0
  142. data/vendor/cfn-status/LICENSE.txt +21 -0
  143. data/vendor/cfn-status/README.md +56 -0
  144. data/vendor/cfn-status/Rakefile +6 -0
  145. data/vendor/cfn-status/bin/console +14 -0
  146. data/vendor/cfn-status/bin/setup +8 -0
  147. data/vendor/cfn-status/cfn-status.gemspec +30 -0
  148. data/vendor/cfn-status/lib/cfn-status.rb +1 -0
  149. data/vendor/cfn-status/lib/cfn/aws_service.rb +51 -0
  150. data/vendor/cfn-status/lib/cfn/status.rb +219 -0
  151. data/vendor/cfn-status/lib/cfn/status/version.rb +5 -0
  152. data/vendor/cfn-status/spec/cfn/status_spec.rb +81 -0
  153. data/vendor/cfn-status/spec/fixtures/cfn/stack-events-complete.json +1080 -0
  154. data/vendor/cfn-status/spec/fixtures/cfn/stack-events-in-progress.json +1080 -0
  155. data/vendor/cfn-status/spec/fixtures/cfn/stack-events-update-rollback-complete.json +1086 -0
  156. data/vendor/cfn-status/spec/spec_helper.rb +14 -0
  157. data/vendor/cfn_camelizer/CHANGELOG.md +20 -0
  158. data/vendor/cfn_camelizer/Gemfile +4 -0
  159. data/vendor/cfn_camelizer/LICENSE.txt +21 -0
  160. data/vendor/cfn_camelizer/README.md +40 -0
  161. data/vendor/cfn_camelizer/Rakefile +6 -0
  162. data/vendor/cfn_camelizer/bin/console +14 -0
  163. data/vendor/cfn_camelizer/bin/setup +8 -0
  164. data/vendor/cfn_camelizer/cfn_camelizer.gemspec +32 -0
  165. data/vendor/cfn_camelizer/lib/camelizer.yml +37 -0
  166. data/vendor/cfn_camelizer/lib/cfn_camelizer.rb +94 -0
  167. data/vendor/cfn_camelizer/lib/cfn_camelizer/version.rb +3 -0
  168. data/vendor/cfn_camelizer/spec/cfn_camelizer_spec.rb +86 -0
  169. data/vendor/cfn_camelizer/spec/spec_helper.rb +14 -0
  170. metadata +189 -62
  171. data/.circleci/bin/commit_docs.sh +0 -26
  172. data/.circleci/config.yml +0 -72
  173. data/bin/release +0 -9
  174. data/lib/lono/help/import.md +0 -54
  175. data/lib/lono/importer.rb +0 -134
  176. data/lib/lono/new/message.rb +0 -35
  177. data/lib/starter_projects/autoscaling/Gemfile +0 -3
  178. data/lib/starter_projects/autoscaling/README.md +0 -118
  179. data/lib/starter_projects/autoscaling/app/definitions/base.rb +0 -2
  180. data/lib/starter_projects/autoscaling/app/templates/autoscaling.yml +0 -682
  181. data/lib/starter_projects/autoscaling/config/params/base/autoscaling.txt +0 -6
  182. data/lib/starter_projects/autoscaling/config/settings.yml +0 -33
  183. data/lib/starter_projects/ec2/.gitignore +0 -2
  184. data/lib/starter_projects/ec2/Gemfile +0 -3
  185. data/lib/starter_projects/ec2/Guardfile +0 -12
  186. data/lib/starter_projects/ec2/README.md +0 -86
  187. data/lib/starter_projects/ec2/app/definitions/base.rb +0 -2
  188. data/lib/starter_projects/ec2/app/definitions/development.rb +0 -1
  189. data/lib/starter_projects/ec2/app/definitions/production.rb +0 -1
  190. data/lib/starter_projects/ec2/app/helpers/my_custom_helper.rb +0 -17
  191. data/lib/starter_projects/ec2/app/partials/user_data/bootstrap.sh +0 -4
  192. data/lib/starter_projects/ec2/app/templates/example.yml +0 -430
  193. data/lib/starter_projects/ec2/config/params/base/example.txt +0 -2
  194. data/lib/starter_projects/ec2/config/params/development/example.txt +0 -3
  195. data/lib/starter_projects/ec2/config/params/production/example.txt +0 -2
  196. data/lib/starter_projects/ec2/config/settings.yml +0 -33
  197. data/lib/starter_projects/ec2/config/variables/base.rb +0 -3
  198. data/lib/starter_projects/ec2/config/variables/development.rb +0 -2
  199. data/lib/starter_projects/ec2/config/variables/production.rb +0 -2
  200. data/lib/starter_projects/ec2/welcome.txt +0 -8
  201. data/lib/starter_projects/skeleton/.gitignore +0 -2
  202. data/lib/starter_projects/skeleton/Gemfile +0 -3
  203. data/lib/starter_projects/skeleton/Guardfile +0 -12
  204. data/lib/starter_projects/skeleton/README.md +0 -53
  205. data/lib/starter_projects/skeleton/config/settings.yml +0 -33
  206. data/lib/starter_projects/skeleton/welcome.txt +0 -7
  207. data/vendor/plissken/Gemfile +0 -14
  208. data/vendor/plissken/LICENSE.txt +0 -20
  209. data/vendor/plissken/README.md +0 -46
  210. data/vendor/plissken/Rakefile +0 -56
  211. data/vendor/plissken/VERSION +0 -1
  212. data/vendor/plissken/lib/plissken.rb +0 -1
  213. data/vendor/plissken/lib/plissken/ext/hash/to_snake_keys.rb +0 -45
  214. data/vendor/plissken/plissken.gemspec +0 -61
  215. data/vendor/plissken/spec/lib/to_snake_keys_spec.rb +0 -177
  216. data/vendor/plissken/spec/spec_helper.rb +0 -90
  217. data/vendor/plissken/test/helper.rb +0 -20
  218. data/vendor/plissken/test/plissken/ext/hash/to_snake_keys_test.rb +0 -184
  219. data/vendor/plissken/test/test_plissken.rb +0 -2
@@ -1,2 +0,0 @@
1
-
2
- template "autoscaling"
@@ -1,682 +0,0 @@
1
- ---
2
- AWSTemplateFormatVersion: '2010-09-09'
3
- Description: 'AWS CloudFormation Sample Template AutoScalingMultiAZWithNotifications:
4
- Create a multi-az, load balanced and Auto Scaled sample web site running on an Apache
5
- Web Serever. The application is configured to span all Availability Zones in the
6
- region and is Auto-Scaled based on the CPU utilization of the web servers. Notifications
7
- will be sent to the operator email address on scaling events. The instances are
8
- load balanced with a simple health check against the default web page. **WARNING**
9
- This template creates one or more Amazon EC2 instances and an Application Load Balancer.
10
- You will be billed for the AWS resources used if you create a stack from this template.'
11
- Parameters:
12
- VpcId:
13
- Type: AWS::EC2::VPC::Id
14
- Description: VpcId of your existing Virtual Private Cloud (VPC)
15
- ConstraintDescription: must be the VPC Id of an existing Virtual Private Cloud.
16
- Subnets:
17
- Type: List<AWS::EC2::Subnet::Id>
18
- Description: The list of SubnetIds in your Virtual Private Cloud (VPC)
19
- ConstraintDescription: must be a list of at least two existing subnets associated
20
- with at least two different availability zones. They should be residing in the
21
- selected Virtual Private Cloud.
22
- InstanceType:
23
- Description: WebServer EC2 instance type
24
- Type: String
25
- Default: t2.small
26
- AllowedValues:
27
- - t1.micro
28
- - t2.nano
29
- - t2.micro
30
- - t2.small
31
- - t2.medium
32
- - t2.large
33
- - m1.small
34
- - m1.medium
35
- - m1.large
36
- - m1.xlarge
37
- - m2.xlarge
38
- - m2.2xlarge
39
- - m2.4xlarge
40
- - m3.medium
41
- - m3.large
42
- - m3.xlarge
43
- - m3.2xlarge
44
- - m4.large
45
- - m4.xlarge
46
- - m4.2xlarge
47
- - m4.4xlarge
48
- - m4.10xlarge
49
- - c1.medium
50
- - c1.xlarge
51
- - c3.large
52
- - c3.xlarge
53
- - c3.2xlarge
54
- - c3.4xlarge
55
- - c3.8xlarge
56
- - c4.large
57
- - c4.xlarge
58
- - c4.2xlarge
59
- - c4.4xlarge
60
- - c4.8xlarge
61
- - g2.2xlarge
62
- - g2.8xlarge
63
- - r3.large
64
- - r3.xlarge
65
- - r3.2xlarge
66
- - r3.4xlarge
67
- - r3.8xlarge
68
- - i2.xlarge
69
- - i2.2xlarge
70
- - i2.4xlarge
71
- - i2.8xlarge
72
- - d2.xlarge
73
- - d2.2xlarge
74
- - d2.4xlarge
75
- - d2.8xlarge
76
- - hi1.4xlarge
77
- - hs1.8xlarge
78
- - cr1.8xlarge
79
- - cc2.8xlarge
80
- - cg1.4xlarge
81
- ConstraintDescription: must be a valid EC2 instance type.
82
- OperatorEMail:
83
- Description: EMail address to notify if there are any scaling operations
84
- Type: String
85
- AllowedPattern: "([a-zA-Z0-9_\\-\\.]+)@((\\[[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.)|(([a-zA-Z0-9\\-]+\\.)+))([a-zA-Z]{2,4}|[0-9]{1,3})(\\]?)"
86
- ConstraintDescription: must be a valid email address.
87
- KeyName:
88
- Description: The EC2 Key Pair to allow SSH access to the instances
89
- Type: AWS::EC2::KeyPair::KeyName
90
- ConstraintDescription: must be the name of an existing EC2 KeyPair.
91
- SSHLocation:
92
- Description: The IP address range that can be used to SSH to the EC2 instances
93
- Type: String
94
- MinLength: '9'
95
- MaxLength: '18'
96
- Default: 0.0.0.0/0
97
- AllowedPattern: "(\\d{1,3})\\.(\\d{1,3})\\.(\\d{1,3})\\.(\\d{1,3})/(\\d{1,2})"
98
- ConstraintDescription: must be a valid IP CIDR range of the form x.x.x.x/x.
99
- Mappings:
100
- Region2Examples:
101
- us-east-1:
102
- Examples: https://s3.amazonaws.com/cloudformation-examples-us-east-1
103
- us-west-2:
104
- Examples: https://s3-us-west-2.amazonaws.com/cloudformation-examples-us-west-2
105
- us-west-1:
106
- Examples: https://s3-us-west-1.amazonaws.com/cloudformation-examples-us-west-1
107
- eu-west-1:
108
- Examples: https://s3-eu-west-1.amazonaws.com/cloudformation-examples-eu-west-1
109
- eu-west-2:
110
- Examples: https://s3-eu-west-2.amazonaws.com/cloudformation-examples-eu-west-2
111
- eu-west-3:
112
- Examples: https://s3-eu-west-3.amazonaws.com/cloudformation-examples-eu-west-3
113
- eu-central-1:
114
- Examples: https://s3-eu-central-1.amazonaws.com/cloudformation-examples-eu-central-1
115
- ap-southeast-1:
116
- Examples: https://s3-ap-southeast-1.amazonaws.com/cloudformation-examples-ap-southeast-1
117
- ap-northeast-1:
118
- Examples: https://s3-ap-northeast-1.amazonaws.com/cloudformation-examples-ap-northeast-1
119
- ap-northeast-2:
120
- Examples: https://s3-ap-northeast-2.amazonaws.com/cloudformation-examples-ap-northeast-2
121
- ap-northeast-3:
122
- Examples: https://s3-ap-northeast-3.amazonaws.com/cloudformation-examples-ap-northeast-3
123
- ap-southeast-2:
124
- Examples: https://s3-ap-southeast-2.amazonaws.com/cloudformation-examples-ap-southeast-2
125
- ap-south-1:
126
- Examples: https://s3-ap-south-1.amazonaws.com/cloudformation-examples-ap-south-1
127
- us-east-2:
128
- Examples: https://s3-us-east-2.amazonaws.com/cloudformation-examples-us-east-2
129
- ca-central-1:
130
- Examples: https://s3-ca-central-1.amazonaws.com/cloudformation-examples-ca-central-1
131
- sa-east-1:
132
- Examples: https://s3-sa-east-1.amazonaws.com/cloudformation-examples-sa-east-1
133
- cn-north-1:
134
- Examples: https://s3.cn-north-1.amazonaws.com.cn/cloudformation-examples-cn-north-1
135
- cn-northwest-1:
136
- Examples: https://s3.cn-northwest-1.amazonaws.com.cn/cloudformation-examples-cn-northwest-1
137
- AWSInstanceType2Arch:
138
- t1.micro:
139
- Arch: PV64
140
- t2.nano:
141
- Arch: HVM64
142
- t2.micro:
143
- Arch: HVM64
144
- t2.small:
145
- Arch: HVM64
146
- t2.medium:
147
- Arch: HVM64
148
- t2.large:
149
- Arch: HVM64
150
- m1.small:
151
- Arch: PV64
152
- m1.medium:
153
- Arch: PV64
154
- m1.large:
155
- Arch: PV64
156
- m1.xlarge:
157
- Arch: PV64
158
- m2.xlarge:
159
- Arch: PV64
160
- m2.2xlarge:
161
- Arch: PV64
162
- m2.4xlarge:
163
- Arch: PV64
164
- m3.medium:
165
- Arch: HVM64
166
- m3.large:
167
- Arch: HVM64
168
- m3.xlarge:
169
- Arch: HVM64
170
- m3.2xlarge:
171
- Arch: HVM64
172
- m4.large:
173
- Arch: HVM64
174
- m4.xlarge:
175
- Arch: HVM64
176
- m4.2xlarge:
177
- Arch: HVM64
178
- m4.4xlarge:
179
- Arch: HVM64
180
- m4.10xlarge:
181
- Arch: HVM64
182
- c1.medium:
183
- Arch: PV64
184
- c1.xlarge:
185
- Arch: PV64
186
- c3.large:
187
- Arch: HVM64
188
- c3.xlarge:
189
- Arch: HVM64
190
- c3.2xlarge:
191
- Arch: HVM64
192
- c3.4xlarge:
193
- Arch: HVM64
194
- c3.8xlarge:
195
- Arch: HVM64
196
- c4.large:
197
- Arch: HVM64
198
- c4.xlarge:
199
- Arch: HVM64
200
- c4.2xlarge:
201
- Arch: HVM64
202
- c4.4xlarge:
203
- Arch: HVM64
204
- c4.8xlarge:
205
- Arch: HVM64
206
- g2.2xlarge:
207
- Arch: HVMG2
208
- g2.8xlarge:
209
- Arch: HVMG2
210
- r3.large:
211
- Arch: HVM64
212
- r3.xlarge:
213
- Arch: HVM64
214
- r3.2xlarge:
215
- Arch: HVM64
216
- r3.4xlarge:
217
- Arch: HVM64
218
- r3.8xlarge:
219
- Arch: HVM64
220
- i2.xlarge:
221
- Arch: HVM64
222
- i2.2xlarge:
223
- Arch: HVM64
224
- i2.4xlarge:
225
- Arch: HVM64
226
- i2.8xlarge:
227
- Arch: HVM64
228
- d2.xlarge:
229
- Arch: HVM64
230
- d2.2xlarge:
231
- Arch: HVM64
232
- d2.4xlarge:
233
- Arch: HVM64
234
- d2.8xlarge:
235
- Arch: HVM64
236
- hi1.4xlarge:
237
- Arch: HVM64
238
- hs1.8xlarge:
239
- Arch: HVM64
240
- cr1.8xlarge:
241
- Arch: HVM64
242
- cc2.8xlarge:
243
- Arch: HVM64
244
- AWSInstanceType2NATArch:
245
- t1.micro:
246
- Arch: NATPV64
247
- t2.nano:
248
- Arch: NATHVM64
249
- t2.micro:
250
- Arch: NATHVM64
251
- t2.small:
252
- Arch: NATHVM64
253
- t2.medium:
254
- Arch: NATHVM64
255
- t2.large:
256
- Arch: NATHVM64
257
- m1.small:
258
- Arch: NATPV64
259
- m1.medium:
260
- Arch: NATPV64
261
- m1.large:
262
- Arch: NATPV64
263
- m1.xlarge:
264
- Arch: NATPV64
265
- m2.xlarge:
266
- Arch: NATPV64
267
- m2.2xlarge:
268
- Arch: NATPV64
269
- m2.4xlarge:
270
- Arch: NATPV64
271
- m3.medium:
272
- Arch: NATHVM64
273
- m3.large:
274
- Arch: NATHVM64
275
- m3.xlarge:
276
- Arch: NATHVM64
277
- m3.2xlarge:
278
- Arch: NATHVM64
279
- m4.large:
280
- Arch: NATHVM64
281
- m4.xlarge:
282
- Arch: NATHVM64
283
- m4.2xlarge:
284
- Arch: NATHVM64
285
- m4.4xlarge:
286
- Arch: NATHVM64
287
- m4.10xlarge:
288
- Arch: NATHVM64
289
- c1.medium:
290
- Arch: NATPV64
291
- c1.xlarge:
292
- Arch: NATPV64
293
- c3.large:
294
- Arch: NATHVM64
295
- c3.xlarge:
296
- Arch: NATHVM64
297
- c3.2xlarge:
298
- Arch: NATHVM64
299
- c3.4xlarge:
300
- Arch: NATHVM64
301
- c3.8xlarge:
302
- Arch: NATHVM64
303
- c4.large:
304
- Arch: NATHVM64
305
- c4.xlarge:
306
- Arch: NATHVM64
307
- c4.2xlarge:
308
- Arch: NATHVM64
309
- c4.4xlarge:
310
- Arch: NATHVM64
311
- c4.8xlarge:
312
- Arch: NATHVM64
313
- g2.2xlarge:
314
- Arch: NATHVMG2
315
- g2.8xlarge:
316
- Arch: NATHVMG2
317
- r3.large:
318
- Arch: NATHVM64
319
- r3.xlarge:
320
- Arch: NATHVM64
321
- r3.2xlarge:
322
- Arch: NATHVM64
323
- r3.4xlarge:
324
- Arch: NATHVM64
325
- r3.8xlarge:
326
- Arch: NATHVM64
327
- i2.xlarge:
328
- Arch: NATHVM64
329
- i2.2xlarge:
330
- Arch: NATHVM64
331
- i2.4xlarge:
332
- Arch: NATHVM64
333
- i2.8xlarge:
334
- Arch: NATHVM64
335
- d2.xlarge:
336
- Arch: NATHVM64
337
- d2.2xlarge:
338
- Arch: NATHVM64
339
- d2.4xlarge:
340
- Arch: NATHVM64
341
- d2.8xlarge:
342
- Arch: NATHVM64
343
- hi1.4xlarge:
344
- Arch: NATHVM64
345
- hs1.8xlarge:
346
- Arch: NATHVM64
347
- cr1.8xlarge:
348
- Arch: NATHVM64
349
- cc2.8xlarge:
350
- Arch: NATHVM64
351
- AWSRegionArch2AMI:
352
- us-east-1:
353
- PV64: ami-2a69aa47
354
- HVM64: ami-6869aa05
355
- HVMG2: ami-0a6e3770
356
- us-west-2:
357
- PV64: ami-7f77b31f
358
- HVM64: ami-7172b611
359
- HVMG2: ami-ee15a196
360
- us-west-1:
361
- PV64: ami-a2490dc2
362
- HVM64: ami-31490d51
363
- HVMG2: ami-0da4a46d
364
- eu-west-1:
365
- PV64: ami-4cdd453f
366
- HVM64: ami-f9dd458a
367
- HVMG2: ami-af8013d6
368
- eu-west-2:
369
- PV64: NOT_SUPPORTED
370
- HVM64: ami-886369ec
371
- HVMG2: NOT_SUPPORTED
372
- eu-west-3:
373
- PV64: NOT_SUPPORTED
374
- HVM64: NOT_SUPPORTED
375
- HVMG2: NOT_SUPPORTED
376
- eu-central-1:
377
- PV64: ami-6527cf0a
378
- HVM64: ami-ea26ce85
379
- HVMG2: ami-1d58ca72
380
- ap-northeast-1:
381
- PV64: ami-3e42b65f
382
- HVM64: ami-374db956
383
- HVMG2: ami-edfd658b
384
- ap-northeast-2:
385
- PV64: NOT_SUPPORTED
386
- HVM64: ami-2b408b45
387
- HVMG2: NOT_SUPPORTED
388
- ap-northeast-3:
389
- PV64: NOT_SUPPORTED
390
- HVM64: NOT_SUPPORTED
391
- HVMG2: NOT_SUPPORTED
392
- ap-southeast-1:
393
- PV64: ami-df9e4cbc
394
- HVM64: ami-a59b49c6
395
- HVMG2: ami-c06013bc
396
- ap-southeast-2:
397
- PV64: ami-63351d00
398
- HVM64: ami-dc361ebf
399
- HVMG2: ami-85ef12e7
400
- ap-south-1:
401
- PV64: NOT_SUPPORTED
402
- HVM64: ami-ffbdd790
403
- HVMG2: ami-411e492e
404
- us-east-2:
405
- PV64: NOT_SUPPORTED
406
- HVM64: ami-f6035893
407
- HVMG2: NOT_SUPPORTED
408
- ca-central-1:
409
- PV64: NOT_SUPPORTED
410
- HVM64: ami-730ebd17
411
- HVMG2: NOT_SUPPORTED
412
- sa-east-1:
413
- PV64: ami-1ad34676
414
- HVM64: ami-6dd04501
415
- HVMG2: NOT_SUPPORTED
416
- cn-north-1:
417
- PV64: ami-77559f1a
418
- HVM64: ami-8e6aa0e3
419
- HVMG2: NOT_SUPPORTED
420
- cn-northwest-1:
421
- PV64: ami-80707be2
422
- HVM64: ami-cb858fa9
423
- HVMG2: NOT_SUPPORTED
424
- Resources:
425
- NotificationTopic:
426
- Type: AWS::SNS::Topic
427
- Properties:
428
- Subscription:
429
- - Endpoint:
430
- Ref: OperatorEMail
431
- Protocol: email
432
- WebServerGroup:
433
- Type: AWS::AutoScaling::AutoScalingGroup
434
- Properties:
435
- VPCZoneIdentifier:
436
- Ref: Subnets
437
- LaunchConfigurationName:
438
- Ref: LaunchConfig
439
- MinSize: '1'
440
- MaxSize: '3'
441
- TargetGroupARNs:
442
- - Ref: ALBTargetGroup
443
- NotificationConfiguration:
444
- TopicARN:
445
- Ref: NotificationTopic
446
- NotificationTypes:
447
- - autoscaling:EC2_INSTANCE_LAUNCH
448
- - autoscaling:EC2_INSTANCE_LAUNCH_ERROR
449
- - autoscaling:EC2_INSTANCE_TERMINATE
450
- - autoscaling:EC2_INSTANCE_TERMINATE_ERROR
451
- CreationPolicy:
452
- ResourceSignal:
453
- Timeout: PT15M
454
- Count: '1'
455
- UpdatePolicy:
456
- AutoScalingRollingUpdate:
457
- MinInstancesInService: '1'
458
- MaxBatchSize: '1'
459
- PauseTime: PT15M
460
- WaitOnResourceSignals: 'true'
461
- LaunchConfig:
462
- Type: AWS::AutoScaling::LaunchConfiguration
463
- Metadata:
464
- Comment: Install a simple application
465
- AWS::CloudFormation::Init:
466
- config:
467
- packages:
468
- yum:
469
- httpd: []
470
- files:
471
- "/var/www/html/index.html":
472
- content:
473
- Fn::Join:
474
- - "\n"
475
- - - <img src="
476
- - Fn::FindInMap:
477
- - Region2Examples
478
- - Ref: AWS::Region
479
- - Examples
480
- - /cloudformation_graphic.png" alt="AWS CloudFormation Logo"/>
481
- - "<h1>Congratulations, you have successfully launched the AWS CloudFormation
482
- sample.</h1>"
483
- mode: '000644'
484
- owner: root
485
- group: root
486
- "/etc/cfn/cfn-hup.conf":
487
- content:
488
- Fn::Join:
489
- - ''
490
- - - "[main]\n"
491
- - stack=
492
- - Ref: AWS::StackId
493
- - "\n"
494
- - region=
495
- - Ref: AWS::Region
496
- - "\n"
497
- mode: '000400'
498
- owner: root
499
- group: root
500
- "/etc/cfn/hooks.d/cfn-auto-reloader.conf":
501
- content:
502
- Fn::Join:
503
- - ''
504
- - - "[cfn-auto-reloader-hook]\n"
505
- - 'triggers=post.update
506
-
507
- '
508
- - 'path=Resources.LaunchConfig.Metadata.AWS::CloudFormation::Init
509
-
510
- '
511
- - 'action=/opt/aws/bin/cfn-init -v '
512
- - " --stack "
513
- - Ref: AWS::StackName
514
- - " --resource LaunchConfig "
515
- - " --region "
516
- - Ref: AWS::Region
517
- - "\n"
518
- - 'runas=root
519
-
520
- '
521
- mode: '000400'
522
- owner: root
523
- group: root
524
- services:
525
- sysvinit:
526
- httpd:
527
- enabled: 'true'
528
- ensureRunning: 'true'
529
- cfn-hup:
530
- enabled: 'true'
531
- ensureRunning: 'true'
532
- files:
533
- - "/etc/cfn/cfn-hup.conf"
534
- - "/etc/cfn/hooks.d/cfn-auto-reloader.conf"
535
- Properties:
536
- KeyName:
537
- Ref: KeyName
538
- ImageId:
539
- Fn::FindInMap:
540
- - AWSRegionArch2AMI
541
- - Ref: AWS::Region
542
- - Fn::FindInMap:
543
- - AWSInstanceType2Arch
544
- - Ref: InstanceType
545
- - Arch
546
- SecurityGroups:
547
- - Ref: InstanceSecurityGroup
548
- InstanceType:
549
- Ref: InstanceType
550
- UserData:
551
- Fn::Base64:
552
- Fn::Join:
553
- - ''
554
- - - "#!/bin/bash -xe\n"
555
- - 'yum update -y aws-cfn-bootstrap
556
-
557
- '
558
- - 'yum update -y aws-cli
559
-
560
- '
561
- - "/opt/aws/bin/cfn-init -v "
562
- - " --stack "
563
- - Ref: AWS::StackName
564
- - " --resource LaunchConfig "
565
- - " --region "
566
- - Ref: AWS::Region
567
- - "\n"
568
- - "/opt/aws/bin/cfn-signal -e $? "
569
- - " --stack "
570
- - Ref: AWS::StackName
571
- - " --resource WebServerGroup "
572
- - " --region "
573
- - Ref: AWS::Region
574
- - "\n"
575
- WebServerScaleUpPolicy:
576
- Type: AWS::AutoScaling::ScalingPolicy
577
- Properties:
578
- AdjustmentType: ChangeInCapacity
579
- AutoScalingGroupName:
580
- Ref: WebServerGroup
581
- Cooldown: '60'
582
- ScalingAdjustment: '1'
583
- WebServerScaleDownPolicy:
584
- Type: AWS::AutoScaling::ScalingPolicy
585
- Properties:
586
- AdjustmentType: ChangeInCapacity
587
- AutoScalingGroupName:
588
- Ref: WebServerGroup
589
- Cooldown: '60'
590
- ScalingAdjustment: "-1"
591
- CPUAlarmHigh:
592
- Type: AWS::CloudWatch::Alarm
593
- Properties:
594
- AlarmDescription: Scale-up if CPU > 90% for 10 minutes
595
- MetricName: CPUUtilization
596
- Namespace: AWS/EC2
597
- Statistic: Average
598
- Period: '300'
599
- EvaluationPeriods: '2'
600
- Threshold: '90'
601
- AlarmActions:
602
- - Ref: WebServerScaleUpPolicy
603
- Dimensions:
604
- - Name: AutoScalingGroupName
605
- Value:
606
- Ref: WebServerGroup
607
- ComparisonOperator: GreaterThanThreshold
608
- CPUAlarmLow:
609
- Type: AWS::CloudWatch::Alarm
610
- Properties:
611
- AlarmDescription: Scale-down if CPU < 70% for 10 minutes
612
- MetricName: CPUUtilization
613
- Namespace: AWS/EC2
614
- Statistic: Average
615
- Period: '300'
616
- EvaluationPeriods: '2'
617
- Threshold: '70'
618
- AlarmActions:
619
- - Ref: WebServerScaleDownPolicy
620
- Dimensions:
621
- - Name: AutoScalingGroupName
622
- Value:
623
- Ref: WebServerGroup
624
- ComparisonOperator: LessThanThreshold
625
- ApplicationLoadBalancer:
626
- Type: AWS::ElasticLoadBalancingV2::LoadBalancer
627
- Properties:
628
- Subnets:
629
- Ref: Subnets
630
- ALBListener:
631
- Type: AWS::ElasticLoadBalancingV2::Listener
632
- Properties:
633
- DefaultActions:
634
- - Type: forward
635
- TargetGroupArn:
636
- Ref: ALBTargetGroup
637
- LoadBalancerArn:
638
- Ref: ApplicationLoadBalancer
639
- Port: '80'
640
- Protocol: HTTP
641
- ALBTargetGroup:
642
- Type: AWS::ElasticLoadBalancingV2::TargetGroup
643
- Properties:
644
- HealthCheckIntervalSeconds: 30
645
- HealthCheckTimeoutSeconds: 5
646
- HealthyThresholdCount: 3
647
- Port: 80
648
- Protocol: HTTP
649
- UnhealthyThresholdCount: 5
650
- VpcId:
651
- Ref: VpcId
652
- InstanceSecurityGroup:
653
- Type: AWS::EC2::SecurityGroup
654
- Properties:
655
- GroupDescription: Enable SSH access and HTTP from the load balancer only
656
- SecurityGroupIngress:
657
- - IpProtocol: tcp
658
- FromPort: '22'
659
- ToPort: '22'
660
- CidrIp:
661
- Ref: SSHLocation
662
- - IpProtocol: tcp
663
- FromPort: '80'
664
- ToPort: '80'
665
- SourceSecurityGroupId:
666
- Fn::Select:
667
- - 0
668
- - Fn::GetAtt:
669
- - ApplicationLoadBalancer
670
- - SecurityGroups
671
- VpcId:
672
- Ref: VpcId
673
- Outputs:
674
- URL:
675
- Description: The URL of the website
676
- Value:
677
- Fn::Join:
678
- - ''
679
- - - http://
680
- - Fn::GetAtt:
681
- - ApplicationLoadBalancer
682
- - DNSName