Hi!
Our task consists of two scenarios
Let me tell what I've done in the first one:
the goal was to deploy infrastructure as showed below
Firstly, authenticating using a Service Principal with a Client Secret in the Cloud Shell. Described this providers:
- resource group
- vnet
- subnet
- network security group (with 80 HTTP port opened)
- publicIp x 3 (for LB x 1, for VMs x 2)
- network interfaces x 2 for VMs
- subnet network security group association
- load balancer
- lb probe (TCP/80)
- lb rule (TCP/80)
- VMs(2019-Datacenter) x 2 in different AZs
- DNS zone
here we goo) moving to the next step:
- connecting to VMs via azure bastion and exexute folowing script to setup WinRM
winrm quickconfig
netsh advfirewall firewall add rule name=”WinRM-HTTP” dir=in localport=5985 protocol=TCP action=allow
- next starting our script "script.ps1", which connects to VMs via WinRM and deploys are IIS, cleans our website/appPool
Our website:
Going to Default.html, created by the script, and opening one more window to be make sure LB is working properly:
the same link, different IPs
That`s all, thanks for paying attention)