IBM Streams 4.2

Creating a device management configuration for a custom device management service

A device management configuration is a type of application configuration object that enables IBM® Streams to securely connect to your custom device management service. When you create a device management configuration, you are registering your device management service plug-in with IBM Streams.

Before you begin

You can create the device management configuration at either the IBM Streams domain or instance level. Before you create the device management configuration, consider the domains and instances that your users have access to and ensure that your device management configuration is created at the correct level.

About this task

You can create a device management configuration from either the IBM Streams Console or from the interactive streamtool interface.

If you use a custom device management service between Apache Edgent and IBM Streams, the device management configuration must have the following properties:

streams-type=streams-devicemanager
streams-devicemanager=device-mgr-name
streams-class=qualified-pkg-name-of-implementation-class
streams-classpath=element-that-loads-device-mgr-plug-in
where:
streams-type
To create a device management configuration, you must set the value of this property to streams-devicemanager.
streams-devicemanager
To use a custom device management service, you must set the value of this property to the name of the device management service.
streams-class
This property specifies the fully qualified package name of the class that implements your custom device management service.
streams-classpath
This property specifies the element of the classpath that is used to load the device management service plug-in. You can specify a directory, JAR file name, or a URL for loading a JAR file. If you need to specify more than one element, append a number that specifies the classpath order to the parameter name. For example
streams-classpath.1=element1
streams-classpath.2=element2
custom-auth-key
If your device management service requires you to authenticate, you can use the custom-auth-key parameter to store the required authentication information.

You can optionally specify these properties in a file to make it easier to create the device management configuration, especially if you plan to use the interactive streamtool interface.

Procedure

To create a device management configuration:

  1. To use the interactive streamtool interface to create the device management configuration, run the mkappconfig command:
    mkappconfig [-d,--domain-id did] [-i,--instance-id instance]
      [--description description] [--property name=value] ... 
    [--propfile property-file] [-U,--User user]
    [-h,--help] [--trace level] 
    [-v,--verbose level] config-name

    Replace the config-name variable with the name that you want to use for the device management configuration.

    You can specify the properties for the device management configuration by:
    • Pulling the values from a properties file by specifying the --propfile option.
    • Specifying each name-value pair individually by specifying the --property option for each property
    Tip: If you specify a value for both the --propfile option and the --property option, the values that are specified in the --property option override any values that are specified for the same property in the file that is specified by the --propfile option.
    If you specify each property manually from the interactive streamtool interface, your command might look something like this:
    mkappconfig --property streams-type=streams-devicemanager
    --property streams-devicemanager=mycustomservice 
    --property streams-class=my.fully.qualified.pkg.name
    --property streams-classpath=myJARfile.jar 
    My-Edge-devices
  2. To use the IBM Streams Console to create the device manager configuration:
    1. From the Management Dashboard, go to the Manage Apache Edgent Applications and Devices page.
    2. If you want to create the device management configuration on a specific instance rather than at the domain level, select the instance from the Scope field.
    3. Click Add Configuration.
    4. Specify the name and description for the device management configuration.
    5. Add the device management configuration properties in one of the following ways:
      • Manually specify the property names and values by entering them in the Name and Value fields and then clicking Add to table
      • Import the property names and values from a properties file by completing the following steps:
        1. Click Upload a properties file or select a streams device manager starter configuration.
        2. Select Import properties from a file and click Browse
        3. Select the file from your local file system and click Open.
        4. Click Upload properties
      • Populate the table with the required fields and then specify the values manually by completing the following steps:
        1. Click Upload a properties file or select a streams device manager starter configuration.
        2. Select Select a streams device manager type and then select Streams device manager (generic).
        3. Click Upload properties.
        4. Double click on the entry in the Value column that you want to edit.
    6. Click Save Device Mgr Config.