- Installation
Download or clone the repository source code to your workstation.
-
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 typegit clone
:
- Navigate into
src
and find the file namedDockerfile.example
. TheDockerfile.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 toDockerfile
before proceeding - Open a console in the root folder (where the
docker-compose.yml
file is)
- Use the
docker compose build
(replaces the olderdocker-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
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 olderdocker-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
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 to your docker engine
- Connect your Industrial Edge App Publisher to your Industrial Edge Management System
-
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
Go to Industrial Edge Management, select uploaded version of application and install to Industrial Edge Device.
Login to Industrial Edge Device and click on Icon of the Hello-World Application to open page in Browser.