Skip to content

Commit 0fa8ef7

Browse files
authored
Merge pull request #201076 from MicrosoftDocs/main
6/09 AM Publish
2 parents 4d0fff5 + b35cb26 commit 0fa8ef7

File tree

71 files changed

+608
-331
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

71 files changed

+608
-331
lines changed

articles/active-directory/develop/tutorial-v2-nodejs-webapp-msal.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ The web app sample in this tutorial uses the [express-session](https://www.npmjs
100100

101101
## Add app registration details
102102

103-
1. Create an *.env* file in the root of your project folder. Then add the following code:
103+
1. Create a *.env* file in the root of your project folder. Then add the following code:
104104

105105
:::code language="text" source="~/ms-identity-node/App/.env":::
106106

@@ -130,6 +130,8 @@ Fill in these details with the values you obtain from Azure app registration por
130130

131131
## Add code for user login and token acquisition
132132

133+
1. Create a new file named *auth.js* under the *router* folder and add the following code there:
134+
133135
:::code language="js" source="~/ms-identity-node/App/routes/auth.js":::
134136

135137
2. Next, update the *index.js* route by replacing the existing code with the following:
@@ -142,7 +144,7 @@ Fill in these details with the values you obtain from Azure app registration por
142144

143145
## Add code for calling the Microsoft Graph API
144146

145-
Create a file named **fetch.js** in the root of your project and add the following code:
147+
Create a file named *fetch.js* in the root of your project and add the following code:
146148

147149
:::code language="js" source="~/ms-identity-node/App/fetch.js":::
148150

articles/active-directory/managed-identities-azure-resources/how-to-assign-app-role-managed-identity-powershell.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ Connect-MgGraph -TenantId $tenantId -Scopes 'Application.Read.All','Application.
124124
125125
# Look up the details about the server app's service principal and app role.
126126
$serverServicePrincipal = (Get-MgServicePrincipal -Filter "DisplayName eq '$serverApplicationName'")
127-
$serverServicePrincipalObjectId = $serverServicePrincipal.ObjectId
127+
$serverServicePrincipalObjectId = $serverServicePrincipal.Id
128128
$appRoleId = ($serverServicePrincipal.AppRoles | Where-Object {$_.Value -eq $appRoleName }).Id
129129
130130
# Assign the managed identity access to the app role.

articles/aks/internal-lb.md

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,27 @@ For more information on configuring your load balancer in a different subnet, se
9696

9797
## Connect Azure Private Link service to internal load balancer (Preview)
9898

99-
To attach an Azure Private Link Service to an internal load balancer, create a service manifest named `internal-lb-pls.yaml` with the service type *LoadBalancer* and the *azure-load-balancer-internal* and *azure-pls-create* annotation as shown in the example below. For more options, refer to the [Azure Private Link Service Integration](https://kubernetes-sigs.github.io/cloud-provider-azure/development/design-docs/pls-integration/) design document
99+
### Before you begin
100+
101+
You must have the following resource installed:
102+
103+
* The Azure CLI
104+
* The `aks-preview` extension version 0.5.50 or later
105+
* Kubernetes version 1.22.x or above
106+
107+
#### Install the aks-preview CLI extension
108+
109+
```azurecli-interactive
110+
# Install the aks-preview extension
111+
az extension add --name aks-preview
112+
113+
# Update the extension to make sure you have the latest version installed
114+
az extension update --name aks-preview
115+
```
116+
117+
### Create a Private Link service connection
118+
119+
To attach an Azure Private Link service to an internal load balancer, create a service manifest named `internal-lb-pls.yaml` with the service type *LoadBalancer* and the *azure-load-balancer-internal* and *azure-pls-create* annotation as shown in the example below. For more options, refer to the [Azure Private Link Service Integration](https://kubernetes-sigs.github.io/cloud-provider-azure/development/design-docs/pls-integration/) design document
100120

101121
```yaml
102122
apiVersion: v1
@@ -142,7 +162,7 @@ pls-xyz pls-xyz.abc123-defg-4hij-56kl-789mnop.eastus2.azure.privatelinkservice
142162
143163
```
144164

145-
### Create a Private Endpoint to the Private Link Service
165+
### Create a Private Endpoint to the Private Link service
146166

147167
A Private Endpoint allows you to privately connect to your Kubernetes service object via the Private Link Service created above. To do so, follow the example shown below:
148168

articles/automation/automation-hrw-run-runbooks.md

Lines changed: 75 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -78,42 +78,92 @@ You can also use an [InlineScript](automation-powershell-workflow.md#use-inlines
7878

7979
Hybrid Runbook Workers on Azure virtual machines can use managed identities to authenticate to Azure resources. Using managed identities for Azure resources instead of Run As accounts provides benefits because you don't need to:
8080

81-
* Export the Run As certificate and then import it into the Hybrid Runbook Worker.
82-
* Renew the certificate used by the Run As account.
83-
* Handle the Run As connection object in your runbook code.
81+
- Export the Run As certificate and then import it into the Hybrid Runbook Worker.
82+
- Renew the certificate used by the Run As account.
83+
- Handle the Run As connection object in your runbook code.
8484

85-
Follow the next steps to use a managed identity for Azure resources on a Hybrid Runbook Worker:
85+
There are two ways to use the Managed Identities in Hybrid Runbook Worker scripts.
8686

87-
1. Create an Azure VM.
88-
1. Configure managed identities for Azure resources on the VM. See [Configure managed identities for Azure resources on a VM using the Azure portal](../active-directory/managed-identities-azure-resources/qs-configure-portal-windows-vm.md#enable-system-assigned-managed-identity-on-an-existing-vm).
89-
1. Give the VM access to a resource group in Resource Manager. Refer to [Use a Windows VM system-assigned managed identity to access Resource Manager](../active-directory/managed-identities-azure-resources/tutorial-windows-vm-access-arm.md#grant-your-vm-access-to-a-resource-group-in-resource-manager).
90-
1. Install the Hybrid Runbook Worker on the VM. See [Deploy a Windows Hybrid Runbook Worker](automation-windows-hrw-install.md) or [Deploy a Linux Hybrid Runbook Worker](automation-linux-hrw-install.md).
91-
1. Update the runbook to use the [Connect-AzAccount](/powershell/module/az.accounts/connect-azaccount) cmdlet with the `Identity` parameter to authenticate to Azure resources. This configuration reduces the need to use a Run As account and perform the associated account management.
87+
1. Use the system-assigned Managed Identity for the Automation account:
88+
89+
1. [Configure](/enable-managed-identity-for-automation.md#enable-a-system-assigned-managed-identity-for-an-azure-automation-account) a System-assigned Managed Identity for the Automation account.
90+
1. Grant this identity the [required permissions](/enable-managed-identity-for-automation.md#assign-role-to-a-system-assigned-managed-identity) within the Subscription to perform its task.
91+
1. Update the runbook to use the [Connect-AzAccount](/powershell/module/az.accounts/connect-azaccount) cmdlet with the `Identity` parameter to authenticate to Azure resources. This configuration reduces the need to use a Run As account and perform the associated account management.
92+
93+
```powershell
94+
# Ensures you do not inherit an AzContext in your runbook
95+
Disable-AzContextAutosave -Scope Process
96+
97+
# Connect to Azure with system-assigned managed identity
98+
$AzureContext = (Connect-AzAccount -Identity).context
99+
100+
# set and store context
101+
$AzureContext = Set-AzContext -SubscriptionName $AzureContext.Subscription -DefaultProfile
102+
$AzureContext
103+
104+
# Get all VM names from the subscription
105+
Get-AzVM -DefaultProfile $AzureContext | Select Name
106+
```
107+
> [!NOTE]
108+
> It is **Not** possible to use the Automation Account's User Managed Identity on a Hybrid Runbook Worker, it must be the Automation Account's System Managed Identity.
109+
110+
2. Use the VM Managed Identity for both the Azure VM or Arc-enabled server running as a Hybrid Runbook Worker.
111+
Here, you can use either the **VM’s User-assigned Managed Identity** or the **VM’s System-assigned Managed Identity**.
112+
113+
> [!NOTE]
114+
> This will **Not** work in an Automation Account which has been configured with an Automation account Managed Identity. As soon as the Automation account Managed Identity is enabled, you can't use the VM Managed Identity. The only available option is to use the Automation Account **System-Assigned Managed Identity** as mentioned in option 1.
115+
116+
**To use a VM's system-assigned managed identity**:
117+
118+
1. [Configure](/active-directory/managed-identities-azure-resources/qs-configure-portal-windows-vm#enable-system-assigned-managed-identity-on-an-existing-vm) a System Managed Identity for the VM.
119+
1. Grant this identity the [required permissions](/active-directory/managed-identities-azure-resources/tutorial-windows-vm-access-arm#grant-your-vm-access-to-a-resource-group-in-resource-manager) within the subscription to perform its tasks.
120+
1. Update the runbook to use the [Connect-Az-Account](/powershell/module/az.accounts/connect-azaccount?view=azps-8.0.0) cmdlet with the `Identity` parameter to authenticate to Azure resources. This configuration reduces the need to use a Run As Account and perform the associated account management.
92121
93122
```powershell
94-
# Ensures you do not inherit an AzContext in your runbook
95-
Disable-AzContextAutosave -Scope Process
96-
97-
# Connect to Azure with system-assigned managed identity
98-
$AzureContext = (Connect-AzAccount -Identity).context
99-
100-
# set and store context
101-
$AzureContext = Set-AzContext -SubscriptionName $AzureContext.Subscription -DefaultProfile $AzureContext
123+
# Ensures you do not inherit an AzContext in your runbook
124+
Disable-AzContextAutosave -Scope Process
125+
126+
# Connect to Azure with system-assigned managed identity
127+
$AzureContext = (Connect-AzAccount -Identity).context
128+
129+
# set and store context
130+
$AzureContext = Set-AzContext -SubscriptionName $AzureContext.Subscription -DefaultProfile
131+
$AzureContext
132+
133+
# Get all VM names from the subscription
134+
Get-AzVM -DefaultProfile $AzureContext | Select Name
135+
```
136+
137+
**To use a VM's user-assigned managed identity**:
138+
1. [Configure](/active-directory/managed-identities-azure-resources/qs-configure-portal-windows-vm#user-assigned-managed-identity) a User Managed Identity for the VM.
139+
1. Grant this identity the [required permissions](/active-directory/managed-identities-azure-resources/howto-assign-access-portal) within the Subscription to perform its tasks.
140+
1. Update the runbook to use the [Connect-AzAccount](/powershell/module/az.accounts/connect-azaccount?view=azps-8.0.0) cmdlet with the `Identity ` and `AccountID` parameters to authenticate to Azure resources. This configuration reduces the need to use a Run As account and perform the associated account management.
102141
103-
# Get all VM names from the subscription
104-
Get-AzVM -DefaultProfile $AzureContext | Select Name
142+
```powershell
143+
# Ensures you do not inherit an AzContext in your runbook
144+
Disable-AzContextAutosave -Scope Process
145+
146+
# Connect to Azure with user-managed-assigned managed identity. Replace <ClientId> below with the Client Id of the User Managed Identity
147+
$AzureContext = (Connect-AzAccount -Identity -AccountId <ClientId>).context
148+
149+
# set and store context
150+
$AzureContext = Set-AzContext -SubscriptionName $AzureContext.Subscription -DefaultProfile
151+
$AzureContext
152+
153+
# Get all VM names from the subscription
154+
Get-AzVM -DefaultProfile $AzureContext | Select Name
105155
```
156+
> [!NOTE]
157+
> You can find the client Id of the user-assigned managed identity in the Azure portal.
158+
159+
> :::image type="content" source="./media/automation-hrw-run-runbooks/managed-identities-client-id-inline.png" alt-text="Screenshot of client id in Managed Identites." lightbox="./media/automation-hrw-run-runbooks/managed-identities-client-id-expanded.png":::
106160
107-
If you want the runbook to execute with the system-assigned managed identity, leave the code as-is. If you run the runbook in an Azure sandbox instead of Hybrid Runbook Worker and you want to use a user-assigned managed identity, then:
108-
1. From line 5, remove `$AzureContext = (Connect-AzAccount -Identity).context`,
109-
1. Replace it with `$AzureContext = (Connect-AzAccount -Identity -AccountId <ClientId>).context`, and
110-
1. Enter the Client ID.
111161
112162
>[!NOTE]
113-
>By default, the Azure contexts are saved for use between PowerShell sessions. It is possible that when a previous runbook on the Hybrid Runbook Worker has been authenticated with Azure, that context persists to the disk in the System PowerShell profile, as per [Azure contexts and sign-in credentials | Microsoft Docs](/powershell/azure/context-persistence?view=azps-7.3.2).
163+
> By default, the Azure contexts are saved for use between PowerShell sessions. It is possible that when a previous runbook on the Hybrid Runbook Worker has been authenticated with Azure, that context persists to the disk in the System PowerShell profile, as per [Azure contexts and sign-in credentials | Microsoft Docs](/powershell/azure/context-persistence?view=azps-7.3.2).
114164
For instance, a runbook with `Get-AzVM` can return all the VMs in the subscription with no call to `Connect-AzAccount`, and the user would be able to access Azure resources without having to authenticate within that runbook. You can disable context autosave in Azure PowerShell, as detailed [here](/powershell/azure/context-persistence?view=azps-7.3.2#save-azure-contexts-across-powershell-sessions).
115165
116-
166+
117167
### Use runbook authentication with Hybrid Worker Credentials
118168
119169
Instead of having your runbook provide its own authentication to local resources, you can specify Hybrid Worker Credentials for a Hybrid Runbook Worker group. To specify a Hybrid Worker Credentials, you must define a [credential asset](./shared-resources/credentials.md) that has access to local resources. These resources include certificate stores and all runbooks run under these credentials on a Hybrid Runbook Worker in the group.
67.1 KB
Loading
67.1 KB
Loading

articles/azure-functions/functions-reference-node.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -527,7 +527,7 @@ The following table shows current supported Node.js versions for each major vers
527527

528528
| Functions version | Node version (Windows) | Node Version (Linux) |
529529
|---|---| --- |
530-
| 4.x (recommended) | `~16` (preview)<br/>`~14` (recommended) | `node|16` (preview)<br/>`node|14` (recommended) |
530+
| 4.x (recommended) | `~16`<br/>`~14` | `node|16`<br/>`node|14` |
531531
| 3.x | `~14`<br/>`~12`<br/>`~10` | `node|14`<br/>`node|12`<br/>`node|10` |
532532
| 2.x | `~12`<br/>`~10`<br/>`~8` | `node|10`<br/>`node|8` |
533533
| 1.x | 6.11.2 (locked by the runtime) | n/a |

articles/azure-functions/start-stop-vms/deploy.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
---
2-
title: Deploy Start/Stop VMs v2 (preview)
3-
description: This article tells how to deploy the Start/Stop VMs v2 (preview) feature for your Azure VMs in your Azure subscription.
2+
title: Deploy Start/Stop VMs v2
3+
description: This article tells how to deploy the Start/Stop VMs v2 feature for your Azure VMs in your Azure subscription.
44
services: azure-functions
55
ms.subservice: start-stop-vms
6-
ms.date: 06/25/2021
6+
ms.date: 06/08/2022
77
ms.topic: conceptual
88
ms.custon: subject-rbac-steps
99
---
1010

11-
# Deploy Start/Stop VMs v2 (preview)
11+
# Deploy Start/Stop VMs v2
1212

13-
Perform the steps in this topic in sequence to install the Start/Stop VMs v2 (preview) feature. After completing the setup process, configure the schedules to customize it to your requirements.
13+
Perform the steps in this topic in sequence to install the Start/Stop VMs v2 feature. After completing the setup process, configure the schedules to customize it to your requirements.
1414

1515
## Permissions considerations
1616
Please keep the following in mind before and during deployment:
@@ -21,10 +21,10 @@ Please keep the following in mind before and during deployment:
2121

2222
The deployment is initiated from the Start/Stop VMs v2 GitHub organization [here](https://github.com/microsoft/startstopv2-deployments/blob/main/README.md). While this feature is intended to manage all of your VMs in your subscription across all resource groups from a single deployment within the subscription, you can install another instance of it based on the operations model or requirements of your organization. It also can be configured to centrally manage VMs across multiple subscriptions.
2323

24-
To simplify management and removal, we recommend you deploy Start/Stop VMs v2 (preview) to a dedicated resource group.
24+
To simplify management and removal, we recommend you deploy Start/Stop VMs v2 to a dedicated resource group.
2525

2626
> [!NOTE]
27-
> Currently this preview does not support specifying an existing Storage account or Application Insights resource.
27+
> Currently this solution does not support specifying an existing Storage account or Application Insights resource.
2828
2929

3030
> [!NOTE]
@@ -79,7 +79,7 @@ To simplify management and removal, we recommend you deploy Start/Stop VMs v2 (p
7979
8080
## Enable multiple subscriptions
8181

82-
After the Start/Stop deployment completes, perform the following steps to enable Start/Stop VMs v2 (preview) to take action across multiple subscriptions.
82+
After the Start/Stop deployment completes, perform the following steps to enable Start/Stop VMs v2 to take action across multiple subscriptions.
8383

8484
1. Copy the value for the Azure Function App name that you specified during the deployment.
8585

@@ -293,7 +293,7 @@ In an environment that includes two or more components on multiple Azure Resourc
293293

294294
## Auto stop scenario
295295

296-
Start/Stop VMs v2 (preview) can help manage the cost of running Azure Resource Manager and classic VMs in your subscription by evaluating machines that aren't used during non-peak periods, such as after hours, and automatically shutting them down if processor utilization is less than a specified percentage.
296+
Start/Stop VMs v2 can help manage the cost of running Azure Resource Manager and classic VMs in your subscription by evaluating machines that aren't used during non-peak periods, such as after hours, and automatically shutting them down if processor utilization is less than a specified percentage.
297297

298298
The following metric alert properties in the request body support customization:
299299

@@ -392,4 +392,4 @@ To learn more about how Azure Monitor metric alerts work and how to configure th
392392

393393
## Next steps
394394

395-
To learn how to monitor status of your Azure VMs managed by the Start/Stop VMs v2 (preview) feature and perform other management tasks, see the [Manage Start/Stop VMs](manage.md) article.
395+
To learn how to monitor status of your Azure VMs managed by the Start/Stop VMs v2 feature and perform other management tasks, see the [Manage Start/Stop VMs](manage.md) article.

0 commit comments

Comments
 (0)