1.1 - Region Selection

55.276559154426494, -7.628722913511502

Regions are geographic locations that generally contain several datacenters managed by your chosen cloud provider. They can contain multiple availability zones that provide redundancy within the region. Specific regions can dictate costs and latency. Regions can also determine what services are available in each cloud provider as new services are not always available in every region.

For this workshop we will be using us-west-2 for AWS and West US 2 for Azure.

AWS Regions list

Azure Regions list

In Tuono, you can define your region using cardinal directions and this will dynamically deploy your infrastructure to the the nearest datacenter. While this works well for most people, there are a few reasons why this might not be the best choice:

  • You require a specific datacenter, for which cardinal directions do not make sense, e.g. US Gov Virginia or AWS GovCloud?

  • You are in Europe and, data sovereignty aside, the closest datacenter is actually in another country.

  • You require a specific service or price point that denoting the datacenter by cardinal directions may not provide.

In such a scenario, you might need to provide an exact datacenter within your blueprint, and this bring up another question, what is it called? What follows is the transcript of a real conversation that goes on in an Engineer's head every time they need to pick a datacenter to deploy their infrastructure to. We are picking on Azure here, but the same conversation plays out wherever Venue you choose.

  • Alter ego: "Great! Now you can go ahead and deploy your infrastructure"

  • Engineer: "But where to exactly?"

  • Alter Ego: "Do you want a datacenter in the West or the East of the US?

  • Engineer: "I'll go East"

  • Alter Ego: OK, "East US" or "East US 2?"

  • Engineer: "What!? There are two in the East of the US? OK, I want "East US 2" because it is a little cheaper. What's that exact name so that I can add it to my blueprint?"

  • Brain: <silence>

  • Alter Ego: Bueller?

  • Engineer: Bueller?

  • All: "Ah... <insert_expletive>"

Luckily, both Azure and AWS have solutions for this problem. These are cross platform, easy to use, and also gives you a host of other features, such as being able to determine the available instance sizes.

Using the CLI

Often, it can be useful to use the CLI to dynamically pull the required information about available regions. This is useful not least because using a similar process you can identify the correct image for your infrastructure, something which we'll cover later.

To learn how to use the Azure CLI, try here.

Conclusion

So, now we know how to pull the direct datacenter name from both the Azure and AWS CLIs, but how do we use that in Tuono? Well, it's quite simple to define the exact datacenter to create an portable example applicable to both AWS and Azure:

location:
  region:
    <friendly_name>:
      aws: eu-west-1
      azure: northeurope

Notice in this example, I defined my local datacenter (Ireland) for both venues... and that's it... start having a play with creating your own portable blueprints that leverage the exact datacenter you require.

Last updated

Was this helpful?