Code Monkey home page Code Monkey logo

Comments (3)

pierresouchay avatar pierresouchay commented on August 22, 2024

@kshpytsya Well, for now I would like to avoid this to avoid over complexifying the codebase as it would break the existing templates (aka, a way to specify a particular instance of a given cluster).

Furthermore, having one single agent allow to be broken when the while cluster is down (and to have a particular behavior in that case), but what if 1 cluster is broken and not the other ones, mixing several clusters in a single template?

So, unless you come with a nice PR dealing with those issues, I would say it is probably not a priority on our side :-)

We are already doing in very large production what you describe, but we try - as much as possible - to have clear separation between datacenters for instance to reduce the risk of a big resilience issue (you might have a look to https://medium.com/criteo-labs/mixing-observability-with-service-discovery-2bb8909e8530 on how we are doing this).

As a side note, as you already noticed, it is still possible to mix several instances of consul-templaterb on a single machine (and ask your prometheus - if you want to do so - to use several files and use all those files to have a single instance fetching data from various clusters). It is even possible to have a single template source using different parameters (see https://github.com/criteo/consul-templaterb/#generate-multiple-templates )

from consul-templaterb.

kshpytsya avatar kshpytsya commented on August 22, 2024

Thank you for your elaborate answer. It looks I am just going to implement the functionality I need in my language of choice, namely Python using Consul's http API.

from consul-templaterb.

pierresouchay avatar pierresouchay commented on August 22, 2024

Hello @kshpytsya,

After some thinking, and a in depth look at the code, the patch to achieve what you wanted to do is not that difficult, so I implemented it in Release 1.26.0.

There is an advanced example on how doing it here:
https://github.com/criteo/consul-templaterb/blob/master/samples/all_services_multi_agents.txt.erb

I hope it will help you, but most methods do now support to add agent: http://address_of_consul_or_vaul:port, so you can federate multiple clusters if you want.

See https://github.com/criteo/consul-templaterb/blob/master/TemplateAPI.md for more information.

from consul-templaterb.

Related Issues (20)

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.