bc-server installation

Requirements

  • Java 8

Installation

  1. download bc-agent distribution file

root# cd /downloads-directory
root# wget http://beyondcron.com/downloads/bc-server_version_all.deb

root# cd /downloads-directory
root# wget http://beyondcron.com/downloads/bc-server_version-0.noarch.rpm

user% cd /downloads-directory
user% wget http://beyondcron.com/downloads/bc-server-version.zip

  1. if it does not already exist, create /etc/apt/sources.list.d/beyondcron.list

root# echo 'deb https://beyondcron.com/dists/stable /' > /etc/apt/sources.list.d/beyondcron.list

the package apt-transport-https is required in order to use an https source. If you are unable to install this package, change the source entry to deb http://beyondcron.com/dists/stable /.

  1. if it does not already exist, download the BeyondCron signing key /etc/apt/trusted.gpg.d/beyondcron.gpg

root# cd /etc/apt/trusted.gpg.d
root# wget https://beyondcron.com/dists/stable/beyondcron.gpg

  1. update package index files

root# apt-get update

  1. if it does not already exist, create /etc/yum/repos.d/beyondcron.repo

root# cat > /etc/yum.repos.d/beydoncron.repo << EOF
[beyondcron]
name=BeyondCron packages
baseurl=http://beyondcron.com/dists/stable
gpgcheck=1
gpgkey=http://beyondcron.com/dists/stable/RPM-GPG-KEY-beyondcron
metadata_expire=300
enabled=1
EOF

  1. install package and start daemon
  1. install package and start daemon

root# dpkg -i bc-server_version_all.deb

root# rpm -i bc-server_version-0.noarch.rpm

root# apt-get install bc-server

root# yum install bc-server

If they do not already exist, installing this package will create the following:

  • operating system user bc-daemon to run bc-server;
  • directory /opt/bc-server containing this package;
  • configuration file /etc/default/bc-server;
  • data directory /var/opt/bc-server;
  • log file /var/log/bc-server.log on init systems;

It will also register and start bc-server as a service.

if the package cannot find a version of Java 8 already installed, the installation will fail.

Starting/stopping

On init systems, the bc-server service can be started and stopped using the service command. e.g.

root# service bc-server (start|stop)

On systemd systems, the bc-server service can be started and stopped using the systemctl command. e.g.

root# systemctl (start|stop) bc-server

Logging

On init systems, output is written to the file /var/log/bc-server.log.

On systemd systems, output is written to the systemd journal and can be viewed using journalctl. e.g.

root# journalctl -u bc-server

  1. move to the install directory

user% cd /install-directory

The distribution will will create the sub-directory bc-server.

  1. unzip distribution

user% unzip /downloads-directory/bc-server-version.zip

  1. confirm installation

user% ./bc-server/bin/bc-server --version

bc-server version

Configuration variables

The following configuration variables can be defined within the file /etc/default/bc-server.

BEYONDCRON_SERVER_NAMES one or more space separated server[:port]s to connect to. Default is the name returned by /bin/hostname.
BEYONDCRON_SERVER_PORT the server port number. Default is 5701.
BEYONDCRON_CLUSTER_NAME name of BeyondCron cluster to join. Default is beyondcron.
BEYONDCRON_CLUSTER_PASSWORD password of cluster. If password is in the format file:filename, then the password will be read from filename. Default is a cluster specific random string.
BEYONDCRON_FORCE_START force start the server if true.
BEYCONCRON_DIR location of configuration (etc) and data (data) directories. If defined, the variables BEYONDCRON_DIR_CONFIG and BEYONDCRON_DIR_DATA will be overwritten, and set to ${BEYONDCRON_DIR}/etc and ${BEYONDCRON_DIR}/data respectively.
BEYONDCRON_DIR_CONFIG location of configuration directory.
BEYONDCRON_DIR_DATA location of data directory.
BEYONDCRON_PROTECTED_HOSTS one or more space separated host names to protect. These names will be defined in additon to any names defined using the protected command. Default is localhost 127.0.0.1
BEYONDCRON_PROTECTED_USERS one or more space separated user names to protect. These names will be defined in additon to any names defined using the protected command. Default is root and the user that bc-server is running under.
BEYONDCRON_STATUS_SERVICE name of status service.
BEYONDCRON_USER_SERVICE name of user service.
BEYONDCRON_GUEST_USER_ACCESS enable guest user access if true. Default is false.
BEYONDCRON_GUEST_USER_NAME name of guest user. Default is guest.
BEYONDCRON_GUEST_USER_DESCRIPTION description of guest user. Default is Guest user.
BEYONDCRON_GUEST_USER_PASSWORD password of guest user. Default is guest.
BEYONDCRON_ALERT_COMMAND operating system command which is called when bc-server stops unexpectedly. This can be used for example to send an email or SMS message. When called, the following environment variables will be set:
BEYONDCRON_ALERT_REASON – description of error. e.g. “bc-server stopped unexpectedly” or “bc-server stopped after receiving signal 15”.
BEYONDCRON_DAEMONbc-server
BEYONDCRON_EXIT_CODE – exit code of bc-server
BEYONDCRON_OS_USER – operating system user name which bc-server was running under.
JAVA_OPTS one or more JVM options. e.g. -Xms2T -Xmx2M
JDBC_CLASSPATH location of one or more JDBC drivers, which are used by the JDBC status service. BeyondCron includes drivers for MySQL and PostgreSQL databases.

when installing bc-server on a server using LDAP for user authentication, the variable BEYONDCRON_USER_SERVICE will be set to Unix.

if installing the BeyondCron components bc-agent, bc-server & bc-web on separate servers, then at least the variable BEYONDCRON_SERVER_NAMES will need to be set to include the names of each server.

Configure services

See service overview, for information on connecting to a user name service, and persisting job status, history and output. In particular, a status service is required in order to view job status, history and output.

See also