I was able to setup a VM in a vNet and RDP to it. It is the simplest scenario to use Azure IaaS. A virtual network supplies a perfect isolation to group related resources that talk to each other. Usually that is not how it is used in the real world.
There are many services living under isolated environments. They expose endpoints that other services can communicate with. Warning: I do not discuss about microservices. Regardless of the term, each service will stay inside a virtual machine in a virtual network. What would it take to make them talk to each other?
Follow the step I did in the previous post, I created another setup in Central US.
Network Peering
There are 2 different virtual networks at different locations, with different address spaces
For 2 virtual networks, there is Network Peering. From each virtual network, create a peering to the other.
A peering can
- Peer 2 virtual networks (of course there must be 2) in different regions
- Belong to a different subscription. It is possible to select a different subscription when creating a peering.
Creating a peer is pretty simple
The above creates a peer from ps-az300-vnet to ps-vnet. To finish the peering, create another one from ps-vnet to ps-az300-vnet.
The peering is ready. Let’s see if these virtual machines can talk to each other
Let’s RDP to each machine and test a connection to the other. This picture makes my day
So far, I am able to
- Create a virtual machine with its network setup. In a more abstract term, I create an isolated environment which allows me to deploy whatever I want
- Connect the 2 isolated environments via Azure Peering resource
Gateway, Hub-spoke topology
Another option is to use a gateway, hub-spoke. They are kind of advanced topics that I do not really need to grasp at the moment. There are step by step on MS Docs site.