Skip to content

Instantly share code, notes, and snippets.

@curtismitchell
Created May 22, 2015 03:06
Show Gist options
  • Save curtismitchell/5069ad6ab23519ab3b22 to your computer and use it in GitHub Desktop.
Save curtismitchell/5069ad6ab23519ab3b22 to your computer and use it in GitHub Desktop.
Build Release Deploy

Project structure for continuous deployment

- Dockerfile
- packer.json
- docs/
  - ...
- src/
  - ...
- readme.md
- serverspec.rb

Dockerfile is optional. Packer can build Docker images without a Dockerfile.

Application sourcecode is in the src directory.

Deployment Pipeline

Build

  • New version number is designated (using semver)
  • Compile (if necessary)
  • Lint (if necessary)
  • Static Analysis (if necessary)
  • Unit tests

When build steps complete, there is a build artifact stored in a central location.

Release

  • Packer is run on the packer.json file
  • The packer.json file references the latest successful build artifact

When release steps complete there should be

  1. An immutable machine image for Amazon
  2. An immutable machine image for VMWare
  3. A machine image for Vagrant
  4. A Docker image

Deploy

  • Locally, launch the Vagrant image or the Docker image
  • In Amazon, use the AMI
  • In VMware, use the VMWare image
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment