bc-serverservice config JDBC

This is a configuration service that connects a JDBC compatible database. BeyondCron is distributed with support for MySQL and PostgreSQL databases. With the inclusion of the the appropriate JDBC driver, and creation of the the required table, BeyondCron is able to support other databases.

Environment variables

BEYONDCRON_CONFIG_SERVICE JDBC
JDBC_URL Database connection URL.
JDBC_USER Database user name.
JDBC_PASSWORD Database user password. If the password is in the format file:filename,, then the password will be read from filename,.
JDBC_TABLE_CONFIG Name of table to use.
JDBC_… Optional MySQL configuration properties.
BEYONDCRON_CONFIG_SERVICE JDBC
JDBC_URL Database connection URL.
JDBC_USER Database user name.
JDBC_PASSWORD Database user password. If the password is in the format file:filename,, then the password will be read from filename.
JDBC_TABLE_CONFIG Name of table to use.
JDBC_… Optional PostgeSQL configuration properties.
BEYONDCRON_CONFIG_SERVICE JDBC
JDBC_URL Database connection.
JDBC_USER Database user name.
JDBC_PASSWORD Database user password. If the password is in the format file:filename,, then the password will be read from filename.
JDBC_TABLE_CONFIG Name of table to use.
JDBC_… Optional database configuration properties.

Table

This service requires the following table:

Table Required permissions
JDBC_TABLE_CONFIG Select/Insert/Update/Delete

with the following colums:

Column Type Nullable Default Primary key
bc_name VARCHAR(256)
bc_value TEXT
Column Type Nullable Default Primary key
bc_name TEXT
bc_value TEXT
Column Java type Size Nullable Default Primary key
bc_name String >= 256B
bc_value String >= 2KB

If the user account has permission, BeyondCron will create the table if it does not already exist.

Example

Setup JDBC.

$ export JDBC_URL=jdbc:mysql://database.example.com:3306/beyondcron
$ export JDBC_USER=beyondcron
$ export JDBC_PASSWORD=Secret!
$ export JDBC_TABLE_CONFIG=bc_config
$ export BEYONDCRON_CONFIG_SERVICE=JDBC
$ /opt/bc-server/bin/bc-server

$ export JDBC_URL=jdbc:postgresql://database.example.com:5433/beyondcron
$ export JDBC_USER=beyondcron
$ export JDBC_PASSWORD=Secret!
$ export JDBC_TABLE_CONFIG=bc_config
$ export BEYONDCRON_CONFIG_SERVICE=JDBC
$ /opt/bc-server/bin/bc-server

$ export JDBC_URL=jdbc:…
$ export JDBC_USER=beyondcron
$ export JDBC_PASSWORD=Secret!
$ export JDBC_TABLE_CONFIG=bc_config
$ export BEYONDCRON_CONFIG_SERVICE=JDBC
$ /opt/bc-server/bin/bc-server

Setup JDBC with the password being read from a file.

$ export JDBC_URL=jdbc:mysql://database.example.com:3306/beyondcron
$ export JDBC_USER=beyondcron
$ export JDBC_PASSWORD=file:/home/bc-daemon/.jdbc/jdbc.password
$ export JDBC_TABLE_CONFIG=bc_config
$ export BEYONDCRON_CONFIG_SERVICE=JDBC
$ /opt/bc-server/bin/bc-server

$ export JDBC_URL=jdbc:postgresql://database.example.com:5433/beyondcron
$ export JDBC_USER=beyondcron
$ export JDBC_PASSWORD=file:/home/bc-daemon/.jdbc/jdbc.password
$ export JDBC_TABLE_CONFIG=bc_config
$ export BEYONDCRON_CONFIG_SERVICE=JDBC
$ /opt/bc-server/bin/bc-server

$ export JDBC_URL=jdbc:…
$ export JDBC_USER=beyondcron
$ export JDBC_PASSWORD=file:/home/bc-daemon/.jdbc/jdbc.password
$ export JDBC_TABLE_CONFIG=bc_config
$ export BEYONDCRON_CONFIG_SERVICE=JDBC
$ /opt/bc-server/bin/bc-server

See also

  • service config AWS
  • service config etcd

Reference