Last active
August 29, 2015 14:01
-
-
Save RMcD/24fac061e33422f26a3d to your computer and use it in GitHub Desktop.
AlwaysOn Configuration for Azure Internal Load Balencers
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$cloudService="corp-ods-db" | |
$ilb="corp-ods-lb" | |
$subnet="AlwaysOn-Static" | |
$IP="10.10.4.7" | |
Add-AzureInternalLoadBalancer -ServiceName $cloudService -InternalLoadBalancerName $ilb –SubnetName $subnet –StaticVNetIPAddress $IP | |
$vmNames=@("corp-ods-db1","corp-ods-db2") | |
$endPointName="SQLServer" | |
$prot="tcp" | |
$localPort=1433 | |
$publicPort=1433 | |
$probePort=59999 | |
$probeProt="TCP" | |
foreach ($vmName in $vmNames) { | |
Get-AzureVM –ServiceName $cloudService –Name $vmName | Add-AzureEndpoint -Name $endPointName -LBSetName "$endPointName-LB" -Protocol $prot -LocalPort $localPort -PublicPort $publicPort –ProbePort $probePort -ProbeProtocol $probeProt -DirectServerReturn $true -InternalLoadBalancerName $ilb | Update-AzureVM | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment