DRY: Reusable Code
Lono is designed to allow you to reuse CloudFormation templates. A key is the separation of configs and template code in a structured and organized way.
Here’s an example configs structure:
configs ├── ec2 │ └── params │ ├── development.txt │ └── production.txt └── vpc └── params ├── development.txt └── production.txt
Notice how there are different
production config files. This structure allows you to use different values for different environments for the same CloudFormation template. Learn more: Configs docs.
The CloudFormation code itself lives in the blueprints folder.
blueprints ├── ec2 └── vpc
Additionally, blueprints can also be gems. Example:
gem "ec2", git: "firstname.lastname@example.org:boltopspro/ec2" gem "vpc", git: "email@example.com:boltopspro/vpc"
Interestingly, this means the blueprints folder could be empty. You can just use pre-built blueprint gems. BoltOps Pro blueprints are actually gems. All you have to do is configure them.
Learn more: Blueprint docs.
With this structure, it DRYs up your code by allowing you to reuse the same CloudFormation templates. You simply:
Pro tip: Use the <- and -> arrow keys to move back and forward.