Giter VIP home page Giter VIP logo

safe-scale's Introduction

#Safe Scale Plugin

The CF CLI Plugin uses blue-green deployment methodology to achieve continuous deployment. In addition to the regular blue-green deployment, the plugin also monitors endpoints. The user can provide a test endpoint that checks if the newly pushed app is healthy. They can also provide a transaction monitoring endpoint that checks if the old app instances are still processing transactions. Customers were noticing that when they scale down their applications, CF would shut down instances that were still processing transactions and they would be lost. This plugin will get the endpoints provided and prevent the blue-green deployment from either mapping the routes to an unhealthy app or prevent an old app that still has ongoing transactions from shutting down.

#Assumptions

The plugin makes assumptions about the endpoints provided by the user. Since the plugin accesses status codes to determine the state of the endpoint, the endpoints must use these status codes in order for the plugin to read it properly. For the test endpoint, it must return status code 200 if the app is healthy. For the transaction endpoint, it must return status code 204 (no content) if the app has no more transactions and 200 if there are still transactions processing. The plugin only consumes “https://“ endpoints currently.

Requirements

The plugin requires you to be in the same directory as the app you are trying to blue-green deploy. The endpoints should be in the form of "/endpoint_name". Note- The endpoint test you provide needs to be monitoring the transactions of the entire app not the single instance of the app the plugin accesses.

Usage

cf safe-scale app_name new_app_name --inst=int --trans=string --test=string --timeout=int

Flags
inst: Number of instances of the new app
trans: endpoint to monitor if app still has pending transactions
test: endpoint to monitor if the app is healthy
timeout: time in seconds to monitor transactions

Note if you don’t provide an endpoint for monitoring transactions or checking health the plugin will just continue regular blue-green deployment

Installation

go get https://github.com/ezra-lieblich/safe-scale

cf install-plugin safe_scale

safe-scale's People

Contributors

ezra-lieblich avatar

Watchers

James Cloos avatar  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.