This tutorial shows the steps to install and configure a rundeck server.
Rundeck allows you to run commands/scripts on a remote computer. In this tutorial, I will deal with Linux servers : Debian for rundeck server and Debian/ubuntu for the remote computers.
As Rundeck uses ssh to connect to remote systems, you must have an account on those systems with a sudo right (if necessary).
We suppose the username is rundeck with password rundeck.
Rundeck is written in java, so we need to install the JDK:
dpkg –add-architecture i386
apt-get install openjdk-7-jdk
At this time, the last version is 2.6.7. To download the software, use the following command:
Install the package :
dpkg -i ./rundeck-2.6.7-1-GA.deb
Configure Rundeck Sever
Configure the package:
Edit the files /etc/rundeck/framework.properties and /etc/rundeck/rundeck-config.properties and change the line:
where your_server is the ip address or FQDN of your rundeck server.
To start Rundeck, just run the following command:
and wait for a minute before connecting.
Launch your favorite web browser and go to: http://your_server:4440
Use Rundeck Sever
To connect to the GUI, use the username and password: admin / admin.
Create a project
For the first connection, click on the link “New project” to add a project.
You have to provide at least a project name (without spaces)
In the “Resource Model source” section, click the “Edit” button and choose “Require file exists”. Then click on “Save”
In the “Default Node Executor” section, I choose “password” for SSH AUthentication (it is however possible to use a pair of keys for better security) Click on “Create” to create the project.
Create a job
Now you are ready to create your first job. This job consists of an ssh connection to launch a remote command.
Click on “Create a new job” and choose your job name (without spaces).
Now we need a password and a sudo password to connect and launch a command.
Click “Add an option.
In the option name, specify sshPassword1 and in default value specify your password (here we will use rundeck)
In the Input type, choose “Secure Remote authentication” and change “Required” from No to Yes as it is a mandatory field.
Repeat the operation with sudoPassword2 and the value rundeck.
In the section “Add a step”, choose “Command”
Provide your command in the Command field . I choose to update my server:
sudo “apt-get update”
Click on “Save” then “Create” to create the job.
To apply this job to our remote systems (called nodes), we need to edit the node file:
Modify the line beginning with ssh-authentication=”password” ssh-password-option=”option.sshPassword1″ sudo-command-enabled=”true” sudo-password-option=”option.sudoPassword2″.
Now go back to your GUI and launch the job!