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:
curl -fsSL get.docker.com -o get-docker.sh && sh get-docker.sh
sudo usermod -aG docker $USER
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
Changing the Settings (optional)¶
The Open Edge Device Kit uses a settings file when starting up, which is called oedk_config.json
and located in the ipc/cfg
directory.
Click here to display the standard settings file
{
"installation": {
"autoStart": 1,
"agentRoot": "/persistent_massdata/appData/"
},
"logging": {
"active_log_directory": "/persistent_massdata/log/",
"upload_log_directory": "/persistent_massdata/tmp/logsToUpload/",
"archived_log_directory": "/persistent_massdata/tmp/archive/",
"logLevel": "INFO",
"size_mb": 20,
"size_cap_mb": 200,
"log_history_days": 8,
"upload_cycle_sec": 120
},
"offlineCache": {
"directory": "offlineCache/",
"size": 500000000
},
"controllerInterface": {
"mqttPort": 1883,
"mqttHostname": "172.30.0.7"
},
"communication": {
"keyStorePath": "keyStore/"
},
"eventObserver": {
"initialDelay": 0,
"executionPeriod": 10
},
"notification": {
"notificationTimeout": 600
}
}
The following table lists the configuration parameters for the settings file. Parameters which are not listed in this table are recommended not to be changed.
Parameter | Default | Description |
---|---|---|
offlineCache > size (byte) | 500.000.000 | Maximum storage space for time series data while the device is offline. Recommended value: 100.000.000 – 2.000.000.000 |
controllerInterface > mqttPort | 1883 | Port of the MQTT broker |
controllerInterface > mqttHostname | Docker: "172.30.0.7” Script: "127.0.0.1" | IP address of the MQTT broker |
EventObserver > initialDelay (seconds) | 0 | Defines the intital delay before the Open Edge Device Kit starts polling for jobs from {{ whitelabel.IOTtoolName }} (e.g. configuration updates). Changing this value is not recommended. |
EventObserver > executionPeriod (seconds) | 10 | Defines the period for polling jobs (e.g. configuration updates) from {{ whitelabel.IOTtoolName }}. Values higher than 30 s can help reducing traffic, but cause delays in the execution of these jobs. Recommended values: 10 – 120 |
Notification > notificationTimeout (seconds) | 600 | Time out value for notifications, e.g. onboarding status. If operations take longer, they fail and a log message notification could not be processed is generated.The recommended value depends on the CPU: - Multi-core x86-x64 CPUs: 60 - Single core, low frequency or mobile CPUs: 600 – 1000 |
Logging > level | INFO | Log level for the Open Edge Device Kit. Enabling DEBUG will decrease the performance significantly.Recommended values: ERROR or INFO . |
Logging > sizeMB | 20 | Maximum file size for log files. Changing this value is not recommended. |
Logging > uploadCycleSec | 120 | Upload interval for sending log files to {{ whitelabel.IOTtoolName }}. Recommended value: 120 - 18000 |
Logging > size_cap_mb (MB) | 200 | Maximum storage space to be taken up by log files on the device. Recommended value: 200 |
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.