Skip to content

Commit efedda0

Browse files
authored
Merge pull request #15943 from MicrosoftDocs/main
9/27/2024 OOB Publishing for Sync PR
2 parents 798696d + 99bcca0 commit efedda0

13 files changed

+554
-279
lines changed

.openpublishing.redirection.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
{
22
"redirections": [
3+
{
4+
"source_path":"azure-stack/hci/deploy/tutorial-private-forest.md",
5+
"redirect_url":"/azure-stack/hci",
6+
"redirect_document_id": false
7+
},
38
{
49
"source_path":"azure-stack/hci/manage/bitlocker-on-csv.md",
510
"redirect_url":"/azure-stack/hci/manage/manage-bitlocker",
Lines changed: 176 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,176 @@
1+
---
2+
title: Configure Arc proxy manually for Azure gateway, version 2408 (preview)
3+
description: Learn how to configure Arc proxy manually for Azure gateway, version 2408 (preview).
4+
author: alkohli
5+
ms.topic: how-to
6+
ms.date: 09/26/2024
7+
ms.author: alkohli
8+
ms.subservice: azure-stack-hci
9+
---
10+
11+
# Configure Arc proxy manually for Azure gateway (preview)
12+
13+
Applies to: Azure Stack HCI, versions 2408.1, 2408, and 23H2
14+
15+
After creating the Arc gateway resource in your Azure subscription, you can enable the new Arc gateway preview features. This article details how to manually configure the Arc proxy before Arc registration.
16+
17+
[!INCLUDE [important](../../includes/hci-preview.md)]
18+
19+
## Prerequisites
20+
21+
Make sure the following prerequisites are met before proceeding:
22+
23+
- You’ve access to an Azure Stack HCI, version 23H2 system.
24+
25+
- An Arc gateway resource created in the same subscription as used to deploy Azure Stack HCI. For more information, see [Create the Arc gateway resource in Azure](deployment-azure-arc-gateway-overview.md#create-the-arc-gateway-resource-in-azure).
26+
27+
> [!Warning]
28+
> Only the standard ISO OS image available at https://aka.ms/PVenEREWEEW should be used to test the Arc gateway public preview on Azure Stack HCI, version 2408. Do not use the ISO image available in Azure portal.
29+
30+
## Step 1: Manually configure the proxy on each node
31+
32+
If you need to configure the Arc proxy on your Azure Stack HCI nodes before starting the Arc registration process, follow the instructions at [Configure proxy settings for Azure Stack HCI, version 23H2](../manage/configure-proxy-settings-23h2.md).
33+
34+
Ensure that you configure the proxy and the bypass list for all your Azure Stack HCI cluster nodes.
35+
36+
## Step 2: Get the ArcGatewayID
37+
38+
You need the proxy and the Arc gateway ID (ArcGatewayID) from Azure to run the Azure Stack HCI node registration script. To get the ArcGatewayID, run the following `az connectedmachine gateway list` command from any computer that is not an Azure Stack HCI node.
39+
40+
Here's an example:
41+
42+
```azurecli
43+
PS C:\> az connectedmachine gateway list
44+
45+
This command is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus
46+
47+
[
48+
  {
49+
    "allowedFeatures": [
50+
      "*"
51+
    ],
52+
    "gatewayEndpoint": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxx.gw.arc.azure.com",
53+
    "gatewayId": "xxxxxxx-xxxx-xxx-xxxx-xxxxxxxxx",
54+
    "gatewayType": "Public",
55+
    "id": "/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxx/resourceGroups/yourresourcegroup/providers/Microsoft.HybridCompute/gateways/yourArcgateway",
56+
    "location": "eastus",
57+
    "name": " yourArcgateway",
58+
    "provisioningState": "Succeeded",
59+
    "resourceGroup": "yourresourcegroup",
60+
    "type": "Microsoft.HybridCompute/gateways"
61+
  }
62+
]
63+
```
64+
65+
## Step 3: Register new nodes in Azure Arc
66+
67+
You run the initialization script by passing the ArcGatewayID parameter and the proxy server parameters. Here's an example of how you should change the `Invoke-AzStackHciArcInitialization` parameters on the initialization script:
68+
69+
```azurecli
70+
#Install required PowerShell modules in your node for registration
71+
72+
Install-Module Az.Accounts -RequiredVersion 2.13.2
73+
74+
Install-Module Az.Resources -RequiredVersion 6.12.0
75+
76+
Install-Module Az.ConnectedMachine -RequiredVersion 0.5.2
77+
78+
#Install Arc registration script from PSGallery
79+
80+
Install-Module AzsHCI.ARCinstaller
81+
82+
#Define the subscription where you want to register your server as Arc device
83+
84+
$Subscription = "xxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx"
85+
86+
#Define the resource group where you want to register your server as Arc device
87+
88+
$RG = "yourresourcegroupname"
89+
90+
#Define the tenant you will use to register your server as Arc device
91+
92+
$Tenant = "xxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxx"
93+
94+
#Define Proxy Server if necessary
95+
96+
$ProxyServer = "http://x.x.x.x:port"
97+
98+
#Define the Arc gateway resource ID from Azure
99+
100+
$ArcgwId = "/subscriptions/xxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx /resourceGroups/ yourresourcegroupname /providers/Microsoft.HybridCompute/gateways/yourarcgatewayname"
101+
102+
#Connect to your Azure account and Subscription
103+
104+
Connect-AzAccount -SubscriptionId $Subscription -TenantId $Tenant -DeviceCode
105+
106+
#Get the Access Token and Account ID for the registration
107+
108+
$ARMtoken = (Get-AzAccessToken).Token
109+
110+
#Get the Account ID for the registration
111+
112+
$id = (Get-AzContext).Account.Id
113+
114+
#Invoke the registration script with Proxy and ArcgatewayID
115+
116+
Invoke-AzStackHciArcInitialization -SubscriptionID $Subscription -ResourceGroup $RG -TenantID $Tenant -Region australiaeast -Cloud "AzureCloud" -ArmAccessToken $ARMtoken -AccountID $id -Proxy $ProxyServer -ArcGatewayID $ArcgwId
117+
```
118+
119+
## Step 4: Start Azure Stack HCI cloud deployment
120+
121+
Once the Azure Stack HCI nodes are registered in Azure Arc and all the extensions are installed, you can start deployment from Azure portal or using the ARM templates that are documented in these articles:
122+
123+
- [Deploy an Azure Stack HCI system using the Azure portal](deploy-via-portal.md).
124+
125+
- [Azure Resource Manager template deployment for Azure Stack HCI, version 23H2](deployment-azure-resource-manager-template.md).
126+
127+
## Step 5: Verify that the setup succeeded
128+
129+
Once the deployment validation starts, you can connect to the first Azure Stack HCI node from your cluster and open the Arc gateway log to monitor which endpoints are redirected to the Arc gateway and which ones continue using your firewall or proxy.
130+
131+
You can find the Arc gateway log at: *c:\programdata\AzureConnectedMAchineAgent\Log\arcproxy.log*.
132+
133+
:::image type="content" source="./media/deployment-connect-nodes-to-arc-gateway/arc-gateway-log.png" alt-text="Screenshot that shows the the Arc gateway log using manual method." lightbox="./media/deployment-connect-nodes-to-arc-gateway/arc-gateway-log.png":::
134+
135+
To check the Arc agent configuration and verify that it is using the Arc gateway, run the following command: `c:\program files\AzureConnectedMachineAgent>.\azcmagent show`
136+
137+
The result should show the following values:
138+
139+
- **Agent version** is **1.45**.
140+
141+
- **Agent Status** is **Connected**.
142+
143+
- **Using HTTPS Proxy** is empty when Arc gateway isn't in use. It should show as `http://localhost:40343` when the Arc gateway is enabled.
144+
145+
- **Upstream Proxy** shows your enterprise proxy server and port.
146+
147+
- **Azure Arc Proxy** shows as **stopped** when Arc gateway isn't in use, and **running** when the Arc gateway is enabled.
148+
149+
The Arc agent without the Arc gateway:
150+
151+
:::image type="content" source="./media/deployment-connect-nodes-to-arc-gateway/arc-agent-without-gateway.png" alt-text="Screenshot that shows the Arc agent without gateway using manual method." lightbox="./media/deployment-connect-nodes-to-arc-gateway/arc-agent-without-gateway.png":::
152+
153+
The Arc agent using the Arc gateway:
154+
155+
:::image type="content" source="./media/deployment-connect-nodes-to-arc-gateway/arc-agent-with-gateway.png" alt-text="Screenshot that shows the Arc agent with gateway using manual method." lightbox="./media/deployment-connect-nodes-to-arc-gateway/arc-agent-with-gateway.png":::
156+
157+
Additionally, to verify that the setup successful, you can run the following command: `c:\program files\AzureConnectedMachineAgent>.\azcmagent check`.
158+
159+
The response should indicate that `connection.type` is set to `gateway`, and the **Reachable** column should indicate **true** for all URLs, as shown:
160+
161+
The Arc agent without the Arc gateway:
162+
163+
:::image type="content" source="./media/deployment-connect-nodes-to-arc-gateway/arc-agent-without-gateway-2.png" alt-text="Screenshot that shows the Arc agent without gateway 2 using manual method." lightbox="./media/deployment-connect-nodes-to-arc-gateway/arc-agent-without-gateway-2.png":::
164+
165+
The Arc agent with the Arc gateway enabled:
166+
167+
:::image type="content" source="./media/deployment-connect-nodes-to-arc-gateway/arc-agent-with-gateway-2.png" alt-text="Screenshot that shows the Arc agent with gateway 2 using manual method." lightbox="./media/deployment-connect-nodes-to-arc-gateway/arc-agent-without-gateway-2.png":::
168+
169+
You can also audit your gateway traffic by viewing the gateway router logs.
170+
171+
To view gateway router logs on Windows, run the `azcmagent logs` command in PowerShell. In the resulting .zip file, the logs are located in the *C:\ProgramData\Microsoft\ArcGatewayRouter* folder.
172+
173+
## Next steps
174+
175+
- [Get support for deployment issues](../manage/get-support-for-deployment-issues.md)
176+
- [Get support for Azure Stack HCI](../manage/get-support.md)
Lines changed: 158 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,158 @@
1+
---
2+
title: Configure Arc proxy via registration script for Azure gateway, version 2408 (preview)
3+
description: Learn how to Configure Arc proxy via registration script for Azure gateway, version 2408 (preview).
4+
author: alkohli
5+
ms.topic: how-to
6+
ms.date: 09/26/2024
7+
ms.author: alkohli
8+
ms.subservice: azure-stack-hci
9+
---
10+
11+
# Configure Arc proxy via registration script for Azure gateway (preview)
12+
13+
Applies to: Azure Stack HCI, versions 2408.1, 2408, and 23H2
14+
15+
After creating the Arc gateway resource in your Azure subscription, you can enable the new Arc gateway preview features. This article details how to configure the Arc proxy before Arc registration using a registration script for the Arc gateway.
16+
17+
Using this method, you don’t need to configure the Arc proxy across WinInet, WinHttp, or environment variables manually.
18+
19+
[!INCLUDE [important](../../includes/hci-preview.md)]
20+
21+
## Prerequisites
22+
23+
Make sure the following prerequisites are met before proceeding:
24+
25+
- You’ve access to an Azure Stack HCI, version 23H2 system.
26+
27+
- An Arc gateway resource created in the same subscription as used to deploy Azure Stack HCI. For more information, see [Create the Arc gateway resource in Azure](deployment-azure-arc-gateway-overview.md#create-the-arc-gateway-resource-in-azure).
28+
29+
> [!Warning]
30+
> Only the standard ISO OS image available at https://aka.ms/PVenEREWEEW should be used to test the Arc gateway public preview on Azure Stack HCI, version 2408. Do not use the ISO image available in Azure portal.
31+
32+
## Step 1: Get the ArcGatewayID
33+
34+
You need the proxy and the ArcGatewayID from Azure to run the Azure Stack HCI node registration script. To get the ArcGatewayID value, run the `az connectedmachine gateway list` command described previously. Do not run this command from any Azure Stack HCI nodes:
35+
36+
```azurecli
37+
PS C:\> az connectedmachine gateway list
38+
This command is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus
39+
[
40+
  {
41+
    "allowedFeatures": [
42+
      "*"
43+
    ],
44+
    "gatewayEndpoint": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxx.gw.arc.azure.com",
45+
    "gatewayId": "xxxxxxx-xxxx-xxx-xxxx-xxxxxxxxx",
46+
    "gatewayType": "Public",
47+
    "id": "/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxx/resourceGroups/yourresourcegroup/providers/Microsoft.HybridCompute/gateways/yourArcgateway",
48+
    "location": "eastus",
49+
    "name": " yourArcgateway",
50+
    "provisioningState": "Succeeded",
51+
    "resourceGroup": "yourresourcegroup",
52+
    "type": "Microsoft.HybridCompute/gateways"
53+
  }
54+
]
55+
```
56+
57+
## Step 2: Register new Azure Stack HCI version 2408 nodes
58+
59+
You can run the initialization script by passing the `ArcGatewayID`, `Proxy server`, and `Proxy bypass list` parameters.
60+
61+
Here's an example of how you should change these parameters for the `Invoke-AzStackHciArcInitialization` initialization script. Once registration is completed, the Azure Stack HCI nodes are registered in Azure Arc using the Arc gateway:
62+
63+
```azurecli
64+
#Install required PowerShell modules in your node for registration
65+
Install-Module Az.Accounts -RequiredVersion 2.13.2
66+
Install-Module Az.Resources -RequiredVersion 6.12.0
67+
Install-Module Az.ConnectedMachine -RequiredVersion 0.5.2
68+
69+
#Install Arc registration script from PSGallery
70+
Install-Module AzsHCI.ARCinstaller
71+
72+
#Define the subscription where you want to register your server as Arc device
73+
$Subscription = "xxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx"
74+
75+
#Define the resource group where you want to register your server as Arc device
76+
$RG = "yourresourcegroupname"
77+
78+
#Define the tenant to use to register your server as Arc device
79+
$Tenant = "xxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxx"
80+
81+
#Define Proxy Server if necessary
82+
$ProxyServer = "http://x.x.x.x:port"
83+
84+
#Define the Arc gateway resource ID from Azure
85+
$ArcgwId = "/subscriptions/xxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx /resourceGroups/ yourresourcegroupname /providers/Microsoft.HybridCompute/gateways/yourarcgatewayname"
86+
87+
#Define the bypass list for the proxy. Use semicolon to separate each item from the list.
88+
# Use "localhost" instead of <local>
89+
# Use specific IPs such as 127.0.0.1 without mask
90+
# Use * for subnets allowlisting. 192.168.1.* for /24 exclusions. Use 192.168.*.* for /16 exclusions.
91+
# Append * for domain names exclusions like *.contoso.com
92+
# DO NOT INCLUDE .svc on the list. The registration script takes care of Environment Variables configuration.
93+
94+
$ProxyBypassList = "localhost;127.0.0.1;*.contoso.com;Node1;Node2;node3;node4;node5;192.168.*.*;HCI-cluster1”
95+
96+
#Connect to your Azure account and Subscription
97+
Connect-AzAccount -SubscriptionId $Subscription -TenantId $Tenant -DeviceCode
98+
99+
#Get the Access Token and Account ID for the registration
100+
$ARMtoken = (Get-AzAccessToken).Token
101+
102+
#Get the Account ID for the registration
103+
$id = (Get-AzContext).Account.Id
104+
105+
#Invoke the registration script with Proxy and ArcgatewayID
106+
Invoke-AzStackHciArcInitialization -SubscriptionID $Subscription -ResourceGroup $RG -TenantID $Tenant -Region australiaeast -Cloud "AzureCloud" -ArmAccessToken $ARMtoken -AccountID $id -Proxy $ProxyServer -ArcGatewayID $ArcgwId -ProxyBypass $ProxyBypassList
107+
```
108+
109+
## Step 3: Verify that the setup succeeded
110+
111+
Once the deployment validation starts, you can connect to the first Azure Stack HCI node from your cluster and open the Arc gateway log to monitor which endpoints are being redirected to the Arc gateway and which ones continue using your firewall or proxy.
112+
113+
You can find the Arc gateway log at: *c:\programdata\AzureConnectedMAchineAgent\Log\arcproxy.log*.
114+
115+
:::image type="content" source="./media/deployment-connect-nodes-to-arc-gateway/arc-gateway-log.png" alt-text="Screenshot that shows the Arc gateway log using script." lightbox="./media/deployment-connect-nodes-to-arc-gateway/arc-gateway-log.png":::
116+
117+
To check the Arc agent configuration and verify that it is using the gateway, run the following command: `c:\program files\AzureConnectedMachineAgent>.\azcmagent show`.
118+
119+
The values displayed should be as follows:
120+
121+
- **Agent version** is **1.45**.
122+
123+
- **Agent Status** should show as **Connected**.
124+
125+
- **Using HTTPS Proxy** empty when Arc gateway isn't in use. It should show as `http://localhost:40343` when the Arc gateway is enabled.
126+
127+
- **Upstream Proxy** shows your enterprise proxy server and port.
128+
129+
- **Azure Arc Proxy** shows as stopped when Arc gateway isn't in use. Running when the Arc gateway is enabled.
130+
131+
The Arc agent without the Arc gateway:
132+
133+
:::image type="content" source="./media/deployment-connect-nodes-to-arc-gateway/arc-agent-without-gateway.png" alt-text="Screenshot that shows the Arc agent without gateway using script." lightbox="./media/deployment-connect-nodes-to-arc-gateway/arc-agent-with-gateway-2.png":::
134+
135+
The Arc agent using the Arc gateway:
136+
137+
:::image type="content" source="./media/deployment-connect-nodes-to-arc-gateway/arc-agent-with-gateway.png" alt-text="Screenshot that shows the Arc agent with gateway using script." lightbox="./media/deployment-connect-nodes-to-arc-gateway/arc-agent-with-gateway-2.png":::
138+
139+
Additionally, to verify that the setup was done successfully, you can run the following command: `c:\program files\AzureConnectedMachineAgent>.\azcmagent check`.
140+
141+
The response should indicate that the **connection.type** is set to **gateway**, and the **Reachable** column should indicate **true** for all URLs.
142+
143+
The Arc agent without the Arc gateway:
144+
145+
:::image type="content" source="./media/deployment-connect-nodes-to-arc-gateway/arc-agent-without-gateway-2.png" alt-text="Screenshot that shows the Arc agent without Arc gateway using script." lightbox="./media/deployment-connect-nodes-to-arc-gateway/arc-agent-without-gateway-2.png":::
146+
147+
The Arc agent using the Arc gateway:
148+
149+
:::image type="content" source="./media/deployment-connect-nodes-to-arc-gateway/arc-agent-with-gateway-2.png" alt-text="Screenshot that shows the Arc agent with Arc gateway using script." lightbox="./media/deployment-connect-nodes-to-arc-gateway/arc-agent-with-gateway-2.png":::
150+
151+
You can also audit your gateway traffic by viewing the gateway router logs.
152+
153+
To view gateway router logs on Windows, run the `azcmagent logs` command in PowerShell. In the resulting .zip file, the logs are located in the *C:\ProgramData\Microsoft\ArcGatewayRouter* folder.
154+
155+
## Next steps
156+
157+
- [Get support for deployment issues](../manage/get-support-for-deployment-issues.md)
158+
- [Get support for Azure Stack HCI](../manage/get-support.md)

0 commit comments

Comments
 (0)