Skip to content

Latest commit

 

History

History
128 lines (91 loc) · 5.25 KB

installation.md

File metadata and controls

128 lines (91 loc) · 5.25 KB

Installation

Build Application

Download Repository

Download or clone the repository source code to your workstation.
Github Clone Section

  • Through terminal:

    git clone https://github.com/industrial-edge/hello-world.git
  • Through VSCode:
    CTRL+↑ SHIFT+P or F1 to open VSCode's command pallette and type git clone:

    VS Code Git Clone command

Build docker image

  • Navigate into src and find the file named Dockerfile.example. The Dockerfile.example is an example Dockerfile that can be used to build the docker image(s) of the service(s) that runs in this application example. If you choose to use these, rename the file to Dockerfile before proceeding
  • Open a console in the root folder (where the docker-compose.yml file is)

Building the image for x86 based devices

  • Use the docker compose build (replaces the older docker-compose build) command to build the docker image of the service which is specified in the docker-compose.yml file.
  • These Docker images can now be used to build your app with the Industrial Edge App Publisher
  • docker inspect " Image name" can be used to check for the image

Building the image for ARM based devices

To create a Docker image that runs on ARM-based devices, the building process has to be carried out on a development environment that supports the ARM architecture. This support can be provided by using an emulator if your development environment is not ARM-based.

The following Docker command can be used to run the emulator. More information can be found here (Note: The container will run in privileged mode; if this is undesired, feel free to use an alternative method)

sudo docker run --privileged --rm tonistiigi/binfmt --install arm64

Expected Output:

installing: arm64 OK
{
  "supported": [
    "linux/amd64",
    "linux/arm64",
    "linux/386"
  ],
  "emulators": [
    "qemu-aarch64"
  ]
}

Afterwards, you can proceed with the following:

  • Use docker compose -f docker-compose-arm64.yml build (replaces the older docker-compose build) command to build the docker image of the service which is specified in the docker-compose-arm64.yml file.
  • These Docker images can now be used to build your app with the Industrial Edge App Publisher
  • docker inspect " Image name" can be used to check for the image

Upload App to the Industrial Edge Management

Please find below a short description how to publish your application in your IEM.

For more detailed information please see the section for uploading apps to the IEM.

Connect your Industrial Edge App Publisher

  • Connect your Industrial Edge App Publisher to your docker engine
  • Connect your Industrial Edge App Publisher to your Industrial Edge Management System

Upload App using the Industrial Edge App Publisher

  • Create a new App Project or select a existing one

  • Create new application

  • Add a new app version with docker compose version 2.4

  • Import the docker-compose file to the Industrial Edge App Publisher using the Import YAML button

  • The warnings
    Build (Detail) (services >> hello-world >> build) is not supported
    can be ignored

  • Configure reverse proxy of hello-world service by editing the service. Click '+' button to save settings

    Container Port: 80
    Protocol: HTTP 
    Service Name: hello-world
    Rewrite Target: /

  • Click "Review" and "Validate & Create"

  • Select the correct architecture depending on the device

    "x86-64"
      or
    "arm64" 

  • Start Upload to transfer the app to Industrial Edge Management

  • Further information about using the Industrial Edge App Publisher can be found in the IE Hub

Install Application on Industrial Edge Device

Go to Industrial Edge Management, select uploaded version of application and install to Industrial Edge Device.

Usage

Login to Industrial Edge Device and click on Icon of the Hello-World Application to open page in Browser.

hello-world