This is a small guide how to deploy lume-Stack on worker nodes with docker-compose.
The following containers are included in the backend deployment:
| Name | Description |
|---|---|
| REST-API | Accepts app-reportings of new flame passings (tree nodes) and inserts them into the neo4j database |
| Neo4j | Graph database to store the path of the fire |
| Mapview | Angular MapView to show the graph on a map |
| Maptiler | Tiles-Service for the angular app |
Remark: The lume-app is not part of this deployment, because the app download link is hosted by github releases.
For more on this see the releases section of the app repository and the corresponding github-action.
To prepare your worker node for serving the lume backend stack,
first run the installation script ./install.sh (only on first time setting up the worker).
This guide shows, how to configure and start the services
- Edit Config
config.sh - Load Config in env variables:
source config.sh - Run Docker-Compose:
docker-compose up [-d] - Initialize Database (only on first start / fresh installation):
- Check for syntactical correctness:
envsubst < seed.cql | less - Apply Configuration with:
envsubst < seed.cql | docker exec -i neo4j cypher-shell -u neo4j -p changeme --format plain
This substitutes the config variables in the seed file and sends it to the database. Can only be called once because neo4j user's password gets changed.
- Check for syntactical correctness:
If there is an update in one of the services, this services image first needs to be pushed to the ghcr.io-Registry.
As soon as the image is there, follow these steps to update the containers:
- Shut down the services
docker-compose down - Update all images used
docker-compose pull - Start all services
docker-compose up -d
This section may be helpful if you have a runner with no direct internet connection.
- Save the id files in your .ssh directory
- add the id file to the ssh agent
or
create a ~/.ssh/config with:Host *lume* User root IdentityFile <Absolute path to id_ed25519 file> - establish a ssh connection with http proxy tunnel
Use guide on Stackexchange
In case you need some sample data, the neo4j database can be seeded with the mock scipts in this repository.
- Create Randomize-Config in mock folder (see
mock/template.py) - Run Randomization:
python3 mock/<file>.py(Api and Database need to be running for this to work)