Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

This section describes shell tools required for the deployment management of the system. All these tools are shipped with part of the JeraSoft Billing distributive. You In order to use the tools you will need either SSH or direct access to the server in order to use them. Please notice that most console. Some of the given tools require root  access and show inline help when running without argumentspermissions to run.

Panel
borderColor#FFBABA
bgColor#FFBABA
borderWidth2px
borderStylesolid

Important!

Please use these tools only if you have a clear understanding of what you are doing. Misuse of the tools may cause improper functioning of the system.

...

Panel
borderColor#ffffb3
bgColor#ffffb3
borderWidth2px

(warning)   Attention

To free our clients from confusion while trying to indicate a path to JeraSoft Billing system, we introduce the <VCSPlease note, for simplification we introduced <APP_PATH> variable that differs depending on refers to the JeraSoft Billing version:

  • <VCS_PATH> before version 3.13.0 is “/usr/local/vcs”
  • <VCS_PATH> after version 3.13.0 is “/opt/jerasoft/vcs”

/The example is as follows:
To restart RADIUS Server, you need to execute <VCSapplication files location. This location may differ, but typically it is "/opt/jerasoft/vcs". So whenever you see an example with path like "<APP_PATH>/bin/service bbradiusd restart, which will look like
/usr/local/vcs/bin/service bbradiusd restart for clients with VCS version 3.12.0 and lower orsystem/cluster" it means "/opt/jerasoft/vcs/bin/service bbradiusd restart for VCS version 3.13.0 and higher/system/cluster".

Requirements Checker

The tool is aimed to check minimal requirements and security recommendations at of your server before and after installation. 

Code Block
languagebash
titleUsage
<VCS<APP_PATH>/bin/system/setup-checker

The tool should be run under root permissions without any arguments. When the tool is run, it will perform a list of checks and show results for each of them. Use it:

...

requires root permissions and takes no arguments. It should be executed before installation of the system in order to check minimal hardware and software requirements.

...

...

Panel
borderColor#ffffb3
bgColor#ffffb3
borderWidth2px

(warning)   Attention

The tool checks only minimal requirements. Real hardware requirements highly depend on your traffic and deployment model.

Safety Checker

The tool is aimed to check configuration of the main server settings after installation.

Code Block
languagebash
titleUsage
<APP_PATH>/bin/system/security-checks

The tool takes no arguments. When executed it performs numerous checks for the correctness of the network and server configuration.

Services Manager

The tool is used for managing the JeraSoft Billing management of System Services. It allows to correctly start, stop , get status of the and perform other actions over various JeraSoft Billing Services such as RADIUS Server, SIP Server, Calculator, etc.

Code Block
languagebash
themeConfluence
titleUsage
<VCS<APP_PATH>/bin/system/service <COMMAND> [<service-name>] <action> [<options>]

The tool should be run under root or vcs user.  Service manager takes 2 arguments:

...

<service-name>

...

<action>

...

Action to perform, one of the following:

  • start - start the service
  • stop - stop the service
  • restart - stop and then start the service
  • reload - force config re-read without restart
  • status - return current status of the tool

Additionally, you may pass the next options:

...

--path=<path>

...

--user=<user>

...

The tool typically takes 2 arguments – action to perform and related system service. Actions prefixed with "all-*" do not require service name and operate over all services.

CommandDescription
start

Start System Service

Takes "--wait" option in order to wait and exit only when service finishes its execution.

stop

Stop System Service

restart
Stop and then start System Service
reload
Send reload (HUP) signal to the System Service (forces reload of settings, connections, etc)
status
Show current status of the System Service
all-start
Start all required System Services (list of services varies depending on the role of the current node in the cluster)
all-stop
Stop all running System Services
all-status
Show status of all System Services on the current node

Usage Examples

...

Code Block
languagebash
titleRestart RADIUS Server
<VCS<APP_PATH>/bin/system/service restart bbradiusd restart


Code Block
languagebash
titleStart Files Downloader
<VCS<APP_PATH>/bin/system/service start files_downloader start


Code Block
languagebash
titleGet status of SIP ServerStart all required System Services
<APP<VCS_PATH>/bin/system/service bbsipd status
Panel
borderColor#ffffb3
bgColor#ffffb3
borderWidth2px

(warning)   Attention

The tool also complies with LSB Init Scripts standard. It allows analyzing exit code of each action in case of automated usage.

all-start


Cluster Manager

The tool is used to manage clustersnodes in the cluster deployment. It allows to init initialize the cluster, add and promote a slave a new node, promote redundancy to master, etc. 

Code Block
languagebash
titleUsage
<VCS<APP_PATH>/bin/system/cluster <command><COMMAND> [<options>]

The tool requires "requires root" permissions. Cluster Manager takes command as a mandatory argument and additional options. Some of the commands may be run only on Master and others only on Slave. There are two available types of Slave: redundancy and reporting. All extra options for the commands are explained below in the corresponding subsection permissions. The list of arguments and other requirements depend on the command used. Please refer to the below table for a summary and respective sections for details.

CommandDescriptionNodesRoot Required
status
Show status of the clusterAny nodeNo
init-master
Init Master Node configurationMasterYes
init-slave
Init Slave Node configurationMasterYes
promote
Promote current node to MasterRedundancyYes
sync-files
Sync files from MasterRedundancy, Reporting, ProcessingNo
remove-node
Remove Node from the ClusterMasterYes

Cluster Status

The command shows Cluster Status, including all nodes with their roles, IP addresses, current lag to Master, and overall status.

Code Block
titleBash
<APP_PATH>/bin/system/cluster status

The command can be executed on the Master in order to get the most detailed information about the cluster:

Example of Cluster Status outputImage Added

Alternatively, the command can be executed at any other node - in this case, only the status of the connection between this particular node and the Master will be shown.

If any node failed and has been disconnected from the cluster it will be shown like this:

Example of Cluster Status output with failed nodeImage Added

In this case, you have to re-check failed node, fix it and then return to the cluster using the "init-slave" command.

Init Master

The command is run on Master and used for Master to configure its parametersthe initial configuration of the Master Node.

Code Block
titleBash
<VCS<APP_PATH>/bin/system/cluster init-master --ip=<IP-of-master>ADDRESS> [<extra-options>]<options>]

Command has to be executed on the Master node and requires root permissions. The following options are supportedThis command may require additional options:

OptionDescriptionDefault
<IP-
-ip=<ip>
ADDRESS>
IP Address of the Master server
none
(required)

--ssh-port=<port>
SSH Port
at
as the master
server
node
22
--pg-data=<path>

Path to PostgreSQL data

path on the master system

directory

autodetect
--vcs-path=<path>
Path to the JeraSoft Billing on Slave
<VCS_PATH>

...

Init Slave

The command is run on the Master and used for:is used to add a node to the cluster. There are different contexts when it is required:

  • First-time deployment of the cluster
  • Addition of a new slave node to the cluster
  • Addition of the
  • first-time initialization of the cluster;
  • addition of the new slave node to the cluster;
  • addition of the  old master to work as a slave  after after failover.
Code Block
titleBash
<VCS<APP_PATH>/bin/system/cluster init-slave --ip=<IP-of-slave>ADDRESS> [<extra-options>]

This command encapsulates 4 sub-commands:

  • configuration of the Master to ship replication logs (init-master)
  • configuration of the Master to accept connections from the Slave (init-master-access)
  • configuration of the Slave to receive replication logs (init-slave)
  • show status of the cluster (status).

Each of these commands may be performed separately if you know exactly what you need.

This command may require additional options:

<options>]

Command has to be executed on the Master node and requires root permissions. The following options are supported:

OptionDescriptionDefault
<IP-ADDRESS>
IP Address of the Slave server (required)

--role=<role>

Role of the new node:

  • redundancy - fully-featured redundancy, that acts as a hot standby and can be promoted to the Master at any time (may be used for redundancy and load balancing at the same time)
  • reporting - a node that receives most of the requests for the reports, holds a full snapshot of the database, however, it might be delayed from Master depending on the current load and requests (might be used for failover, as a last resort)
  • processing - lightweight node for processing of real-time requests (authentication, authorization, and routing), can not be used for failover as it does not hold any statistical data
redundancy
--
OptionDescriptionDefault
--ip=<ip>
IP Address of the Slave server
none
--
ssh-port=<port>
SSH Port at the
slave server
remote node
22
--ssh-
username
user=
<login>
<user>
SSH User at the remote node
Login to the slave server
jerasupport
--pg-data=<path>

Path to PostgreSQL data

path on the slave system

same as master

--vcs-path=<path>
Path to the JeraSoft Billing on Slave
<VCS_PATH>
--role=<role>
Role of the secondary system. Could be [redundancy or reporting]
redundancy

...

directory at the remove node

autodetect

Promote  to Master

The command is run on the Slave and used to promote the current Slave Redundancy node to Master. 

Code Block
titleBash
<VCS<APP_PATH>/bin/system/cluster promote

Command has to be executed on the Redundancy node and requires root permissions. Reporting node can be used as a last resort if there are no Redundancy node alive. There are no options required.

After the promotion is performed, all required System Services will be started on the current node (new master)The command is used for failover. After you fix the old Master, you may add it as a new Slave using the "init-slave" command.

Panel
borderColor#ffffb3
bgColor#ffffb3
borderWidth2px

(warning)   Attention

In case when you have more than 2 nodes in the cluster, you need to re-init all other slaves nodes from this new Master.

...

Sync Files

The command is run on the Slave and used to synchronize files sync data and application files from the Master. The command is mostly used in crontab for auto-sync.

Code Block
titleBash
<VCS<APP_PATH>/bin/system/cluster sync-files

During initialization of the cluster, tool adds this command to the crontab (/etc/cron.d/vcs-cluster) at the Slave node. 

Cluster Status

Command has to be executed on the Redundancy node and by default, it is added to the crontab for automatic synchronization.

Remove Node

The command may be run on any node and used to get status of the cluster. The command is used to remove a node from the cluster.

Code Block
titleBash
<VCS<APP_PATH>/bin/system/cluster status

When the command is run on the Master, it shows the type of the node and attached Slaves that are up to date:

Code Block
[ NOTICE ] Cluster Status
  ifconfig  | grep 'inet addr:'| grep -v '127.0.0.1' | cut -d: -f2 | awk '{ print $1}'

Master (master ip): ACTIVE 
    Redundancy (slave ip): ACTIVE

When the command is run on the Slave, it shows the type of the node and synchronization delay.

Code Block
[ NOTICE ] Cluster Status
  ifconfig  | grep 'inet addr:'| grep -v '127.0.0.1' | cut -d: -f2 | awk '{ print $1}'

Master (master ip): NOT AVAILABLE | Activity delay: -00:00:58.393423
    Redundancy (slave ip): ACTIVE

Please don't worry if you see the following:

Code Block
the row: Master (master ip): NOT AVAILABLE 

It's normal behavior. Instead, please pay attention to Activity delay parameter − it shows large values if replication is broken and servers are not in sync. 

...

remove-node <IP-ADDRESS>

Command has to be executed on the Master node. The node in question shouldn't have any active database replication. The following options are supported:

OptionDescriptionDefault
<IP-ADDRESS>
IP Address of the remote node (required)