Configuring high availability in Teracloud® Streams for an application repository

If you configure high availability for an application repository, this application repository should be hosted on highly available storage. You can set the application repository at the domain level or at an individual instance level. If you configure high availability for an instance, this instance level setting takes priority over the domain level setting.

Before you begin

For high availability with automatic recovery from failures, the domain controller service must be running as a Linux system service on the Teracloud® Streams resource. For more information, see Options for setting up the domain controller service on Teracloud® Streams resources.

About this task

If the hosts or resources of an application, which is configured as highly available, crash, Teracloud® Streams pulls this application out of the application repository and starts the processing elements (PEs) of this application on new hosts.

If the property is not set, Teracloud® Streams uses by default the file system repository of the applicationBundlesPath property to determine the location of the application directory.

Procedure

  • The following example configures an application repository that is running on a highly available shared file system. The configuration is set at the instance level.
    The streamtool setproperty command sets the property values for an instance. You have to update the values in this command:
    streamtool setproperty instance.repositoryConfigurationApplicationCache="{\"type\":\"filesystem\",\"baseDirectory\":\"/mydirectory/apprepos\"}"
  • The following example configures an application repository that uses the IBM Cloud Object Storage. The configuration is set at the domain level. You have to update the values in this command:
    streamtool setrestrictedconfig cosconfig="{\"IBMCOSaccessKey\":\"theaccesskeygoeshere\",\"IBMCOSsecretKey\":\"thesecretykeygoeshere\"}" 
    The streamtool setdomainproperty command sets the property values for the domain. You have to update the values for endpoint, bucket, and auth:
    domain.repositoryConfiguration="{\"type\":\"ibmcloudobjectstorage\",\"endpoint\"
    
    :\"theendpointforCOSgoeshere\",\"bucket\":\"apprepos\",\"auth\":\"cosconfig\"}"
    Note:
    auth
    Is the name of the restricted configuration created in the prior step.
    bucket
    If you have not created or defined a bucket using the Cloud Object Storage (COS) service, a bucket is created for you.