Comments (3)
Hi @GarciaPL!
This is already possible by either:
- Using the builder:
builder.withConsulHost("http://localhost:8501")
orbuilder.withConsulHost("localhost:8501")
. - Or using ENV variables:
CONSUL_HOST=http://localhost:8501
orCONSUL_HOST=localhost:8501
.
from consultant.
Hi,
thank you for reply. Yes it works ;) Moreover I was trying to fetch properties from consul which are stored at this moment in directories like dev, qa but invoking getProperties() method returns empty Properties object. Do you have any idea what might be missing ?
from consultant.
Ah yes currently Consultant only supports one way of storing/retrieving settings. It only reads/listens to config defined in a particular folder in the root folder, which has to be named after the service name. So if I have a builder like this:
Consultant.builder()
.identifyAs("some-service")
.build();
Then the config for that service must be placed in a folder called "some-service". We currently don't have a way of conditionally loading settings depending the environment (qa, dev, etc). However it's probably not a good idea anyway to store all of those settings in the same Consul cluster. Instead what we do (which may also be of use to you) is to have separate clusters, each dedicated to their own environment, and containing settings specific to that setting. For development we run Consul in a VM locally, which we also register our services to, so we don't interfere with production or each other.
from consultant.
Related Issues (6)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from consultant.