Skip to content

Docker prior 4.6.1

Bordi Tamás edited this page Jun 8, 2023 · 1 revision

Docker is a container platform that can be used to package and deploy applications in server environments, among other. In particular, the docker-compose utility may with advantage be used during application development to test integration with the Arrowhead Core systems. Here, we provide brief instructions on how to install and run both Docker and container images for the Arrowhead Core systems.

Requirements

Don't forget to create a volume for mysql: docker volume create --name=mysql
Don't forget to copy the initSQL.sh script next to the docker-compose file and execute it! On the first run it initializes the Database!
Example copy command which does this for you, execute from the project root directory.

cp scripts/initSQL.sh docker/
cd docker
./initSQL.sh

Examples

We provide two examples of how Docker containers can be used to host Arrowhead Core systems in this repository. The first one is located in the docker folder and the second one in the docker-all folder. The former example shows how some prebuilt Docker images can be used to bring up networks, while the second describes how a Docker image can be constructed that contains all Arrowhead Core systems. Please refer to those folders for more information. In particular, each folder contains its own README.md file with more instructions.

Docker Guide

Note: Don't forget to set domain.name and domain.port properties!

Example Docker Compose file is located here. The interesting part is the volumes section. Format is /path/on/your/local/machine:/path/inside/docker/container

You may want to copy the config files elsewhere with the compose file too. If you copy them, please don't forget to change the volume mounting point, but DON'T change the volume mounting point inside the container, otherwise it will start up with default config.

To update the images: execute docker-compose pull command in the directory where the compose file is.

To start the containers: execute docker-compose up -d command in the directory where the compose file is.

Don't forget to check, are all containers up and running?

docker ps -a

If all of their is Up, you are all set. If they die, please check their logs.

If you change your config you have to restart the appropriate container

docker restart <containerName>

Include certificate in Docker container

The following guide describes step by step, how to include your own certificates into a Docker container.

Docker Cheat-Sheet

Command Description
docker ps -a List all containers
docker images List all images
docker-compose up -d Starts the Docker containers
docker-compose down Destroys the Docker containers
docker restart <containerName> Restarts a container, making it re-read its configuration files
docker logs <containerName> Shows logs for the container
docker volume create --name=<volumeName> Creates a named volume
docker volume rm <volumeName> Removes the specified named volume

Troubleshooting

Q: MySQL won't start. What did went wrong?
A: Probably you missed to copy the init SQL script next to the compose file, or you have a typo in its name. Solution: https://github.com/eclipse-arrowhead/core-java-spring/issues/105

ABOUT

GETTING STARTED

Certificates

Quick start

How to contribute?

HINTS

MANDATORY CORE SYSTEMS

Service Registry

Orchestrator

Authorization

APPLICATION SYSTEMS

SUPPORTING CORE SYSTEMS

Gatekeeper

Gateway

Event Handler

Choreographer

Quality of Service Monitor

Certificate Authority

System Registry

Device Registry

Onboarding

Data Manager

Time Manager

Plant Description Engine

HawkBit Configuration Manager

Device Hub

Clone this wiki locally