Rundeck allows users to execute jobs to remote Windows nodes to manage and automate tasks using Rundeck workflows. This article shows how to add a Windows node and execute Rundeck jobs and commands with windows-based systems.
To communicate with Windows nodes, Rundeck uses an out-of-the-box Node Execution/ File Copier plugin that uses the WinRM (Windows Remote Management) protocol.
Basic pywinrm Plugin Requirements
The pywinrm plugin (opens new window)needs the following requirements on the Rundeck server to work properly. It is supported on Rundeck running on Linux, Mac OS X, or Windows operating systems.
Requirements
The pywinrm plugin (opens new window)uses the python WinRM Library (opens new window)to provide the WinRM implementation.
- Python 3.3-3.5 or PyPy2 installed on Rundeck server. (Python 3 strongly recommended)
- Pywinrm library (It can be installed with the following command:
$ pip install pywinrm
requests-kerberos and requests-credssp are optional.
Basic Windows Requirements
To follow this How to Guide, your Windows system needs the following requirements:
A Windows node in the same network as the Rundeck instance
- Windows Server 2008 R2 or above
- PowerShell 2.0 or above
Windows Configuration
The first step is to configure the Windows machine. To do this, go to the Windows instance and follow the these steps:
Open a PowerShell terminal as an admin user profile.
Enable the WinRM protocol on Windows:
$ winrm qc
# Define the authentication type:
$ winrm set winrm/config/service/Auth '@{Basic="true"}'
# Define the client authentication type:
$ winrm set winrm/config/client/Auth '@{Basic="true"}'
# Allow unencrypted SOAP messages:
$ winrm set winrm/config/service '@{AllowUnencrypted="true"}'
Add Windows Key
Don’t forget to add the Windows user password to the Rundeck key storage.
- Go to the System Menu(Gear Icon) > Key Storage.
- Click on the + Add or Upload a Key button.
- Enter the Windows password as shown in the image and save.
Rundeck Configuration
Create a Windows-based project on the Rundeck instance.
- Create a new project: Name
windows
, and LabelWindows Jobs
- Go to the Default Node Executor tab and then select WinRM Node Executor Python. It may be necessary to set the Python interpreter textbox to
python3
interpreter as the command/path. - Go to the Default File Copier tab and select the WinRM Python File Copier. Similar to the previous step, it may be necessary to define the Python interpreter textbox as
python3
interpreter for the command/path. - Click on the Create button.
Adding a Windows Test Node
- Click on the Add a new Node Source + button.
- Select File
- In the Format section, click on the right list and select the resourceyaml option.
- Put the file’s desired path including the file name and extension. (e.g.
~/windows-nodes.yaml
) - Select check boxes for Generate, Include Server Node and Writeable checkboxes, and then click on the Save buttons (there are two).
6. Now click on the Edit tab, and click on the Modify button.
7. Add the following node definition in the node definition text area. Make sure you use your own nodes IP Address for hostname and login name for username
mywindows:
description: Windows Server.
tags: windows
hostname: 192.168.1.10
osArch: amd64
osFamily: windows
username: Administrator
winrm-password-storage-path: "keys/windows.password"
- Best AI tools for Software Engineers - November 4, 2024
- Installing Jupyter: Get up and running on your computer - November 2, 2024
- An Introduction of SymOps by SymOps.com - October 30, 2024
Thanks’ rajesh, with the above steps i added windows node in rundeck, but while executing a job it got failed,
i want know whether Windows is successfully added or not and also windows is reachable/able to login from rundeck.
can you please guide on this