Deploying edge applications with Edge Analytics by using Edge Application Manager

You can deploy edge applications to one or more edge systems by using IBM® Edge Application Manager.

Before you begin

Package the edge application image as an Edge Application Manager service. For more information, see Packaging an edge application service for deployment by using Edge Application Manager.

About this task

When you packaged your edge application image by using Edge Application Manager, an Edge Application Manager service and pattern associated with your application were published to the Edge Application Manager hub. To deploy your application, you must register each edge system where you want the application to run to use this pattern.
When you deploy an application, you can use a userinput.json file to override service variables (submission-time values and runtime options) that are defined by the Edge Application Manager service. The format of a variable specification in the userinput.json file is as follows:
 "my_variable_name" : "my_value"
For example, the following sample userinput.json file sets three service variables (two submission-time variables, one a string and the other a list of strings, and a runtime option):
{
    "services": [
        {
            "org": "myOrgId",
            "url": "myServiceId",
            "variables": {
                "appVar1": "value for var1",
                "appListVar3": "var1,var2,var3",
                "STREAMS_OPT_LOG_LEVEL": "2"
            }
        }
    ]
} 

To see the list of available service variables, see the Service variables section of the service in the Edge Application Manager console or use the command hzn exchange service list -l to see the service definitions. The service variables are under the userInput field.

Procedure

For each edge system where you want to deploy your application:

  1. Use ssh to log in to your edge system.
  2. Deploy the Edge Application Manager pattern.
    • If you don't need to specify a userinput.json file, use the following command:
      hzn register -p my_pattern
    • To specify a userinput.json file, add the -f option:
      hzn register -p my_pattern -f userinput.json

Results

The edge application is running on the edge systems that you deployed it to.

What to do next

You can view the status of the edge application in the Edge Application Manager console. You can also view the status, closely monitor, or collect logs or metrics from the running application by using the Edge analytics page in the Cloud Pak for Data web user interface. For more information, see Monitoring edge applications.