Agents across multiple region support

Hi Team,

I have an use case where I want to run different steps using agens from different regions (e.g. AU and US)? Is that possible at the moment?

For more context, I’m using the Elastic CI Stack for AWS.

Thanks,
Nam

Hey there @nam!

Welcome to the community!

That would be possible, actually. You could use something like the following:

steps:
  - label: "Hello, world!"
    command: echo "Hello, world!"
    agents:
      aws:region: us-east-1
...

And then something like this to target an agent in Sydney:

...
  - label: "Goodbye, world!"
    command: echo "Hello, world!"
    agents:
      aws:region: ap-southeast-2

Screenshot 2023-08-31 at 15.14.15

You’d obviously require stacks/agents in each of those regions first!

Hope that helps!

1 Like

Hi @benmc

Thanks for a quick response.

Just to clarify, does the agents from these two regions have to have the same queue name, or it can be different, something like


steps:
  - label: "Hello, world!"
    command: echo "Hello, world!"
    agents:
      aws:region: us-east-1
      queue: deploy


...
  - label: "Goodbye, world!"
    command: echo "Hello, world!"
    agents:
      aws:region: ap-southeast-2
      queue: deploy-au

Thanks again

@nam :wave:

They can be different names if you like, the queue is just another filter, but it’s an && operator rather than an ||, so in your example it would need to be in us-east-1 and the deploy queue, it couldn’t be us-east-1 and deploy-au, for example.

Thanks again for your help @benmc

I will give it a try and let you know how it goes

1 Like

It works perfectly. Thanks @benmc

1 Like

Glad to hear it, @nam!