Transitioning to IEM V2¶
With IEM V2, the application development and deployment workflow has changed. The app project journey is deprecated, and you now need to:
- Create a standalone application version.
- Export the application as
.appfile. - Import the application to IEM using the new device apps commands.
- Check application import status.
- Install the application to your Edge Devices.
- Monitor application installation status.
Prerequisites¶
- IECTL installed and configured
- Docker and Docker-compose
- Access to IEM V2
- Edge Device onboarded to IEM
Procedure¶
-
Create a Standalone Application
Initialize the workspace (ensure the folder is empty):
$ iectl publisher workspace init -
Create an app with metadata:
$ iectl publisher standalone-app create \ --appname "my cool app" \ --reponame "mycompany" \ --appdescription "my cool app" \ --iconpath "/path/to/my/icon" \ --webAddress "www.test.com" \ --signUpType "SignUpWithoutCode" \ --externalUrl "www.siemens.com" -
Create an app version with Docker-compose configuration:
$ iectl publisher standalone-app version create \ --appname "cool app" \ --changelogs "initial release" \ --yamlpath "/path/to/folder/with/docker-compose.yaml" \ --versionnumber "1.0.0" \ --redirectsection "my service" \ --redirecttype "FromBoxSpecificPort" \ --redirecturl "8080" -
Export the app version as
.appfile:$ iectl publisher standalone-app version export \ --appname "cool app" \ --exportpath /path/for/app/file \ --versionnumber "1.0.0"NOTICE
For more details on creating standalone apps, see Standalone App.
-
Use the exported
.appfile to import your application to IEM V2:$ iectl iem-v2 device-apps import \ --file "/path/to/sampleApp.app" \ --appSource "self-developed"NOTICE
App Source Type The
--appSourceparameter determines how the application is categorized: - Useself-developedfor applications under development or internal use and visible only to the user who created the application (default) - Useotherswhen you want the application to be immediately available for all users of the IEMThe import command returns a job ID which can be used to track the import status.
-
Monitor the import progress using the job ID:
$ iectl iem-v2 device-apps import-status --id <jobId>Alternatively, use the job wait command to automatically wait for completion:
$ iectl iem-v2 job import-job-wait --id <jobId> -
Once the import is complete, verify your application:
$ iectl iem-v2 device-apps listFilter by name or source:
$ iectl iem-v2 device-apps list --filter "name contains 'cool app'" $ iectl iem-v2 device-apps list --filter "appSource eq 'self-developed'" $ iectl iem-v2 device-apps list -q "{.data[?(@.title == 'cool app')].applicationId}" -
Retrieve detailed information (i.e. metadata, versions, and appSource) about your application:
$ iectl iem-v2 device-apps details --applicationId <appId> -
Retrieve a list of Edge Devices, with options for sorting, filtering, and pagination:
$ iectl iem-v2 device list --filter "name contains 'testDevice'" -
Install the application on one or more Edge Devices:
$ iectl iem-v2 job batch-create \ --appid <applicationId> \ --operation installApplication \ --versionId <versionId> \ --infoMap '{"devices":["<deviceId1>","<deviceId2>"]}'For catalog applications, you can omit the
--versionIdparameter:$ iectl iem-v2 job batch-create \ --appid <applicationId> \ --operation installApplication \ --infoMap '{"devices":["<deviceId>"]}' -
Get the list of jobs with unique batch ID:
$ iectl iem-v2 job get-batch-jobs --id <jobId> -
Check the status of the installation job:
$ iectl iem-v2 job install-job-status --id <jobId>When your application is installed, the status of the corresponding job will be marked as 'COMPLETED'.
In order to avoid manual checks, you can utilize the job wait command to automatically monitor the job until it completes:
$ iectl iem-v2 job device-job-wait --id <jobId> -
To confirm that the application has been successfully installed, run the following command:
$ iectl iem-v2 device details --device-id <deviceId>
Uninstall Application¶
To uninstall an application from Edge Devices, use the same batch create command with the uninstallApplication operation:
$ iectl iem-v2 job batch-create \
--appid <applicationId> \
--operation uninstallApplication \
--infoMap '{"devices":["<deviceId>"]}'