Open Edge Device Kit – Getting Started - Docker Version¶
Prerequisites to use the Open Edge Device Kit¶
The Open Edge Device Kit is a software component which can be run on a user device. The module is written in Java and can be executed on a Java friendly environment.
- 4 GB free disk space
- 1 GB RAM available
- 1 Core CPU, 600 MHz
- Linux-based operating system
-
Root privileges
-
Network settings must allow access to https://hub.docker.com
Installation Instructions¶
Setting up Docker and Docker Compose¶
-
Install Docker version 18 or higher and Docker Compose version 1.23 or higher from https://docs.docker.com/compose/install/. The following commands perform the installation on Debian-based operating systems:
Docker
curl -fsSL get.docker.com -o get-docker.sh && sh get-docker.sh sudo usermod -aG docker $USER
Docker-compose
apt install -y python python-pip pip install docker-compose
-
Change the execution rights for Docker Compose for all users with the following command:
sudo chmod +x /usr/local/bin/docker-compose
-
If you are behind a proxy, add the proxy information in the Docker file:
FROM openjdk:8u131-jre-alpine ENV HTTP_PROXY= http://{proxy_ip}:{proxy_port} RUN apk add --no-cache bash RUN mkdir -p /opt/siemens/ipc COPY ipc /opt/siemens/ipc CMD ./opt/siemens/ipc/bin/MindEdgeRuntimeSystem -c /opt/siemens/ipc/cfg/oedk_config.json
-
Restart the device.
Downloading the Open Edge Device Kit¶
Download the Open Edge Device Kit from the Siemens Industry Online Support (SIOS) Portal. Extract the tarball file with the option tar -xvf
.
The docker version consists of the following files:
- Config file for the Open Edge Device Kit:
{extract_path}/ipc/cfg/oedk_config.json
- Docker file:
{extract_path}/dockerfile
- Docker Compose file:
{extract_path}/docker-compose.yml
- Open Edge Device Kit executables
---8<--- "docs/resources/openedge-devicekit/text-modules/settings.txt!}
Docker Compose file settings¶
By default MQTT Broker is opens port 1883 on the host machine. If you want to keep it under private network, ports
section under the broker
section should be removed. After removing the ports
section the MQTT Broker can only be reachable with the 172.30.0.7
IP.
version: '3.3'
#network for internal communicaton between containers
networks:
devicekit-subnet:
ipam:
config:
- subnet: 172.30.0.0/24
volumes:
massdata: {}
services:
broker:
container_name: Mqtt_Broker
image: "eclipse-mosquitto"
networks:
devicekit-subnet:
ipv4_address: 172.30.0.7
# Remove the following two lines if you don't want to expose broker to all network
ports:
- "1883:1883"
agent:
container_name: Device_Kit
stop_grace_period: 50s
build: .
networks:
devicekit-subnet:
ipv4_address: 172.30.0.8
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- "./appconfigs:/appconfigs:rw"
- "massdata:/persistent_massdata:rw"
# oedk_config file shoud be configured with broker's ip address (e.g 172.30.0.7 in this configuration)
environment:
- agent_pass=/run/secrets/agent_pass
secrets:
- agent_pass
restart:
on-failure
depends_on:
- broker
secrets:
agent_pass:
file: ./rand.dat
Starting the Open Edge Device Kit¶
Run the following commands in the {extract_path}
directory:
< /dev/urandom tr -dc _A-Z-a-z-0-9 | head -c20 > rand.dat
docker-compose build
docker-compose up (-d for running in the background)
This starts two docker containers, the Device_Kit
runs the Open Edge Device Kit and the Mqtt_Broker
runs Eclipse Mosquitto.
Eclipse Mosquitto Connection Information
The Eclipse Mosquitto broker is available at:
IP Address: 172.30.0.7
Port : 1883 (default port)
Except where otherwise noted, content on this site is licensed under the Development License Agreement.