Skip to content

Creating Edge Apps

This document highlights steps to create Edge Apps.

Quick Start Guide

To run commands related to the IEM, you must first add the IEM and IE App Publisher configuration by using the following commands:

$ iectl config add iem  \
         --name "iemdev" \              # unique name for the confguration
         --url "https://iem-url" \      # your IEM url 
         --user email@siemens.com \     # email address registered on IEM
         --password "password"          # password of the IEM user
$ iectl config add publisher  \
         --workspace "/home/WS" \ # path to for the workspace, used to store app related metadata 
         --dockerurl "http://127.0.0.1:2375" \ # your docker engine url, used for saving the image refrenced in the docker compose yaml
         --name "publisherdev"   #  unique name for the confguration
## Edge Apps

You can perform several operations related to Industrial Edge Apps on the IEM. Commonly used operations are:

- Create Application
- Create app versions
- Add app configurations
- Export app versions
- Import standalone apps on the IEM

If needed, you can also set other arguments in the IE App Publisher configuration. For more information, see iectl config add publisher --help

Create Application

You can create a Docker Compose application on IEM with the following command:

$ iectl iem app-project create-app \
         --name                 "my cool app" \ # application you want to create
         --repo-name            "repo1" \ # associated with the application
         --category             "Retail" \  # name under which you want to create the app
         --description          "my cool app's description" \   #description of the application 
         --project-name         "project1" \ #projectName in which application should be created ON IEM
         --icon-path            "/path/to/icon/image.png" \ # path of the image you want to associate with application
         --web-address          "www.sample.com" \ # (optional) web address associated with the app (default "www.siemens.com")
         --configurator-url     "/sample/example.html" \  #(optional) redirect url for the external configurator
         --signup-type          "SignUpWithCodeOnly" \ #(optional) Use Edge Device Auth Service. Allowed Inputs - "SignUpWithCodeOnly", "SignUpWithOrWithoutCode", "NoSignUp", "SignUpWithoutCode", "None" (default "None")

Create App Version

You can create a Docker Compose app version with the following command:

$ iectl publisher app version create \
            --appid             "uvxLneoYYKxFWLHD3DmOw0eI1WJ1LcDt" \ #Unique id(defined while application is created on IEM) of application for which the version has to be created
            --changelogs        "initial release" \
            --yamlpath          "/path/to/folder/with/docker-compose.yaml" \ #Path to your docker compose yaml file
            --versionnumber     "1.0.0" \  #This version must be conformant to the semantic versioning specification
            --redirectsection   "myservice" \ #This requires the service name within docker-compose which contains the container that shall be exposed
            --redirecttype      "FromBoxSpecificPort" \ #Either FromBoxSpecificPort for direct port exposure or FromBoxReverseProxy for reverse proxy exposure
            --redirecturl       "80" \  #Internal container port where device redirects app when app is clicked, device will use external port assigned to port 80 in this case for redirection. 
            --restredirecturl   "" \ # this path will be used upon redirect to your application

This command creates a directory structure containing app and version metadata in the given workspace.

Export App Version

Exporting an app finally creates the package application with all necessary information including deployment options.

Instead of using the application, an explicit app version will be used.

You can export the app with the following command:

$ iectl publisher app version export \
        --appid "unique id of application on IEM for which you want to perform this operation" \ 
        --exportpath "/path/for/app/file" \
        --versionnumber "1.0.0" 
        # version will be exported to "/path/for/app/file"