Lono

Gem Version CircleCI Code Climate Dependency Status Coverage Status Join the chat at https://gitter.im/tongueroo/lono Support

Lono is a tool to help you manage your CloudFormation templates. Lono handles the entire CloudFormation lifecyle. It helps you craft the templates and then provision the infrastructure.

  • Lono generates CloudFormation templates based on ERB ruby templates in yaml format.
  • Lono takes simple env-like files and generates the CloudFormation parameter files.
  • Lono provides a simple CLI interface to launch the CloudFormation stacks.

See lono.cloud for full lono documentation.

Important

If you are on version 3, you can run lono upgrade4 within your project to upgrade it to version 4. Refer to the CHANGELOG.

Blog Posts

These blog posts also cover lono:

Quick Usage

It only takes a couple of commands to start using lono.

gem install lono
lono new infra
cd infra
lono import https://s3-us-west-2.amazonaws.com/cloudformation-templates-us-west-2/EC2InstanceWithSecurityGroupSample.template --name ec2
# update the generated params file
lono cfn create ec2

Lono flowchart

Lono Cfn Lifecycle Commands

Lono provides a lono cfn lifecycle command that allows you to launch stacks quickly. The lono cfn tool automatically runs lono generate internally and then launches the CloudFormation stack all in one command. If you are in a lono project and have a my-stack lono template definition. To create a stack you can simply run:

$ lono cfn create my-stack

The above command will generate files to output/templates/my-stack.json and output/params/my-stack.txt and use them to create a CloudFormation stack. Here are some more examples of cfn commands:

$ lono cfn create mystack-$(date +%Y%m%d%H%M%S) --template mystack --params mystack
$ lono cfn create mystack-$(date +%Y%m%d%H%M%S) # shorthand if template and params file matches.
$ lono cfn diff mystack-1493859659
$ lono cfn preview mystack-1493859659
$ lono cfn update mystack-1493859659
$ lono cfn delete mystack-1493859659
$ lono cfn create -h # getting help

See lono.cloud for full lono documentation.

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request

Developing

There is a submodule in this project, so when you check out remember to sync the submodule.

$ git clone [email protected]:yourfork/lono.git
$ git submodule sync
$ git submodule update --init