What is Rundeck

Rundeck is orchestration & scheduling tool. It holds several jobs into projects and projects can be configured separately according to project requirement. Each projects contains remote nodes where you can execute commands or scripts via SSH. Rundeck provides user friendly job execution status in real time. It is easy to use for non-technical people once setting up several jobs into projects. It also generates, notify and store job execution status.

Preparing the installation

Rundeck required at least java 8. To get the install latest version of java, run

# yum install java
# java -version
openjdk version "1.8.0_121"
OpenJDK Runtime Environment (build 1.8.0_121-b13)
OpenJDK 64-Bit Server VM (build 25.121-b13, mixed mode)

Installation

First repo needed to install then install the Rundeck rpm using yum

# rpm -Uvh http://repo.rundeck.org/latest.rpm
#yum install rundeck

After installation check if Rundeck status running or not

# service rundeckd status

Logging in the Rundeck Web GUI

Troubleshoot: If grails server URL is not properly configured then you will face difficulty to access Rundeck’s Web GUI remotely. Set grails.serverURL value properly in /etc/rundeck/rundeck-config.properties . Here, my Rundeck server address is 192.168.230.148. After changing the value restart the Rundeck service.
Ip_address:4440
Username: admin
Password: admin

grails.serverURL=http://192.168.230.148:4440
# service rundeckd restart
 
Rundeck login page – ip_address:4440

Project and node setup

First create a project clicking ‘New Project’ button. Then give a name and create. Rundeck uses SSH to execute remote command. Now, we will configure key based SSH authentication process.

Generate SSH key pair. Note the private key path.

ssh-keygen –t rsa –b 4096

Transfer SSH key to the remote PC. Note the remote user.

ssh-copy-id -i /var/lib/rundeck/.ssh/id_rsa.pub root@192.168.230.140

‘Resource Model Source’ contains information about remote nodes in /var/rundeck/projects/project/etc/project.properties file.

<?xml version="1.0" encoding="UTF-8"?> 
<project>
<node name="localhost" description="Rundeck server node" tags="" hostname="localhost" osArch="amd64" osFamily="unix" osName="Linux" osVersion="3.10.0-327.el7.x86_64" username="rundeck"/>
<node name="S_MASTER" description="Remote Master" tags="" hostname="192.168.230.140" username="root" ssh-keypath="/var/lib/rundeck/.ssh/id_rsa"/>
</project>

Node added. Check from the Web GUI. Rundeck add its running OS in the node section by default.