Introduction
This article describes how to install and configure a TRM (Translation Resource Monitor) on a remote computing node, for an existing STS10 installation.
Description
To improve performance sometimes we may consider to add a different computing node (or backend) and move the SYSTRAN Translation Resource Monitor (TRM). This procedure explains how to install a TRM on a dedicated computing node and configure it to communicate to TRS Console, RabbitMQ server & SES Console.
Procedure
1) Prerequesites
1.1) Update firewall rules on SES Frontend
This will to allow incoming connections from backend
firewall-cmd --permanent --add-rich-rule='rule family="ipv4" source address="[BACKEND_IP]/32" port port="5672" protocol="tcp" accept' # Rabbitmq
firewall-cmd --permanent --add-rich-rule='rule family="ipv4" source address="[BACKEND_IP]/32" port port="3445" protocol="tcp" accept' # TRSL - HTTP
firewall-cmd --permanent --add-rich-rule='rule family="ipv4" source address="[BACKEND_IP]/32" port port="8892" protocol="tcp" accept' # Gdict - HTTP
firewall-cmd --permanent --add-rich-rule='rule family="ipv4" source address="[BACKEND_IP]/32" port port="8889" protocol="tcp" accept' # Corpus manager - HTTP
firewall-cmd --reload
Note: RabbitMQ SSL port is 5671 (instead of 5672)
1.2) Open TRM port on new Backend
firewall-cmd --permanent --add-rich-rule='rule family="ipv4" source address="[FRONTEND_IP]/32" port port="8888" protocol="tcp" accept' # TRM - HTTP
firewall-cmd --reload
1.3) Create ulimits conf file on new Backend
Create the /etc/security/limits.d/systran_ses_limits.conf file containing the information below
* hard nofile 65536
* soft nofile 16384
* - nproc unlimited
root - nproc unlimited
systran - nproc unlimited
2) Installation
2.1) Add Repository on the new Backend
Create the /etc/yum.repos.d/systranrpm.repo file by adding the following content. Depending on your version, replace the 'x'. For example STS 10.x, can be replaced with 10.3.
Change the xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx string by your TRS key.
[systran-ses]
name=Systran RPM Repository
baseurl=https://repo.systran.net/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/systran_rpm/ses/10.X/centOS8/$basearch
enabled=1
gpgcheck=1
gpgkey=https://repo.systran.net/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/systran_rpm/GPG-KEY-systranreporpm
2.2) Install Systran Translation Resource Monitor and Systran-redis on the new Backend
yum install -y systran-redis
yum install -y systran-translation-resource-monitor
3) Configuration on the new Backend
3.1) Systran-redis configuration
Edit the /opt/systran/redis/etc/redis.conf and replace the lines:
# maxmemory <bytes>
by:
maxmemory 1gb
and
# maxmemory-policy noeviction
by
maxmemory-policy allkeys-lru
3.2) SYSTRAN configuration
Edit the file /opt/systran/translation-resource-monitor/etc/trm.cfg and replace the following line:
broker = amqp://systran:SESpassword@localhost:5672
by
broker = amqp://systran:SESpassword@[FRONTEND_IP]:5672
Then edit the file /opt/systran/translation-resource-monitor/etc/source.http.cfg and replace the following line:
trsurl=https://localhost:3445
by
trsurl=https://[FRONTEND_IP]:3445
3.3) Enable and start services on the new Backend
Systran-redis:
systemctl enable systran-redis
systemctl restart systran-redis
Start SYSTRAN TRM:
systemctl enable systran-translation-resource-monitor
systemctl restart systran-translation-resource-monitor
4) Computing node registration
Last step consists of registering this computing node (Backend) in your SYSTRAN server.
In the SES console go to Admin panel> Server management > Service status then click on the + Register new service button as described into below screenshot:
Select the Computing Node option, then type the IP or the Hostname of the new Backend (computing node) server. Finally click on Submit as shown below:
5) Check and tests
After registering the new computing node, by clicking on Refresh button, you should see the new computing node listed with status running (green).
The test consists of import & install a new Translation Resource on this new computing node, instantiate it then check if translation runs fine.