Docker and Docker Compose

Using Docker or Docker Compose on Windows and Linux is done via a command line shell and is almost identical on both platforms. You can use the PowerShell or Command Prompt on Windows and a shell like bash or zsh on Linux. Have a look into System Prerequisites for details.

Note

It is mandatory to have a Nexus Repository user account in order to install the Deep Hub on your machine.

Using Docker or Docker Compose

We recommend using Docker Compose because this way you’ll get a completely configured “system” consisting of the Deep Hub, the Deep Hub UI and a containerized web server to simplify the overall usage of these components.

They are provided in the form of three docker container and we provide a Docker Compose file that configures the necessary orchestration between those. See next section in this documentation on where to get the Docker Compose file and how to use it.

Nevertheless, you are able to pull just the docker container that you need instead of all three. Note that you have to login into the nexus repository anyway first!

If you want to download e.g. only the Deep Hub itself, use the following command to pull just that container:

docker pull repo.deephub.io:8443/deephub/deephub:latest

Getting the latest Docker Compose file

Please login to Nexus Repository to download the Docker Compose.

../_images/nexus_step_1.png

After logging in, click on “Browse” to access the repository content.

../_images/nexus_step_4.png

In the directory “deephub-extra”, navigate to the “bundle” folder and download the archive “deephub-bundle_latest.zip”.

../_images/nexus_step_6a.png

Extract all the content from the zip file and copy the path to the extracted directory “deephub-bundle_latest”.

Start a Deep Hub

  1. Open a shell (PowerShell or Command Prompt on Windows, a terminal on Linux)

  2. Change to the directory of the extracted bundle. Typically “deephub-bundle_latest”. Docker Compose won’t work if invoked outside this directory.

  3. If this is your first time logging into the Docker Nexus Repository, do this now in the shell. The system will prompt for the username and password of the Nexus Repository. Input your user credentials. You will get a “Login Succeeded” message in case you typed in the credentials correctly. Again: This step has to be done only once.

  4. Invoke Docker Compose. It will take a few minutes to download the Docker images and set up the Deep Hub.

Example:

cd deephub-bundle_latest
[OPTIONALLY; first time usage] docker login repo.deephub.io:8443
docker-compose up -d

../_images/command_line_example.png

Note

  1. Once a user is logged in to Nexus repository through docker registry, it is not needed to give user account credentials every time until the user logs out. A user can log out by executing command docker logout repo.deephub.io:8443.

  2. On Linux it may be necessary to call the docker-compose as superuser via the sudo command.


Now you have your own running Deep Hub instance that can be accessed with any modern web browser on address http://localhost:8081

../_images/win_deep_hub_ui.png

Stop a running Deep Hub

Please make sure you are in the same directory where you invoked docker-compose. Probably “deephub-bundle_latest”.

To stop a running Deep Hub, execute docker-compose down. This ensures the running Deep Hub is stopped and allows the user to modify the configuration data.

Example:

cd deephub-bundle_latest
docker-compose down

../_images/command_line_example-2.png

Note

On Linux it may be necessary to call the docker-compose as superuser via the sudo command.


How to use simulation data

In order to test features and functionalities of the Deep Hub, a simulation package is provided. This package consists of simulated data for zones, fences, and moving trackables, and was produced at our testing site in Teningen, Germany. Please download the Simulation Package from the Nexus Repository. After testing the Deep Hub using the simulation package, you may also test using your own network(s) and data. Please consult Heidelberg Mobil International GmbH for support if needed.

Note

If you have the Deep Hub already installed on your machine, it is mandatory to stop the running Deep Hub in order to run the simulation.

Running this simulation will import the simulation data in the current Deep Hub instance.


Import the simulation data

  1. Ensure a running Deep Hub instance is stopped. See Stop a running Deep Hub above.

  2. Open the simulation package downloaded from the Nexus repository and copy all dat, db and yaml files into the “hub-data” folder of the extracted deephub-bundle_latest directory. Some files will be replaced within the “hub-data” directory during this operation.

  3. Start the Deep Hub again. See Start a Deep Hub above.

  4. Open a browser with address http://localhost:8081. This will provide access to the Deep Hub frontend. The zones and fences from our test site in Teningen, Germany will be visible on the map.

The map will now also display the simulated trackables moving along a fixed path. As trackables move through fences, the left side pane will list triggered events.