Skip to content

Commit 291be1e

Browse files
committed
Updates README
1 parent 24a7bcc commit 291be1e

1 file changed

Lines changed: 33 additions & 19 deletions

File tree

README.md

Lines changed: 33 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -100,25 +100,6 @@ You may want to see the content printed by the function to its standard output/e
100100

101101
Note that we currently support output capture only for some runtimes (e.g., Python supports it).
102102

103-
## Distributed Deployment
104-
105-
[This repository](https://github.com/serverledge-faas/serverledge-deploy) provides an
106-
Ansible playbook to deploy Serverledge in a distributed configuration.
107-
108-
In this case, you can instruct `serverledge-cli` to
109-
connect to a node other than `localhost` or use a non-default port
110-
by means of environment variables or command-line options:
111-
112-
- Use `--host <HOST>` (or `-H <HOST>`) and/or `--port <PORT>` (or, `-P <PORT>`)
113-
to specify the server
114-
host and port on the command line
115-
- Alternatively, you can set the environment variables
116-
`SERVERLEDGE_HOST` and/or `SERVERLEDGE_PORT`, which are read by the client.
117-
118-
Example:
119-
120-
$ bin/serverledge-cli status -H <host ip-address> -P <port number>
121-
122103
## Configuration
123104

124105
You can provide a configuration file using YAML or TOML syntax. Depending on the
@@ -143,6 +124,39 @@ The configuration file may look like this:
143124
scheduler.queue.capacity: 0
144125
metrics.enabled: true
145126

127+
## Distributed Deployment
128+
129+
Distributed deployment can be easily achieved by running multiple Serverledge nodes on different machines. Just a few configuration changes are required to ensure
130+
that nodes coordinate with each other.
131+
132+
### Node Configuration
133+
134+
The following parameters in the configuration file are particularly relevant:
135+
136+
- `etcd.address`: **Required**. Set this to the address of your `etcd` server (e.g., `192.168.1.10:2379`). All nodes in the same deployment **must** use the same `etcd` cluster.
137+
- `registry.area`: **Required**. The geographic or administrative area where the node is located (e.g., `EDGE_ZONE_1`). Nodes within the same area will coordinate with each other for horizontal offloading.
138+
- `registry.remote.area`: (Optional) The identifier of a "higher-layer" infrastructure area (e.g., `CLOUD`). This enables vertical offloading to a cloud-like layer when the local area is overloaded.
139+
- `api.ip`: (Optional) The IP address of the current node that other nodes can use to reach it. If not set, Serverledge attempts to auto-detect a public IP address.
140+
141+
### Using the CLI
142+
143+
You can instruct `serverledge-cli` to connect to a specific node by means of environment variables or command-line options:
144+
145+
- Use `--host <HOST>` (or `-H <HOST>`) and/or `--port <PORT>` (or, `-P <PORT>`)
146+
to specify the server host and port on the command line.
147+
- Alternatively, you can set the environment variables `SERVERLEDGE_HOST` and/or `SERVERLEDGE_PORT`, which are read by the client.
148+
149+
Example:
150+
151+
$ bin/serverledge-cli status -H <host ip-address> -P <port number>
152+
153+
### Emulating a (local) distributed deployment
154+
155+
For testing, you can emulate a (local) distributed deployment by running multiple Serverledge nodes on the same machine.
156+
Note that in this case it is fundamental to use different ports for each node. Specifically, you must configure different values for:
157+
- `api.port`
158+
- `registry.udp.port`
159+
146160
## Workflows
147161

148162
Serverledge has been extended to support the composition of multiple functions into workflows.

0 commit comments

Comments
 (0)