Legate is a webservice forwarder that is intertwined with Consul. It forwards any HTTP requests via HTTP redirection to a service that is registered by Consul. i
Simply start legate with a call to its command `legate '. For example this call may be like this:
legate consulserver:8500
Any configuration will be dervied from command line parameters unless -config
is given to set a
configuration file.
A docker container with the name lycis/legate:latest
is avaibale at Docker Hub. It can be configured
by using command line parameters and ran by using a command like this:
docker run -p 8080:8080 lycis/legate:latest -dc dc01 consul:8500
The host port 8080 can thereafter be used to access the service.
Usually legate
is configured by providing matching command line parameters:
-bind string
address and port to bind to (e.g. 127.0.0.1:80) (default ":8080")
-config string
configuration file
-dc string
consul datacenter (default "dc01")
If Legate is configured by file the given file has to be a YAML file with the follwing structure:
Example:
consul:
address: consulserver:8500
datacenter: dc01
bind: 0.0.0.0:8080
- consul: This section directly refers to the configuration of the Consul API. See here
- bind: Address and port to bind to (default: 0.0.0.0:8080)