This repository allows to deploy a lifemap backend.
To deploy backend and frontend, first install Ansible, for example with pipx:
pipx install --include-deps ansible
The backend is composed of several elements:
points
, lines
and polygons
tables), as well as "production" tables (points_prod
, lines_prod
and polygons_prod
tables). When the tree is updated, build tables are emptied and recreated, and production tables are copied from build tables only if the update process is successful.taxo
for tree data and addi
for additional data.These elements are build and deployed with docker compose, from back/docker/docker-compose.yml
.
Another element deployed to the backend is the builder
, a set of Python and shell scripts that download and process data to build both the tree data in postgis and additional informations stored in solr.
The backend should be deployable on any recent debian-based distribution by following these steps:
Edit the file inventory.yml
. Change the values of backend_ip
, frontend_ip
, backend_hostname
, frontend_hostname
, postgresql_password
and solr_password
.
Install the base system by running:
ansible-playbook -i inventory.yml back/00_install_system_back.yml
ansible-playbook -i inventory.yml back/install_back.yml
ansible-playbook -i inventory.yml back/install_builder.yml
This repository also contains two test frontends which are deployable on the backend server (it is also possible to deploy them on another machine). These are development frontends, the real one is in the lifemap-front repository.
To deploy these frontends:
ansible-playbook -i inventory.yml back/install_front.yml
They will be accessible at the /ncbi/
(for the mod_tile bitmap frontend) and /bbox/
(for the bbox vector frontend) urls.
To create or update the data needed to run Lifemap, ssh to the backend and run:
cd ~/builder/
./update_lifemap.sh
# Optional: prerender mod_tile tiles
./prerender_mod_tiles.sh
# Optional: seed bbox vector tiles
./prerender_bbox.sh