Giter VIP home page Giter VIP logo

ansible-haproxy-blue-green's Introduction

HAProxy blue-green

Backend-switching based blue-green deployements.

This role will let you swap haproxy backends depending on the deployed color.

When used, it will create two backends: blue and green. You call this role with blue_green_color set to blue or green, and it will set the current color to blue_green_color.

It works by setting the inactive color backend to disabled.

The blue-green deployement process roughly follows this pattern:

  • check which color is the oldest (and thus, can be deployed)
  • deploy application to the corresponding color target (a directory for instance)
  • point loadbalancers to the new color

Requirements

Any pre-requisites that may not be covered by the ansible itself or the role should be mentioned here. For instance, if the role uses the EC2 module, it may be a good idea to mention in this section that the boto package is required.

Role Variables

  • haproxy_blue_green_front_name: HAproxy frontend entry name to create
  • haproxy_blue_green_loadbalancers: Group name of loadbalancers to configure
  • haproxy_blue_green_backend_group: Group name of backend to add in the backend

Usage

The role is supposed to be used this way from a playbook:

- { role: leucos.haproxy-blue-green,
    haproxy_blue_green_front_name: 'myfront',
    haproxy_blue_green_loadbalancers: 'lb',
    haproxy_blue_green_backend_group: 'www',
    when: blue_green_color is defined }

blue_green_color can be set earlier in the playbook using leucos.blue-green role, which tries to guess which color is the oldest (and thus, can be redeployed).

Dependencies

This role depends on:

License

MIT

Author Information

@leucos

ansible-haproxy-blue-green's People

Contributors

dglinder avatar leucos 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.