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.
- checksums.yaml +4 -4
- data/.cody/README.md +6 -0
- data/.cody/acceptance.sh +30 -0
- data/.cody/buildspec.yml +21 -0
- data/.cody/demo.rb +38 -0
- data/.cody/project.rb +12 -0
- data/.cody/role.rb +1 -0
- data/.gitignore +2 -0
- data/.gitmodules +6 -3
- data/.travis.yml +7 -0
- data/CHANGELOG.md +10 -0
- data/Gemfile +0 -1
- data/LICENSE.txt +1 -22
- data/README.md +46 -55
- data/lib/lono.rb +20 -27
- data/lib/lono/app_file.rb +5 -0
- data/lib/lono/app_file/base.rb +19 -0
- data/lib/lono/app_file/build.rb +78 -0
- data/lib/lono/app_file/registry.rb +14 -0
- data/lib/lono/app_file/registry/item.rb +46 -0
- data/lib/lono/app_file/upload.rb +39 -0
- data/lib/lono/autoloader.rb +22 -0
- data/lib/lono/aws_services.rb +46 -0
- data/lib/lono/aws_services/util.rb +49 -0
- data/lib/lono/blueprint.rb +113 -0
- data/lib/lono/blueprint/find.rb +90 -0
- data/lib/lono/blueprint/helper.rb +18 -0
- data/lib/lono/blueprint/info.rb +10 -0
- data/lib/lono/blueprint/list.rb +14 -0
- data/lib/lono/blueprint/root.rb +43 -0
- data/lib/lono/cfn.rb +31 -19
- data/lib/lono/cfn/aws_service.rb +16 -0
- data/lib/lono/cfn/base.rb +244 -261
- data/lib/lono/cfn/create.rb +36 -32
- data/lib/lono/cfn/current.rb +1 -1
- data/lib/lono/cfn/delete.rb +2 -2
- data/lib/lono/cfn/deploy.rb +11 -0
- data/lib/lono/cfn/diff.rb +1 -1
- data/lib/lono/cfn/preview.rb +3 -3
- data/lib/lono/cfn/rollback.rb +26 -0
- data/lib/lono/cfn/status.rb +2 -203
- data/lib/lono/cfn/suffix.rb +67 -0
- data/lib/lono/cfn/update.rb +61 -53
- data/lib/lono/cli.rb +42 -23
- data/lib/lono/completer.rb +0 -2
- data/lib/lono/configure.rb +37 -0
- data/lib/lono/configure/aws_services.rb +18 -0
- data/lib/lono/configure/base.rb +94 -0
- data/lib/lono/configure/helpers.rb +128 -0
- data/lib/lono/conventions.rb +11 -0
- data/lib/lono/core.rb +42 -12
- data/lib/lono/core/config.rb +5 -4
- data/lib/lono/default/settings.yml +0 -11
- data/lib/lono/file_uploader.rb +9 -4
- data/lib/lono/help.rb +1 -2
- data/lib/lono/help/blueprint.md +46 -0
- data/lib/lono/help/cfn.md +5 -4
- data/lib/lono/help/cfn/create.md +14 -9
- data/lib/lono/help/cfn/deploy.md +92 -0
- data/lib/lono/help/cfn/diff.md +0 -1
- data/lib/lono/help/cfn/update.md +16 -15
- data/lib/lono/help/completion.md +3 -3
- data/lib/lono/help/generate.md +0 -1
- data/lib/lono/help/new.md +40 -34
- data/lib/lono/help/param.md +1 -1
- data/lib/lono/help/param/generate.md +1 -1
- data/lib/lono/help/template.md +2 -2
- data/lib/lono/help/xgraph.md +1 -1
- data/lib/lono/inspector.rb +1 -1
- data/lib/lono/inspector/base.rb +26 -10
- data/lib/lono/inspector/graph.rb +7 -3
- data/lib/lono/inspector/summary.rb +15 -3
- data/lib/lono/md5.rb +46 -0
- data/lib/lono/new.rb +40 -28
- data/lib/lono/new/helper.rb +2 -3
- data/lib/lono/param.rb +12 -11
- data/lib/lono/param/generator.rb +96 -42
- data/lib/lono/project_checker.rb +27 -8
- data/lib/lono/s3.rb +23 -0
- data/lib/lono/s3/bucket.rb +123 -0
- data/lib/lono/script.rb +4 -8
- data/lib/lono/script/base.rb +7 -2
- data/lib/lono/script/build.rb +7 -8
- data/lib/lono/script/upload.rb +4 -20
- data/lib/lono/sequence.rb +19 -16
- data/lib/lono/setting.rb +19 -27
- data/lib/lono/template.rb +22 -26
- data/lib/lono/template/base.rb +13 -0
- data/lib/lono/template/context.rb +4 -56
- data/lib/lono/template/context/loader.rb +70 -0
- data/lib/lono/template/dsl.rb +15 -151
- data/lib/lono/template/dsl/builder.rb +60 -0
- data/lib/lono/template/dsl/builder/base.rb +14 -0
- data/lib/lono/template/dsl/builder/condition.rb +26 -0
- data/lib/lono/template/dsl/builder/fn.rb +114 -0
- data/lib/lono/template/dsl/builder/helper.rb +64 -0
- data/lib/lono/template/dsl/builder/mapping.rb +24 -0
- data/lib/lono/template/dsl/builder/output.rb +37 -0
- data/lib/lono/template/dsl/builder/parameter.rb +39 -0
- data/lib/lono/template/dsl/builder/resource.rb +38 -0
- data/lib/lono/template/dsl/builder/section.rb +12 -0
- data/lib/lono/template/dsl/builder/syntax.rb +58 -0
- data/lib/lono/template/erb.rb +82 -0
- data/lib/lono/template/evaluate.rb +39 -0
- data/lib/lono/template/generator.rb +29 -0
- data/lib/lono/template/helper.rb +7 -29
- data/lib/lono/template/post_processor.rb +69 -0
- data/lib/lono/template/template.rb +4 -9
- data/lib/lono/template/upload.rb +103 -133
- data/lib/lono/template/util.rb +48 -0
- data/lib/lono/upgrade.rb +5 -3
- data/lib/lono/upgrade/upgrade5.rb +55 -0
- data/lib/lono/user_data.rb +4 -4
- data/lib/lono/version.rb +1 -1
- data/lib/templates/blueprint/%blueprint_name%.gemspec.tt +44 -0
- data/lib/templates/blueprint/.gitignore +14 -0
- data/lib/templates/blueprint/.lono/config.yml.tt +3 -0
- data/lib/templates/blueprint/.meta/config.yml.tt +3 -0
- data/lib/templates/blueprint/CHANGELOG.md +7 -0
- data/lib/templates/blueprint/Gemfile +4 -0
- data/lib/templates/blueprint/README.md +37 -0
- data/lib/templates/blueprint/Rakefile +6 -0
- data/lib/templates/blueprint/setup/configs.rb +54 -0
- data/lib/templates/blueprint_configs/configs/%blueprint_name%/params/base.txt +2 -0
- data/lib/{starter_projects/skeleton/app/definitions/base.rb → templates/blueprint_configs/configs/%blueprint_name%/params/development.txt} +0 -0
- data/lib/templates/blueprint_configs/configs/%blueprint_name%/variables/base.rb +2 -0
- data/lib/templates/blueprint_configs/configs/%blueprint_name%/variables/development.rb +0 -0
- data/lib/templates/blueprint_types/dsl/app/templates/%blueprint_name%.rb +37 -0
- data/lib/templates/blueprint_types/dsl/app/user_data/bootstrap.sh +2 -0
- data/lib/templates/blueprint_types/erb/app/definitions/base.rb.tt +1 -0
- data/lib/templates/blueprint_types/erb/app/templates/%blueprint_name%.yml +8 -0
- data/lib/{starter_projects/autoscaling → templates/skeleton}/.gitignore +1 -0
- data/lib/templates/skeleton/Gemfile +3 -0
- data/lib/{starter_projects/autoscaling → templates/skeleton}/Guardfile +2 -2
- data/lib/templates/skeleton/README.md +58 -0
- data/lib/templates/skeleton/configs/settings.yml +17 -0
- data/lib/templates/upgrade5/blueprints/main/.lono/config.yml +3 -0
- data/lib/templates/upgrade5/blueprints/main/.meta/config.yml +3 -0
- data/lono.gemspec +12 -8
- data/vendor/cfn-status/CHANGELOG.md +10 -0
- data/vendor/cfn-status/Gemfile +4 -0
- data/vendor/cfn-status/LICENSE.txt +21 -0
- data/vendor/cfn-status/README.md +56 -0
- data/vendor/cfn-status/Rakefile +6 -0
- data/vendor/cfn-status/bin/console +14 -0
- data/vendor/cfn-status/bin/setup +8 -0
- data/vendor/cfn-status/cfn-status.gemspec +30 -0
- data/vendor/cfn-status/lib/cfn-status.rb +1 -0
- data/vendor/cfn-status/lib/cfn/aws_service.rb +51 -0
- data/vendor/cfn-status/lib/cfn/status.rb +219 -0
- data/vendor/cfn-status/lib/cfn/status/version.rb +5 -0
- data/vendor/cfn-status/spec/cfn/status_spec.rb +81 -0
- data/vendor/cfn-status/spec/fixtures/cfn/stack-events-complete.json +1080 -0
- data/vendor/cfn-status/spec/fixtures/cfn/stack-events-in-progress.json +1080 -0
- data/vendor/cfn-status/spec/fixtures/cfn/stack-events-update-rollback-complete.json +1086 -0
- data/vendor/cfn-status/spec/spec_helper.rb +14 -0
- data/vendor/cfn_camelizer/CHANGELOG.md +20 -0
- data/vendor/cfn_camelizer/Gemfile +4 -0
- data/vendor/cfn_camelizer/LICENSE.txt +21 -0
- data/vendor/cfn_camelizer/README.md +40 -0
- data/vendor/cfn_camelizer/Rakefile +6 -0
- data/vendor/cfn_camelizer/bin/console +14 -0
- data/vendor/cfn_camelizer/bin/setup +8 -0
- data/vendor/cfn_camelizer/cfn_camelizer.gemspec +32 -0
- data/vendor/cfn_camelizer/lib/camelizer.yml +37 -0
- data/vendor/cfn_camelizer/lib/cfn_camelizer.rb +94 -0
- data/vendor/cfn_camelizer/lib/cfn_camelizer/version.rb +3 -0
- data/vendor/cfn_camelizer/spec/cfn_camelizer_spec.rb +86 -0
- data/vendor/cfn_camelizer/spec/spec_helper.rb +14 -0
- metadata +189 -62
- data/.circleci/bin/commit_docs.sh +0 -26
- data/.circleci/config.yml +0 -72
- data/bin/release +0 -9
- data/lib/lono/help/import.md +0 -54
- data/lib/lono/importer.rb +0 -134
- data/lib/lono/new/message.rb +0 -35
- data/lib/starter_projects/autoscaling/Gemfile +0 -3
- data/lib/starter_projects/autoscaling/README.md +0 -118
- data/lib/starter_projects/autoscaling/app/definitions/base.rb +0 -2
- data/lib/starter_projects/autoscaling/app/templates/autoscaling.yml +0 -682
- data/lib/starter_projects/autoscaling/config/params/base/autoscaling.txt +0 -6
- data/lib/starter_projects/autoscaling/config/settings.yml +0 -33
- data/lib/starter_projects/ec2/.gitignore +0 -2
- data/lib/starter_projects/ec2/Gemfile +0 -3
- data/lib/starter_projects/ec2/Guardfile +0 -12
- data/lib/starter_projects/ec2/README.md +0 -86
- data/lib/starter_projects/ec2/app/definitions/base.rb +0 -2
- data/lib/starter_projects/ec2/app/definitions/development.rb +0 -1
- data/lib/starter_projects/ec2/app/definitions/production.rb +0 -1
- data/lib/starter_projects/ec2/app/helpers/my_custom_helper.rb +0 -17
- data/lib/starter_projects/ec2/app/partials/user_data/bootstrap.sh +0 -4
- data/lib/starter_projects/ec2/app/templates/example.yml +0 -430
- data/lib/starter_projects/ec2/config/params/base/example.txt +0 -2
- data/lib/starter_projects/ec2/config/params/development/example.txt +0 -3
- data/lib/starter_projects/ec2/config/params/production/example.txt +0 -2
- data/lib/starter_projects/ec2/config/settings.yml +0 -33
- data/lib/starter_projects/ec2/config/variables/base.rb +0 -3
- data/lib/starter_projects/ec2/config/variables/development.rb +0 -2
- data/lib/starter_projects/ec2/config/variables/production.rb +0 -2
- data/lib/starter_projects/ec2/welcome.txt +0 -8
- data/lib/starter_projects/skeleton/.gitignore +0 -2
- data/lib/starter_projects/skeleton/Gemfile +0 -3
- data/lib/starter_projects/skeleton/Guardfile +0 -12
- data/lib/starter_projects/skeleton/README.md +0 -53
- data/lib/starter_projects/skeleton/config/settings.yml +0 -33
- data/lib/starter_projects/skeleton/welcome.txt +0 -7
- data/vendor/plissken/Gemfile +0 -14
- data/vendor/plissken/LICENSE.txt +0 -20
- data/vendor/plissken/README.md +0 -46
- data/vendor/plissken/Rakefile +0 -56
- data/vendor/plissken/VERSION +0 -1
- data/vendor/plissken/lib/plissken.rb +0 -1
- data/vendor/plissken/lib/plissken/ext/hash/to_snake_keys.rb +0 -45
- data/vendor/plissken/plissken.gemspec +0 -61
- data/vendor/plissken/spec/lib/to_snake_keys_spec.rb +0 -177
- data/vendor/plissken/spec/spec_helper.rb +0 -90
- data/vendor/plissken/test/helper.rb +0 -20
- data/vendor/plissken/test/plissken/ext/hash/to_snake_keys_test.rb +0 -184
- data/vendor/plissken/test/test_plissken.rb +0 -2
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
# More info: http://lono.cloud/docs/settings/
|
|
2
|
-
# The base config is specially treated. It gets included the other environments automatically.
|
|
3
|
-
# Yaml also directly supports merging with & and <<* syntax but doing it automatically
|
|
4
|
-
# for a cleaner syntax.
|
|
5
|
-
base:
|
|
6
|
-
# http://lono.cloud/docs/app-scripts/
|
|
7
|
-
# extract_scripts:
|
|
8
|
-
# to: "/opt"
|
|
9
|
-
# as: "ec2-user"
|
|
10
|
-
# If s3_folder is set then the generated templates and app/scripts will automatically
|
|
11
|
-
# be uploaded to s3.
|
|
12
|
-
# There are 2 formats for s3_folder:
|
|
13
|
-
# Format 1:
|
|
14
|
-
# s3_folder: mybucket/path/to/folder # simple string
|
|
15
|
-
# Format 2:
|
|
16
|
-
# s3_folder: # Hash options in order to support multiple AWS_PROFILEs
|
|
17
|
-
# default: mybucket/folder
|
|
18
|
-
# aws_profile1: mybucket/folder
|
|
19
|
-
# aws_profile2: another-bucket/storage/folder
|
|
20
|
-
# stack_name_suffix: random # tack on a 3 char random string at the end of the stack name for lono cfn create
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
development:
|
|
24
|
-
# When you have AWS_PROFILE set to one of these values, lono will switch to the desired
|
|
25
|
-
# environment. This prevents you from switching AWS_PROFILE, forgetting to
|
|
26
|
-
# also switch LONO_ENV, and accidentally deploying to production vs development.
|
|
27
|
-
# aws_profiles:
|
|
28
|
-
# - dev_profile1
|
|
29
|
-
# - dev_profile2
|
|
30
|
-
|
|
31
|
-
production:
|
|
32
|
-
# aws_profiles:
|
|
33
|
-
# - prod_profile
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
# A sample Guardfile
|
|
2
|
-
# More info at https://github.com/guard/guard#readme
|
|
3
|
-
|
|
4
|
-
guard "lono" do
|
|
5
|
-
watch(%r{^config/lono.rb$})
|
|
6
|
-
watch(%r{^templates/.*$})
|
|
7
|
-
end
|
|
8
|
-
|
|
9
|
-
# Commented out due to CF rate limiting
|
|
10
|
-
# guard "cloudformation", templates_path: "output" do
|
|
11
|
-
# watch(%r{^output/.+\.yml$})
|
|
12
|
-
# end
|
|
@@ -1,86 +0,0 @@
|
|
|
1
|
-
# Autoscaling Lono Example
|
|
2
|
-
|
|
3
|
-
## Usage
|
|
4
|
-
|
|
5
|
-
Create a new project.
|
|
6
|
-
|
|
7
|
-
```
|
|
8
|
-
TEMPLATE=ec2 lono new ec2
|
|
9
|
-
cd ec2
|
|
10
|
-
```
|
|
11
|
-
|
|
12
|
-
Edit `config/params/base/ec2.txt` with your desired parameters. Here are the current contents of ``config/params/base/ec2.txt`:
|
|
13
|
-
|
|
14
|
-
```sh
|
|
15
|
-
InstanceType=t2.micro
|
|
16
|
-
KeyName=default
|
|
17
|
-
```
|
|
18
|
-
|
|
19
|
-
Then launch the stack:
|
|
20
|
-
|
|
21
|
-
```sh
|
|
22
|
-
lono cfn create ec2
|
|
23
|
-
```
|
|
24
|
-
|
|
25
|
-
## How This Example Was Orginally Built
|
|
26
|
-
|
|
27
|
-
First, generate a skeleton starter lono project.
|
|
28
|
-
|
|
29
|
-
```sh
|
|
30
|
-
TEMPLATE=skeleton lono new ec2
|
|
31
|
-
```
|
|
32
|
-
|
|
33
|
-
Then import a standard CloudFormation template into lono. The `--name` option is used to name the template `ec2`.
|
|
34
|
-
|
|
35
|
-
```
|
|
36
|
-
$ lono import https://s3-us-west-2.amazonaws.com/cloudformation-templates-us-west-2/EC2InstanceWithSecurityGroupSample.template --name ec2
|
|
37
|
-
=> Imported CloudFormation template and lono-fied it.
|
|
38
|
-
Template definition added to app/definitions/base.rb
|
|
39
|
-
Params file created to config/params/base/ec2.txt
|
|
40
|
-
Template downloaded to app/templates/ec2.yml
|
|
41
|
-
=> CloudFormation Template Summary:
|
|
42
|
-
Parameters:
|
|
43
|
-
Required:
|
|
44
|
-
KeyName (AWS::EC2::KeyPair::KeyName)
|
|
45
|
-
Optional:
|
|
46
|
-
InstanceType (String) Default: t2.small
|
|
47
|
-
SSHLocation (String) Default: 0.0.0.0/0
|
|
48
|
-
Resources:
|
|
49
|
-
1 AWS::EC2::Instance
|
|
50
|
-
1 AWS::EC2::SecurityGroup
|
|
51
|
-
2 Total
|
|
52
|
-
Here are contents of the params config/params/base/ec2.txt file:
|
|
53
|
-
KeyName=
|
|
54
|
-
#InstanceType= # optional
|
|
55
|
-
#SSHLocation= # optional
|
|
56
|
-
```
|
|
57
|
-
|
|
58
|
-
The template was imported from [https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/sample-templates-services-us-west-2.html#w2ab2c23c48c13c15).
|
|
59
|
-
|
|
60
|
-
A starter `config/params/base/ec2.txt` was generated with required parameters emptied and optional parameters commented out. Fill in the required parameters.
|
|
61
|
-
|
|
62
|
-
### Filling in the Parameters
|
|
63
|
-
|
|
64
|
-
You can use the following commands to set KeyName to a key that exists on your AWS account. Here we use `default` :
|
|
65
|
-
|
|
66
|
-
```
|
|
67
|
-
sed "s/KeyName=/KeyName=default/" config/params/base/ec2.txt > config/params/base/ec2.txt.1
|
|
68
|
-
mv config/params/base/ec2.txt{.1,}
|
|
69
|
-
```
|
|
70
|
-
|
|
71
|
-
Now launch the stack:
|
|
72
|
-
|
|
73
|
-
```
|
|
74
|
-
lono cfn create ec2
|
|
75
|
-
```
|
|
76
|
-
|
|
77
|
-
## Commands Summarized
|
|
78
|
-
|
|
79
|
-
```sh
|
|
80
|
-
lono new ec2
|
|
81
|
-
cd ec2
|
|
82
|
-
lono import https://s3-us-west-2.amazonaws.com/cloudformation-templates-us-west-2/EC2InstanceWithSecurityGroupSample.template --name ec2
|
|
83
|
-
sed "s/KeyName=/KeyName=default/" config/params/base/ec2.txt > config/params/base/ec2.txt.1
|
|
84
|
-
mv config/params/base/ec2.txt{.1,}
|
|
85
|
-
lono cfn create ec2 --template ec2
|
|
86
|
-
```
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
# resources that only exist in the development environment
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
# resources that only exist in the production environment
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
# File must be name in underscore casing and the module name must be named in
|
|
2
|
-
# CamelizeCasing. The file must also end in _helper.rb by convention.
|
|
3
|
-
# More info http://lono.cloud/docs/helpers
|
|
4
|
-
# Custom Helpers are loaed into the same scope as built-in lono helpers and are
|
|
5
|
-
# treated a first class citizens. They have access to all the same methods
|
|
6
|
-
# and instance variable as the built-in lono helpers.
|
|
7
|
-
module MyCustomHelper
|
|
8
|
-
# This example helper method checks if the file path exists and fails gracefully
|
|
9
|
-
# the built-in partial fails hard.
|
|
10
|
-
def shared_partial(name, options={}, indent=0)
|
|
11
|
-
partial_name = "shared/#{name}.yml.erb"
|
|
12
|
-
if partial_exist?(partial_name) # partial_exist? is built-in lono helper
|
|
13
|
-
result << partial(partial_name, {}, indent: indent)
|
|
14
|
-
result.join("\n")
|
|
15
|
-
end
|
|
16
|
-
end
|
|
17
|
-
end
|
|
@@ -1,430 +0,0 @@
|
|
|
1
|
-
# http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/sample-templates-services-us-west-2.html#w1ab2c21c45c15c15
|
|
2
|
-
# Amazon EC2 instance in a security group Creates an Amazon EC2 instance in an Amazon EC2 security group.
|
|
3
|
-
---
|
|
4
|
-
AWSTemplateFormatVersion: '2010-09-09'
|
|
5
|
-
Description: 'AWS CloudFormation Sample Template EC2InstanceWithSecurityGroupSample:
|
|
6
|
-
Create an Amazon EC2 instance running the Amazon Linux AMI. The AMI is chosen based
|
|
7
|
-
on the region in which the stack is run. This example creates an EC2 security group
|
|
8
|
-
for the instance to give you SSH access. **WARNING** This template creates an Amazon
|
|
9
|
-
EC2 instance. You will be billed for the AWS resources used if you create a stack
|
|
10
|
-
from this template.'
|
|
11
|
-
Parameters:
|
|
12
|
-
KeyName:
|
|
13
|
-
Description: Name of an existing EC2 KeyPair to enable SSH access to the instance
|
|
14
|
-
Type: AWS::EC2::KeyPair::KeyName
|
|
15
|
-
ConstraintDescription: must be the name of an existing EC2 KeyPair.
|
|
16
|
-
InstanceType:
|
|
17
|
-
Description: WebServer EC2 instance type
|
|
18
|
-
Type: String
|
|
19
|
-
Default: t2.small
|
|
20
|
-
AllowedValues:
|
|
21
|
-
- t1.micro
|
|
22
|
-
- t2.nano
|
|
23
|
-
- t2.micro
|
|
24
|
-
- t2.small
|
|
25
|
-
- t2.medium
|
|
26
|
-
- t2.large
|
|
27
|
-
- m1.small
|
|
28
|
-
- m1.medium
|
|
29
|
-
- m1.large
|
|
30
|
-
- m1.xlarge
|
|
31
|
-
- m2.xlarge
|
|
32
|
-
- m2.2xlarge
|
|
33
|
-
- m2.4xlarge
|
|
34
|
-
- m3.medium
|
|
35
|
-
- m3.large
|
|
36
|
-
- m3.xlarge
|
|
37
|
-
- m3.2xlarge
|
|
38
|
-
- m4.large
|
|
39
|
-
- m4.xlarge
|
|
40
|
-
- m4.2xlarge
|
|
41
|
-
- m4.4xlarge
|
|
42
|
-
- m4.10xlarge
|
|
43
|
-
- c1.medium
|
|
44
|
-
- c1.xlarge
|
|
45
|
-
- c3.large
|
|
46
|
-
- c3.xlarge
|
|
47
|
-
- c3.2xlarge
|
|
48
|
-
- c3.4xlarge
|
|
49
|
-
- c3.8xlarge
|
|
50
|
-
- c4.large
|
|
51
|
-
- c4.xlarge
|
|
52
|
-
- c4.2xlarge
|
|
53
|
-
- c4.4xlarge
|
|
54
|
-
- c4.8xlarge
|
|
55
|
-
- g2.2xlarge
|
|
56
|
-
- g2.8xlarge
|
|
57
|
-
- r3.large
|
|
58
|
-
- r3.xlarge
|
|
59
|
-
- r3.2xlarge
|
|
60
|
-
- r3.4xlarge
|
|
61
|
-
- r3.8xlarge
|
|
62
|
-
- i2.xlarge
|
|
63
|
-
- i2.2xlarge
|
|
64
|
-
- i2.4xlarge
|
|
65
|
-
- i2.8xlarge
|
|
66
|
-
- d2.xlarge
|
|
67
|
-
- d2.2xlarge
|
|
68
|
-
- d2.4xlarge
|
|
69
|
-
- d2.8xlarge
|
|
70
|
-
- hi1.4xlarge
|
|
71
|
-
- hs1.8xlarge
|
|
72
|
-
- cr1.8xlarge
|
|
73
|
-
- cc2.8xlarge
|
|
74
|
-
- cg1.4xlarge
|
|
75
|
-
ConstraintDescription: must be a valid EC2 instance type.
|
|
76
|
-
SSHLocation:
|
|
77
|
-
Description: The IP address range that can be used to SSH to the EC2 instances
|
|
78
|
-
Type: String
|
|
79
|
-
MinLength: '9'
|
|
80
|
-
MaxLength: '18'
|
|
81
|
-
Default: 0.0.0.0/0
|
|
82
|
-
AllowedPattern: "(\\d{1,3})\\.(\\d{1,3})\\.(\\d{1,3})\\.(\\d{1,3})/(\\d{1,2})"
|
|
83
|
-
ConstraintDescription: must be a valid IP CIDR range of the form x.x.x.x/x.
|
|
84
|
-
<% if @route53 %>
|
|
85
|
-
HostedZoneName:
|
|
86
|
-
Description: The route53 HostedZoneName. For example, "mydomain.com." Don't forget the period at the end.
|
|
87
|
-
Type: String
|
|
88
|
-
Subdomain:
|
|
89
|
-
Description: The subdomain of the dns entry. For example, hello -> hello.mydomain.com, hello is the subdomain.
|
|
90
|
-
Type: String
|
|
91
|
-
<% end %>
|
|
92
|
-
Mappings:
|
|
93
|
-
AWSInstanceType2Arch:
|
|
94
|
-
t1.micro:
|
|
95
|
-
Arch: PV64
|
|
96
|
-
t2.nano:
|
|
97
|
-
Arch: HVM64
|
|
98
|
-
t2.micro:
|
|
99
|
-
Arch: HVM64
|
|
100
|
-
t2.small:
|
|
101
|
-
Arch: HVM64
|
|
102
|
-
t2.medium:
|
|
103
|
-
Arch: HVM64
|
|
104
|
-
t2.large:
|
|
105
|
-
Arch: HVM64
|
|
106
|
-
m1.small:
|
|
107
|
-
Arch: PV64
|
|
108
|
-
m1.medium:
|
|
109
|
-
Arch: PV64
|
|
110
|
-
m1.large:
|
|
111
|
-
Arch: PV64
|
|
112
|
-
m1.xlarge:
|
|
113
|
-
Arch: PV64
|
|
114
|
-
m2.xlarge:
|
|
115
|
-
Arch: PV64
|
|
116
|
-
m2.2xlarge:
|
|
117
|
-
Arch: PV64
|
|
118
|
-
m2.4xlarge:
|
|
119
|
-
Arch: PV64
|
|
120
|
-
m3.medium:
|
|
121
|
-
Arch: HVM64
|
|
122
|
-
m3.large:
|
|
123
|
-
Arch: HVM64
|
|
124
|
-
m3.xlarge:
|
|
125
|
-
Arch: HVM64
|
|
126
|
-
m3.2xlarge:
|
|
127
|
-
Arch: HVM64
|
|
128
|
-
m4.large:
|
|
129
|
-
Arch: HVM64
|
|
130
|
-
m4.xlarge:
|
|
131
|
-
Arch: HVM64
|
|
132
|
-
m4.2xlarge:
|
|
133
|
-
Arch: HVM64
|
|
134
|
-
m4.4xlarge:
|
|
135
|
-
Arch: HVM64
|
|
136
|
-
m4.10xlarge:
|
|
137
|
-
Arch: HVM64
|
|
138
|
-
c1.medium:
|
|
139
|
-
Arch: PV64
|
|
140
|
-
c1.xlarge:
|
|
141
|
-
Arch: PV64
|
|
142
|
-
c3.large:
|
|
143
|
-
Arch: HVM64
|
|
144
|
-
c3.xlarge:
|
|
145
|
-
Arch: HVM64
|
|
146
|
-
c3.2xlarge:
|
|
147
|
-
Arch: HVM64
|
|
148
|
-
c3.4xlarge:
|
|
149
|
-
Arch: HVM64
|
|
150
|
-
c3.8xlarge:
|
|
151
|
-
Arch: HVM64
|
|
152
|
-
c4.large:
|
|
153
|
-
Arch: HVM64
|
|
154
|
-
c4.xlarge:
|
|
155
|
-
Arch: HVM64
|
|
156
|
-
c4.2xlarge:
|
|
157
|
-
Arch: HVM64
|
|
158
|
-
c4.4xlarge:
|
|
159
|
-
Arch: HVM64
|
|
160
|
-
c4.8xlarge:
|
|
161
|
-
Arch: HVM64
|
|
162
|
-
g2.2xlarge:
|
|
163
|
-
Arch: HVMG2
|
|
164
|
-
g2.8xlarge:
|
|
165
|
-
Arch: HVMG2
|
|
166
|
-
r3.large:
|
|
167
|
-
Arch: HVM64
|
|
168
|
-
r3.xlarge:
|
|
169
|
-
Arch: HVM64
|
|
170
|
-
r3.2xlarge:
|
|
171
|
-
Arch: HVM64
|
|
172
|
-
r3.4xlarge:
|
|
173
|
-
Arch: HVM64
|
|
174
|
-
r3.8xlarge:
|
|
175
|
-
Arch: HVM64
|
|
176
|
-
i2.xlarge:
|
|
177
|
-
Arch: HVM64
|
|
178
|
-
i2.2xlarge:
|
|
179
|
-
Arch: HVM64
|
|
180
|
-
i2.4xlarge:
|
|
181
|
-
Arch: HVM64
|
|
182
|
-
i2.8xlarge:
|
|
183
|
-
Arch: HVM64
|
|
184
|
-
d2.xlarge:
|
|
185
|
-
Arch: HVM64
|
|
186
|
-
d2.2xlarge:
|
|
187
|
-
Arch: HVM64
|
|
188
|
-
d2.4xlarge:
|
|
189
|
-
Arch: HVM64
|
|
190
|
-
d2.8xlarge:
|
|
191
|
-
Arch: HVM64
|
|
192
|
-
hi1.4xlarge:
|
|
193
|
-
Arch: HVM64
|
|
194
|
-
hs1.8xlarge:
|
|
195
|
-
Arch: HVM64
|
|
196
|
-
cr1.8xlarge:
|
|
197
|
-
Arch: HVM64
|
|
198
|
-
cc2.8xlarge:
|
|
199
|
-
Arch: HVM64
|
|
200
|
-
AWSInstanceType2NATArch:
|
|
201
|
-
t1.micro:
|
|
202
|
-
Arch: NATPV64
|
|
203
|
-
t2.nano:
|
|
204
|
-
Arch: NATHVM64
|
|
205
|
-
t2.micro:
|
|
206
|
-
Arch: NATHVM64
|
|
207
|
-
t2.small:
|
|
208
|
-
Arch: NATHVM64
|
|
209
|
-
t2.medium:
|
|
210
|
-
Arch: NATHVM64
|
|
211
|
-
t2.large:
|
|
212
|
-
Arch: NATHVM64
|
|
213
|
-
m1.small:
|
|
214
|
-
Arch: NATPV64
|
|
215
|
-
m1.medium:
|
|
216
|
-
Arch: NATPV64
|
|
217
|
-
m1.large:
|
|
218
|
-
Arch: NATPV64
|
|
219
|
-
m1.xlarge:
|
|
220
|
-
Arch: NATPV64
|
|
221
|
-
m2.xlarge:
|
|
222
|
-
Arch: NATPV64
|
|
223
|
-
m2.2xlarge:
|
|
224
|
-
Arch: NATPV64
|
|
225
|
-
m2.4xlarge:
|
|
226
|
-
Arch: NATPV64
|
|
227
|
-
m3.medium:
|
|
228
|
-
Arch: NATHVM64
|
|
229
|
-
m3.large:
|
|
230
|
-
Arch: NATHVM64
|
|
231
|
-
m3.xlarge:
|
|
232
|
-
Arch: NATHVM64
|
|
233
|
-
m3.2xlarge:
|
|
234
|
-
Arch: NATHVM64
|
|
235
|
-
m4.large:
|
|
236
|
-
Arch: NATHVM64
|
|
237
|
-
m4.xlarge:
|
|
238
|
-
Arch: NATHVM64
|
|
239
|
-
m4.2xlarge:
|
|
240
|
-
Arch: NATHVM64
|
|
241
|
-
m4.4xlarge:
|
|
242
|
-
Arch: NATHVM64
|
|
243
|
-
m4.10xlarge:
|
|
244
|
-
Arch: NATHVM64
|
|
245
|
-
c1.medium:
|
|
246
|
-
Arch: NATPV64
|
|
247
|
-
c1.xlarge:
|
|
248
|
-
Arch: NATPV64
|
|
249
|
-
c3.large:
|
|
250
|
-
Arch: NATHVM64
|
|
251
|
-
c3.xlarge:
|
|
252
|
-
Arch: NATHVM64
|
|
253
|
-
c3.2xlarge:
|
|
254
|
-
Arch: NATHVM64
|
|
255
|
-
c3.4xlarge:
|
|
256
|
-
Arch: NATHVM64
|
|
257
|
-
c3.8xlarge:
|
|
258
|
-
Arch: NATHVM64
|
|
259
|
-
c4.large:
|
|
260
|
-
Arch: NATHVM64
|
|
261
|
-
c4.xlarge:
|
|
262
|
-
Arch: NATHVM64
|
|
263
|
-
c4.2xlarge:
|
|
264
|
-
Arch: NATHVM64
|
|
265
|
-
c4.4xlarge:
|
|
266
|
-
Arch: NATHVM64
|
|
267
|
-
c4.8xlarge:
|
|
268
|
-
Arch: NATHVM64
|
|
269
|
-
g2.2xlarge:
|
|
270
|
-
Arch: NATHVMG2
|
|
271
|
-
g2.8xlarge:
|
|
272
|
-
Arch: NATHVMG2
|
|
273
|
-
r3.large:
|
|
274
|
-
Arch: NATHVM64
|
|
275
|
-
r3.xlarge:
|
|
276
|
-
Arch: NATHVM64
|
|
277
|
-
r3.2xlarge:
|
|
278
|
-
Arch: NATHVM64
|
|
279
|
-
r3.4xlarge:
|
|
280
|
-
Arch: NATHVM64
|
|
281
|
-
r3.8xlarge:
|
|
282
|
-
Arch: NATHVM64
|
|
283
|
-
i2.xlarge:
|
|
284
|
-
Arch: NATHVM64
|
|
285
|
-
i2.2xlarge:
|
|
286
|
-
Arch: NATHVM64
|
|
287
|
-
i2.4xlarge:
|
|
288
|
-
Arch: NATHVM64
|
|
289
|
-
i2.8xlarge:
|
|
290
|
-
Arch: NATHVM64
|
|
291
|
-
d2.xlarge:
|
|
292
|
-
Arch: NATHVM64
|
|
293
|
-
d2.2xlarge:
|
|
294
|
-
Arch: NATHVM64
|
|
295
|
-
d2.4xlarge:
|
|
296
|
-
Arch: NATHVM64
|
|
297
|
-
d2.8xlarge:
|
|
298
|
-
Arch: NATHVM64
|
|
299
|
-
hi1.4xlarge:
|
|
300
|
-
Arch: NATHVM64
|
|
301
|
-
hs1.8xlarge:
|
|
302
|
-
Arch: NATHVM64
|
|
303
|
-
cr1.8xlarge:
|
|
304
|
-
Arch: NATHVM64
|
|
305
|
-
cc2.8xlarge:
|
|
306
|
-
Arch: NATHVM64
|
|
307
|
-
AWSRegionArch2AMI:
|
|
308
|
-
us-east-1:
|
|
309
|
-
PV64: ami-2a69aa47
|
|
310
|
-
HVM64: ami-6869aa05
|
|
311
|
-
HVMG2: ami-61e27177
|
|
312
|
-
us-west-2:
|
|
313
|
-
PV64: ami-7f77b31f
|
|
314
|
-
HVM64: ami-7172b611
|
|
315
|
-
HVMG2: ami-60aa3700
|
|
316
|
-
us-west-1:
|
|
317
|
-
PV64: ami-a2490dc2
|
|
318
|
-
HVM64: ami-31490d51
|
|
319
|
-
HVMG2: ami-4b694d2b
|
|
320
|
-
eu-west-1:
|
|
321
|
-
PV64: ami-4cdd453f
|
|
322
|
-
HVM64: ami-f9dd458a
|
|
323
|
-
HVMG2: ami-2955524f
|
|
324
|
-
eu-west-2:
|
|
325
|
-
PV64: NOT_SUPPORTED
|
|
326
|
-
HVM64: ami-886369ec
|
|
327
|
-
HVMG2: NOT_SUPPORTED
|
|
328
|
-
eu-central-1:
|
|
329
|
-
PV64: ami-6527cf0a
|
|
330
|
-
HVM64: ami-ea26ce85
|
|
331
|
-
HVMG2: ami-81ac71ee
|
|
332
|
-
ap-northeast-1:
|
|
333
|
-
PV64: ami-3e42b65f
|
|
334
|
-
HVM64: ami-374db956
|
|
335
|
-
HVMG2: ami-46220c21
|
|
336
|
-
ap-northeast-2:
|
|
337
|
-
PV64: NOT_SUPPORTED
|
|
338
|
-
HVM64: ami-2b408b45
|
|
339
|
-
HVMG2: NOT_SUPPORTED
|
|
340
|
-
ap-southeast-1:
|
|
341
|
-
PV64: ami-df9e4cbc
|
|
342
|
-
HVM64: ami-a59b49c6
|
|
343
|
-
HVMG2: ami-c212aba1
|
|
344
|
-
ap-southeast-2:
|
|
345
|
-
PV64: ami-63351d00
|
|
346
|
-
HVM64: ami-dc361ebf
|
|
347
|
-
HVMG2: ami-0ad2db69
|
|
348
|
-
ap-south-1:
|
|
349
|
-
PV64: NOT_SUPPORTED
|
|
350
|
-
HVM64: ami-ffbdd790
|
|
351
|
-
HVMG2: ami-ca3042a5
|
|
352
|
-
us-east-2:
|
|
353
|
-
PV64: NOT_SUPPORTED
|
|
354
|
-
HVM64: ami-f6035893
|
|
355
|
-
HVMG2: NOT_SUPPORTED
|
|
356
|
-
ca-central-1:
|
|
357
|
-
PV64: NOT_SUPPORTED
|
|
358
|
-
HVM64: ami-730ebd17
|
|
359
|
-
HVMG2: NOT_SUPPORTED
|
|
360
|
-
sa-east-1:
|
|
361
|
-
PV64: ami-1ad34676
|
|
362
|
-
HVM64: ami-6dd04501
|
|
363
|
-
HVMG2: NOT_SUPPORTED
|
|
364
|
-
cn-north-1:
|
|
365
|
-
PV64: ami-77559f1a
|
|
366
|
-
HVM64: ami-8e6aa0e3
|
|
367
|
-
HVMG2: NOT_SUPPORTED
|
|
368
|
-
Resources:
|
|
369
|
-
EC2Instance:
|
|
370
|
-
Type: AWS::EC2::Instance
|
|
371
|
-
Properties:
|
|
372
|
-
InstanceType:
|
|
373
|
-
Ref: InstanceType
|
|
374
|
-
SecurityGroups:
|
|
375
|
-
- Ref: InstanceSecurityGroup
|
|
376
|
-
KeyName:
|
|
377
|
-
Ref: KeyName
|
|
378
|
-
ImageId:
|
|
379
|
-
Fn::FindInMap:
|
|
380
|
-
- AWSRegionArch2AMI
|
|
381
|
-
- Ref: AWS::Region
|
|
382
|
-
- Fn::FindInMap:
|
|
383
|
-
- AWSInstanceType2Arch
|
|
384
|
-
- Ref: InstanceType
|
|
385
|
-
- Arch
|
|
386
|
-
InstanceSecurityGroup:
|
|
387
|
-
Type: AWS::EC2::SecurityGroup
|
|
388
|
-
Properties:
|
|
389
|
-
GroupDescription: Enable SSH access via port 22
|
|
390
|
-
SecurityGroupIngress:
|
|
391
|
-
- IpProtocol: tcp
|
|
392
|
-
FromPort: '22'
|
|
393
|
-
ToPort: '22'
|
|
394
|
-
CidrIp:
|
|
395
|
-
Ref: SSHLocation
|
|
396
|
-
<% if @route53 %>
|
|
397
|
-
DnsRecord:
|
|
398
|
-
Type: AWS::Route53::RecordSet
|
|
399
|
-
Properties:
|
|
400
|
-
HostedZoneName: !Ref 'HostedZoneName'
|
|
401
|
-
Comment: DNS name for my instance.
|
|
402
|
-
Name: !Join ['', [!Ref 'Subdomain', ., !Ref 'HostedZoneName']]
|
|
403
|
-
Type: CNAME
|
|
404
|
-
TTL: '900'
|
|
405
|
-
ResourceRecords:
|
|
406
|
-
- !GetAtt EC2Instance.PublicIp
|
|
407
|
-
<% end %>
|
|
408
|
-
Outputs:
|
|
409
|
-
InstanceId:
|
|
410
|
-
Description: InstanceId of the newly created EC2 instance
|
|
411
|
-
Value:
|
|
412
|
-
Ref: EC2Instance
|
|
413
|
-
AZ:
|
|
414
|
-
Description: Availability Zone of the newly created EC2 instance
|
|
415
|
-
Value:
|
|
416
|
-
Fn::GetAtt:
|
|
417
|
-
- EC2Instance
|
|
418
|
-
- AvailabilityZone
|
|
419
|
-
PublicDNS:
|
|
420
|
-
Description: Public DNSName of the newly created EC2 instance
|
|
421
|
-
Value:
|
|
422
|
-
Fn::GetAtt:
|
|
423
|
-
- EC2Instance
|
|
424
|
-
- PublicDnsName
|
|
425
|
-
PublicIP:
|
|
426
|
-
Description: Public IP address of the newly created EC2 instance
|
|
427
|
-
Value:
|
|
428
|
-
Fn::GetAtt:
|
|
429
|
-
- EC2Instance
|
|
430
|
-
- PublicIp
|