Getting started
This is a quick guide to installing a standalone instance of BeyondCron on a single server.
Upgrading BeyondCron
This is a quick guide to upgrading BeyondCron.
Requirements
- Unix operating system with at least:
- 1 CPU
- 1 GB Memory
- 500GB of free disk
- Java 8 or 11
- git 1.7 or greater
- ssh
- sudo
Optional
- SQL database, AWS DynamoDB or ETCD for configuration management
- SQL database or AWS DynamoDB/S3 for job execution logging
1 Install BeyondCron
- install BeyondCron and start daemons
root# cd /tmp
root# wget https://beyondcron.com/downloads/beyondcron_4.230317.0_all.deb
root# dpkg -i beyondcron_4.230317.0_all.deb
- install BeyondCron packaging signature
root# cd /tmp
root# wget https://beyondcron.com/downloads/beyondcron_pub.asc
root# rpm --import beyondcron_pub.asc
- install BeyondCron and start daemons
root# wget https://beyondcron.com/downloads/beyondcron-4.230317.0-0.noarch.rpm
root# rpm -i beyondcron-4.230317.0-0.noarch.rpm
The installation will create the following:
- operating system users:
bc-daemon
bc-web
- application directory
/opt/beyondcron
containing bc-agent, bc-cli, bc-server & bc-web. - service environment files:
/etc/bc-agent.conf
/etc/bc-server.conf
/etc/bc-web.conf
- data directory
/var/bc-server/data
- log4j2 configuration files:
/var/bc-agent/log4j.yaml
/var/bc-server/log4j.yaml
/var/bc-web/log4j.yaml
- log files on init systems:
/var/log/bc-agent.log
/var/log/bc-server.log
/var/log/bc-web.log
It will also register and start the services bc-agent
, bc-server
& bc-web
.
if the package cannot find a version of Java 8 or 11 already installed, the installation will fail.
If you wish to run BeyondCron under your own user id:
- download BeyondCron distribution file
username% cd /install/directory/parent
username% wget https://beyondcron.com/downloads/beyondcron-4.230317.0.zip
username% unzip beyondcron-4.230317.0.zip
- start bc-server
username% ./beyondcron/bin/bc-server &
2021-09-23T10:26:25,630 [main] INFO com.beyondcron.server.App – bc-server 4.230317.0
…
- start bc-agent
username% ./beyondcron/bin/bc-agent &
2021-09-23T10:26:25,630 [main] INFO com.beyondcron.agent.App – bc-agent 4.230317.0
…
- start bc-web
username% ./beyondcron/bin/bc-web &
2021-09-23T10:26:25,630 [main] INFO com.beyondcron.web.App – bc-web 4.230317.0
…
2 Configure ssh
The BeyondCron user bc-daemon
requires passwordless ssh access to each server on which BeyondCron is running, and every server on which jobs are executed as follows:
Source | Destination | Source user | Destination user |
---|---|---|---|
BeyondCron server | BeyondCron server | bc-daemon |
bc-daemon |
BeyondCron server | job host | bc-daemon |
job user |
In order to execute jobs on other servers, BeyondCron requires that you have passwordless ssh access to those servers.
3 Configure sudo
bc-agent executes jobs locally via sudo. As such you must allow bc-daemon
on each server where Beyondcron is installed to sudo to job users.
A minimal sudo entry to allow bc-agent to execute commands for any user except root
, is:
bc-daemon ALL=(ALL,!root) NOPASSWD: ALL
You can add this entry to /etc/sudoers
, or if the directory /etc/sudoers.d
exists, to a BeyondCron specific sudoers file such as /etc/sudoers.d/90-beyondcron
.
If you wish to allow bc-agent to execute commands as root
, the safest option is to explicitly define each command that you wish to allow bc-agent to execute. e.g.
bc-daemon ALL=(ALL,!root) NOPASSWD: ALL, (root) /usr/bin/tee,/sbin/reboot
bc-agent uses the tee command to save the command output, so should always be included in the commands that bc-agent can sudo to when allowing bc-agent to execute commands as root.
If you wish BeyondCron to execute jobs as users other than your own user id, it is recommended to install BeyondCron as a service using either the Debian or RedHat packages.
4 Set up a Beyondcron admin user
If the host operating system is configured to use LDAP for user authentication, BeyondCron can be configured to authenticate against LDAP.
To designate yourself as a BeyondCron adminstrator in your LDAP director service:
- create the group
bc_admin
- add yourself to the new
bc_admin
group.
- enable the Unix user service within BeyondCron
root# sudo -u bc-daemon /usr/local/bin/bc-cli --admin
BeyondCron % config set beyondcron.user.service Unix
BeyondCron % user service reload
Confirm that the user service is connected and can see the LDAP users
BeyondCron % user service show
User service Unix – connected 14:43:58 23/05/2020
BeyondCron % user list
User Description ------ ------------- bsmyth William Smyth jsmith John Smith ...
BeyondCron % exit
If host operating system is not using LDAP use BeyondCrons default internal user service.
To create yourself as a BeyondCron adminstrator:
- create an admin user within Beyondcron using bc-cli
root# sudo -u bc-daemon /usr/local/bin/bc-cli --admin
BeyondCron % user add username
BeyondCron % user password username secret
BeyondCron % user role add username admin
BeyondCron % exit
username% /usr/local/bin/bc-cli
bc-cli
username’s password: ••••••••
BeyondCron %
see bc-server user service Unix for additional configuration details.
the Unix service cannot be used when the host operating system is using /etc/passwd
& /etc/shadow
.
see commands user overview for additional user configuration details.
4 Set yourself up as a BeyondCron admin user
- create a BeyondCron user with the same name as your Unix user
username% /usr/local/bin/bc-cli --admin
BeyondCron % user add username
BeyondCron % user password username secret
BeyondCron % user role add username admin
BeyondCron % exit
username% /usr/local/bin/bc-cli
bc-cli
username’s password: ••••••••
BeyondCron %
5 Purchase a license
Without a license, BeyondCron will run unrestricted for 1 month, and afterwards will be limited to 5 defined jobs running on a single bc-server. If you wish to define more than 5 jobs or run bc-server in a clustered configuration, please purchase a license as follows:
BeyondCron % server license request
Store URL: https://example.com/store/?instance=0:7fdf823b&jobs=20&servers=1&example
If executed within the bc-web terminal, the command output will be a link similar the to following:
Store URL: http://example.com/store/
- copy and paste the url into your web browser.
Next steps
see the Knowledge base
1 Upgrade BeyondCron
- upgrade BeyondCron
root# cd /tmp
root# wget https://beyondcron.com/downloads/beyondcron_4.230317.0_all.deb
root# dpkg -i beyondcron_4.230317.0_all.deb
root# cd /tmp
root# wget https://beyondcron.com/downloads/beyondcron-4.230317.0-0.noarch.rpm
root# rpm -U beyondcron-4.230317.0-0.noarch.rpm
username% cd /install/directory/parent
username% wget https://beyondcron.com/downloads/beyondcron-4.230317.0.zip
username% unzip beyondcron-4.230317.0.zip
- restart bc-server
username% pkill bc-server
username% ./beyondcron/bin/bc-server &
2021-09-23T10:26:25,630 [main] INFO com.beyondcron.server.App – bc-server 4.230317.0
…
- restart bc-agent
username% pkill bc-agent
username% ./beyondcron/bin/bc-agent &
2021-09-23T10:26:25,630 [main] INFO com.beyondcron.agent.App – bc-agent 4.230317.0
…
- restart bc-web
username% pkill bc-web
username% ./beyondcron/bin/bc-web &
2021-09-23T10:26:25,630 [main] INFO com.beyondcron.web.App – bc-web 4.230317.0
…