[Nomad] Nomad Server Multi Region Auto Join

Hi, is we have native automated way to do nomad multi region federation without hitting the button nomad server join X.X.X.X ?

So for context as the nomad server IP is changing when we do nomad upgrade / change the config, we want to do nomad server join to another region automatically

or is there any best way to do this ?

Warm Regard,
Kholis RA Gumelar

Hi Kholis.

Thanks for using Nomad!

Does your use case allow you to post a join request somehow?


Yeah, it can do the mult-region federation,
but not in automatic way, what I want is in an automatic way, after we do upgrading / updating the nomad server asg.

so there is not nomad native method to join in automated way?

lets say we have nomad server asg, then we need to upgrade it, it will have new IP right?,

afaik, after like that, we still need to join it manually, by hitting that api

I’m searching how to automated it without hitting the endpoint again, after we upgrade

Hi @petrukngantuk1. Thanks for using Nomad!

I admit, I haven’t personally tried this in a multi-region deployment, but is it safe to assume the retry_join provider= approach is not working for you? It seems like it should. The cloud-auto-join docs show that a region setting is available. Did you see all that documentation already?

let me try it first, can the region flag be multi region or not

Does the retry_join support multiple spec?

I mean first we retry_joint o server in aws same region
Then retry join again to server in aws in different region,

If it can, we just need to config the retry join to multiple spec, based ok regions

I believe that depends on the go-discover library. I’m sorry say this, but as best as I can tell, it doesn’t support specifying multiple regions.

That said, are you really trying to failover to a different cloud provider region? I ask because the region the the cloud auto-join provider setting relates to the cloud provider region (e.g. AWS us-east) not the Nomad region. I apologize, but I’m not sure I understand your use case fully yet.

nope, we need to create nomad federation, in aws, regardless its same / different aws region

Ok. I think I better understand what you are trying to do here. While I’m researching options it occurred to me, could you just use DNS instead of IP and solve the failover at the DNS level?