Introduction

The WEB role provides the following functionality to the jtel platform.

  • Web Server Application for Agents, Supervisors and Administrators
  • SOAP Web Service API

WEB requires access to STORE, and DATA.

The web server is provided by the java based wildfly server, and uses port 8080. The load balancer (LB) is used to distribute sessions to the webserver(s), and to decrypt https if installed. The WEB role runs internally behind the LB role and does not use encryption.

Pre-Requisites

STORE must be mounted before installing this role. See Mounting STORE - All Linux except for STORE (Debian/Win2019).

Installation

Symbolic Link for Store

Since access to the store is performed using UNC paths, this path must be created and linked to the location of the STORE mount:

mkdir /acd-store
ln -s /home/jtel/shared /acd-store/shared

This will enable the webserver to access paths like: //acd-store/shared

Debian 10/11 Install Java Runtime

apt-get -y install default-jdk

Debian 12 Install Java Runtime

mkdir -p /etc/apt/keyrings
wget -O - https://packages.adoptium.net/artifactory/api/gpg/key/public | tee /etc/apt/keyrings/adoptium.asc
echo "deb [signed-by=/etc/apt/keyrings/adoptium.asc] https://packages.adoptium.net/artifactory/deb $(awk -F= '/^VERSION_CODENAME/{print$2}' /etc/os-release) main" | tee /etc/apt/sources.list.d/adoptium.list
apt update 
apt install temurin-8-jdk

Install Wildfly

The following commands will install and configure the wildfly server as a systemd service:

# Get and unpack package
cd /home/jtel
wget http://cdn.jtel.de/downloads/jboss/wildfly-18.0.1.Final.05.tar.gz
tar xzf wildfly-18.0.1.Final.05.tar.gz
rm -f wildfly-18.0.1.Final.05.tar.gz
# Make deployment directory, change ownership, link up
mkdir -p wildfly-18.0.1.Final/standalone/deployments
chown -R jtel:jtel wildfly-18.0.1.Final
ln -s /home/jtel/wildfly-18.0.1.Final wildfly-current

# Install systemctl service
cp /home/jtel/wildfly-current/systemd/wildfly.service /etc/systemd/system/wildfly.service
systemctl daemon-reload

# Install required fonts
tar -xvf /home/jtel/shared/JTELCarrierPortal/Update/resources/lucida.tar -C /usr/share/fonts/truetype/
chmod -R a+r /usr/share/fonts/truetype/lucida
fc-cache

# Create daily cron jobs
cd /etc/cron.daily
ln -s /home/jtel/wildfly-current/bin/jboss-logmaint.sh jboss-logmaint
ln -s /home/jtel/wildfly-current/bin/jboss-restart.sh jboss-restart

# Create update script
cd /usr/local/bin
ln -s /home/jtel/wildfly-current/bin/updatejb.sh
systemctl enable wildfly.service

Configure Firewall

The following commands open the necessary ports in the firewall:

ufw allow 5701:5801/tcp
ufw allow 5455/tcp
ufw allow 8080:8081/tcp
ufw allow 4447/tcp
ufw allow 5445/tcp
ufw allow 20640/udp
ufw allow 20642/udp
ufw allow 20644/udp

Or for a specific ethernet interface:

ufw allow in on eth1 to any port 5701:5801 proto tcp
ufw allow in on eth1 to any port 5455 proto tcp
ufw allow in on eth1 to any port 8080:8081 proto tcp
ufw allow in on eth1 to any port 4447 proto tcp
ufw allow in on eth1 to any port 5445 proto tcp
ufw allow in on eth1 to any port 20640 proto udp
ufw allow in on eth1 to any port 20642 proto udp
ufw allow in on eth1 to any port 20644 proto udp

Configure Cron

Some debian packages come with a default crontab configuration that we need to change. 

Check/Change Configuration

# Check current configuration
less /etc/crontab
# Edit configuration
vi /etc/crontab
# Reload Config after change
/etc/init.d/cron reload

Expected Result

Configure Wildfly Server

First Server

Next, configure the wildfly server to attach to the database servers as appropriate.

The 4th line of this series of commands must be modified to contain the password for the database.

CAUTION PASSWORD

DBPRI=acd-dbm
DBSTA=acd-dbs
DBREP=acd-dbr
DBPWD=<password>
sed -i -e "s/DATA_PRIMARY/${DBPRI}/g" -e "s/DATA_STATS/${DBSTA}/g" -e "s/DATA_REPORTS/${DBREP}/g" -e "s/DB_PASSWORD/${DBPWD}/g" /home/jtel/wildfly-current/standalone/configuration/standalone.xml
unset DBPWD
unset DBREP
unset DBSTA
unset DBPRI
cp /home/jtel/wildfly-current/standalone/configuration/standalone.xml /home/jtel/shared

Further Servers

If the configuration file has already been provided on STORE, then the following commands will copy it to the wildfly server.

rm -f /home/jtel/wildfly-current/standalone/configuration/standalone.xml
cp /home/jtel/shared/standalone.xml /home/jtel/wildfly-current/standalone/configuration/standalone.xml
chown jtel:jtel /home/jtel/wildfly-current/standalone/configuration/standalone.xml

Configure Hazelcast Cluster

The hazelcast configuration file is now copied:

rm -f /home/jtel/wildfly-current/standalone/configuration/hazelcast.xml
cp /home/jtel/shared/hazelcast.xml /home/jtel/wildfly-current/standalone/configuration/hazelcast.xml
chown jtel:jtel /home/jtel/wildfly-current/standalone/configuration/hazelcast.xml

Start Wildfly

Start the webserver as follows:

updatejb.sh

Whether it is running, can be checked in the webserver log file:

less /home/jtel/wildfly-current/standalone/log/server.log

Or by logging into the portal directly on port 8080 using a browser pointing to the following URL:

http://acd-jb1:8080/CarrierPortal/sysadmin/login

The login page should appear, with the logo.

  • No labels