timetable-mgr/README.md

41 lines
2.7 KiB
Markdown
Raw Permalink Normal View History

2024-03-23 11:26:24 +00:00
# timetable-mgr
2023-07-15 20:15:33 +01:00
2024-03-23 11:26:24 +00:00
timetable-mgr is the new name for mq-client.
It has been extended to manage all timetable management aspects within OwlBoard:
- Periodic fetch of CORPUS Location Data
2024-06-30 08:58:50 +01:00
- Periodic fetch of Knowledgebase Stations data
2024-03-23 11:26:24 +00:00
- Daily fetch of Network Rail timetable files
- Subscribe to VSTP Messages from the MQ Feed
- Update the database with new timetable data
- Clean old services from the database
The configuration options have also been changed to support simple files, this allows support for Docker Secrets as well as the mounting of secrets within a Kubernetes cluster in addition to the existing method of configuring via environment variables.
## Configuration
The application requires the following configuration values to be set.
The preferred method of configuration in Kubernetes is mapping secrets to environment variables, and in Docker is to mount the secrets to a file - one value per file. This is the simplest method and provides an acceptable level of security - provided you have configured secret management within Kubernetes.
Docker Swarm has secret support built-in, for Docker Standalone/Podman you will need to manage secrets yourself.
See the table below for the environment variable name, the configuration file path. Some values have defaults which will be used if the variable is not set and the file path does not exist. In cases where the file path exists and the environment variable also exists, the environment variable will be used. All values without a default are required,timetable-mgr will exit if it cannot load a value.
2024-03-23 11:51:26 +00:00
| Variable Name | File Path | Default Value | Description |
| :------------ | :------------------ | :------------ | :---------- |
2024-03-23 11:58:20 +00:00
| OWL_VSTP_ON | /owl/conf/vstp/on | on | Enable/Disable VSTP Updates <sup>1</sup> |
2024-03-23 11:51:26 +00:00
| OWL_NROD_USER | /owl/conf/nrod/user | | Network Rail NROD Username |
| OWL_NROD_PASS | /owl/conf/nrod/pass | | Network Rail NROD Password |
| OWL_DB_HOST | /owl/conf/db/host | localhost | MongoDB Host |
| OWL_DB_PORT | /owl/conf/db/port | 27017 | MongoDB Port |
| OWL_DB_USER | /owl/conf/db/user | | MongoDB Username |
| OWL_DB_PASS | /owl/conf/db/pass | | MondoDB Password |
<sup>1</sup> Set to 'off' to disable VSTP Updates. Useful in testing as you cannot have two clients connected.
## Logging
Logging is at INFO level. The environment variable 'runtime' is checked. If it is set to `debug`, then the log level will be set to DEBUG.
If the environment variable 'perflog' is set to `on`, then the number of running goroutines and heap memory allocation will be printed to the console every two seconds. Of course this is off by default.