Skip to content

Commit f304519

Browse files
committed
added new info
1 parent 146fcca commit f304519

File tree

1 file changed

+64
-13
lines changed

1 file changed

+64
-13
lines changed

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

Lines changed: 64 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ title: Run Azure Automation runbooks on a Hybrid Runbook Worker
33
description: This article describes how to run runbooks on machines in your local datacenter or other cloud provider with the Hybrid Runbook Worker.
44
services: automation
55
ms.subservice: process-automation
6-
ms.date: 11/18/2022
6+
ms.date: 03/17/2023
77
ms.topic: conceptual
88
ms.custom: devx-track-azurepowershell
99
---
@@ -24,29 +24,80 @@ Enabling the Azure Firewall on [Azure Storage](../storage/common/storage-network
2424

2525
## Plan runbook job behavior
2626

27-
Azure Automation handles jobs on Hybrid Runbook Workers differently from jobs run in Azure sandboxes. If you have a long-running runbook, make sure that it's resilient to possible restart. For details of the job behavior, see [Hybrid Runbook Worker jobs](automation-hybrid-runbook-worker.md#hybrid-runbook-worker-jobs).
27+
Azure Automation handles jobs on Hybrid Runbook Workers differently from jobs run in cloud sandboxes. If you have a long-running runbook, make sure that it's resilient to possible restart. For details of the job behavior, see [Hybrid Runbook Worker jobs](automation-hybrid-runbook-worker.md#hybrid-runbook-worker-jobs).
2828

2929
## Service accounts
3030

31-
### Windows
31+
### Windows Hybrid Worker
3232

3333
Jobs for Hybrid Runbook Workers run under the local **System** account.
34+
3435
>[!NOTE]
35-
> To run PowerShell 7.x on a Windows Hybrid Runbook Worker, see [Installing PowerShell on Windows](/powershell/scripting/install/installing-powershell-on-windows).
36-
> We support [Hybrid worker extension based](./extension-based-hybrid-runbook-worker-install.md) and [agent based](./automation-windows-hrw-install.md) onboarding.
37-
> For agent based onboarding, ensure the Windows Hybrid Runbook worker version is 7.3.1296.0 or above.
36+
>- PowerShell 5.1, PowerShell 7.1(preview), Python 2.7, and Python 3.8(preview) runbooks are supported on both extension-based and agent-based Windows Hybrid Runbook Workers. For agent based workers, ensure the Windows Hybrid worker version is 7.3.12960 or above.
37+
>- PowerShell 7.2 (preview) and Python 3.10 (preview) runbooks are supported on extension-based Windows Hybrid Workers only. Ensure the Windows Hybrid worker extension version is 1.1.11 or above.
38+
39+
#### [Extension-based Hybrid Workers](#tab/win-extn-hrw)
40+
41+
Make sure the path where the *pwsh.exe* executable is located and is added to the PATH environment variable. Restart the Hybrid Runbook Worker after installation is completed.
42+
43+
**PowerShell 7.1**
44+
Make sure the path where the *pwsh.exe* executable is located and is added to the PATH environment variable. Restart the Hybrid Runbook Worker after the installation completes.
45+
46+
**Python 2.x, Python 3.x upto 3.8**
47+
Make sure the path where the *python.exe* executable is located and is added to the PATH environment variable. Restart the Hybrid Runbook Worker after the installation completes.
48+
49+
**PowerShell 7.2**
50+
To run PowerShell 7.2 runbooks on a Windows Hybrid Worker, install *pwsh.exe* on the Hybrid Worker. See [Installing PowerShell on Windows]().
51+
52+
After PowerShell 7.2 installation is complete, create an environment variable with Variable name as powershell_7_2_path and Variable value as location of the executable *pwsh.exe*. Restart the Hybrid Runbook Worker after environment variable is created successfully.
3853

39-
Make sure the path where the *pwsh.exe* executable is located and is added to the PATH environment variable. Restart the Hybrid Runbook Worker after installation completes.
54+
**Python 3.10**
55+
To run Python 3.10 runbooks on a Windows Hybrid Worker, install *python.exe* on the Hybrid Worker. See [Installing Python on Windows]().
56+
57+
After Python 3.10 installation is complete, create an environment variable with Variable name as python_3_10_path and Variable value as location of the executable *python.exe*. Restart the Hybrid Runbook Worker after environment variable is created successfully.
58+
59+
#### [Agent-based Hybrid Workers](#tab/win-agt-hrw)
60+
61+
**PowerShell 7.1**
62+
Make sure the path where the *pwsh.exe* executable is located and is added to the PATH environment variable. Restart the Hybrid Runbook Worker after the installation completes.
63+
64+
**Python 2.x, Python 3.x upto 3.8**
65+
Make sure the path where the *python.exe executable is located and is added to the PATH environment variable. Restart the Hybrid Runbook Worker after the installation completes.
66+
67+
---
4068

41-
### Linux
69+
### Linux Hybrid Worker
4270

4371
>[!NOTE]
44-
> To run PowerShell 7.x on a Linux Hybrid Runbook Worker, see [Installing PowerShell on Linux](/powershell/scripting/install/installing-powershell-on-linux).
45-
> We support [Hybrid worker extension based](./extension-based-hybrid-runbook-worker-install.md) and [agent based](./automation-linux-hrw-install.md) onboarding.
46-
> For agent based onboarding, ensure the Linux Hybrid Runbook worker version is 1.7.5.0 or above.
72+
>- PowerShell 5.1, PowerShell 7.1(preview), Python 2.7, Python 3.8 (preview) runbooks are supported on both extension-based and agent-based Linux Hybrid Runbook Workers. For agent-based workers, ensure the Linux Hybrid Runbook worker version is 1.7.5.0 or above.
73+
>- PowerShell 7.2 (preview) and Python 3.10 (preview) runbooks are supported on extension-based Linux Hybrid Workers only. Ensure the Linux Hybrid worker extension version is 1.1.11 or above.
4774
75+
#### [Extension-based Hybrid Workers](#tab/Lin-extn-hrw)
4876

49-
Service accounts **nxautomation** and **omsagent** are created. The creation and permission assignment script can be viewed at [https://github.com/microsoft/OMS-Agent-for-Linux/blob/master/installer/datafiles/linux.data](https://github.com/microsoft/OMS-Agent-for-Linux/blob/master/installer/datafiles/linux.data). The accounts, with the corresponding sudo permissions, must be present during [installation of a Linux Hybrid Runbook worker](automation-linux-hrw-install.md). If you try to install the worker, and the account is not present or doesn't have the appropriate permissions, the installation fails. Do not change the permissions of the `sudoers.d` folder or its ownership. Sudo permission is required for the accounts and the permissions shouldn't be removed. Restricting this to certain folders or commands may result in a breaking change. The **nxautomation** user enabled as part of Update Management executes only signed runbooks.
77+
>[!NOTE]
78+
> Create environment variable in Linux systems: </br> 1. Open /etc/environment. </br> 2. Create a new Environment variable by adding VARIABLE_NAME="variable_value" in a new line in /etc/environment (VARIABLE_NAME is the name of the new Environment variable and variable_value represents the value it is to be assigned). </br> 3. Either restart the VM or logout from current user and login again after saving the changes to /etc/environment to ensure environment variable changes take place.
79+
80+
**Python 2.x, Python 3.x upto 3.8**
81+
Make sure the path where the **python.exe* executable file is located and added to the PATH environment variable. Restart the Hybrid Runbook Worker after the installation is complete.
82+
83+
**PowerShell 7.2**
84+
To run PowerShell 7.2 runbooks on a Linux Hybrid Worker, install *pwsh.exe* file on the Hybrid Worker. For more information, see [Installing PowerShell on Linux](https://learn.microsoft.com/powershell/scripting/install/installing-powershell-on-linux?view=powershell-7.3).
85+
86+
After PowerShell 7.2 installation is complete, create an environment variable with **Variable name** as *powershell_7_2_path* and **Variable value** as location of the executable *pwsh.exe*.
87+
88+
Restart the Hybrid Runbook Worker after an environment variable is created successfully.
89+
90+
**Python 3.10**
91+
To run Python 3.10 runbooks on a Linux Hybrid Worker, install *python.exe* on the Hybrid Worker. For more information, see [Installing Python 3.10 on Linux]()
92+
93+
After Python 3.10 installation is complete, create an environment variable with **Variable name** as *python_3_10_path* and **Variable value** as location of the executable *python.exe* file. Restart the Hybrid Runbook Worker after environment variable is created successfully.
94+
95+
96+
#### [Agent-based Hybrid Workers](#tab/Lin-agt-hrw)
97+
98+
Create Service accounts **nxautomation** and **omsagent** for agent-based Hybrid Workers. The creation and permission assignment script can be viewed at [https://github.com/microsoft/OMS-Agent-for-Linux/blob/master/installer/datafiles/linux.data](https://github.com/microsoft/OMS-Agent-for-Linux/blob/master/installer/datafiles/linux.data). The accounts, with the corresponding sudo permissions, must be present during [installation of a Linux Hybrid Runbook worker](automation-linux-hrw-install.md).
99+
100+
If you try to install the worker, and the account is not present or doesn't have the appropriate permissions, the installation fails. Do not change the permissions of the `sudoers.d` folder or its ownership. Sudo permission is required for the accounts and the permissions shouldn't be removed. Restricting this to certain folders or commands may result in a breaking change. The **nxautomation** user enabled as part of Update Management executes only signed runbooks.
50101

51102
To ensure the service accounts have access to the stored runbook modules:
52103

@@ -55,7 +106,7 @@ To ensure the service accounts have access to the stored runbook modules:
55106

56107
The Automation worker log is located at `/var/opt/microsoft/omsagent/run/automationworker/worker.log`.
57108

58-
The service accounts are removed when the machine is removed as a Hybrid Runbook Worker.
109+
---
59110

60111
## Configure runbook permissions
61112

0 commit comments

Comments
 (0)