GithubHelp home page GithubHelp logo

isabella232 / condensation Goto Github PK

View Code? Open in Web Editor NEW

This project forked from sungardas/condensation

0.0 0.0 0.0 3.7 MB

Package, reuse and share particles for CloudFormation projects

License: Apache License 2.0

JavaScript 99.43% HTML 0.57%

condensation's Introduction

condensation

Package, reuse and share particles for CloudFormation projects

condensation

NPM Gitter Build Status Code Climate Coverage Status Dependency Status

Summary

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.

Quick Start

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

Use

Particles

Template Helpers

Handlebars Helpers

AWS Intrinsic Functions

Project Structure

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.

Processing Templates

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

layout support

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.

Lazy Loading

Particles will only be included in the final distribution if they are referenced in a hbs file.

Config Options

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

Errors due to badly formed JSON or failed CF validations will stop the process and the offending files will be dumped to condensation_errors

Experimental

condensation.js

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

License

Apache-2.0 ©

Maintained By

Sungard Availability Services | Labs

This project is maintained by the Labs team at Sungard Availability Services

GitHub: https://sungardas.github.io

Blog: http://blog.sungardas.com/CTOLabs/

condensation's People

Contributors

gregorycox avatar kmcgrath avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.