How to Add Nodes in Rundeck for Seamless Job Execution
Adding nodes in Rundeck allows you to extend the automation capabilities of your server and enables remote job execution. Whether you’re managing infrastructure or automating tasks across multiple environments, setting up remote nodes is essential. In this guide, we’ll walk you through the process of adding nodes to Rundeck, from initial setup to key configuration. We’ll also discuss how ZippyOPS, a leader in DevOps, Cloud, and AIOps, can enhance your automation infrastructure with consulting and managed services.

Step 1: Create a Project in Rundeck
First, create a project in the Rundeck GUI. You can name it test-project or any other identifier that fits your needs. After setting up the project, some configuration files are automatically generated in the /var/lib/rundeck/projects/your-project-name directory. For example:
/var/lib/rundeck/projects/test-project
Navigate to this directory:
cd /var/rundeck/projects/test-project/etc/
Step 2: Create the resources.xml File
In the etc folder, create a new resources.xml file. This file is crucial for adding nodes to the Rundeck server.
touch resources.xml
Now, open the file for editing:
vi /var/rundeck/projects/test-project/etc/resources.xml
In this file, you will need to define your remote nodes. Below is an example of how to add the node configuration:
<resources>
<node name="remote-node-1" description="Remote Node" tags="linux" hostname="your.remote.node.ip" username="rundeck" ssh-keyfile="/var/lib/rundeck/.ssh/id_rsa" />
</resources>
Note: Replace hostname with the IP address of your remote node.
Save and exit the file.
Step 3: Restart Rundeck Service
To ensure your configuration is loaded correctly, restart the Rundeck service:
service rundeckd restart
At this point, the remote node is added to Rundeck, but if you try to run a job, it will fail because the keys have not been shared with the remote node.
Step 4: Share Rundeck Public Key with Remote Nodes
Rundeck uses a dedicated SSH key to communicate with remote nodes. By default, the Rundeck server has an SSH user (rundeck) with an SSH key pair. To share the public key with your remote node, you can retrieve it as follows:
cat /var/lib/rundeck/.ssh/id_rsa.pub
Copy this key, as you will need to add it to the remote node.
Step 5: Set Up the Remote Nodes
On the remote node, create a user account for Rundeck:
adduser rundeck
Next, create an SSH directory for the new user:
mkdir -p /home/rundeck/.ssh
touch /home/rundeck/.ssh/authorized_keys
Give appropriate permissions to the .ssh directory and the authorized_keys file:
chown rundeck:rundeck /home/rundeck/
chown rundeck:rundeck /home/rundeck/.ssh/authorized_keys
Step 6: Grant Sudo Access to Rundeck User
To allow Rundeck to run commands with elevated privileges on the remote node, you need to give the rundeck user sudo access. Open the sudoers file:
visudo
Add the following line:
rundeck ALL=(ALL) NOPASSWD: ALL
This ensures that the rundeck user can execute commands as root without a password.
Step 7: Add Rundeck Public Key to Remote Node
Now, go to the remote node and add the Rundeck public key to the authorized_keys file:
vi /home/rundeck/.ssh/authorized_keys
Paste the public key you copied earlier and save the file.
Step 8: Test the Configuration
At this point, your remote node is successfully added to Rundeck. You should now be able to execute jobs on the remote node from the Rundeck server.
Conclusion
By following these steps, you can easily add remote nodes to your Rundeck setup, enabling you to manage and automate your workflows across different environments. If you need further assistance with Rundeck or automation solutions, ZippyOPS offers a range of services including DevOps, Cloud, and Security consulting. We specialize in managing infrastructure, microservices, and AI-driven operations, ensuring your systems run seamlessly.
To take your operations to the next level, reach out to ZippyOPS for tailored consulting and implementation services.
Get in touch: sales@zippyops.com



