adds docker & release stuff for fnlb

This commit is contained in:
Reed Allman
2017-06-11 07:18:18 -07:00
parent 26806ccafd
commit bcd9f1253e
7 changed files with 100 additions and 2 deletions

View File

@@ -9,4 +9,25 @@ fnlb --listen <address-for-incoming> --nodes <node1>,<node2>,<node3>
And redirect all traffic to the load balancer.
**NOTE: For the load balancer to work all function nodes need to be sharing the same DB.**
**NOTE: For the load balancer to work all function nodes need to be sharing the same DB.**
## Running with docker
```sh
make docker-build
make docker-run
curl -X PUT -d '{"node":"127.0.0.1:8080"}' localhost:8081/1/lb/nodes
```
`127.0.0.1:8080` should be the address of a functions server. The lb will health
check this and log if it cannot reach that node. By default, docker-run runs
with --net=host and should work out of the box. Any number of functions
servers may be added to the load balancer.
To make functions requests against the lb:
```sh
API_URL=http://localhost:8081 fn call my/function
```
## TODO More docs to be added for complex installs..