Install and configure Rundeck on Ubuntu 18.04 / Debian 9

Posted on 88 views

Rundeck is an open source automation service that lets you easily run automation tasks across a set of nodes. It comes with a web console, command line tools, and a WebAPI.

install-rundeck-ubuntu

In this guide, I’ll take you through the steps to install and configure Rundeck on Ubuntu 18.04 & Debian 9. The same should also work for Ubuntu 16.04 LTS.

Features of Rundeck

  • Distributed command execution
  • Workflow (including option passing, conditionals, error handling, and multiple workflow strategies)
  • Pluggable execution system (SSH and WinRM by default; Powershell available)
  • Pluggable resource model (get details of your infrastructure from external systems)
  • On-demand (Web GUI, API or CLI) or scheduled job execution
  • Secure Key store for passwords and keys
  • Role-based access control policy with support for LDAP/ActiveDirectory/SSO
  • Access control policy editing/management tools
  • History and auditing logs
  • Use any scripting language

Step 1: Update your system & Set the hostname

Start your installation by making sure your packages are updated.

sudo apt update
sudo apt upgrade -y

After update, set server hostname.

sudo hostnamectl set-hostname rundeck.example.com

Add the hostname and IP address to /etc/hosts

echo "192.168.17.50 rundeck.example.com" | tee -a /etc/hosts

Step 2: Install Java 8 ( SE or OpenJDK)

Rundeck requires Java 8 installed on the host system. You can install Java 8 on your Ubuntu 18.04 / Debian 9 by:

1. Add Java 8 PPA repository

sudo add-apt-repository ppa:webupd8team/java

Press  [ENTER] when prompted to add the repository to your system.

2. Install Java 8 on Ubuntu 18.04 / Debian 9

sudo apt install oracle-java8-installer

Press Ok to Agree to Oracle Binary Code License Agreement for the Java SE Platform Products and JavaFX.

Runcheck-ubuntu-18.04-debian-9-install-java-01-1024x315

Next, Accept  Oracle Binary Code license terms by selecting Yes

Runcheck-ubuntu-18.04-debian-9-install-java-02-1024x282

After the installation is done, confirm the Java version installed:

$ java -version
java version "1.8.0_191"
Java(TM) SE Runtime Environment (build 1.8.0_191-b12)
Java HotSpot(TM) 64-Bit Server VM (build 25.191-b12, mixed mode)

To install OpenJDK 8, just run:

sudo apt install openjdk-8-jdk-headless

Step 3: Install Rundeck on Ubuntu 18.04 / Debian 9

After installing Java 8, proceed to install Rundeck on Ubuntu 18.04 / Debian 9.

Check for the latest release of Rundeck before downloading.

wget https://dl.bintray.com/rundeck/rundeck-deb/rundeck_3.0.22.20190512-1.201905130100_all.deb

Once downloaded, install the package using dpkg command:

$ sudo dpkg -i rundeck*.deb
Selecting previously unselected package rundeck.
(Reading database ... 105814 files and directories currently installed.)
Preparing to unpack rundeck_3.0.22.20190512-1.201905130100_all.deb ...
Unpacking rundeck (3.0.22.20190512-1.201905130100) ...
Setting up rundeck (3.0.22.20190512-1.201905130100) ...
Adding group rundeck....done
Adding system user rundeck....done
Processing triggers for ureadahead (0.100.0-20) ...
Processing triggers for systemd (237-3ubuntu10.3) ...

Step 4: Configure Rundeck

The main configuration file is /etc/rundeck/framework.properties. Edit the file to customize Rundeck

I have modified my Rundeck server connection information to be similar to below:

framework.server.name = rundeck.example.com
framework.server.hostname = rundeck.example.com
framework.server.port = 4440
framework.server.url = http://192.168.17.50:4440

Also set correct hostname on /etc/rundeck/rundeck-config.properties

$ sudo vim /etc/rundeck/rundeck-config.properties

grails.serverURL=http://192.168.17.50:4440

Don’t forget to replace all occurrences of rundeck.example.com & 192.168.17.50 with your correct values for hostname and IP address.

When done with the changes, start rundeckd and set it to start on boot:

sudo systemctl start rundeckd
sudo systemctl enable rundeckd

If you have an active ufw firewall, allow port 4440

sudo ufw allow 4440/tcp

To check service status, use:

$ sudo systemctl status rundeckd
* rundeckd.service - LSB: rundeck job automation console
   Loaded: loaded (/etc/init.d/rundeckd; generated)
   Active: active (running) since Wed 2018-11-14 11:24:45 PST; 19s ago
     Docs: man:systemd-sysv-generator(8)
 Main PID: 4751 (java)
    Tasks: 20 (limit: 2319)
   CGroup: /system.slice/rundeckd.service
           `-4751 java -Drundeck.jaaslogin=true -Djava.security.auth.login.config=/etc/rundeck/jaas-loginmodule.conf -Dloginmodule.name=RDpropertyfile

Nov 14 11:24:45 rundeck.example.com systemd[1]: Starting LSB: rundeck job automation console...
Nov 14 11:24:45 rundeck.example.com rundeckd[4726]:  * Starting rundeckd
Nov 14 11:24:45 rundeck.example.com rundeckd[4726]:    ...done.
Nov 14 11:24:45 rundeck.example.com systemd[1]: Started LSB: rundeck job automation console.

Step 5: Access Rundeck UI

Open http://[IP or hostname]:4440/ on your favorite web browser to Login to Rundeck web console.

Runcheck-ubuntu-18.04-debian-9-login-1024x649

The default logins are:

Username: admin
Password: admin

Changing admin user password by editing the file /etc/rundeck/realm.properties

sudo vim /etc/rundeck/realm.properties

Set like below:

admin:NEW_ADMIN_PASSWORD,user,admin,architect,deploy,build

Restart rundeckd service:

sudo systemctl restart rundeckd

I hope this tutorial was helpful in your journey to install and configure Rundeck on Ubuntu 18.04 / Debian 9.

coffee

Gravatar Image
A systems engineer with excellent skills in systems administration, cloud computing, systems deployment, virtualization, containers, and a certified ethical hacker.