Skip to content

Commit 4e23125

Browse files
committed
Add script to MDP docs
1 parent f258631 commit 4e23125

File tree

2 files changed

+99
-0
lines changed

2 files changed

+99
-0
lines changed

docs/managed-devops-pools/configure-networking.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -206,6 +206,18 @@ If you have systems in place on your network (NSG, Firewall, etc.) that restrict
206206

207207
If you configure your Azure DevOps Pipeline to run inside of a container, you need to also allowlist the source of the container image (Docker or ACR).
208208

209+
## Validating Endpoint connectivity
210+
211+
To confirm that you can use a given subnet with Managed DevOps Pools, you can run the following script on a resource on that subnet to validate that the network flow is configured to reach all these available endpoints, and additionally the Managed DevOps control plane.
212+
213+
[ValidateMDPEndpoints.ps1](./scripts/ValidateMDPEndpoints.ps1)
214+
215+
To run the script, with Powershell Core, Powershell 5 or greater you can run
216+
217+
```powershell
218+
.\ValidateMDPEndpoints.ps1 -organization "<your-organization>"
219+
```
220+
209221
## Configure the Azure DevOps Agent to run behind a Proxy
210222

211223
If you configured a proxy service on your image and want your workloads running on your Managed DevOps pool to run behind this proxy, you must add the following environment variables on your image.
Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
param (
2+
[string]$organization
3+
)
4+
$azureDevOpsUris = @(
5+
"https://dev.azure.com",
6+
"https://vssps.dev.azure.com",
7+
"https://vsrm.dev.azure.com",
8+
"https://management.azure.com",
9+
"https://login.microsoftonline.com",
10+
"https://graph.microsoft.com",
11+
"https://aadcdn.msftauth.net",
12+
"https://${organization}.visualstudio.com",
13+
"https://${organization}.vsrm.visualstudio.com",
14+
"https://${organization}.vstmr.visualstudio.com",
15+
"https://${organization}.pkgs.visualstudio.com",
16+
"https://${organization}.vssps.visualstudio.com",
17+
"https://download.agent.dev.azure.com",
18+
"download.agent.dev.azure.com"
19+
)
20+
$managedDevOpsPoolsControlPlaneUris = @(
21+
# List of agent queue endpoints - maps to *.queue.core.windows.net
22+
"https://rmprodaedefaultcq.queue.core.windows.net",
23+
"https://rmprodbrsdefaultcq.queue.core.windows.net",
24+
"https://rmprodcncdefaultcq.queue.core.windows.net",
25+
"https://rmprodcusdefaultcq.queue.core.windows.net",
26+
"https://rmprodeus2defaultcq.queue.core.windows.net",
27+
"https://rmprodgwcdefaultcq.queue.core.windows.net",
28+
"https://rmprodincdefaultcq.queue.core.windows.net",
29+
"https://rmprodneudefaultcq.queue.core.windows.net",
30+
"https://rmprodseadefaultcq.queue.core.windows.net",
31+
"https://rmprodszndefaultcq.queue.core.windows.net",
32+
"https://rmproduksdefaultcq.queue.core.windows.net",
33+
"https://rmprodwcusdefaultcq.queue.core.windows.net",
34+
"https://rmprodwus3defaultcq.queue.core.windows.net",
35+
# CDN for downloading the Managed DevOps Pools agent - maps to *.prod.managedevops.microsoft.com
36+
"rm-agent.prod.manageddevops.microsoft.com"
37+
# List of control plane endpoints - maps to *.manageddevops.microsoft.com
38+
"default.ae.prod.manageddevops.microsoft.com",
39+
"default.brs.prod.manageddevops.microsoft.com",
40+
"default.cnc.prod.manageddevops.microsoft.com",
41+
"default.cus.prod.manageddevops.microsoft.com",
42+
"default.eus2.prod.manageddevops.microsoft.com",
43+
"default.gwc.prod.manageddevops.microsoft.com",
44+
"default.inc.prod.manageddevops.microsoft.com",
45+
"default.neu.prod.manageddevops.microsoft.com",
46+
"default.sea.prod.manageddevops.microsoft.com",
47+
"default.szn.prod.manageddevops.microsoft.com",
48+
"default.uks.prod.manageddevops.microsoft.com",
49+
"default.wcus.prod.manageddevops.microsoft.com",
50+
"default.wus3.prod.manageddevops.microsoft.com"
51+
)
52+
$unreachableUris = @()
53+
foreach ($uri in $azureDevOpsUris) {
54+
try {
55+
$hostName = ($uri -replace "^https?://", "") -replace "/.*", ""
56+
$connection = Test-NetConnection -ComputerName $hostName -Port 443 -WarningAction SilentlyContinue
57+
if (-not $connection.TcpTestSucceeded) {
58+
$unreachableUris += $uri
59+
}
60+
} catch {
61+
$unreachableUris += $uri
62+
}
63+
}
64+
if ($unreachableUris.Count -eq 0) {
65+
Write-Output "All Azure DevOps endpoints are reachable."
66+
} else {
67+
Write-Output "The following Azure DevOps endpoints could not be reached:"
68+
$unreachableUris | ForEach-Object { Write-Output $_ }
69+
}
70+
foreach ($uri in $managedDevOpsPoolsControlPlaneUris) {
71+
try {
72+
$hostName = ($uri -replace "^https?://", "") -replace "/.*", ""
73+
$connection = Test-NetConnection -ComputerName $hostName -Port 443 -WarningAction SilentlyContinue
74+
75+
if (-not $connection.TcpTestSucceeded) {
76+
$unreachableUris += $uri
77+
}
78+
} catch {
79+
$unreachableUris += $uri
80+
}
81+
}
82+
if ($unreachableUris.Count -eq 0) {
83+
Write-Output "All Azure Managed DevOps Pools endpoints are reachable."
84+
} else {
85+
Write-Output "The following Managed DevOps Pools endpoints could not be reached:"
86+
$unreachableUris | ForEach-Object { Write-Output $_ }
87+
}

0 commit comments

Comments
 (0)