The service to control dynamic configs of the other userver-based services.
Service using PostgreSQL version 10+
The service is ready to use, contains minimal web interface for configs administration. make start-* commands will start the service with a message close to:
=================================================
Started service at http://localhost:8083/
=================================================
At the provided address the web interface is available:
# Clone the service
git clone git@github.com:userver-framework/uservice-dynconf.git
cd uservice-dynconf
# Create schemas and struct db for storage configs
psql -f ./postgresql/schemas/uservice_dynconf.sql
# Full db default value configs
psql -f ./postgresql/data/default_configs.sql
# Run build or install (optional Env PREFIX set install dir)
make install
# Run service
uservice-dynconf --config /etc/uservice-dynconf/config_vars.yamlIn file static_configs.yaml of the microservice add the following lines to connect and retrieve configurations from the uservice-dynconf:
dynamic-config-client:
# uservice-dynconf address
config-url: http://localhost:8083
# service name to send to uservice-dynconf
service-name: microservice-name
http-retries: 5
http-timeout: 20s
dynamic-config-client-updater:
config-settings: false
full-update-interval: 1m
load-only-my-values: true
store-enabled: true
update-interval: 5sHTTP REST API of the uservice-dynconf is described in OpenAPI format in file
Makefile contains useful targets for development:
make build-debug- debug build of the service with all the assertions and sanitizers enabledmake build-release- release build of the service with LTOmake test-debug- does amake build-debugand runs all the tests on the resultmake test-release- does amake build-releaseand runs all the tests on the resultmake start-debug- builds the service in debug mode and starts it with web interfacemake start-release- builds the service in release mode and starts it with web interfacemakeormake all- builds and runs all the tests in release and debug modesmake format- autoformat all the C++ and Python sourcesmake clean-- cleans the object filesmake dist-clean- clean all, including the CMake cached configurationsmake install- does amake build-releaseand runs install in directory set in environmentPREFIXmake install-debug- does amake build-debugand runs install in directory set in environmentPREFIXmake docker-COMMAND- runmake COMMANDin docker environmentmake docker-build-debug- debug build of the service with all the assertions and sanitizers enabled in docker environmentmake docker-test-debug- does amake build-debugand runs all the tests on the result in docker environmentmake docker-start-release- does amake install-releaseand runs service in docker environmentmake docker-start-debug- does amake install-debugand runs service in docker environmentmake docker-clean-data- stop docker containers and clean database data
Edit Makefile.local to change the default configuration and build options.
Distributed under the Apache-2.0 License with the CLA.