You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -4,7 +4,7 @@ description: Learn how to configure Hybrid Connections in Azure Relay to connect
4
4
author: eamono
5
5
6
6
ms.topic: conceptual
7
-
ms.date: 9/5/2019
7
+
ms.date: 04/26/2020
8
8
ms.author: eamono
9
9
# Customer intent: As solution architect, I want to be able to connect my function app in Azure to on-premises resources so I can remotely manage those resources by using PowerShell functions.
10
10
---
@@ -47,94 +47,135 @@ cmd.exe /C $Cmd
47
47
48
48
The App Service Hybrid Connections feature is available only in Basic, Standard, and Isolated pricing plans. When you create the function app with PowerShell, create or select one of these plans.
49
49
50
-
1.In the [Azure portal](https://portal.azure.com), select **+ Create a resource** in the menu on the left, and then select **Function app**.
50
+
1.From the Azure portal menu or the **Home** page, select **Create a resource**.
51
51
52
-
1.For **Hosting plan**, select **App Service plan**, and then select **App Service plan/Location**.
52
+
1.In the **New** page, select **Compute** > **Function App**.
53
53
54
-
1.Select **Create new**, type an **App Service plan** name, choose a **Location** in a [region](https://azure.microsoft.com/regions/) near you or near other services your functions access, and then select **Pricing tier**.
54
+
1.On the **Basics** page, use the function app settings as specified in the following table.
55
55
56
-
1. Choose the S1 Standard plan, and then select **Apply**.
56
+
| Setting | Suggested value | Description |
57
+
| ------------ | ---------------- | ----------- |
58
+
|**Subscription**| Your subscription | The subscription under which this new function app is created. |
59
+
|**[Resource Group](../azure-resource-manager/management/overview.md)**|*myResourceGroup*| Name for the new resource group in which to create your function app. |
60
+
|**Function App name**| Globally unique name | Name that identifies your new function app. Valid characters are `a-z` (case insensitive), `0-9`, and `-`. |
61
+
|**Publish**| Code | Option to publish code files or a Docker container. |
62
+
|**Runtime stack**| Preferred language | Choose PowerShell Core. |
63
+
|**Version**| Version number | Choose the version of your installed runtime. |
64
+
|**Region**| Preferred region | Choose a [region](https://azure.microsoft.com/regions/) near you or near other services your functions access. |
57
65
58
-
1. Select **OK** to create the plan, and then configure the remaining **Function App** settings as specified in the table immediately after the following screenshot:
66
+
:::image type="content" source="./media/functions-hybrid-powershell/function-app-create-basics.png" alt-text="Create a function app - Basics." border="true":::
59
67
60
-

68
+
1. Select **Next : Hosting**. On the **Hosting** page, enter the following settings.
|**App name**| Globally unique name | Name that identifies your new function app. Valid characters are `a-z`, `0-9`, and `-`. |
65
-
|**Subscription**| Your subscription | The subscription under which this new function app is created. |
66
-
|**Resource Group**| myResourceGroup | Name for the new resource group in which to create your function app. You can also use the suggested value. |
67
-
|**OS**| Preferred OS | Select Windows. |
68
-
|**Runtime stack**| Preferred language | Choose PowerShell Core. |
69
-
| **Storage** | Globally unique name | Create a storage account used by your function app. Storage account names must be from 3 to 24 characters in length and can contain numbers and lowercase letters only. You can also use an existing account.
70
-
|**Application Insights**| Default | Creates an Application Insights resource of the same *App name* in the nearest supported region. By expanding this setting, you can change the **New resource name** or choose a different **Location** in an [Azure geography](https://azure.microsoft.com/global-infrastructure/geographies/) region where you want to store your data. |
70
+
| Setting | Suggested value | Description |
71
+
| ------------ | ---------------- | ----------- |
72
+
|**[Storage account](../storage/common/storage-account-create.md)**| Globally unique name | Create a storage account used by your function app. Storage account names must be between 3 and 24 characters in length and can contain numbers and lowercase letters only. You can also use an existing account, which must meet the [storage account requirements](../azure-functions/functions-scale.md#storage-account-requirements). |
73
+
|**Operating system**| Preferred operating system | An operating system is pre-selected for you based on your runtime stack selection, but you can change the setting if necessary. |
74
+
|**[Plan type](../azure-functions/functions-scale.md)**|**App service plan**| Choose **App service plan**. When you run in an App Service plan, you must manage the [scaling of your function app](../azure-functions/functions-scale.md). |
75
+
76
+
:::image type="content" source="./media/functions-hybrid-powershell/function-app-create-hosting.png" alt-text="Create a function app - Hosting." border="true":::
71
77
72
-
1.After your settings are validated, select**Create**.
78
+
1.Select **Next : Monitoring**. On the**Monitoring** page, enter the following settings.
73
79
74
-
1. Select the **Notification** icon in the upper-right corner of the portal, and wait for the "Deployment succeeded" message.
80
+
| Setting | Suggested value | Description |
81
+
| ------------ | ---------------- | ----------- |
82
+
|**[Application Insights](../azure-functions/functions-monitoring.md)**| Default | Creates an Application Insights resource of the same *App name* in the nearest supported region. By expanding this setting or selecting **Create new**, you can change the Application Insights name or choose a different region in an [Azure geography](https://azure.microsoft.com/global-infrastructure/geographies/) where you want to store your data. |
83
+
84
+
:::image type="content" source="./media/functions-hybrid-powershell/function-app-create-monitoring.png" alt-text="Create a function app - Monitoring." border="true":::
85
+
86
+
1. Select **Review + create** to review the app configuration selections.
87
+
88
+
1. On the **Review + create** page, review your settings, and then select **Create** to provision and deploy the function app.
89
+
90
+
1. Select the **Notifications** icon in the upper-right corner of the portal and watch for the **Deployment succeeded** message.
75
91
76
92
1. Select **Go to resource** to view your new function app. You can also select **Pin to dashboard**. Pinning makes it easier to return to this function app resource from your dashboard.
77
93
78
94
## Create a hybrid connection for the function app
79
95
80
96
Hybrid connections are configured from the networking section of the function app:
81
97
82
-
1. Select the **Platform features** tab in the function app, and then select **Networking**.
83
-

98
+
1. Under **Settings** in the function app you just created, select **Networking**.
84
99
1. Select **Configure your hybrid connections endpoints**.
:::image type="content" source="./media/functions-hybrid-powershell/hybrid-connection-overview.png" alt-text="Add a hybrid connection." border="true":::
106
+
88
107
1. Enter information about the hybrid connection as shown right after the following screenshot. You have the option of making the **Endpoint Host** setting match the host name of the on-premises server to make it easier to remember the server later when you're running remote commands. The port matches the default Windows remote management service port that was defined on the server earlier.
1. Expand **New application setting** to create a new setting for the password.
129
-
1. Name the setting _ContosoUserPassword_, and enter the password.
130
-
1. Select **OK** and then save to store the password in the function application.
131
-

152
+
1. Under **Settings** for your function app, select **Configuration**.
153
+
1. Select **+ New application setting**.
154
+
155
+
:::image type="content" source="./media/functions-hybrid-powershell/select-configuration.png" alt-text="Configure a password for the administrator account." border="true":::
156
+
157
+
1. Name the setting **ContosoUserPassword**, and enter the password. Select **OK**.
158
+
1. Select **Save** to store the password in the function application.
159
+
160
+
:::image type="content" source="./media/functions-hybrid-powershell/save-administrator-password.png" alt-text="Save the password for the administrator account." border="true":::
161
+
162
+
## Create a function HTTP trigger
132
163
133
-
## Create a function http trigger to test
164
+
1. In your function app, select **Functions**, and then select **+ Add**.
134
165
135
-
1. Create a new HTTP trigger function from the function app.
136
-

137
-
1. Replace the PowerShell code from the template with the following code:
166
+
:::image type="content" source="./media/functions-hybrid-powershell/create-http-trigger-function.png" alt-text="Create new HTTP trigger." border="true":::
167
+
168
+
1. Select the **HTTP trigger** template.
169
+
170
+
:::image type="content" source="./media/functions-hybrid-powershell/select-http-trigger-template.png" alt-text="Select the HTTP trigger template." border="true":::
171
+
172
+
1. Name the new function and select **Create Function**.
173
+
174
+
:::image type="content" source="./media/functions-hybrid-powershell/create-new-http-function.png" alt-text="Name and create the new HTTP trigger function." border="true":::
175
+
176
+
## Test the function
177
+
178
+
1. In the new function, select **Code + Test**. Replace the PowerShell code from the template with the following code:
138
179
139
180
```powershell
140
181
# Input bindings are passed in via param block.
@@ -169,8 +210,13 @@ Hybrid connections are configured from the networking section of the function ap
169
210
-SessionOption (New-PSSessionOption -SkipCACheck)
170
211
```
171
212
172
-
3. Select **Save** and **Run** to test the function.
173
-

213
+
1. Select **Save**.
214
+
215
+
:::image type="content" source="./media/functions-hybrid-powershell/save-http-function.png" alt-text="Change the PowerShell code and save the HTTP trigger function." border="true":::
216
+
217
+
1. Select **Test**, and then select **Run** to test the function. Review the logs to verify that the test was successful.
0 commit comments