Running nowcasting on a different server
Making use of the nowcasting, the load on your nowcast service may cause performance issues: IRIS Focus may become slower in returning results to users.
You can compensate for this by moving nowcasting to a separate server.
On the new (blank AlmaLinux, non-Focus) machine that will have the nowcast server on it, do the following steps:
- Setup firewall rules first.
-
Set ALLOW_IP to IP address of machine that needs to access
nowcast, or set to nothing to allow all machines access:
declare ALLOW_IP="" declare -i ALLOW_PORT=31004 if systemctl status firewalld &> /dev/null && (( ALLOW_PORT > 0 )); then if [ "${ALLOW_IP}" != "" ]; then -
Limit access to just the machine specified:
firewall-cmd --permanent --zone=public --add-rich-rule="rule family=\"ipv4\" source address=\"${ALLOW_IP}/32\" port protocol=\"tcp\" port=\"${ALLOW_PORT}\" accept" else -
Allow everyone access instead:
firewall-cmd --permanent --add-port="${ALLOW_PORT}/tcp" fi fi firewall-cmd --reload -
scp the cloud-nowcast-service.tar from the <Focus
installation files dir>/k8s/images to the nowcast server machine:
scp root@<Focus_machine>:/Focus_installation_files/k8s/images/cloud-nowcast-service.tar . -
Load and create nowcast container:
podman image load < cloud-nowcast-service.tar podman run --name nowcast -d -p 31004:31004 com.vaisala.fire/cloud-nowcast-service:7.x.x /app/bin/nowcast-server 31004where
x.xis the number of the version/patch. -
Check that you can reach nowcast on local server:
curl --request POST http://localhost:31004/focus-nowcast/api/v2/health; echoYou should see the following output:
{"status":"UP"} -
To manage with systemd, use these commands:
podman generate systemd --new --name vaisala-radarsw-nowcast >| /etc/systemd/system/vaisala-radarsw-nowcast.service chmod 644 /etc/systemd/system/vaisala-radarsw-nowcast.service systemctl enable --now vaisala-radarsw-nowcast systemctl status vaisala-radarsw-nowcast -
Any time firewall rules are changed, you need to restart the nowcast service with the
following command:
systemctl restart vaisala-radarsw-nowcast -
To view the log, use the following command:
podman logs nowcast -
On the IRIS-Focus machine, check that you can reach nowcast from remote server:
curl --request POST http://<nowcast_machine>:31004/focus-nowcast/api/v2/health; echoYou should see the following output:
{"status":"UP"} -
Change the line in vsoweb-override.ini (use the hostname where the
nowcast is):
nowcast.http.server.url = http://<Focus_machine>:31004/focus-nowcast/api/v2/mvf/
-
Restart the webapp with this command:
systemctl restart vaisala-radarsw-webapp
