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/automation/automation-dsc-onboarding.md
+62-61Lines changed: 62 additions & 61 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -57,64 +57,24 @@ You can use the [Register-AzAutomationDscNode](/powershell/module/az.automation/
57
57
58
58
The best way to register VMs from other Azure subscriptions is to use the DSC extension in an Azure Resource Manager deployment template. Examples are provided in [Desired State Configuration extension with Azure Resource Manager templates](../virtual-machines/extensions/dsc-template.md).
59
59
60
-
To find the registration key and registration URL to use as parameters in the template, see [Enable machines securely using registration](#enable-machines-securely-using-registration).
60
+
## Use DSC metaconfiguration to register hybrid machines
61
61
62
-
## Enable physical/virtual Windows machines
62
+
You can enable machines securely for an Azure Automation account through the DSC metaconfiguration. The protocols implemented in DSC use information from the
63
+
metaconfiguration to authenticate to Azure Automation State Configuration. The node registers with the service at the registration URL and authenticates using
64
+
a registration key. During registration, the DSC node and DSC service negotiate a unique certificate for the node to use for authentication to the server
65
+
post-registration. This process prevents enabled nodes from impersonating one another, for example, if a node is compromised and behaving maliciously.
66
+
After registration, the registration key is not used for authentication again, and is deleted from the node.
63
67
64
-
You can enable Windows servers running on-premises or in other cloud environments (including AWS EC2 instances) to Azure Automation State Configuration. The servers must have [outbound access to Azure](automation-dsc-overview.md#network-planning).
65
-
66
-
1. Make sure that the latest version of [WMF 5](https://aka.ms/wmf5latest) is installed on the machines to enable for State Configuration. In addition, WMF 5 must be installed on the computer that you are using for enabling the machines.
67
-
1. Follow the directions in [Generate DSC metaconfigurations](#generate-dsc-metaconfigurations) to create a folder containing the required DSC metaconfigurations.
68
-
1. Use the following cmdlet to apply the PowerShell DSC metaconfigurations remotely to the machines to enable.
1. If you can't apply the PowerShell DSC metaconfigurations remotely, copy the **metaconfigurations** folder to the machines that you are enabling. Then add code to call [Set-DscLocalConfigurationManager](/powershell/module/psdesiredstateconfiguration/set-dsclocalconfigurationmanager) locally on the machines.
75
-
1. Using the Azure portal or cmdlets, verify that the machines appear as State Configuration nodes registered in your Azure Automation account.
76
-
77
-
## Enable physical/virtual Linux machines
78
-
79
-
You can enable Linux servers running on-premises or in other cloud environments for State Configuration. The servers must have [outbound access to Azure](automation-dsc-overview.md#network-planning).
80
-
81
-
1. Make sure that the latest version of [PowerShell Desired State Configuration for Linux](https://github.com/Microsoft/PowerShell-DSC-for-Linux) is installed on the machines to enable for State Configuration.
82
-
2. If the [PowerShell DSC Local Configuration Manager defaults](/powershell/dsc/managing-nodes/metaConfig4) match your use case, and you want to enable machines so that they both pull from and report to State Configuration:
83
-
84
-
- On each Linux machine to enable, use `Register.py` to enable the machine with the PowerShell DSC Local Configuration Manager defaults.
- To find the registration key and registration URL for your Automation account, see [Enable machines securely using registration](#enable-machines-securely-using-registration).
89
-
90
-
3. If the PowerShell DSC Local Configuration Manager (LCM) defaults don't match your use case, or you want to enable machines that only report to Azure Automation State Configuration, follow steps 4-7. Otherwise, proceed directly to step 7.
91
-
92
-
4. Follow the directions in [Generate DSC metaconfigurations](#generate-dsc-metaconfigurations) section to produce a folder containing the required DSC metaconfigurations.
93
-
94
-
5. Make sure that the latest version of [WMF 5](https://aka.ms/wmf5latest) is installed on the computer being used to enable your machines for State Configuration.
95
-
96
-
6. Add code as follows to apply the PowerShell DSC metaconfigurations remotely to the machines to enable.
7. If you can't apply the PowerShell DSC metaconfigurations remotely, copy the metaconfigurations corresponding to the remote machines from the folder described in step 4 to the Linux machines.
68
+
You can get the information required for the State Configuration registration protocol from **Keys** under **Account Settings** in the Azure portal.
110
69
111
-
8. Add code to call `Set-DscLocalConfigurationManager.py` locally on each Linux machine to enable for State Configuration.
70
+

112
71
113
-
`/opt/microsoft/dsc/Scripts/SetDscLocalConfigurationManager.py -configurationmof <path to metaconfiguration file>`
72
+
- Registration URL is the URL field on the Keys page.
73
+
- Registration key is the value of the **Primary access key** field or the **Secondary access key** field on the Keys page. Either key can be used.
114
74
115
-
9. Using the Azure portal or cmdlets, ensure that the machines to enable now show up as DSC nodes registered in your Azure Automation account.
75
+
For added security, you can regenerate the primary and secondary access keys of an Automation account at any time on the Keys page. Key regeneration prevents future node registrations from using previous keys.
116
76
117
-
## Generate DSC metaconfigurations
77
+
###Generate DSC metaconfigurations
118
78
119
79
To enable any machine for State Configuration, you can generate a [DSC metaconfiguration](/powershell/dsc/managing-nodes/metaConfig). This configuration tells the DSC agent to pull from and/or report to Azure Automation State Configuration. You can generate a DSC metaconfiguration for Azure Automation State Configuration using either a PowerShell DSC configuration or the Azure Automation PowerShell cmdlets.
120
80
@@ -241,7 +201,7 @@ Proxy support for metaconfigurations is controlled by the [Local Configuration M
241
201
DscMetaConfigs @Params
242
202
```
243
203
244
-
1. Fill in the registration key and URL for your Automation account, as well as the names of the machines to enable. All other parameters are optional. To find the registration key and registration URL for your Automation account, see [Enable machines securely using registration](#enable-machines-securely-using-registration).
204
+
1. Fill in the registration key and URL for your Automation account, as well as the names of the machines to enable. All other parameters are optional. To find the registration key and registration URL for your Automation account, see [Use DSC metaconfiguration to register hybrid machines](#use-dsc-metaconfiguration-to-register-hybrid-machines).
245
205
246
206
1. If you want the machines to report DSC status information to Azure Automation State Configuration, but not pull configuration or PowerShell modules, set the `ReportOnly` parameter to true.
247
207
@@ -281,19 +241,60 @@ enable machines to both pull from and report to Azure Automation State Configura
You can enable machines securely for an Azure Automation account through the WMF 5 DSC registration protocol. This protocol allows a DSC node to authenticate to a PowerShell DSC pull or report server, including Azure Automation State Configuration. The node registers with the server at the registration URL and authenticates using a registration key. During registration, the DSC node and DSC pull/report server negotiate a unique certificate for the node to use for authentication to the server post-registration. This process prevents enabled nodes from
287
-
impersonating one another, for example, if a node is compromised and behaving maliciously. After registration, the registration key is not used for authentication again, and is deleted from the node.
246
+
You can enable Windows servers running on-premises or in other cloud environments (including AWS EC2 instances) to Azure Automation State Configuration. The servers must have [outbound access to Azure](automation-dsc-overview.md#network-planning).
288
247
289
-
You can get the information required for the State Configuration registration protocol from **Keys** under **Account Settings** in the Azure portal.
248
+
1. Make sure that the latest version of [WMF 5](https://aka.ms/wmf5latest) is installed on the machines to enable for State Configuration. In addition, WMF 5 must be installed on the computer that you are using for enabling the machines.
249
+
1. Follow the directions in [Generate DSC metaconfigurations](#generate-dsc-metaconfigurations) to create a folder containing the required DSC metaconfigurations.
250
+
1. Use the following cmdlet to apply the PowerShell DSC metaconfigurations remotely to the machines to enable.
290
251
291
-

- Registration URL is the URL field on the Keys page.
294
-
- Registration key is the value of the **Primary access key** field or the **Secondary access key** field on the Keys page. Either key can be used.
256
+
1. If you can't apply the PowerShell DSC metaconfigurations remotely, copy the **metaconfigurations** folder to the machines that you are enabling. Then add code to call [Set-DscLocalConfigurationManager](/powershell/module/psdesiredstateconfiguration/set-dsclocalconfigurationmanager) locally on the machines.
257
+
1. Using the Azure portal or cmdlets, verify that the machines appear as State Configuration nodes registered in your Azure Automation account.
295
258
296
-
For added security, you can regenerate the primary and secondary access keys of an Automation account at any time on the Keys page. Key regeneration prevents future node registrations from using previous keys.
259
+
### Enable physical/virtual Linux machines
260
+
261
+
You can enable Linux servers running on-premises or in other cloud environments for State Configuration. The servers must have [outbound access to Azure](automation-dsc-overview.md#network-planning).
262
+
263
+
1. Make sure that the latest version of [PowerShell Desired State Configuration for Linux](https://github.com/Microsoft/PowerShell-DSC-for-Linux) is installed on the machines to enable for State Configuration.
264
+
2. If the [PowerShell DSC Local Configuration Manager defaults](/powershell/dsc/managing-nodes/metaConfig4) match your use case, and you want to enable machines so that they both pull from and report to State Configuration:
265
+
266
+
- On each Linux machine to enable, use `Register.py` to enable the machine with the PowerShell DSC Local Configuration Manager defaults.
- To find the registration key and registration URL for your Automation account, see [Use DSC metaconfiguration to register hybrid machines](#use-dsc-metaconfiguration-to-register-hybrid-machines).
271
+
272
+
3. If the PowerShell DSC Local Configuration Manager (LCM) defaults don't match your use case, or you want to enable machines that only report to Azure Automation State Configuration, follow steps 4-7. Otherwise, proceed directly to step 7.
273
+
274
+
4. Follow the directions in [Generate DSC metaconfigurations](#generate-dsc-metaconfigurations) section to produce a folder containing the required DSC metaconfigurations.
275
+
276
+
5. Make sure that the latest version of [WMF 5](https://aka.ms/wmf5latest) is installed on the computer being used to enable your machines for State Configuration.
277
+
278
+
6. Add code as follows to apply the PowerShell DSC metaconfigurations remotely to the machines to enable.
7. If you can't apply the PowerShell DSC metaconfigurations remotely, copy the metaconfigurations corresponding to the remote machines from the folder described in step 4 to the Linux machines.
292
+
293
+
8. Add code to call `Set-DscLocalConfigurationManager.py` locally on each Linux machine to enable for State Configuration.
294
+
295
+
`/opt/microsoft/dsc/Scripts/SetDscLocalConfigurationManager.py -configurationmof <path to metaconfiguration file>`
296
+
297
+
9. Using the Azure portal or cmdlets, ensure that the machines to enable now show up as DSC nodes registered in your Azure Automation account.
Automation. For details about obtaining those values, see
25
+
[Use DSC metaconfiguration to register hybrid machines](/automation/automation-dsc-onboarding.md#Use-DSC-metaconfiguration-to-register-hybrid-machines).
27
26
28
27
> [!NOTE]
29
28
> You might encounter slightly different schema examples. The change in schema occurred in the October 2016 release. For details, see [Update from a previous format](#update-from-a-previous-format).
0 commit comments