Skip to content

Upload an App to Catalog and install using Manifest

iectl apply --manifest "/path/to/iem_to_ied.yaml"

To create an app on IEM and then to install the app on a device use above command

Within the YAML file, you also have the possiblity to re-use the query option and reference outputs from previously executed commands within the manifest file. Command parameter which reference the output and and query result of different components have to follow the following scheme:

parameter : command.name.separated.by.dots#{.query}

NOTICE

You have to provide query in JSONPath query language. Example of using query is shown below in manifest file.
JSONPath is a query language for JSON. JSONPath is used for selecting and extracting a sub-section from the JSON document.

Synopsis

The below iem_to_ied.yaml manifest file will upload your application to catalog and then install it to IED with given device ID:

variables :
  iemUrl: "https://iem-url"
  iemUser: "username@siemens.com"
  iemPass: "password"
commands: 
  - command:
    target: config
    resource: add.iem
    parameters:
      name: "iem_config"
      url: "${{iemUrl}}"
      user: "${{iemUser}}"
      password: "${{iemPass}}"
  - command:
    target: publisher
    resource: app-project.upload.catalog
    parameters: 
      filepath: "/path/to/app/file/HBdfezUzTcz631tZct4ouwi2ZbltwGKW_0.0.2.app"
      allowfailure: "true"
  - command:
    target: iem
    resource: catalog.list
    parameters:
      allowfailure: "true"
  - command:
    target: iem
    resource: job.batch-create
    parameters: 
      appid: "iem.catalog.list#{.data[?(@.title=='app_name')].applicationId}"
      infoMap: '{"devices":["d39b707268a24306845b9a6aae951ec5"]}'
      operation: "installApplication"
      allowfailure: "true"