Lola
Lola is an opiniated cli tool to orchestrate AWS Cloudformation templates.
Installation
$ [sudo] npm install lola -g
Usage
lola.yml
Lola expects a config file (lola.yml) which holds information about the AWS Cloudformation stacks you wish to control.
project: <project-name>
tags:
<name-of-tag>: <value-of-tag>
<name-of-another-tag>: <value-of-another-tag>
stacks:
<stack1>:
template: <location of the template.yml file for this stack>
description: <optionally describe this stack>
actions:
preDeploy: preDeployScript.js
environments:
default:
<stack1>:
region: <aws region>
profile: <~/.aws/credentails profile name>
tags:
<name-of-tag>: <value-of-tag>
<name-of-another-tag>: <value-of-another-tag>
<dev>:
<stack1>:
name: <my-stack-dev>
region: <aws region>
profile: <~/.aws/credentails profile name>
tags:
<name-of-tag>: <value-of-tag>
<name-of-another-tag>: <value-of-another-tag>
terminationProtection: <true|false>
params:
<Param1>: <Value1>
hooks:
pre-deploy:
- preDeploy
cli
$ lola --help
Usage: lola [options] [command]
Do AWS Stuff
Options:
-V, --version output the version number
-c, --config-file <configFile> Optional config file
-o, --options-file <optionsFile> Optional deploy options file
-v, --verbose Verbose output
-s, --options-stack <optionsStack> Stack
-e, --options-environment <optionsEnvironment> Environment
-h, --help display help for command
Commands:
validate|v Validates a stack
status|s Get the status of a stack
deploy|d Deploys a stack
delete|x Deletes a stack
action|a Runs an action on a stack/env
protection|p Toggles termination protection on a stack/env
changeSet|c Create and view changeset of a stack/env
help [command] display help for command
Running lola
When running a lola command (validate, status, ..) without arguments, lola will ask about two things: the stack and the environment. These can also be provided through an input file (-o flag) or other input flags.
deploy hooks
actions
Each stack can define actions. Each action can be run on it's own or can be attached to one of the deploy hooks.
function runAction(config, stackName, env) {
console.log(config);
throw new Error('Error');
}
module.exports.runAction = runAction;