Skip to content
This repository has been archived by the owner on Oct 23, 2024. It is now read-only.

Commit

Permalink
Fix references to haproxy-marathon-bridge in documentation
Browse files Browse the repository at this point in the history
(It was called haproxy_marathon_bridge)
  • Loading branch information
kolloch committed Mar 19, 2015
1 parent 61b18d6 commit 1375e6c
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions docs/docs/service-discovery-load-balancing.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@ Port information for each running task can be queried via the
at `<marathon host>:<port>/v2/tasks`

## Using HAProxy
Marathon ships with a simple shell script called `haproxy_marathon_bridge` that turns the Marathon's REST API's list of running tasks into a config file for HAProxy, a lightweight TCP/HTTP proxy.
To generate an HAProxy configuration from Marathon running at `localhost:8080`, use the `haproxy_marathon_bridge` script:
Marathon ships with a simple shell script called `haproxy-marathon-bridge` that turns the Marathon's REST API's list of running tasks into a config file for HAProxy, a lightweight TCP/HTTP proxy.
To generate an HAProxy configuration from Marathon running at `localhost:8080`, use the `haproxy-marathon-bridge` script:

``` console
$ bin/haproxy_marathon_bridge localhost:8080 > haproxy.cfg
$ ./bin/haproxy-marathon-bridge localhost:8080 > haproxy.cfg
```

To reload the HAProxy configuration without interrupting existing connections:
Expand All @@ -38,19 +38,19 @@ The configuration script and reload could be triggered frequently by Cron, to
keep track of topology changes. If a node goes away between reloads, HAProxy's
health check will catch it and stop sending traffic to that node.

To facilitate this setup, the `haproxy_marathon_bridge` script can be invoked in
To facilitate this setup, the `haproxy-marathon-bridge` script can be invoked in
an alternate way which installs the script itself, HAProxy and a cronjob that
once a minute pings one of the Marathon servers specified and refreshes
HAProxy if anything has changed.

``` console
$ install_haproxy_system localhost:8080
$ ./bin/haproxy-marathon-bridge install_haproxy_system localhost:8080
```

- The list of Marathons to ping is stored one per line in
`/etc/haproxy_marathon_bridge/marathons`
- The script is installed as `/usr/local/bin/haproxy_marathon_bridge`
- The cronjob is installed as `/etc/cron.d/haproxy_marathon_bridge`
- The script is installed as `/usr/local/bin/haproxy-marathon-bridge`
- The cronjob is installed as `/etc/cron.d/haproxy-marathon-bridge`
and run as root.

The provided script is just a basic example. For a full list of options, check the
Expand Down

0 comments on commit 1375e6c

Please sign in to comment.