I can initialise the Consul services at startup using the /consul/config directory. I would like to be able to initialise my application settings into the Consul kv store when I start the Consul container. Is this possible?
Possible to initialise Consul Key Value store at startup?
2k Views Asked by David Clarke At
2
There are 2 best solutions below
Related Questions in DOCKER
- Docker, redirecting to virtualbox port
- Collect only from STDERR when using Docker syslog logging driver
- How can I create a docker image from the current system?
- Moving Docker Containers Around
- How can I test with serverspec that Jenkins is running in a jenkins docker container?
- How to deploy django 1.8 on Elastic Beanstalk using Docker
- Emulating `docker run` using the golang docker API
- Where are docker images and containers stored when we use it with Windows?
- docker compose, vagrant and insecure Repository
- Commit data in a mysql container
- oh-my-zsh installation returns non zero code
- Use custom docker binary in CoreOS
- Can I use docker image ubuntu 14.04 if my host is 12.04?
- Hide/obfuscate environmental parameters in docker
- How to add initial users when starting a RabbitMQ Docker container?
Related Questions in .NET-CORE
- NLog with DNX Core 5.0
- How should I reference HttpClient for dnx451 and dnxcore50?
- DNX Core 5.0 library to target any platform. No System.Random class. Workarounds or options?
- Kestrel Running which framework?
- Directory.CreateDirectory not exists in .NET Core
- asp.net dnxcore50 load assembly by file path
- .NET Core doesn't depend on any installation?
- Why is linq to object implementing iterators manually?
- Microsoft Band and WPF
- Determine port in asp.net core
- ASP.NET Core IISIntegration.Tools and .NET Framework
- ANTLR 4.5.3 C# lexer fails to initialize (ATN UUID error)
- Opening Visual Studio 2017 projects in Visual Studio 2015
- dotnetCore (1.0.0-preview2-1-003177) - build warnings as errors - how?
- How to implement interface of C# use COM of native C++?
Related Questions in CONSUL
- Does Consul persist the Key Value store?
- Consul agent does not respond
- How do config tools like Consul "push" config updates to clients?
- i/o timeout error using progrium/docker-consul
- How is service discovery not a subset of centralized configuration?
- How to access Consul's DNS interface from a hostmachine?
- How to use variable in Marathon Docker parameters
- Generating -bind parameter in Consul JSON files for use with Marathon
- Accessing consul UI running in docker on OSX
- Consul set up without docker for production use
- Random ports for microservices registered with Consul
- Why does Consul try to connect to my database?
- How to use consul/registration for service discovery on kubernetes nodes?
- How to fix `error starting agent failed to get advertise address multiple private ips found`
- Docker CMD evaluation with ENTRYPOINT
Related Questions in CONSUL-KV
- How to use Consul to perform synchronize task on one machine at a time?
- Using Consul for dynamic configuration management
- Consul KV store endpoints
- Consul KV read from Spring Integration transformers
- Do consul possess an upper limit on number of consul watches?
- Access consul-api from consul-connect-service-mesh
- How to get the configuration for the React app from "CONSUL"
- Not able to read consul key value properties into spring boot application
- Deploy Vault and consul agent in same pod with TLS using helm
- Auto-updated key value in consul?
- Reading through Consul keys data in terraform
- Consul: increment a counter in a KV atomically with multiple nodes
- Does Consul KV supports reading multiple keys?
- Consul HTTP requests to get all kv values
- Possible to initialise Consul Key Value store at startup?
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
I wanted a simple approach to set application settings in Consul for a microservice project. I'm sure there are a number of existing tools but I wanted something that was lightweight and suits my development process. So rather than try to work with some of @mgyongyosi's suggestions I wrote a quick dotnet console application to do the (not so) heavy lifting. Under the project root directory I've created a directory structure
Consul/kv. The child directories under that path represent keys in the Consul KV store and ajsonfile at a leaf represents the application settings. Note there is only expected to be a singlejsonfile per leaf directory. The application uses the Consul.NET nuget package for communicating with Consul.