Lipi is now available via docker. if you already have docker installed, you could run LIPI with only a few commands. To install docker on various platforms see https://docs.docker.com/get-docker/
Environment variables
LIPI_API_KEY - Api key from lipi config in Map Editor
LIPI_HTTP_SCHEME - The http protocol LIPI will run with (
http
orhttps
)POSITION_PROVIDER_USERNAME - Username of the position provider (CMX, Aruba ALE...)
POSITION_PROVIDER_PASSWORD - Password of the position provider (CMX, Aruba ALE...)
Required
LIPI_API_KEY
POSITION_PROVIDER_USERNAME
POSITION_PROVIDER_PASSWORD
Optional and defaults
LIPI_HTTP_SCHEME='https'
Possible Values:
http
,https
Running LIPI
...
LIPI Image Version
The current stable LIPI version is 4.1.0_0
...
Running LIPI
Create an environment variable file lipi-docker-env-file
Code Block | ||
---|---|---|
| ||
LIPI_IMAGE_VERSION=4.1.0_0 LIPI_API_KEY=<lipi-api-key> docker rm# -f lipi-server docker run -e LIPI_API_KEY=$LIPI_API_KEY \ -eWhere DNA Spaces is the position provider, the following should be left as is POSITION_PROVIDER_USERNAME=<username-here> \ -e POSITION_PROVIDER_PASSWORD=<password-here> |
Use the environment variable file to start the lipi
For production: Start the service in the background, by adding the --detach
option:
Code Block | ||
---|---|---|
| ||
sudo docker run --detach --rm --name lipi \ --env-file=lipi-docker-env-file \ -p 443:4438080 \ gcr.io/mazemap-public-docker/lipi:latest |
Special case: For debugging/testing: you can run without the --detach option to remain inside the docker context and see what is going in after starting it.
Code Block | ||
---|---|---|
| ||
sudo docker run --rm --name lipi-server \ --env-file=lipi-docker-env-file \ -p 443:8080 \ gcr.io/mazemap-public-docker/lipi-server:$LIPI_IMAGE_VERSION |
...
:latest |
Inspecting logs
Docker has a command to view the logs of containers running in the background: docker logs <container_name>
.
By default this command prints everything logged since the container was started and then returns you to the command prompt. You may add the option --follow
to see the log messages as they arrive. If the service has been running for a long time and you’re only interested in, say, messages from the last 5 minutes, use --since 5m
. Putting it all together:
Code Block |
---|
sudo docker logs --since 5m --follow lipi |
Start Server with local config.json
file
Remember to fill in the placeholdersThis is a special case, the normal case for production use is to start the service in the background, as described further up in this document.
Code Block | ||
---|---|---|
| ||
LIPI_IMAGE_VERSION=4.1.0_0 LIPI_API_KEY=<lipi-api-key> docker rm -f lipi-server docker run -e LIPI_API_KEY=$LIPI_API_KEY sudo docker run --rm --name lipi \ -e POSITION_PROVIDER_USERNAME=user \ -e POSITION_PROVIDER_PASSWORD=pass \ -p 443:443 -env-file=lipi-docker-env-file \ -v <your-config-path>:/srvapp/resources/local_config.json \ --name lipi-serverp 443:8080 \ gcr.io/mazemap-public-docker/lipi-server:$LIPI_IMAGE_VERSION:latest |
Applying LIPI Config Changes
Changes to the LIPI configuration can be applied by simply restarting the running lipi-server container
...
deleting the container:
Code Block | ||
---|---|---|
| ||
sudo docker rm -f lipi |
And then starting again it in the same way as normal.
Available LIPI versions
You can choose to run a specific LIPI version by replacing latest
with a specific version string. To list available versions:
Code Block | ||
---|---|---|
| ||
wget -q https://gcr.io/v2/mazemap-public-docker/lipi/tags/list -O - | \
python -c "import json, sys; tags=json.loads(sys.stdin.read())['tags']; print(*[tag for tag in tags if len(tag) < 40], sep='\n')" |
Recognized variables
LIPI_API_KEY - Api key from lipi config in Map Editor
LIPI_HTTP_SCHEME - The http protocol LIPI will run with (
http
orhttps
)POSITION_PROVIDER_USERNAME - Username of the position provider (CMX, Aruba ALE...)
POSITION_PROVIDER_PASSWORD - Password of the position provider (CMX, Aruba ALE...)
HTTP_PROXY_SCHEME - Proxy server protocol (http or https)
HTTP_PROXY_HOST - Host name of proxy server
HTTP_PROXY_PORT - Port number for proxy server
REQUIRE_API_KEY_IN_NOTIFICATIONS - If set to “yes”, rejects CMX notifications if they don’t have X-LIPI-API-Key header set to the value of LIPI_API_KEY. Added in 4.2.12.
Required
LIPI_API_KEY
POSITION_PROVIDER_USERNAME
POSITION_PROVIDER_PASSWORD
Optional and defaults
LIPI_HTTP_SCHEME='https'
Possible Values:
http
,https
REQUIRE_API_KEY_IN_NOTIFICATIONS='no'
Security and privacy considerations
The LIPI_HTTP_SCHEME should only be set to http for testing purposes, as this means that users' positions will be sent unencrypted between LIPI and the user devices.
The REQUIRE_API_KEY_IN_NOTIFICATIONS variable should be set to “yes” in production, otherwise it is theoretically possible for malicious users to pose as a CMX server and inject position and user data into the LIPI, which could cause service disruptions.