Skip to content

Commit 0dd2436

Browse files
committed
Update README
1 parent 2900889 commit 0dd2436

File tree

1 file changed

+1
-23
lines changed

1 file changed

+1
-23
lines changed

README_short.md

Lines changed: 1 addition & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -87,29 +87,7 @@ $ docker kill -s USR2 my-running-haproxy
8787

8888
## Enable Data Plane API
8989

90-
[Data Plane API](https://www.haproxy.com/documentation/hapee/2-7r1/api/data-plane-api/) sidecar is being distributed by default in all 2.0+ images and to enable it there are a few steps required:
91-
92-
1. define one or more users through `userlist`
93-
2. enable dataplane api process through `program api`
94-
3. enable haproxy.cfg to be read/write mounted in Docker, either by defining volume being r/w or by rebuilding image with your own haproxy.cfg
95-
4. expose dataplane TCP port in Docker with `--expose`
96-
97-
Relevant part of haproxy.cfg is below:
98-
99-
```
100-
userlist haproxy-dataplaneapi
101-
user admin insecure-password mypassword
102-
103-
program api
104-
command /usr/bin/dataplaneapi --host 0.0.0.0 --port 5555 --haproxy-bin /usr/sbin/haproxy --config-file /usr/local/etc/haproxy/haproxy.cfg --reload-cmd "kill -SIGUSR2 1" --restart-cmd "kill -SIGUSR2 1" --reload-delay 5 --userlist haproxy-dataplaneapi
105-
no option start-on-reload
106-
```
107-
108-
To run such image we would use the following command (note that volume containing haproxy.cfg is mounted r/w and port tcp/5555 is being exposed):
109-
110-
```console
111-
$ docker run -d --name my-running-haproxy --expose 5555 -v /path/to/etc/haproxy:/usr/local/etc/haproxy:rw haproxytech/haproxy-ubuntu
112-
```
90+
To use Data Plane API it is easiest to use s6-tagged images which all have Data Plane API running by default.
11391

11492
# License
11593

0 commit comments

Comments
 (0)