Apply commands via manifest file - Manual - Industrial Edge - Industrial Edge - Industrial Edge - Documentation of Industrial Edge APIs - CLI tools - Industrial Edge - References - APIs

Industrial Edge Platform Operation - APIs & References

Product
Industrial Edge
Edition
12/2024
Language
en-US (original)

The manifest file provides the possibility to execute multiple commands at once, i.e. to fulfill a use-case such as creating an application , creating its version and export app file.

iectl apply -f downloads.yaml

Manifest YAML configuration : manifest file will contain these keys -

  • commands : under commands key you can provide list of command configurations that need to be executed

  • command : placeholder for command label

  • target : target will contain the root command you want to invoke i.e. : iem, portal, publisher, device, onboard etc.

  • resource : resource contain the hierarchy of command which you want to execute joined by dot (.) for e.g.

    iectl publisher app-project upload catalog 
    

    this command will have publisher in target and publisher.app-project.upload.catalog in resource

  • parameters : parameters contain the flags and their values corresponding to the command added in the resource. Each parameter value should be given in double quotes ("") except json data which will be given in single quotes('').

!!! info "NOTICE" use parameter allowfailure : "true" if you want to continue even if the command fails with en error

  • variables : Define variables in the manifest yaml and use them in the command parameters. E.g. :
variables :
  username : "myuser@siemens.com"
commands :
  - command 
    .
    .
    .
    parameters
      username: "${{username}}"

Example YAML File:

commands:
  - command:
    target: publisher
    resource: workspace.init
    parameters:
      allowfailure: "true"
  - command:
    target: publisher
    resource: standalone-app.create
    parameters: 
      appname: "sampleapp"
      reponame: "sampleapp"
      iconpath: "/path/to/siemens.png"
      appdescription: "appDesc"
      allowfailure: "true"
  - command:
    target: publisher
    resource: standalone-app.version.create
    parameters: 
      appname: "sampleapp"
      versionnumber: "0.0.1"
      yamlpath: "/path/to/docker-compose.yml"
      redirectsection: "myservice"
      redirecttype: "FromBoxSpecificPort"
      redirecturl: "8080"
      restredirecturl: ""
      allowfailure: "true"
  - command:
    target: publisher
    resource: standalone-app.version.export
    parameters:
      appname: "sampleapp"
      versionnumber: "0.0.1"
      exportpath: "/path/to/Downloads"
      allowfailure: "true"