GithubHelp home page GithubHelp logo

apolukhin / uservice-dynconf Goto Github PK

View Code? Open in Web Editor NEW

This project forked from userver-framework/uservice-dynconf

0.0 1.0 0.0 112 KB

The service to control dynamic configs of the other userver-based services

License: Apache License 2.0

C++ 44.57% Python 35.29% Makefile 12.85% CMake 7.29%

uservice-dynconf's Introduction

uservice-dynconf

CI

The service to control dynamic configs of the other userver-based services.

Service using postgres db version 10+

The service is ready to use. Web interface for configs administration would be added soon.

Run uservice-dynconf

# Clone the service
git clone [email protected]:userver-framework/uservice-dynconf.git
cd uservice-dynconf
git submodule update --init

# 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.yaml

HowTo configure other userver-based microservices to use uservice-dynconf

In 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
            fallback-path: dynamic_config_fallback.json
            full-update-interval: 1m
            load-only-my-values: true
            store-enabled: true
            update-interval: 5s

HTTP API

HTTP REST API of the uservice-dynconf is described in OpenAPI format in file

Makefile

Makefile contains useful targets for development:

  • make build-debug - debug build of the service with all the assertions and sanitizers enabled
  • make build-release - release build of the service with LTO
  • make test-debug - does a make build-debug and runs all the tests on the result
  • make test-release - does a make build-release and runs all the tests on the result
  • make or make all - builds and runs all the tests in release and debug modes
  • make format - autoformat all the C++ and Python sources
  • make clean- - cleans the object files
  • make dist-clean - clean all, including the CMake cached configurations
  • make install - does a make build-release and runs install in directory set in environment PREFIX
  • make install-debug - does a make build-debug and runs install in directory set in environment PREFIX
  • make docker-COMMAND - run make COMMAND in docker environment
  • make docker-build-debug - debug build of the service with all the assertions and sanitizers enabled in docker environment
  • make docker-test-debug - does a make build-debug and runs all the tests on the result in docker environment
  • make docker-start-service - does a make install and runs service in docker environment
  • make docker-start-service-debug - does a make install-debug and runs service in docker environment
  • make docker-clean-data - stop docker containers and clean database data

Edit Makefile.local to change the default configuration and build options.

License

Distributed under the Apache-2.0 License with the CLA.

uservice-dynconf's People

Contributors

alexiprof avatar apolukhin avatar podsvirov avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.