Creating VNets

Create two Virtual Networks (VNets), one in the East US region (Vnet 1) and one in the West US region (Vnet 2).



While creating the VPC, I enable the option to create a Bastion host.

Success



Creating VMs

In each VNet, deploy two Virtual Machines (VMs) - VM1 and VM2.

West USEast US
VM1
VM1
VM2
VM2

Success



Using “storage account” hectorstorage12345

  • I create a ‘upload’ container with blob access.

I download error.html file that renders

I upload error.html to “Static website”

I click ‘Save’ and then receive the endpoints.

I click $web

I make note of the “Primary endpoint”

https://hectorstorage12345.z1.web.core.windows.net/

Success



Creating gateways

app-gate-west-us

app-gate-east-us

Gateways



Configure VMs

VM1

Prerequisite: before running vm1.sh

sudo apt remove python3-blinker -y
sudo apt autoremove -y

I run the script vm1.sh

git clone https://github.com/hectorproko/azproject.git
cd azproject
bash vm1.sh

Inside my local repo azproject I edit file config.py

[DEFAULT]
# Account name
account =accountname
# Azure Storage account access key
key =storageaccountkey
# Container name
container =upload

I replace account name and key with the following commands:

sed -i "s|accountname|hectorstorage12345|" config.py
sed -i "s|storageaccountkey|*********|" config.py

********* represents my storage account key


I execute the Flask application app.py:

sudo python3 app.py



VM2

I run the script vm2.sh

git clone https://github.com/azcloudberg/azproject
cd azproject
bash vm2.sh

I create traffic manager



Traffic Manager Endpoints

I go to my Traffic Manager and navigate to “Endpoints” where I click ”+ Add”

At some point, the public IP of the gateway will need to be assigned a DNS name.



Traffic Manager with endpoints I make note of the “DNS name”

Verify

I use the “DNS name” from above
I test the path /upload

I upload a file and click “Upload” button

If I navigate to my upload container, I see the file I just uploaded.

Success


Create VNet peering

I follow the same steps as in Assignment 1: Module 6



Success

I ping each VM in different regions to each other.