IBM Streams 4.3.0

Creating application configuration objects to securely store data

You can use application configuration objects to securely store configuration data for your IBM® Streams environment.

About this task

You can use an application configuration object to store information that your IBM Streams environment or applications might need, such as:
  • Database connection data
  • Credentials that your applications need to use to access external systems
  • Other data, such as the port number of a TCP sink or source operator

An application configuration object enables you to store this type of information in a central location, rather than storing configuration files on each host where a job might be deployed. However, the application developer must configure the operators in the application to call the appropriate application configuration objects.

You must determine which properties and values to include in your application configuration objects.

You can create an application configuration object at either the IBM Streams domain or instance level. Before you create the application configuration object, consider the domains and instances that your users and applications have access to and ensure that your application configuration objects are created at the appropriate level.

To create an application configuration at the domain level, you must have domain administrator rights. Instance users can create application configuration objects at the instance level.

Application configuration objects are stored in Apache ZooKeeper in an encoded state.

Procedure

To create an application configuration object:

  1. To use the interactive streamtool interface to create the application configuration object, run the streamtool 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 application configuration object. (This is the name that an application must use to retrieve the application configuration object.)

    You can specify the properties of the application configuration object by:
    • Pulling the values from a properties file by specifying the --propfile option.
    • Specifying each name-value pair individually by specifying the --propertyoption 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 userName=dbUserName
    --property password=dbPassword dbConnectConfig
  2. To use the IBM Streams Console to create the application configuration object:
    1. From the Management Dashboard, go to the Manage Application Configurations page.
    2. If you want to create the application configuration object 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 application configuration object.
    5. Add the application configuration object 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 Import properties by uploading a file and click Browse.
        2. Select the file from your local file system and click Open.
        3. Click Upload properties
    6. Click Save App Config.

What to do next

To retrieve an application configuration object, an application must specify the name of the application configuration object. Additionally, the user or application that is requesting the application configuration object must have the appropriate permissions to access it.

If the application configuration object is defined at the instance and domain level, the application configuration object at the instance level takes precedence.