Skip to content
Thomas Mueller edited this page Feb 18, 2015 · 4 revisions

This document describes how to deploy the rundeck.war file for Tomcat, with a basic authentication/authorization scheme.

If you want to use LDAP, refer to the Tomcat Deployment with LDAP page.

Deploy

Create a 'rundeck' directory under the webapps dir, and expand the rundeck.war there:

mkdir webapps/rundeck
cd webapps/rundeck
unzip ../../rundeck-1.4.4.war

Create configuration

Create a base directory for Rundeck, we will refer to it as $RDECK_BASE:

cd tomcat7
mkdir rdbase

Create a rundeck-config file for Tomcat, for example in $RDECK_BASE/rundeck-config.properties

grails.serverURL=http://myhostname:8080/rundeck
dataSource.dbCreate = update
dataSource.url = jdbc:h2:file:$RDECK_BASE/server/data/grailsdb

#note, make sure this is set to "true" if you are using Oracle or Mysql
rundeck.v14.rdbsupport=false

Make sure to replace $RDECK_BASE with the correct path to your basedir.

To recap, we now have:

  • Rundeck base dir: $RDECK_BASE
  • Rundeck config location: $RDECK_BASE/rundeck-config.properties

Tomcat Authentication

Tomcat authentication/authorization is defined by use of Realms. By default, Tomcat has a basic file-based realm defined in the server.xml.

Modify the file conf/tomcat-users.xml to enable any users you want to add. You should at least add an admin user:

<user username="admin" password="changeme" roles="admin,user"/>

Make sure you specify at least a role named "user". This is a default role, specified in Rundeck's web.xml file, which is required for any users you want to give access to Rundeck. You can modify the name of this role in the expanded webapp dir webapps/rundeck/WEB-INF/web.xml.

Custom Realms

You can read more about Tomcat Realms.

There are two ways to define a new Realm, either in Tomcat's server.xml file, or in a custom Context (see Defining a Context).

Running

To start the Tomcat server, we need to pass certain JVM arguments. We need to specify the location of the config file, and the base dir. We should also increase the memory constraints for the JVM. Here are the JVM arguments we want to use with Tomcat:

    -XX:MaxPermSize=256m -Xmx1024m -Xms256m -server  -Drundeck.config.location=$RDECK_BASE/rundeck-config.properties -Drdeck.base=$RDECK_BASE

It is simpler if we put this in a script file, which will then call Tomcat's startup.sh script.

Create a script called rdstart.sh:

#!/bin/bash

DIR=$(pwd)
RDECK_BASE=$DIR/rdbase
export CATALINA_OPTS="-Xmx1024m -Xms256m -Drdeck.base=$RDECK_BASE -Drundeck.config.location=$RDECK_BASE/rundeck-config.properties"

exec $1

To use the script, execute: rdstart.sh $CATALINA_BASE/bin/startup.sh

Post-run configuration

When you start Rundeck the first time, it will create several configuration files in the $RDECK_BASE/etc dir. These config files contain some default values which you may need to customize.

You should modify these values in the $RDECK_BASE/etc/framework.properties file:

framework.server.username=[username]
framework.server.password=[password]

As well, you should examine the "aclpolicy" files defined in the $RDECK_BASE/etc directory, and modify them if you need to.