If you already have Rundeck running but can't add a remote node, Jack Wallen offers the solution.
Rundeck is an incredibly powerful administration tool that enables the administrator to manage multiple data center nodes from a single point of entry. Imagine that you have many servers that you want to control from a single, web-based, user-interface. With Rundeck, that is not only possible, but it's simple to do.
There is a slight caveat: Adding nodes. When you add nodes you must jump through a few hoops, but that shouldn't challenge most IT pros.
I'm will walk you through the process of setting up a remote node that can be controlled by Rundeck. I'll demonstrate adding a Linux node to Rundeck using password authentication. I assume you already have Rundeck up and running (How to install Rundeck local and remote services controller on Ubuntu 18.04).
SEE: Disaster recovery and business continuity plan (Tech Pro Research)
Once you have Rundeck ready, it's time to add a node.
Setting up authentication
Before you add your node, you need to set up authentication. We'll set up password authentication that will use the authentication credentials for our remote Linux server. To set this up, log into your Rundeck server and click on the gear icon in the upper right corner. From the pop-up menu, select Key Storage. In the resulting window (Figure A), click the Add or upload key button.
In the pop-up window (Figure B), select Password from the Key Type dropdown, and then type the password in the Enter text area. In the Name section type the username to be used on the remote server. With that information in place, click Save.
That's all for the password set up.
Creating a project
Before you can add a node, you must first create a project. To do this, click Projects | New project. Give the project a name, label, and description, and then scroll down to the SSH section (Figure C).
From the SSH Authentication dropdown select password. From the SSH Password Storage Path, click the Select button, select the key you created earlier (Figure B), and then click Choose Selected Key (Figure D).
Do the same thing for the SCP section you just did for SSH, scroll down, and click Create. Your project is ready.
Adding a node
Once you save the Project, you will be immediately taken to the Node creation page. I prefer to add nodes from the terminal window, so Secure Shell into your Rundeck server and gain sudo access with the command:
Change into the newly created project directory with the command:
where PROJECTNAME is the name of the project you just created.
Create a new configuration file with the command:
The contents of the file will look like this:
<?xml version="1.0" encoding="UTF-8"?> <project> <node name="NAME" osFamily="unix" username="USERNAME" hostname="REMOTE_IP" ssh-authentication="password" sudo-command-enabled="true" sudo-password-storage-path="keys/USERNAME" /> </project>
- NAME is the name of the remote node.
- USERNAME is the username on the remote node.
- REMOTE_IP is the IP address of the remote node.
Save and close that file.
Restart Rundeck with the command:
sudo systemctl restart rundeckd
It will take a few minutes for Rundeck to restart. When the service is back up and running, you have to log back into the Rundeck web interface. Once you've done that, your node should be registered. You can check this by going to the project page and clicking Nodes. From the Nodes dropdown, select Show all nodes. You should see localhost (the Rundeck server) and your newly added node listed (Figure E).
Congratulations, you now have a remote node added to Rundeck that you can manage from the web-based interface. In our next Rundeck piece, I'll walk you through the process of running commands on your remote nodes.
- How to monitor your data center Linux server with osquery (TechRepublic)
- How to connect an agent to Pandora FMS (TechRepublic)
- How to connect a new host to Zabbix monitoring server (TechRepublic)
- How to run remote commands on multiple Linux servers with Parallel-SSH (TechRepublic)
- HPE launches Composable Cloud as it wades deeper into the hybrid cloud fray (ZDNet)
- Executive's guide to the software defined data center (TechRepublic download)
- The data center is dead: Here's what comes next (ZDNet)
- Best cloud services for small businesses (CNET)