Coder Social home page Coder Social logo

haproxy's Introduction

haproxy + confd

Docker image which configures haproxy dynamically using confd -> remote etcd hosted on Compose.io.

This is specifically useful if you want to run ECS Tasks with dynamic port allocations (tracked in etcd), and want dynamic service discovery / HTTP routing.

Usage

docker run --name haproxy \
           --rm \
           -p 8080:8080 \
           -p 1000:1000 \
           -e ETCD_NODE=${etcd_proto}://${etcd_host} \
           -e ETCD_USER=${etcd_user} \
           -e ETCD_PASS=${etcd_pass} \
           -e ETCD_CACERT=${etcd_cacert_contents} \
           uniiverse/haproxy:latest
  • haproxy runs on 8080
  • ha status page runs on 1000 (suitable for health checks)
  • etcd properties passed in as environment variables

Assumptions

  • assumes etcd uses the key path /v2/keys/backends/universe/<service name> -> 10.1.2.3:32770

Props

This project builds off the excellent resources provided by Jason Wilder @ http://jasonwilder.com/blog/2014/07/15/docker-service-discovery. Thanks for the community contributions that made this possible!

haproxy's People

Contributors

adammeghji avatar

Watchers

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