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:

  1. Setup firewall rules first.
  2. 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
  3. 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
  4. Allow everyone access instead:
    firewall-cmd --permanent --add-port="${ALLOW_PORT}/tcp"
    fi
    fi
    firewall-cmd --reload
  5. 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 .
  6. 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 31004

    where x.x is the number of the version/patch.

  7. Check that you can reach nowcast on local server:
    curl --request POST http://localhost:31004/focus-nowcast/api/v2/health; echo

    You should see the following output:

    {"status":"UP"}
  8. 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
  9. Any time firewall rules are changed, you need to restart the nowcast service with the following command:
    systemctl restart vaisala-radarsw-nowcast
    1. Example on restarting without system control:
      podman stop nowcast
      podman start nowcast
  10. To view the log, use the following command:
    podman logs nowcast
  11. 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; echo

    You should see the following output:

    {"status":"UP"}
  12. 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/

  13. Restart the webapp with this command:
    systemctl restart vaisala-radarsw-webapp