Skip to main content
Skip table of contents

Installation on Docker (Linux / Ubuntu)

When creating a server to host DATPROF Runtime, both Linux and Windows can be used as the underlying operating system. While the overall installation process for these two systems is overall pretty similar, this page serves as a general instruction on how to host Runtime on Ubuntu, and for this example we’ll be doing so inside of a Docker Container. By using Docker, we gain access to a stable, isolated operating system which can be used to run Runtime without interference from other programs, while still being able to communicate with other clients.

For this guide, we’ll be using the docker on Windows command-line, but the commands should be the same if you are starting from for instance Ubuntu or another distribution of Linux. If you are installing on a stand-alone instance of Linux, the second half of this page can be used for installation steps.

Requirements

For this guide, the only things you need is a working installation of Docker and the Linux Runtime installation files. To find out how to set this up, you can consult these guide:

Linux (Docker Engine): https://docs.docker.com/engine/install/

Windows (Docker Desktop):https://docs.docker.com/desktop/

Docker Setup

Choosing a container image

For this guide, you can realistically choose whatever Linux distribution has an available container image, and offers the support you require from the OS. Some examples:

  • Ubuntu

  • Red Hat (and most other RHEL compatible distros)

  • CentOS

  • Debian

Pulling the container image

The next step is pulling our container image. Here, you can specify both which image you’d like to pull, as well as the desired version. If no version is provided, the default is to pull the latest available version.

CODE
Syntax:
docker pull <image_name>:<version(optional)>
Example: 
docker pull ubuntu:latest

If you’re doing this on a machine which is not connected to the internet, you’ll need to pull the docker image on a machine which is connected to the internet. after this you can export the image using the docker save command, and transfer it to desired server. Then, you can import the image using the docker load command.

Starting the container

When running the container there’s a few things we need to make sure we’re supplying in order to work with the container.

Volumes

In order to persist data, we need to supply Docker with a valid location on our operating system to store any information we create during the lifecycle of the container. If this step is skipped, the container would store information as long as it’s running, but would then be wiped clean if it’s ever shut down.

In the example below I store the volume on the machine running Docker in /data/docker_volumes. This can be any location on your filesystem, just make sure you’ve created the necessary directories for this beforehand. The location on the container should be /data.

Port Mapping

After we’ve successfully installed Runtime on our container, we’ll need to be able to connect to the web interface over port 7070. This means we’ll need to map that port from the host to the container. This means that any attempt to connect to the server itself over port 7070 is redirected to port 7070 on the docker container.

Miscellaneous flags

Other than the above, we’ll also be using the -it option to run the docker container in interactive mode, so we are automatically connected to the container and are able to execute bash commands on it. Lastly, we use the --name option to give our container a non-random name.

CODE
syntax:
docker run -it -v <host_volume>:/<container_volume> -p <host_port>:<container_port> --name <desired_name> <docker_image> 

example:
docker run -it -v /data/docker_volumes/ubuntu_runtime:/data -p 7070:7070 --name Ubuntu_Runtime ubuntu:latest 

Linux configuration

Once we’ve connected to our container (or are using a standalone instance of Linux), we need to install Runtime. To do this, we’ll copy the files from our host to the container. Alternatively, you can also download the latest version of the application directly from the container as well.

Copying the installation files from host

To copy files from the host to the container we use the docker cp command. Here’s an example:

CODE
Syntax:
docker cp <file_path_to_runtime_installation_files>/runtime-latest-linux.tar.gz <container_name>:<destination_filepath_on_container>
Example:
docker cp runtime-latest-linux.tar.gz Runtime_Ubuntu:/lib/Datprof_Runtime

(Optional) Downloading directly to the machine

If you have internet connectivity on the instance that will be running Runtime, you can also directly download the latest version of Runtime from our download server. For this, we’ll use the wget command-line tool, which is included in almost every Linux distribution by default.

CODE
Example:
wget "https://downloads.datprof.com:8443/Runtime/runtime-latest-linux.tar.gz" 

Unzipping the installation files

Before we can start Runtime, need to unzip the installation files, as the download files are packed into .tar.gz archive by default. To do this, we use the tar bash tool.

CODE
Syntax:
tar -xvzf <name_of_zipped_runtime_files>

Example:
tar -xvzf runtime-latest-linux.tar.gz

Creating a DATA folder

Before Runtime can be started, a DATA folder is required. This can either be an existing DATA folder moved onto the Linux instance as demonstrated above, but we can also just create a new, empty DATA folder. To do this:

CODE
Syntax:
mkdir <folder_name>

Example:
mkdir DATA

Starting Runtime

To start Runtime, navigate into the bin folder of the Runtime installation files, and execute the following command.

CODE
syntax:
<path_to_runtimeStart_file> <path_to_data_folder>
Example:
./runtimeStart ../DATA

To check whether Runtime is running, you can execute the ps -a command. This will produce an overview of all running processes, with Runtime running as a Java process:

CODE
 ---Sample ps -a output---
  PID TTY          TIME CMD
   29 pts/1    00:00:58 java
  114 pts/1    00:00:04 java
  234 pts/1    00:00:00 ps

Alternatively, you can also execute ps aux to get a more verbose overview of running processes:

CODE

USER       PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND
root         1  0.0  0.0   4588  3696 pts/0    Ss+  10:13   0:00 /bin/bash
root         9  0.0  0.0   4588  3912 pts/1    Ss   10:13   0:00 bash
root        29  0.9  5.1 14202592 840288 pts/1 Sl   10:14   1:26 /usr/lib/Datprof_Runtime/runtime-4.11.0/jdk/bin/java -D
root       114  0.1  1.0 8328328 176032 pts/1  Sl   10:14   0:16 /usr/lib/Datprof_Runtime/runtime-4.11.0/jdk/bin/java -D
root       369  0.0  0.0   2800  1112 pts/2    Ss+  10:32   0:00 /bin/sh
root      3262 33.3  0.0   7888  3840 pts/1    R+   12:41   0:00 ps aux

Connecting to Runtime

Connecting to Runtime on Linux, whether this is in a Docker container or in a standalone Linux server works the same as for any other installation. Simply open a supported internet browser (for example: Google Chrome, Mozilla Firefox) on the machine itself, or externally. After this, supply the IP or DNS name of the server, followed by port 7070.

Scenario

Format

Approaching Runtime from the same machine as where this is installed / running

http://localhost:7070

Approaching Runtime from a client machine:

Syntax:

http://<ip_or_dns_name>:7070

Example:

http://123.423.21.3:7070

OR
http://my_tdm_dns_name:7070

If you are unable to connect to Runtime, it’s possible that your Linux instance currently does not allow traffic to the server over port 7070! You can enable access through firewall configuration on the server. As this may work differently depending on which distribution of Linux is being used, this is not detailed in this guide.

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.