Mastering AWS CodeDeploy with Jenkins and Puppet

AllCloud Blog:
Cloud Insights and Innovation

Mastering  AWS CodeDeploy with Jenkins and Puppet

Some Reasons Why Deployment Pipelines are Hard:

  • Dynamic / Elastic cloud clusters

  • Multiple Dev & Staging Envs

  • Has to design for scale

  • Need to eliminate SPOF

  • Can’t allow any downtime

  • How to roll back?

How to Deploy Like a Pro:

  • Jenkins

  • AWS CodeDeploy

  • Puppet


  • Repeatable

  • Predictable

  • Works on Scale

  • No SPOF

  • No Downtime

How Do We Do It?

  • Our Software Engineer in the Automation and Development team help customers automate their processes in the cloud by developing a CI & CD solution for the AWS cloud, based on CodeDeploy, Jenkins and Puppet.

What is AWS CodeDeploy?

An AWS service that coordinates application deployments to fleets of instances.

Why AWS CodeDeploy?

  • Better alternative to MCollective when doing deployments in AWS

  • Solves all of MCollective’s pitfalls:

    • Predictability   →   part of the AWS infrastructure; machine discovery comes natural

    • Deployment tracking   →   live deployment status per machine & deployment phase

    • System downtime   →   deployment configurations focus on delivering rolling updates

    • Rollback   →   natural to simulate with CodeDeploy; just deploy some previous revision

    • Complex to use   →   AWS Management Console UI vs. “mco” CLI commands

Rolling Update Options

  • Health constraint = no. of hosts kept healthy during deployment

  • Built-in deployment configurations:

  • AllAtOnce   —   HOST_COUNT = 0

  • HalfAtATime   —   FLEET_PERCENT = 50%

  • OneAtATime   —   MOST_CONCURRENCY = 1

  • Custom deployment configurations (CLI or API only)

Why Masterless Puppet?


  • No single point of failure

  • Scalable solution (no DoS on master)

  • Simpler networking requirements

  • No need to configure certificates


  • No central dashboard → deployment status taken over by AWS CodeDeploy

Why Jenkins?

  • Very easy to get started with

Important, since we hand it over to our customers.

  • Open source, with tons of plugins and support

Relevant, considering the dynamics of the cloud computing field.

  • Supports more SCMs than any other CI solution

AWS CodeDeploy Pitfalls

  • Supported in only 4 regions (N. Virginia, Oregon, Ireland, Sydney)

  • Cannot delete old revisions from the AWS Management Console

  • No ELB rolling update scripts for Windows

  • Cannot pass arguments to lifecycle event scripts

Emind has found solutions for these pitfalls.

Jenkins Integration with AWS CodeDeploy

  • Jenkins plugin for AWS CodeDeploy (very basic):

  • Doesn’t allow separation of build phase from deploy phase

  • Can’t configure destination of deployed files

  • Can’t define hook scripts (e.g. run Puppet at deploy time)

  • Run AWS CLI commands from action scripts (full control)


Deployments on AWS are only a few clicks away.

With what?

  • Puppet  –  manage configuration in a predictable way

  • AWS CodeDeploy  –  coordinate fine grained deployments

  • Jenkins  –  automate repeatable jobs; ease of use through GUI


  • Configure machine roles from the AWS Management Console via tags

  • Build and deploy from Jenkins with only a few clicks & keystrokes

Watch the webinar now: Mastering CodeDeploy with Jenkins & Puppet 

For more information on mastering CodeDeploy, watch the webinar or write us at


Monica Avellino

Marketing Lead, Israel

Read more posts by Monica Avellino