Optional Title
Jan 26, 2019Category: Linux AdministrationPosted by: adminBefore you add your node, you need to set up authentication.
Jan 23, 2019Category: Linux AdministrationPosted by: adminSuppose you are on a vpn ...
Dec 3, 2018Category: Linux AdministrationPosted by: adminExtending a partition
Welcome to the expat blog
Setting up nodes in Rundeck
Before you add your node, you need to set up authentication.
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.
Figure A
The Rundeck Key Storage window.
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.
Figure B
Creating a new password key.
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).
Figure C
Configuring SSH for the project.
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).
Figure D
Selecting our password key for SSH authentication.
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:
sudo -s
Change into the newly created project directory with the command:
cd /var/rundeck/projects/PROJECTNAME/etc/
where PROJECTNAME is the name of the project you just created.
Create a new configuration file with the command:
nano resources.xml
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>
where:
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).
Figure E
Our newly added node.
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.