Quick start
This is a guide to getting started quickly with a standalone instance of BeyondCron on a single server.
Getting started
This is a guide to installing a standalone instance of BeyondCron on a single server.
Upgrading BeyondCron
This is a guide to upgrading BeyondCron.
Requirements
- Linux operating system with at least:
- 1 CPU
- 1 GB Memory
- 2 GB Swap space
- 500GB of free disk
- Java 11 or greater
- 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 and configure BeyondCron
- download and run quick start script
username% cd /tmp
username% wget https://beyondcron.com/downloads/quick-start
username% sudo bash quick-start
Downloading beyondcron_5.241101.0…
Installing beyondcron_5.241101.0…
Would you like BeyondCron to be able to: [R] reboot this server [A] execute any command as root [N] have no ability to execute commands as root: answer
Initing SSH keys for bc-daemon
Creating user name (full name) in BeyondCron as an administrator enter password for user: •••••••• confirm password: ••••••••
Would you like to load the example jobs [Y/N]: answer
Congratulations, BeyondCron is now installed on this server.
To login to BeyondCron, either:
1: as jsmith run the command “/usr/local/bin/bc-cli”, or
2: open http://example.com:8080/?user=jsmith in a web browser.
For more information on please visit: https://beyondcron.com/kb/
The installation will create the following:
- operating system users:
bc-daemon
bc-web
- ssh directory and keys ~bc-daemon/.ssh/…
- sudo configuration file
/etc/sudoers.d/90-beyondcron
- application directory
/opt/beyondcron
containing bc-agent, bc-cli, bc-server & bc-web. - symbolic link
/usr/local/bin/bc-cli
→/opt/beyondcron/bin/bc-cli
- 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
.
guick-start.sh will fail if:
- Java 11+ is not already installed
- git 1.7+ is not already installed
- BeyondCron is already install
- the quick start script is not executed using sudo
1 Install BeyondCron
- install BeyondCron and start daemons
username% cd /tmp
username% wget https://beyondcron.com/downloads/beyondcron_5.241101.0_all.deb
username% sudo dpkg -i beyondcron_5.241101.0_all.deb
- install BeyondCron packaging signature
username% cd /tmp
username% wget https://beyondcron.com/downloads/beyondcron_pub.asc
username% sudo rpm --import beyondcron_pub.asc
- install BeyondCron and start daemons
username% wget https://beyondcron.com/downloads/beyondcron-5.241101.0-0.noarch.rpm
username% sudo rpm -i beyondcron-5.241101.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. - symbolic link
/usr/local/bin/bc-cli
→/opt/beyondcron/bin/bc-cli
- 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
.
the installation will fail if:
- Java 11+ is not already installed
- git 1.7+ is not already installed
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-5.241101.0.zip
username% unzip beyondcron-5.241101.0.zip
- start bc-server
username% ./beyondcron/bin/bc-server —data /data/directory &
2021-09-23T10:26:25,630 [main] INFO com.beyondcron.server.App – bc-server 5.241101.0
…
Where /data/directory is the name of an existing directory in which bc-server will store its data.
- start bc-agent
username% ./beyondcron/bin/bc-agent &
2021-09-23T10:26:25,630 [main] INFO com.beyondcron.agent.App – bc-agent 5.241101.0
…
- start bc-web
username% ./beyondcron/bin/bc-web &
2021-09-23T10:26:25,630 [main] INFO com.beyondcron.web.App – bc-web 5.241101.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 |
bc-daemon |
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 via sudo. As such you must allow bc-daemon
on each server where Beyondcron is installed, and on servers on which job commands are executed, 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. to allow BeyondCron to reboot the server:
bc-daemon ALL=(ALL,!root) NOPASSWD: ALL, (root) SETENV: /usr/bin/tee,/usr/bin/kill,/sbin/reboot
bc-agent uses the tee command to save the command output, and kill to stop running commands, so they should always be included in the commands that bc-agent can sudo to when allowing bc-agent to execute commands as root
.
Alternantivey, if you wish to allow bc-agent to execute any command as root
, you can use the following entry:
bc-daemon ALL=(ALL) NOPASSWD: ALL
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 or another name sevice for user authentication, BeyondCron can be configured to authenticate using the Unix service. The Unix service however cannot be used when the host operating system is using /etc/passwd
& /etc/shadow
. Instead you should define users within BeyondCron.
To designate yourself as a BeyondCron adminstrator in your LDAP directory service:
- create the group
bc_admin
- add yourself to the new
bc_admin
group.
- enable the Unix user service within BeyondCron
username% 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
- confirm that you can login to BeyondCron using bc-cli
username% /usr/local/bin/bc-cli
bc-cli
username’s password: ••••••••
BeyondCron % exit
If host operating system is not using LDAP or another name sevice, use BeyondCron’s default internal user service.
To create yourself as a BeyondCron adminstrator:
- create an admin user within Beyondcron using bc-cli
username% 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
- confirm that you can login to BeyondCron using bc-cli
username% /usr/local/bin/bc-cli
bc-cli
username’s password: ••••••••
BeyondCron % exit
see bc-server user service Unix for additional configuration details.
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
- confirm that you can login to BeyondCron using bc-cli
username% /usr/local/bin/bc-cli
bc-cli
username’s password: ••••••••
BeyondCron % exit
2 First steps
Login to BeyondCron using bc-cli or bc-web
For help visit the Knowledge base
3 Purchase a license
5 First steps
Login to BeyondCron using bc-cli or bc-web
For help visit the Knowledge base
6 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, a license is required.
For license pricing, see the BeyondCron store.
When purchasing a license, you will need to get your BeyondCron instance, the easiest way to do this is 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: https://example.com/store/ open_in_new
- click or, copy and paste the url into your web browser.
1 Upgrade BeyondCron
- upgrade BeyondCron
username% cd /tmp
username% wget https://beyondcron.com/downloads/beyondcron_5.241101.0_all.deb
username% sudo dpkg -i beyondcron_5.241101.0_all.deb
username% cd /tmp
username% wget https://beyondcron.com/downloads/beyondcron-5.241101.0-0.noarch.rpm
username% sudo rpm -U beyondcron-5.241101.0-0.noarch.rpm
username% cd /install/directory/parent
username% wget https://beyondcron.com/downloads/beyondcron-5.241101.0.zip
username% unzip beyondcron-5.241101.0.zip
- restart bc-server
username% pkill bc-server -data /data/directory
username% ./beyondcron/bin/bc-server &
2021-09-23T10:26:25,630 [main] INFO com.beyondcron.server.App – bc-server 5.241101.0
…
Where /data/directory is the name of an existing directory in which bc-server stores its data.
- 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 5.241101.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 5.241101.0
…