Skip to content

Running a Sample App

This guide describes how to run a sample Edge App on an onboarded Edge Device. The basic steps required for this purpose will be explained sequentially.

First of all, the Docker image will be created locally. Then, the sample Edge App will be created using this Docker image in the IE App Publisher. After the sample Edge App is created in the IE App Publisher, this sample Edge App will be transferred to the IEM. The sample Edge App in the IEM will be able to run on an onboarded Edge Device.

Prerequisites

  • Logged in to the IEM.

  • Onboarded Edge Device.

Create an Edge App locally

The first step is to create a simple Docker image locally. When all steps are completed and the sample Edge App runs on the Edg Device, an HTML page will appear on the screen.

Create index.html and save it.

<!DOCTYPE html>
<HTML>
    <TITLE>Welcome to Industrial Edge!</TITLE>
    <BODY>
    <H1>Ready to Run Sample App in Device</H1>
    </BODY>
</HTML>

Create a Docker file.

FROM alpine
RUN apk update \
&& apk add lighttpd \
&& rm -rf /var/cache/apk/*
COPY ./index.html /var/www/localhost/htdocs
CMD ["lighttpd","-D","-f","/etc/lighttpd/lighttpd.conf"]

NOTICE

The index.html file and the Docker file must be in the same directory.

Create a Docker image.

sudo docker build . -t hello_App

title

The hello_app Docker image created locally will be used in IE App Publisher.

Create a Sample Edge App with the IE App Publisher

Some steps will continue through the IE App Publisher - Operation manual.
First, the IE App Publisher must be installed in the development environment. You can find information on how to install the IE App Publisher in the Installing the IE App Publisher section in the IE App Publisher - Operation manual.

Run Industrial Edge App Publisher

The IE App Publisher can be run as a binary file in the development environment directly, as shown in the figure, after the *.deb package is installed.

title

Connect to Docker Engine

Follow the steps in the Connecting to a Docker Engine section in the Industrial Edge App Publisher - Operation manual.

To connect to the Docker Engine in the IE App Publisher , follow the below steps:

  • Create a /etc/Docker/daemon.json file with the following content to ensure the Docker Engine can be accessed by the IE App Publisher:

{"hosts": ["tcp://0.0.0.0:2375", "unix:///var/run/Docker.sock"]}

  • Docker Engine protocol, IP and port settings should be as follows:

title

After the above adjustments are completed, the IE App Publisher screen looks like this: title

After connecting the Docker Engine, a connection to the IEM is required.

Connect to IEM

Follow the steps from the Connecting to an IEM section in the IE App Publisher - Operation manual to connect the IE App Publisher to the IEM.

Create a new Edge App

Follow the steps from the Creating a new Edge App section in the IE App Publisher - Operation manual to create a new Edge App.

title

Import Sample Edge App to IEM

The Hello_App created in the IE App Publisher must be added to the Catalog to appear in the IEM.

NOTICE

The *.app file must be exported to the development environment via the IE App Publisher.

  1. Log into the IEM.
  2. Navigate to the Catalog menu item.
  3. Import the *.app file.

title

title

Install Sample Edge App to an Edge Device

Proceeding in the order given below, the previously onboarded Edge Device is displayed in the IEM under Edge Devices.

  1. Select the app from the IEM catalog and click Install. title
  2. Select the Edge Devices on which you want to install the app.
    After the app has been installed, the app will be visible under My Installed Apps. title
  3. Access the app through a web browser with the IP address of the Edge Device ("https://[IPAddressOfTheDevice]".
  4. After logging into the Edge Device UI, the app is available under Apps. title
  5. After clicking the app tile, the below screen is displayed.
    title
  6. The app details can be checked under Management. title