Giter Site home page Giter Site logo

matulko / cf-blue-green-deploy Goto Github PK

View Code? Open in Web Editor NEW

This project forked from bluemixgaragelondon/cf-blue-green-deploy

0.0 0.0 0.0 3.34 MB

Cloud Foundry CLI plugin for zero downtime deploys

License: Apache License 2.0

Shell 17.38% Go 82.62%

cf-blue-green-deploy's Introduction

Blue/Green deployer plugin for CF

Introduction

cf-blue-green-deploy is a plugin for the CF command line tool that automates a few steps involved in zero-downtime deploys.

Overview

The plugin takes care of the following steps packaged into one command:

  • Pushes the current version of the app with a new name
  • Optionally runs smoke tests against the newly pushed app to verify the deployment
    • If smoke tests fail, newly pushed app gets marked as failed and left around for investigation
    • If smoke tests pass, remaps routes from the currently live app to the newly deployed app
  • Cleans up versions of the app no longer in use

How to use

  • Get the plugin from the CF Community Repository
cf install-plugin blue-green-deploy -r CF-Community
  • Deploy your app
cd your_app_root
cf blue-green-deploy app_name
  • Deploy with optional smoke tests
cf blue-green-deploy app_name --smoke-test <path to test script>
  • You can also use the shorter alias
cf bgd app_name

The only argument passed to the smoke test script is the FQDN of the newly pushed app. If the smoke test returns with a non-zero exit code the deploy process will stop and fail, the current live app will not be affected.

If the test script exits with a zero exit code, the plugin will remap all routes from the current live app to the new app. The plugin supports routes under custom domains.

How to build

script/build

This will download dependencies, run the tests, and build binaries in the artefacts folder.

cf-blue-green-deploy's People

Contributors

bluemixgaragelondon avatar holly-cummins avatar matulko avatar r4vi avatar samhandev avatar samze 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.