Formerly mq-client. Manages the timetable data in the database, fetching, updating and purging old services. https://owlboard.info
Go to file
Fred Boniface c4d680116a
All checks were successful
Go Test / test (push) Successful in 30s
Add additional keys for database.Service struct
2024-04-08 11:44:36 +01:00
.gitea/workflows Reorganise repo 2024-04-05 22:23:42 +01:00
background Reorganise repo 2024-04-05 22:23:42 +01:00
cif Add additional keys for database.Service struct 2024-04-08 11:44:36 +01:00
corpus Reorganise repo 2024-04-05 22:23:42 +01:00
dbAccess Implement function to insert new CIF entries in to the database and adjust the deletion function to follow the same style. 2024-04-06 22:27:55 +01:00
helpers Reorganise repo 2024-04-05 22:23:42 +01:00
log Reorganise repo 2024-04-05 22:23:42 +01:00
messaging Reorganise repo 2024-04-05 22:23:42 +01:00
nrod Reorganise repo 2024-04-05 22:23:42 +01:00
vstp Reorganise repo 2024-04-05 22:23:42 +01:00
.dockerignore Update dockerignore 2024-04-05 22:28:54 +01:00
.gitignore Add default binary names to .gitignore to prevent inflating repo size by accidental inclusion 2024-04-05 21:51:09 +01:00
Dockerfile Update dockerfile for new repo layout 2024-04-05 22:28:30 +01:00
go.mod Begin parsing of JsonSchedule 2024-04-07 21:28:48 +01:00
go.sum Begin parsing of JsonSchedule 2024-04-07 21:28:48 +01:00
LICENSE Initial commit 2023-07-15 20:15:33 +01:00
main.go Reorganise repo 2024-04-05 22:23:42 +01:00
README.md Update Markdown format 2024-03-23 11:58:20 +00:00

timetable-mgr

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
  • 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.

Variable Name File Path Default Value Description
OWL_VSTP_ON /owl/conf/vstp/on on Enable/Disable VSTP Updates 1
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

1 Set to 'off' to disable VSTP Updates. Useful in testing as you cannot have two clients connected.