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/batch/automatic-certificate-rotation.md
+87-15Lines changed: 87 additions & 15 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,31 +1,32 @@
1
1
---
2
2
title: Enable automatic certificate rotation in a Batch pool
3
-
description: You can create a Batch pool with a managed identity and a certificate that will automatically be renewed.
3
+
description: You can create a Batch pool with a managed identity and a certificate that can automatically be renewed.
4
4
ms.topic: conceptual
5
5
ms.custom: linux-related-content
6
6
ms.date: 12/05/2023
7
7
---
8
+
8
9
# Enable automatic certificate rotation in a Batch pool
9
10
10
-
You can create a Batch pool with a certificate that will automatically be renewed. To do so, your pool must be created with a [user-assigned managed identity](managed-identity-pools.md) that will have access to the certificate in [Azure Key Vault](../key-vault/general/overview.md).
11
+
You can create a Batch pool with a certificate that can automatically be renewed. To do so, your pool must be created with a [user-assigned managed identity](managed-identity-pools.md) that has access to the certificate in [Azure Key Vault](../key-vault/general/overview.md).
11
12
12
13
## Create a user-assigned identity
13
14
14
15
First, [create your user-assigned managed identity](../active-directory/managed-identities-azure-resources/how-to-manage-ua-identity-portal.md#create-a-user-assigned-managed-identity) in the same tenant as your Batch account. This managed identity doesn't need to be in the same resource group or even in the same subscription.
15
16
16
-
Be sure to note the **Client ID** of the user-assigned managed identity. You'll need this value later.
17
+
Be sure to note the **Client ID** of the user-assigned managed identity. You need this value later.
17
18
18
19
:::image type="content" source="media/automatic-certificate-rotation/client-id.png" alt-text="Screenshot showing the client ID of a user-assigned managed identity in the Azure portal.":::
19
20
20
21
## Create your certificate
21
22
22
-
Next, you'll need to create a certificate and add it to Azure Key Vault. If you haven't already created a key vault, you'll need to do that first. For instructions, see [Quickstart: Set and retrieve a certificate from Azure Key Vault using the Azure portal](../key-vault/certificates/quick-create-portal.md).
23
+
Next, you need to create a certificate and add it to Azure Key Vault. If you haven't already created a key vault, you need to do that first. For instructions, see [Quickstart: Set and retrieve a certificate from Azure Key Vault using the Azure portal](../key-vault/certificates/quick-create-portal.md).
23
24
24
25
When creating your certificate, be sure to set **Lifetime Action Type** to automatically renew, and specify the number of days after which the certificate should renew.
25
26
26
27
:::image type="content" source="media/automatic-certificate-rotation/certificate.png" alt-text="Screenshot of the certificate creation screen in the Azure portal.":::
27
28
28
-
After your certificate has been created, make note of its **Secret Identifier**. You'll need this value later.
29
+
After your certificate has been created, make note of its **Secret Identifier**. You need this value later.
29
30
30
31
:::image type="content" source="media/automatic-certificate-rotation/secret-identifier.png" alt-text="Screenshot showing the Secret Identifier of a certificate.":::
31
32
@@ -48,7 +49,68 @@ REST API URI
48
49
PUT https://management.azure.com/subscriptions/<subscriptionid>/resourceGroups/<resourcegroupName>/providers/Microsoft.Batch/batchAccounts/<batchaccountname>/pools/<poolname>?api-version=2021-01-01
[{"status":{"code":0,"formattedMessage":{"lang":"en","message":"Successfully started Key Vault extension service. 2021-03-03T23:12:23Z"},"operation":"Service start.","status":"success"},"timestampUTC":"2021-03-03T23:12:23Z","version":"1.0"}]root@74773db5fe1b42ab9a4b6cf679d929da000000:/var/lib/waagent/Microsoft.Azure.KeyVault.KeyVaultForLinux-1.0.1363.13/status#
120
185
```
121
186
187
+
## Troubleshooting Key Vault Extension
188
+
189
+
If Key Vault extension is configured incorrectly, the compute node might be in usuable state. To troubleshoot Key Vault extension failure, you can temporarily set requireInitialSync to false and redeploy your pool, then the compute node is in idle state, you can log in to the compute node to check KeyVault extension logs for errors and fix the configuration issues. Visit following Key Vault extension doc link for more information.
190
+
191
+
-[Azure Key Vault extension for Linux](../virtual-machines/extensions/key-vault-linux.md)
192
+
-[Azure Key Vault extension for Windows](../virtual-machines/extensions/key-vault-windows.md)
193
+
122
194
## Next steps
123
195
124
196
- Learn more about [Managed identities for Azure resources](../active-directory/managed-identities-azure-resources/overview.md).
Extensions are small applications that facilitate post-provisioning configuration and setup on Batch compute nodes. You can select any of the extensions that are allowed by Azure Batch and have them installed on the compute nodes as they're provisioned. After that, the extension can perform its intended operation.
11
+
Extensions are small applications that facilitate post-provisioning configuration and setup on Batch compute nodes. You can select any of the extensions that are allowed by Azure Batch and install them on the compute nodes as they're provisioned. After that, the extension can perform its intended operation.
12
12
13
13
You can check the live status of the extensions you use and retrieve the information they return in order to pursue any detection, correction, or diagnostics capabilities.
14
14
15
15
## Prerequisites
16
16
17
17
- Pools with extensions must use [Virtual Machine Configuration](nodes-and-pools.md#virtual-machine-configuration).
18
18
- The CustomScript extension type is reserved for the Azure Batch service and can't be overridden.
19
-
- Some extensions may need pool-level Managed Identity accessible in the context of a compute node in order to function properly. Please see [configuring managed identities in Batch pools](managed-identity-pools.md) if applicable for the extension(s).
19
+
- Some extensions may need pool-level Managed Identity accessible in the context of a compute node in order to function properly. See [configuring managed identities in Batch pools](managed-identity-pools.md) if applicable for the extensions.
20
20
21
21
> [!TIP]
22
22
> Extensions cannot be added to an existing pool. Pools must be recreated to add, remove, or update extensions.
@@ -38,19 +38,82 @@ The following extensions can currently be installed when creating a Batch pool:
38
38
-[Azure Monitor agent for Linux](../azure-monitor/agents/azure-monitor-agent-manage.md)
39
39
-[Azure Monitor agent for Windows](../azure-monitor/agents/azure-monitor-agent-manage.md)
40
40
41
-
You can request support for additional publishers and/or extension types by opening a support request.
41
+
You can request support for other publishers and/or extension types by opening a support request.
42
42
43
43
## Create a pool with extensions
44
44
45
-
The example below creates a Batch pool of Linux nodes that uses the Azure Key Vault extension.
45
+
The following example creates a Batch pool of Linux/Windows nodes that uses the Azure Key Vault extension.
46
46
47
47
REST API URI
48
48
49
49
```http
50
50
PUT https://management.azure.com/subscriptions/<subscriptionId>/resourceGroups/<resourceGroup>/providers/Microsoft.Batch/batchAccounts/<batchaccountName>/pools/<batchpoolName>?api-version=2021-01-01
If Key Vault extension is configured incorrectly, the compute node might be in a usable state. To troubleshoot Key Vault extension failure, you can temporarily set requireInitialSync to false and redeploy your pool, then the compute node is in idle state, you can log in to the compute node to check KeyVault extension logs for errors and fix the configuration issues. Visit following Key Vault extension doc link for more information.
222
+
223
+
-[Azure Key Vault extension for Linux](../virtual-machines/extensions/key-vault-linux.md)
224
+
-[Azure Key Vault extension for Windows](../virtual-machines/extensions/key-vault-windows.md)
225
+
137
226
## Next steps
138
227
139
228
- Learn about various ways to [copy applications and data to pool nodes](batch-applications-to-pool-nodes.md).
0 commit comments