bc-web installation

Requirements

  • Java 8

Installation

  1. download bc-agent distribution file

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

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

user% cd /downloads-directory
user% wget http://beyondcron.com/downloads/bc-web-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-web_version_all.deb

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

root# apt-get install bc-web

root# yum install bc-web

if you do not wish bc-web to be automatically started after installation, touch the file /tmp/bc-web.postinstall.startup.disabled

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

  • operating system user bc-web to run bc-web;
  • directory /opt/bc-web containing this package;
  • configuration file /etc/default/bc-web
  • log4j configuration file /var/opt/bc-web/etc/log4j.properties
  • log file /var/log/bc-web.log on initd systems;

It will also register and start bc-web 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-web service can be started and stopped using the service command. e.g.

root# service bc-web (start|stop)

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

root# systemctl (start|stop) bc-web

Logging

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

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

root# journalctl -u bc-web

  1. move to the install directory

user% cd /install-directory

  1. unzip distribution

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

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

  1. confirm installation

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

bc-web version

Configuration variables

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

BEYONDCRON_SERVER_NAMES one or more space separated server[:port]s to connect to.
Default is a plumbed IP address that best matches the rules defined by the environment variables BEYONDCRON_SERVER_ADDRESS_PRIVATE, BEYONDCRON_SREVER_ADDRESS_IPV6 & BEYONDCRON_SERVER_ADDRESS_IGNORE.
BEYONDCRON_SERVER_PORT the server port number. Default is 5701.
BEYONDCRON_SERVER_ADDRESS_PRIVATE When searching for an address, only chose a private network address. Default is true.
BEYONDCRON_SERVER_ADDRESS_IPV6 When searching for an address, prefer an IPv6 address. Default is false.
BEYONDCRON_SERVER_ADDRESS_IGNORE Space separated list of IP address prefixes. When searching for an address, ignore any addresses that begin with one of these prefixes. This can be useful, on servers with one or more management interfaces.
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_JETTY_CONFIG Jetty configuration file.
BEYONDCRON_HTTP_PORT on which to listen for http requests. Default is 8080.
BEYONDCRON_TIME_ZONE default timezone.
BEYONDCRON_CHECK_HOSTS_EXIST check that command job hosts exist. Default is true.
BEYONDCRON_ALERT_COMMAND operating system command which is called when bc-web 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-web stopped unexpectedly” or “bc-web stopped after receiving signal 15”.
BEYONDCRON_DAEMONbc-web
BEYONDCRON_EXIT_CODE – exit code of bc-web
BEYONDCRON_OS_USER – operating system user name which bc-web was running under.
BEYONDCRON_ECHO enable/disable the echo url. Default is true, enabled.
JAVA_OPTS one or more JVM options. e.g. -Xms2T -Xmx2M
LOG4J_CONFIGURATION location of the log4j configuration file. If this file does not exist, bc-web will create and populate it, with the bc-web defaults.

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.

See also