Deployment¶
Systemd Service¶
The tile server can be installed as a systemd service for automatic startup.
Installation¶
# Build and install
cd build && cmake .. && make gva-tile-server -j$(nproc)
sudo cmake --install . --prefix /usr
# Enable and start
sudo systemctl enable --now gva-tile-server
# Check status
systemctl status gva-tile-server
sudo journalctl -u gva-tile-server -f
Configuration¶
The service reads environment variables from /etc/default/gva-tile-server:
# /etc/default/gva-tile-server
# Copernicus Data Space credentials (for Sentinel-2)
CDSE_CLIENT_ID=your-client-id
CDSE_CLIENT_SECRET=your-client-secret
The systemd service uses /var/cache/gva-maptiles as the shared tile cache directory,
accessible to both the tile server and BMS applications.
Debian Package¶
# Build the .deb package
./packages/build-service-packages.sh
# Install
sudo dpkg -i build/gva-tile-server-service_0.2.0_amd64.deb
Copernicus Sentinel-2¶
Copernicus Sentinel-2 imagery requires OAuth2 authentication via the Copernicus Data Space Ecosystem (CDSE).
Registration¶
- Register for a free account at dataspace.copernicus.eu
- Navigate to your CDSE Dashboard and select OAuth Clients
- Click Create New to register an OAuth2 client application
- Copy the Client ID and Client Secret from the client details page
Tip
Full instructions are available in the CDSE OAuth Client Registration Guide.
Configuration¶
Set environment variables before starting the tile server:
Or configure in the systemd environment file:
Syncing Sentinel-2 Tiles¶
gva-tile-server --sync \
--source "Sentinel-2 L2A - True Color" \
--bbox "149.0,-35.5,149.3,-35.2" \
--zoom "0-12" \
--rate-limit 2
Farnborough, UK example (bbox covers airfield and surrounding area):
gva-tile-server --sync \
--source "Sentinel-2 L2A - True Color" \
--bbox "-0.82,51.25,-0.68,51.32" \
--zoom "0-12" \
--rate-limit 2
Note
Sentinel-2 sources are rate-limited to 2 requests/second to comply with CDSE fair usage policies. The tile server enforces this automatically.
Operational Deployment¶
Pre-Mission Tile Sync¶
Before deploying to a disconnected environment, sync tiles for the area of operations.
Farnborough, UK¶
Bounding box -0.82,51.25,-0.68,51.32 covers the town, airfield and surrounding area:
# OpenStreetMap base map (zoom 0-16, ~3 400 tiles)
gva-tile-server --sync --source "OpenStreetMap - Standard" \
--bbox "-0.82,51.25,-0.68,51.32" --zoom "0-16"
# Sentinel-2 satellite imagery (zoom 0-12, requires CDSE credentials)
gva-tile-server --sync --source "Sentinel-2 L2A - True Color" \
--bbox "-0.82,51.25,-0.68,51.32" --zoom "0-12" --rate-limit 2
Canberra, Australia¶
# Sync multiple sources for the AO
gva-tile-server --sync --source "OpenStreetMap - Standard" \
--bbox "149.0,-35.5,149.3,-35.2" --zoom "0-16"
gva-tile-server --sync --source "GA - Satellite Imagery" \
--bbox "149.0,-35.5,149.3,-35.2" --zoom "0-14"
gva-tile-server --sync --source "GA - Topographic" \
--bbox "149.0,-35.5,149.3,-35.2" --zoom "0-14"
Portable Cache¶
The tile cache can be copied to removable media for deployment:
# Export cache to USB drive
cp -r /var/cache/gva-maptiles /media/usb/gva-maptiles
# Import on target system
cp -r /media/usb/gva-maptiles /var/cache/gva-maptiles
Disconnected Operation¶
With the tile server running and tiles pre-synced, the BMS application works fully
offline using the Local - * map sources. No internet connectivity is required.