You can configure Rundeck to use a RDB instead of the default file-based data storage.
You must modify the server/config/rundeck-config.properties
file, to change the dataSource
configuration, and you will have to add the appropriate JDBC driver JAR file to the lib directory.
The default dataSource is configured for filesystem storage using HSQLDB:
dataSource.url = jdbc:hsqldb:file:/var/lib/rundeck/data/grailsdb;shutdown=true
Here is an example configuration to use an Oracle backend:
1 |
|
Here is an example configuration to use Mysql:
1 |
|
NB: for Mysql, the autoReconnect=true
will fix a common problem where the Rundeck server's connection to Mysql is dropped after a period of inactivity, resulting in an error message: "Message: Can not read response from server. Expected to read 4 bytes, read 0 bytes before connection was unexpectedly lost."
See more about configuring the Mysql JDBC Connector/J URL.
Copy the appropriate JDBC driver, such as "ojdbc14.jar" for Oracle into the server lib
dir:
cp ojdbc14.jar $RDECK_BASE/server/lib
Or:
cp mysql-connector-java-5.1.17-bin.jar $RDECK_BASE/server/lib