git2consul icon indicating copy to clipboard operation
git2consul copied to clipboard

Add Datacenter support to consul operations

Open XerxesDGreat opened this issue 9 years ago • 5 comments

Since we have use of using different data centers for various reasons, we'd like to be able to point different configurations at a specific data center. Nominally, this should be simple to do, as it is very much like the token property; it's something which is added on all consul calls; in fact, I've done this already in a fork (and would be happy to share)

My question is whether or not there is a particular reason this hasn't been done already; is it just something which never came up / was never needed, or is there some insidious bug lurking below the surface?

XerxesDGreat avatar Jun 01 '16 15:06 XerxesDGreat

@XerxesDGreat to answer your question, the usual scenario is that git2consul runs on the target datacenter. In our case, we use consul-replicate to move KV data from one DC to another if need be, but in general we run an instance of git2consul in the datacenter that we want those KV to appear at.

calvn avatar Jun 01 '16 17:06 calvn

Thanks for the response!

Fair enough; I'm just trying to keep all the operations in a single location; we've got a single box which serves as a kind of utility node and was hoping to keep all instances of git2consul on that one box.

From what you stated, I didn't get the feeling that there was something technically preventing using datacenter with git2consul (aside from the fact that it's not implemented, of course), just that it's not a typical use case. Can you confirm that for me?

XerxesDGreat avatar Jun 01 '16 19:06 XerxesDGreat

That's correct. From a technical point of view this can be implemented, but there are available solutions and there was no compelling use case/scenario for this. We can include it as a feature enhancement in a future release of git2consul.

calvn avatar Jun 01 '16 19:06 calvn

Thanks; we'll likely be trying it out soon so I can let you know how it goes. As mentioned, I already have the code changes I think would be necessary to implement this; would you be interested in these modifications so you wouldn't have to do the work?

XerxesDGreat avatar Jun 01 '16 22:06 XerxesDGreat

Feel free to submit a PR with the changes and we can take a look at it!

calvn avatar Jun 20 '16 20:06 calvn