In this article:

Preparing Virtualization Environment

Installing Docker Components

Installing the docker-compose Utility

Deployment and Preparation of Ubuntu-Based Server

Foresight Mobile Platform works in the Docker containerization environment. Set up and deploy the Docker subsystem infrastructure on a mobile platform server and on a Relay server, if it is used.

To deploy a server:

  1. Prepare virtualization environment if a virtual server is used. Foresight Mobile Platform supports Oracle VirtualBox, VMware Workstation and Microsoft Hyper-V.

  2. Make sure that the operating system meets the system requirements.

  3. Install Docker components.

  4. Install the docker-compose utility to simultaneously manage several containers included in the application.

After executing the operation the server is prepared for installing a mobile platform server.

Preparing Virtualization Environment

Consider creating a virtual machine on a local computer by means of the Oracle VirtualBox 7.0.20 virtualization software.

To prepare virtualization environment:

  1. Download the Ubuntu OS ISO image with 22.04 version.

  2. Create a virtual machine in Oracle VirtualBox using the Create Virtual Machine dialog box:

Set the parameters:

  1. Make sure that the NAT connection type is select in virtual machine network settings and set up port forwarding, for example, the 1022 port of the local computer will correspond to the 22 port of the virtual machine:

  1. Connect to the virtual machine on the local computer via SSH. To do this, select execute the command in the command line:

ssh -p <port number> <IP address>

In substitutions:

For example:

ssh -p 1022 127.0.0.1

After executing the operations the virtualization environment is prepared, that is, the virtual machine is created and set up on the local computer.

To exchange files between the local computer and the virtual machine, use the WinSCP or FileZilla utility.

To work with the administrator console, after installing mobile platform server set up port forwarding of the local computer and the virtual machine to the 80 port.

Installing Docker Components

To install Docker components:

  1. Enter the server console locally or remotely using SSH client.

  2. Delete earlier versions of Docker:

% sudo apt-get remove docker docker-engine docker.io

The specified components are possibly absent in the system.

  1. Update the package index:

% sudo apt-get update

  1. Install the apt-transport-https, ca-certificates prepackages to work with the HTTPS protocol, the curl tool to send data from server, software-properties-common to manage the Docker repository:

% sudo apt-get install apt-transport-https ca-certificates curl software-properties-common

  1. Add official GPG key of the Docker vendor:

% curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -

  1. Connect the Docker repository for the operating system in use:

% sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"

If installation completed with errors, execute the command:

$ sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu xenial stable"

  1. Repeat packages index update:

% sudo apt-get update

  1. Install Docker packages:

% sudo apt-get install docker-ce

If installation completed with errors, execute the command:

$ sudo apt-get upgrade

  1. Add the current account to the Docker group of users to start containers without requesting root privileges:

% sudo usermod -aG docker $USER

  1. Log out and log in again to the operating system, finish all user sessions in the console, use SSH or restart the server.

  1. Check if Docker was installed correctly:

% docker run hello-world

As a result, the test Docker image is loaded, the test container is started and the response with the operation status is obtained

% docker version

As a result, the response with client version and Docker component server version is obtained:

Client:
Version:
....
....

Server:
Version:
....
....

  1. Delete the text container and the Docker image:

% docker container rm $(docker container ls –aq) && docker image rm $(docker image ls –aq)

After executing the operation, Docker components are installed to server.

Installing the docker-compose Utility

To install the docker-compose utility, execute the commands:

% sudo curl -L https://github.com/docker/compose/releases/download/1.29.2/docker-compose-$(uname -s)-$(uname -m) -o /usr/local/bin/docker-compose
% sudo chmod +x /usr/local/bin/docker-compose
% docker-compose --version

After executing the operations the docker-compose is installed and the utility version title is displayed.

See also:

Installing and Setting Up Foresight Mobile Platform | Activation and License Management