Skip to content

Configuration

Joseph Manley edited this page Aug 2, 2019 · 8 revisions

Deployer Configuration

  1. Global Object
  2. Stack Object
  3. Config Properties

Global Object

Required Properties: region
global:
  region: us-east-1

The global object holds common configurations across all stacks in the configuration file. Any property in the global object, is passed to all stack objects.

To declare a global object, create a top level yaml object named global and populate its properties.

Stack Object

Required Properties: stack_name, template
Example:
  stack_name: ExampleStack
  template: cloudformation/top.yaml

Stack objects are the main input given to Deployer. In the stack object, you need to define the name deployer will see the stack as, the name CloudFormation will see the stack as, the template that corresponds to the stack, and any addition properties or parameters the environment requires.

Config Properties

Property Type Short Description
region String AWS Region for deployer to actions in.
sync_base String Base sync directory for deployer to work from.
sync_exclude List< String > Files and file extentions to exclude when syncing directroies to S3.
sync_dest_bucket String Name of the bucket to upload files when syncing.
template_bucket String Name of the bucket to deploy CloudFormation from.
parameters Dictionary Dictionary of parameters to be passed to CloudFormation stacks.
tags Dictionary Dictionary of tags to be applied to the CloudFormation stack(s).
sync_dirs List< String > Directories to be sync with sync_dest_bucket.
lambda_dirs List< String > Directories containing lambda code to be packaged by Deployer.
release String Release version of stack.
lookup_parameters Dictionary Parameters to grab from outputs of other stacks.
stack_name String Name of CloudFormation stack to be created/update.
template String CloudFormation template used when creating/updating.
full_template_url String Override url when deploying a top stack.

region

The AWS region that the cloud tools buckets are located and the region to deploy the CloudFormation stack.

global:
  region: us-east-1

sync_base

The base directory to use when syncing files over to S3.

global:
  sync_base: ./

sync_exclude

A list of files extensions and files that are ignored when syncing to S3.

global:
  sync_exclude:
    - .py
    - requirements.txt

sync_dest_bucket

The bucket that Deployer will sync before taking an action.

global:
  sync_dest_bucket: cloudtools-us-east-1

template_bucket

Bucket that intial CloudFormation template is ran from.

global:
  template_bucket: cloudtools-us-east-1

parameters

Parameters that are passed to CloudFormation when creating or updating a stack.

SnsExample:
  parameters:
    SubscriptionEndPoint: [email protected]

tags

CloudFormation tags placed on the stack when being created or updated.

global:
  tags:
    Project: DeployerExample

sync_dirs

Directories that sync with S3. Root directory is assigned with sync_base.

global:
  sync_dirs: [ cloudformation ]

lambda_dirs

Directories containing unbuilt lambda functions that deployer builds before creating or updating a stack.

global:
  lambda_dirs:
    - lambda/exampleLambda

release

The release version that the stack with deployed with. S3 Files are uploaded to sync_base/${release}.

global:
  release: develop

lookup_parameters

Parameters sent to CloudFormation stack that are outputs of another CloudFormation stack. The Stack value, must be the name in the Deployer config file. These values are check for dependencies when using the --all flag.

ApplicationStack:
  lookup_parameters:
    VpcId: { Stack: NetworkStack, OutputKey: VpcId }

stack_name

Name of the stack in CloudFormation. This value is also used when looking to delete or take any other action on a stack.

ExampleStack:
  stack_name: SnsExample

template

The CloudFormation template to use when Deployer calls a create or update on the stack.

ExampleStack:
  template: cloudformation/top.json 

full_template_url

Used to override the url used when deploying a stack.

ExampleStack:
  full_template_url: 'https://s3.amazonaws.com/example_bucket/cloudformation/top.yaml'

Clone this wiki locally