Configuring GlobalDcc
This page describes the configuration needed for developers to start. It relies on various defaults set within the files in this repository. Configuring GlobalDcc for deployment is a bit more complex, but the main ingredients and concepts are the same:
Dapr components
The dapr component for development are listed under /dev/dapr/components
.
All other components should be already set up for local development (else please correct and commit).
App settings
App settings are read from the usual config sources:
- appsettings.json
- appsettings.ENVIRONMENT.json
- environment variables
- user secrets
- command line args
It is recommended to use environment variables in
/dev/docker-compose/docker-compose.override.yml
for app settings.
When using multiple road nets, ensure that the dapr --app-id
is unique per
roadnet. The pubsub and state components can be shared across road nets (topics
and storage folder names are set by the apps and contain the road net id).
For an overview of all currently available settings, check the source code
(classes GlobalDccApiConfigOptions.cs
, GlobalDccBackendConfigOptions.cs
and
RoadNetManagerConfigOptions.cs
).
The /dev/docker-compose/docker-compose.yml
, appsettings.json
, and
appsettings.Development.json
files are in source control and define some
defaults you might wish to override with other config sources.
Data folder
Each backend expects to find a DccMulti.xml file within the folder
GlobalDccBackendConfig:DataFolderPath
on startup. This file contains dcc
specific configuration, i.p. the values
- bin_file: points to the road net data to load
- SPCMessageVersion
- RoadNetworkUpdatesFile
- GeoidUTMGeoLabel
For an explanation of these values, see the example file
/assets/default/DccMulti.xml
.
Note that /assets/
is a simple development example - it has subfolders for
three roadnet versions 'default', 'version_1', 'version_2', but the contained
DccMulti files actually point to the same roadnet data (in the parent folder).
For production, each version would use separate roadnet data.
Cache
Both api and backend require access to a shared cache database, which is
configured via Cache
.