Description of the role
The role WEB is provided by a Java application under a modified Wildfly. The server has read and write access to both the STORE role and the DATA role. Access to the jtel portal and the jtel SOAP interfaces is provided via HTTP on port 8080 and 8081 (for HTTPS access provided by the proxy). User sessions on the portal are bound to the respective web server. This also applies to the SOAP v1 interface. The new SOAP v3 interface, which is available as of version 3.06, allows the execution of SOAP queries of a session on any web server.
Linking the data area
Linking the Data area, as descripited on the site Linking STORE (All Linux except STORE).
Installing the software - Wildfly installations
To include the official MySQL software repositories and install the MySQL client, use the following commands:
yum -y install https://dev.mysql.com/get/mysql80-community-release-el7-3.noarch.rpm yum -y install mysql-community-client
Since all access to the shared file share is via a Windows-compatible CIFS-UNC, a symbolic link must be created so that such accesses can also be made under UNIX. This is done with the following command which has to be adapted in practice according to the name of the computer for the role STORE:
mkdir /acd-store ln -s /home/jtel/shared /acd-store/shared
This allows access to the files in the share with the UNC specification:
ls -la //acd-store/shared/JTELCarrierPortal
Next, the required Java Runtime Environment is installed with the following command:
yum -y install https://cdn.jtel.de/downloads/java/jdk-8u202-linux-x64.rpm
Next, the customized application server can now be downloaded and installed:
cd /home/jtel wget http://cdn.jtel.de/downloads/jboss/wildfly-18.0.1.Final.03.tar.gz tar xzf wildfly-18.0.1.Final.03.tar.gz rm -f wildfly-18.0.1.Final.03.tar.gz mkdir -p wildfly-18.0.1.Final/standalone/deployments chown -R jtel:jtel wildfly-18.0.1.Final mkdir -p /home/jtel/upload chown -R jtel:jtel /home/jtel/upload ln -s /home/jtel/wildfly-18.0.1.Final wildfly-current ln -s /home/jtel/wildfly-current/init.d/wildfly /etc/init.d/wildfly ln -s /home/jtel/wildfly-current/default/wildfly /etc/default/wildfly cd /etc/cron.daily ln -s /home/jtel/wildfly-current/bin/jboss-logmaint.sh ln -s /home/jtel/wildfly-current/bin/jboss-restart.sh cd /usr/local/bin ln -s /home/jtel/wildfly-current/bin/updatejb.sh chkconfig wildfly on
Next, the port shares for the jboss AS service must be entered in the firewall and stored permanently:
firewall-cmd --zone=public --add-port=5701-5801/tcp --permanent firewall-cmd --zone=public --add-port=5455/tcp --permanent firewall-cmd --zone=public --add-port=8080-8081/tcp --permanent firewall-cmd --zone=public --add-port=4447/tcp --permanent firewall-cmd --zone=public --add-port=5445/tcp --permanent firewall-cmd --zone=public --add-port=20640/udp --permanent firewall-cmd --zone=public --add-port=20642/udp --permanent firewall-cmd --zone=public --add-port=20644/udp --permanent firewall-cmd --reload
Necessary adjustments of the configuration
The configuration of the jboss AS server is done via one or in case of software version >= 3.06 two configuration files. If a version of the software >= 3.06 is used, a copy of the file hazelcast.xml
is also stored in the configuration directory of the jboss AS. Since this was already created during the installation of the primary DATA server and stored in the file share of the STORE, it can simply be copied to the destination:
cp /home/jtel/shared/hazelcast.xml /home/jtel/wildfly-current/standalone/configuration chown jtel:jtel /home/jtel/wildfly-current/standalone/configuration/hazelcast.xml
Furthermore, adjustments to the configuration file standalone.xml
are necessary. When installing several servers with the WEB role, it is a good idea to store this file in the file share after initial configuration to speed up the installation. If a customized version already exists there, it can be copied to the target location using the following command:
cp /home/jtel/shared/standalone.xml /home/jtel/wildfly-current/standalone/configuration chown jtel:jtel /home/jtel/wildfly-current/standalone/configuration/standalone.xml
If, on the other hand, the configuration of the first WEB server is adjusted, some values in the file must be adjusted according to the database server configuration. This can be done with the following commands - <password> replace with the appropriate 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
The values of the first 4 lines must be adjusted according to the database configuration:
- DBPRI: Name of the primary DATA server
- DBSTA: Name of the DATA server for real-time statistics Data
- DBREP: Name of the DATA server for report execution
- DBPWD: Password of the database connection
After adapting the configuration file standalone-full.xml
, it can be saved to the central data share to speed up the configuration of the other WEB servers:
cp -a /home/jtel/wildfly-current/standalone/configuration/standalone.xml /home/jtel/shared
Starting the WEB application server
At this point the Web Server can be started. Entering the following command updates the to be executed web application and starts the web server:
updatejb.sh
A correct start can be checked in the log file of the web server. There you should be able to find the following messages after about 45 seconds from the start:
08:07:38,249 INFO [org.jboss.as.server] (DeploymentScanner-threads - 2) JBAS018559: Deployed "SMSReceiver.war" 08:07:38,250 INFO [org.jboss.as.server] (DeploymentScanner-threads - 2) JBAS018559: Deployed "CarrierPortal.war" 08:07:38,250 INFO [org.jboss.as.server] (DeploymentScanner-threads - 2) JBAS018559: Deployed "jasper-utils-0.0.1-SNAPSHOT.jar"
Furthermore, in case of software version >= 3.06 the status of the hazelcast-cluster can be recognized by messages like this
08:07:24,705 INFO [com.hazelcast.cluster.ClusterService] (hz._hzInstance_1_jtel-cluster-test5.generic-operation.thread-1) [192.168.1.32]:5701 [jtel-cluster-example] [3.5] Members [3] { Member [192.168.1.21]:5701 Member [192.168.1.31]:5701 Member [192.168.1.32]:5701 this } 08:07:26,713 INFO [com.hazelcast.core.LifecycleService] (MSC service thread 1-1) [10.42.13.65]:5701 [jtel-cluster-example] [3.5] Address[192.168.1.32]:5701 is STARTED
These messages appear every time a node of the cluster is added or removed. In the portal, the parameter "ACD.UDP.Webserver.Use.Hazelcast" must be activated, i.e. set to the value 1, so that the web servers use Hazelcast/UDPListener.
The final test to show that the web server has started properly is of course the call directly from the browser. Assuming that the second WEB server has just been installed, the application can be reached in the browser by entering the following URL: http://acd-jb2.example.com:8080/CarrierPortal/sysadmin/login
If everything works, you will be welcomed by the login mask:
Installing the software - JBOSS installations
To include the official MySQL software repositories and install the MySQL client, use the following commands:
MySQL 8.x
yum -y install https://dev.mysql.com/get/mysql80-community-release-el7-3.noarch.rpm yum -y install mysql-community-client
MySQL 5.6
yum -y install http://dev.mysql.com/get/mysql-community-release-el6-5.noarch.rpm yum -y install mysql-community-client
Beide Varianten
Since all access to the common file share takes place via a Windows-compatible CIFS-UNC, a symbolic link must be created so that such accesses can also take place under UNIX. This is done with the following command which has to be adapted in practice according to the name of the computer for the role STORE:
mkdir /acd-store ln -s /home/jtel/shared /acd-store/shared
This allows access to the files in the share with the UNC specification:
ls -la //acd-store/shared/JTELCarrierPortal
Next, the required Java Runtime Environment is installed with the following command:
yum -y install http://cdn.jtel.de/downloads/java/jdk-7u79-linux-x64.rpm
Next, the customized application server can now be downloaded and installed:
cd /home/jtel wget http://cdn.jtel.de/downloads/jboss/jboss-as-7.1.1.FINAL.15.tar.gz tar xzf jboss-as-7.1.1.FINAL.15.tar.gz rm -f jboss-as-7.1.1.FINAL.15.tar.gz mkdir -p jboss-as-7.1.1.FINAL/standalone/deployments cp jboss-as-7.1.1.FINAL/jboss /etc/init.d chown -R jtel:jtel jboss-as-7.1.1.FINAL chkconfig jboss on
cd /home/jtel wget http://cdn.jtel.de/downloads/jboss/jboss-as-7.1.1.FINAL.14.tar.gz tar xzf jboss-as-7.1.1.FINAL.14.tar.gz rm -f jboss-as-7.1.1.FINAL.14.tar.gz mkdir -p jboss-as-7.1.1.FINAL/standalone/deployments cp jboss-as-7.1.1.FINAL/jboss /etc/init.d chown -R jtel:jtel jboss-as-7.1.1.FINAL chkconfig jboss on mkdir /home/jtel/upload chown -R jtel:jtel /home/jtel/upload
Next, the port shares for the jboss AS service must be entered in the firewall and stored permanently:
firewall-cmd --zone=public --add-port=5701-5801/tcp --permanent firewall-cmd --zone=public --add-port=5455/tcp --permanent firewall-cmd --zone=public --add-port=8080-8081/tcp --permanent firewall-cmd --zone=public --add-port=4447/tcp --permanent firewall-cmd --zone=public --add-port=5445/tcp --permanent firewall-cmd --zone=public --add-port=20640/udp --permanent firewall-cmd --zone=public --add-port=20642/udp --permanent firewall-cmd --zone=public --add-port=20644/udp --permanent firewall-cmd --reload
Next, the daily maintenance scripts are now registered in the cron service:
cd /etc/cron.daily ln -s /home/jtel/jboss-as-7.1.1.FINAL/bin/jboss-logmaint.sh ln -s /home/jtel/jboss-as-7.1.1.FINAL/bin/jboss-restart.sh
To simplify the update of the portal software in the jboss AS service, a corresponding script is now created:
cat <<EOFF>/usr/local/bin/updatejb.sh #!/bin/bash systemctl stop jboss.service rm -rf /home/jtel/jboss-as-7.1.1.FINAL/standalone/deployments/* rm -rf /home/jtel/jboss-as-7.1.1.FINAL/standalone/lib/* rm -rf /home/jtel/jboss-as-7.1.1.FINAL/standalone/tmp/* rm -rf /home/jtel/jboss-as-7.1.1.FINAL/standalone/data/* cp /home/jtel/shared/JTELCarrierPortal/deploy/*ar /home/jtel/jboss-as-7.1.1.FINAL/standalone/deployments chown jtel:jtel /home/jtel/jboss-as-7.1.1.FINAL/standalone/deployments/* systemctl start jboss.service EOFF chmod +x /usr/local/bin/updatejb.sh
Necessary adjustments of the configuration
The configuration of the jboss AS server is done via one or in case of software version >= 3.06 two configuration files. If a version of the software >= 3.06 is used, a copy of the file hazelcast.xml
is also stored in the configuration directory of the jboss AS. Since this was already created during the installation of the primary DATA server and stored in the file share of the STORE, it can simply be copied to the destination:
cp /home/jtel/shared/hazelcast.xml /home/jtel/jboss-as-7.1.1.FINAL/standalone/configuration chown jtel:jtel /home/jtel/jboss-as-7.1.1.FINAL/standalone/configuration/hazelcast.xml
Furthermore, adjustments to the configuration file standalone-full.xml are necessary. When installing several servers with the WEB role, it is a good idea to store this file in the file share after initial configuration to speed up the installation. If a customized version already exists there, it can be copied to the target location using the following command:
cp /home/jtel/shared/standalone-full.xml /home/jtel/jboss-as-7.1.1.FINAL/standalone/configuration chown jtel:jtel /home/jtel/jboss-as-7.1.1.FINAL/standalone/configuration/standalone-full.xml
However, if you adjust the configuration of the first WEB server, some values in the file must be adjusted according to the database server configuration. This can be done with the following commands - <password> replace with the appropriate 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/jboss-as-7.1.1.FINAL/standalone/configuration/standalone-full.xml unset DBPWD unset DBREP unset DBSTA unset DBPRI
The values of the first 4 lines must be adjusted according to the database configuration:
- DBPRI: Name of the primary DATA server
- DBSTA: Name of the DATA server for real-time statistics Data
- DBREP: Name of the DATA server for report execution
- DBPWD: Password of the database connection
After adapting the configuration file standalone-full.xml
, it can be saved to the central data share to speed up the configuration of the other WEB servers:
cp -a /home/jtel/jboss-as-7.1.1.FINAL/standalone/configuration/standalone-full.xml /home/jtel/shared
Starting the WEB application server
If the Centos version is 7.7, you have to apply the following patch before you start jboss
bash /home/jtel/shared/JTELCarrierPortal/Update/jboss-restart-patch.sh updatejb.sh
At this point the Web Server can be started. Entering the following command updates the to be executed web application and starts the web server:
updatejb.sh
A correct start can be checked in the log file of the web server. There you should be able to find the following messages after about 45 seconds from the start:
08:07:38,249 INFO [org.jboss.as.server] (DeploymentScanner-threads - 2) JBAS018559: Deployed "SMSReceiver.war" 08:07:38,250 INFO [org.jboss.as.server] (DeploymentScanner-threads - 2) JBAS018559: Deployed "CarrierPortal.war" 08:07:38,250 INFO [org.jboss.as.server] (DeploymentScanner-threads - 2) JBAS018559: Deployed "jasper-utils-0.0.1-SNAPSHOT.jar"
Furthermore, in case of software version >= 3.06 the status of the hazelcast-cluster can be recognized by messages like this
08:07:24,705 INFO [com.hazelcast.cluster.ClusterService] (hz._hzInstance_1_jtel-cluster-test5.generic-operation.thread-1) [192.168.1.32]:5701 [jtel-cluster-example] [3.5] Members [3] { Member [192.168.1.21]:5701 Member [192.168.1.31]:5701 Member [192.168.1.32]:5701 this } 08:07:26,713 INFO [com.hazelcast.core.LifecycleService] (MSC service thread 1-1) [10.42.13.65]:5701 [jtel-cluster-example] [3.5] Address[192.168.1.32]:5701 is STARTED
These messages appear every time a node of the cluster is added or removed. In the portal, the parameter "ACD.UDP.Webserver.Use.Hazelcast" must be activated, i.e. set to the value 1, so that the web servers use Hazelcast/UDPListener.
The final test to show that the web server has started properly is of course the call directly from the browser. Assuming that the second WEB server has just been installed, the application can be reached in the browser by entering the following URL: http://acd-jb2.example.com:8080/CarrierPortal/sysadmin/login
If everything works, you will be welcomed by the login mask: