Updating Foresight Mobile Platform

In this article:

Updating Foresight Mobile Platform 22.04 or Later

Updating Foresight Mobile Platform 21.04

Updating Foresight Mobile Platform 20.10 or Earlier

Before updating Foresight Mobile Platform at host server check if the conditions are satisfied:

NOTE. If a Relay server is installed, to provide correct work, mobile platform server and Relay server versions must match.

Updating of Foresight Mobile Platform is different depending on the version:

Previous logs will be unavailable on the Foresight Mobile Platform update.

IMPORTANT. To update Foresight Mobile Platform to the latest version, update the mobile platform to each later version one by one.

Updating Foresight Mobile Platform 22.04 or Later

To update Foresight Mobile Platform 22.04 or later:

  1. Download new versions of images and files to mobile platform server. Unpack the archive:

% unzip standalone_compose_files_v23.05.01.zip

  1. Load new images to local storage:

% docker load -i fmp_v23.05.01.tgz

After executing the operation the local storage will contain the files docker-compose.standalone.yaml and .env with the new version.

  1. Change the SERVER_NAME parameter in the .env file if domain server name differs from localhost:

SERVER_NAME = <IP address or DNS server name>

To specify several server names, use the space character, for example:

SERVER_NAME = 127.0.0.1 localhost

  1. Open the update_standalone.py file and set parameters:

The example of the update_standalone.py file with the specified parameters:

```py
OLD_VERSION_COMPOSE_PATH=./old_version
NEW_VERSION_COMPOSE_PATH=./new_version
```

File structure corresponding to the parameters specified in the example:

~

└───old_version
│ │ docker-compose.standalone.yaml
│ │ .env

└───new_version
│ docker-compose.standalone.yaml
│ .env
│ update_standalone.py

  1. Start the update_standalone.py file for execution in Python 3.6 or later:

python3 update_standalone.py

After executing the operations the message about successful file loading to MinIO is displayed, and Foresight Mobile Platform will be updated to the latest version.

Updating Foresight Mobile Platform 21.04

To update Foresight Mobile Platform 21.04 has been released:

  1. Download new versions of images and files to mobile platform server. Unpack the archive:

% unzip standalone_compose_files_v21.04.01.zip

  1. Load new images to local storage:

% docker load -i fmp_v21.04.01.tgz

After executing the operation the local storage will contain the files docker-compose.standalone.yaml and .env with the new version.

  1. Open the update_standalone.py file and set parameters:

    • OLD_VERSION_COMPOSE_PATH. Specify path to the files docker-compose.standalone.yaml and .env with the old version.

    • NEW_VERSION_COMPOSE_PATH. Specify path to the files docker-compose.standalone.yaml and .env with the new version.

    • UP_TIMEOUT. If required, set timeout in seconds after the start of the new mobile platform version to the start of loading files to MinIO.

The example of the update_standalone.py file with the specified parameters:

```py
OLD_VERSION_COMPOSE_PATH=./old_version
NEW_VERSION_COMPOSE_PATH=./new_version
```

File structure corresponding to the parameters specified in the example:

~

└───old_version
│ │ docker-compose.standalone.yaml
│ │ .env

└───new_version
│ docker-compose.standalone.yaml
│ .env
│ update_standalone.py

  1. Start the update_standalone.py file for execution in Python 3.6 or later:

python3 update_standalone.py

After executing the operations the message about successful file loading to MinIO is displayed, and Foresight Mobile Platform will be updated to the latest version.

Updating Foresight Mobile Platform 20.10 or Earlier

To update Foresight Mobile Platform 20.10 or earlier, and also the Docker subsystem deployed on the server:

  1. Go to the directory with the file docker-compose.standalone.yml of the current host server installation and stop the current platform version:

% docker-compose -f docker-compose.standalone.yml down

After successful platform stop delete the existing images:

% docker image rm $(docker image ls -q)

  1. Delete previous installation files:

  1. Download new versions of images and files to mobile platform server. Unpack the archive:

% unzip standalone_compose_files_v20.10.06.zip

  1. Load new images to local storage:

# load
% docker load -i fmp_v20.10.06.tgz

# delete archive
% rm -rf fmp_v20.10.06.tgz

  1. Execute commands for successive update of Foresight Mobile Platform from the 18.04 version to the 19.03 version:

NOTE. Product update is available from version 18.04. When updating Foresight Analytics Platform from the 19.03 version to the 20.10 version skip this step.

% docker-compose -f docker-compose.standalone.yml run --rm -u root hhive sed -i 's|/var/hhive/static|/var/hh_static/static|g' /var/hhive/nginx/includes/dashboard.inc

% docker-compose -f docker-compose.standalone.yml run --rm hhive bash -c 'mkdir -p /var/hhive/ssh/ /var/hhive/supervisor/ && touch /var/hhive/ssh/ssh_conf_relay /var/hhive/supervisor/supervisor_ssh.conf'

  1. Execute the command to delete static elements of the previous build:

% docker volume rm hyperhive_var_static

  1. Update version of Foresight Mobile Platform:

% docker-compose -f docker-compose.standalone.yml up

After executing the operations, Foresight Mobile Platform will be updated to the latest version.

See also:

Installing and Setting Up Foresight Mobile Platform | Managing Mobile Platform