Creating a Streams application resource template
You can customize the resources that your IBM Streams applications use by creating custom application resource templates.
Before you begin
- Install a Streams service. For more information, see Installing Streams.
About this task
- If tags are specified and the matching application resource template is found, the application resource template for the specified tags is used.
- If no tags are specified, the default application resource template (called
application
) is used. - If tags are specified and no matching application resource template is found, the job submission fails.
- When you create a custom application resource template, Streams augments the application resource with attributes that are required by Streams, such as labels, environment variables, container specification, liveness detection, and lifecycle management.
- If the resource template contains an attribute, such as an environment variable, that has a name that Streams uses, Streams uses the information in the Streams attribute when it creates the application resource.
- If you use a custom application resource template and your application uses the geospatial toolkit, your custom template must define a shared memory volume that can grow as memory is needed. The default shared memory that is provided by Docker is not sufficient for the geospatial toolkit.
- If an application is submitted or restarted and its resource tags specify a resource template that isn't found, the application submission or restart will fail.
- You are responsible for managing the custom resource templates and any objects that they require. If an application resource template specifies a custom application image or other objects such as a persistent volume claim mount or a pull secret, those objects must exist before the associated resource is restarted or an application that uses the resource is submitted. If not, the resource restart or the application submission or restart will fail.
- images
- image pull secrets
- number of CPUs
- memory size
- persistence volumes
- resource affinity
Procedure
What to do next
After you customize the Streams instance configuration map, you must provision a Streams instance that uses the configuration map. If the Streams instance is already provisioned, you can edit the instance to specify the new configuration map. If the new configuration map affects resources that are in use by jobs that are in progress, those jobs do not automatically use the updated resource template.
If your application resource template requires any Kubernetes resource objects, make sure these objects are created before you submit your streaming application.
If the YAML syntax in the configuration map is incorrect, job submissions will fail. For information about how to debug this problem, see Job fails when submitted with a custom application resource template (Streams).