Package, reuse and share particles for CloudFormation projects
Condensation provides a framework for building and sharing particles
that when packaged together create AWS CloudFormation
projects.
Projects are uploaded to S3 and include templates, static assets and/or lambda functions.
Check out all of Condensation's features and see it in action on YouTube.
Get started fast with condensation-docker
$ alias condensation="docker run -e AWS_ACCESS_KEY_ID -e AWS_SECRET_ACCESS_KEY -e AWS_SESSION_TOKEN -v \"$HOME\"/.aws/credentials:/home/condensation/.aws/credentials -v \`pwd\`:/particles --rm -it sungardas/condensation"
$ condensation create project particles-MYPROJECT
$ cd particles-MYPROJECT
$ condensation run build
# Upload to S3
$ condensation run deploy
You can also get started with nodejs
Next become familiar with all of Condensation's tasks
particles-my-project
|
-- guplfile.js
|
-- README.md
|
-- CHANGELOG.md
|
--particles
|
-- assets
|
-- conditions
|
-- cftemplates
|
-- helpers
|
-- mappings
|
-- metadata
|
-- outputs
|
-- parameters
|
-- resources
|
-- sets
|
-- partials
Condensation builds templates with Handlebars helpers that are able to load particles from the local project or from any condensation compatible module added as a npm dependency.
Condensation will process any template that ends with .hbs
- particles
|- cftemplates
|- network.template.json.hbs
This allows static templates to be deployed alongside compiled templates
Instead of including particles within a traditional CloudFormation template use a layout to include particles in any order you wish. They will be added to correct template section during the condensation build process.
Particles will only be included in the final distribution if they are
referenced in a hbs
file.
var config = {
// Array of S3 buckets to deploy to
s3: [
{
// AWS specific options
aws: {
region: 'us-east-1',
bucket: 'my.bucket.in.us-east-1',
},
// Run CloudFormation validation during the build task for this bucket
validate: true,
// Create this bucket if it does not already exist
create: true
// Prefix all objects (allows for multiple deployments to the same bucket
prefix: '',
labels: ['east']
},
],
// The prefix to add to all generated gulp tasks (default: 'condensation')
// An empty string will remove the prefix
// - condensation:deploy will become deploy
taskPrefix: '',
// Directory that contains the `particles` directory.
// Used for test scripts, should not be changed if sharing templates
root: './',
// Where the build task will put the distribution
dist: 'dist'
};
##Front Matter
All particles are first processed with gray-matter to load any default data definitions.
Errors due to badly formed JSON or failed CF validations will stop the
process and the offending files will be dumped to condensation_errors
If a project contains condensation.js
the file will be loaded as a
module and will attement to run the initialize
function. If
initialize
accepts a single argument then only a callback will be
provided. If initialize
accepts two arguments the project
configuration will be passed as the first argument and the callback as
the second.
This can be used by a condensation project to bootstrap assets and configuration before template compiling begins.
Example: particles-cloudsploit-scans
Apache-2.0 ©
This project is maintained by the Labs team at Sungard Availability Services
GitHub: https://sungardas.github.io