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
Copy file name to clipboardExpand all lines: articles/active-directory/managed-identities-azure-resources/how-to-assign-app-role-managed-identity-powershell.md
Copy file name to clipboardExpand all lines: articles/aks/internal-lb.md
+22-2Lines changed: 22 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -96,7 +96,27 @@ For more information on configuring your load balancer in a different subnet, se
96
96
97
97
## Connect Azure Private Link service to internal load balancer (Preview)
98
98
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
### Create a Private Endpoint to the Private Link Service
165
+
### Create a Private Endpoint to the Private Link service
146
166
147
167
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:
Copy file name to clipboardExpand all lines: articles/automation/automation-hrw-run-runbooks.md
+75-25Lines changed: 75 additions & 25 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -78,42 +78,92 @@ You can also use an [InlineScript](automation-powershell-workflow.md#use-inlines
78
78
79
79
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:
80
80
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.
84
84
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.
86
86
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
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.
92
121
93
122
```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
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.
102
141
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
Get-AzVM -DefaultProfile $AzureContext | Select Name
105
155
```
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":::
106
160
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.
111
161
112
162
>[!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).
114
164
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).
115
165
116
-
166
+
117
167
### Use runbook authentication with Hybrid Worker Credentials
118
168
119
169
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.
Copy file name to clipboardExpand all lines: articles/azure-functions/start-stop-vms/deploy.md
+10-10Lines changed: 10 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,16 +1,16 @@
1
1
---
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.
4
4
services: azure-functions
5
5
ms.subservice: start-stop-vms
6
-
ms.date: 06/25/2021
6
+
ms.date: 06/08/2022
7
7
ms.topic: conceptual
8
8
ms.custon: subject-rbac-steps
9
9
---
10
10
11
-
# Deploy Start/Stop VMs v2 (preview)
11
+
# Deploy Start/Stop VMs v2
12
12
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.
14
14
15
15
## Permissions considerations
16
16
Please keep the following in mind before and during deployment:
@@ -21,10 +21,10 @@ Please keep the following in mind before and during deployment:
21
21
22
22
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.
23
23
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.
25
25
26
26
> [!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.
28
28
29
29
30
30
> [!NOTE]
@@ -79,7 +79,7 @@ To simplify management and removal, we recommend you deploy Start/Stop VMs v2 (p
79
79
80
80
## Enable multiple subscriptions
81
81
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.
83
83
84
84
1. Copy the value for the Azure Function App name that you specified during the deployment.
85
85
@@ -293,7 +293,7 @@ In an environment that includes two or more components on multiple Azure Resourc
293
293
294
294
## Auto stop scenario
295
295
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.
297
297
298
298
The following metric alert properties in the request body support customization:
299
299
@@ -392,4 +392,4 @@ To learn more about how Azure Monitor metric alerts work and how to configure th
392
392
393
393
## Next steps
394
394
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