Adding a custom service

You can install a specialized application or product in IBM® Sovereign Core by adding the application as a custom service in the platform capabilities catalog.

Before you begin

This task assumes the following prerequisites are met:
  • You have built an IBM Sovereign Core catalog service package that includes the product's container images and related assets and is prepared for deployment. You must have the URL that points to the location where the application or product is hosted.
    Draft comment:
    Might get a sample service package in public git repo or add a topic giving an example of how to develop a service post-GA.
  • By default, the Add service offering to catalog capability is available in the platform account. The tile in the catalog shows Unconfigured which means that the capability is only available to the system owner.
    Optional: A system account user with the Owner or Editor role can also make the Add service offering to catalog capability available to all tenant accounts to allow tenants to add a custom service directly to their catalogs. To give tenants access to the capability:
    1. From Platform capabilities in the navigation menu, click Manage service on the Add service offering to catalog capability.
    2. Set the Add service offering catalog toggle to make the capability available in all tenant accounts, and click Finish.

Procedure

Complete the following tasks to add a custom service in IBM Sovereign Core:
  1. Registering your product as a custom service
  2. Publishing the custom service
  3. Using the custom service

Registering your product as a custom service

You must have the Owner role in the platform account to complete this task. For details on how to access the account, see Setting up the platform account.
  1. From the platform account home page, select the Catalog tab, and create a new workspace or click an existing workspace name to open the workspace view navigate to the platform account.
  2. To register your product as a custom service, click Deploy for the Add service offering to catalog capability.
  3. Fill out the details to register your product:
    • Product name: Set the name to display in the catalog for your service.
      Note: The product name can have a maximum length of 64 characters.
    • Product description: Add a description of your service to display in the catalog.
    • Product service id: Enter a service ID for your product such as, myproductid.
      Note: The product service ID must be unique to your product and can only contain lowercase alphabetic letters and have a maximum length of 63 characters. This ID is the service ID you must provide when you integrate the custom service with platform metering for usage tracking. For details, see Integrating a custom service with metering.
    • Service broker url: Add a link that points to where your service is hosted.
    • Product marketing url: Add a link to the marketing page for your service.
    • Product support url: Add a link to the product support page for your service.
    • Input schema - base64 encoded json schema: Enter a base64 encoded string that represents the JSON schema configuration file for your service.

      The JSON schema should conform to the standard JSON schema specification. For details, see JSON schema reference documentation.

      Make sure to include the properties section in the schema. Each property can include the multiple keys such as:
      • type: Data type (string, number, integer, boolean, object, array, null)
      • enum: List of allowed values
      • minLength/maxLength: String length limits
      • minimum/maximum: Numeric value limits
      • pattern: Regex pattern for strings
      • required: Array of required property names
      • items: Array item schema
      • description: Human-readable description
      For details about how to configure properties in the JSON schema, see Define properties.
      Note: The instanceName property is a required key in the JSON schema to define the name for each instance of the custom service. The instanceName should be a text string that can only contain lowercase letters, digits, spaces, or hyphens, and can be between 2 and 54 characters long.
      The following example shows a sample JSON schema for a custom service:
      {
        "$schema": "http://json-schema.org/draft-07/schema#",
        "type": "object",
        "properties": {
          "instanceName": {
            "type": "string",
            "pattern": "^[a-zA-Z0-9- ]+$",
            "minLength": 2,
            "maxLength": 54,
            "description": "The custom service instance name"
          },
          "description": {
            "type": "string",
            "description": "The custom service description"
          }
        },
        "required": ["instanceName"]
      }
      Convert the file to a base64 encoded string.
    • Metered metrics: Enter a JSON array that defines the usage metrics that your service sends to the platform metering service.

      The usage metrics field is optional and you can set the metrics array to an empty array value [].

      The following example sets up the service to report the number of API calls, active users, and peak user metrics to the metering service.
      [
          {
              "displayName": "API Calls",
              "metricId": "api_calls",
              "metricType": "total-up-to-date"
          },
          {
              "displayName": "Active Users",
              "metricId": "active_users",
              "metricType": "point-in-time"
          },
          {
              "displayName": "Peak Users",
              "metricId": "peak_users",
              "metricType": "high-watermark"
          }
      ]
      The supported metricType values are total-up-to-date, point-in-time and high-watermark. For details about metering in IBM Sovereign Core, see Metering service for system owners.
    • Base64 encoded service broker ca: Enter the base64 encoded certificate authority (CA) certificate that is presented by your service broker. If you leave the service broker CA field empty, the platform assumes your service broker has the same CA as the control plane.
  4. Click Deploy to publish the service to the platform capabilities catalog.
  5. Optional: Set up service usage metering for your custom service. For details, see Integrating a custom service with metering.

Publishing the custom service

You must have the Owner or Editor role in the system account to complete this task.
  1. From the navigation menu on the system account home page, select Platform capabilities. Click Manage service to install your custom service capability. The custom service is displayed in the catalog with the name the platform account owner provided during service registration.
  2. Set the Show service globally toggle to make the capability available in all tenant accounts, and click Finish.

Using the custom service

You must have the Editor in a workspace in the tenant account to complete this task.
  1. In the tenant account, create a new workspace or click an existing workspace name to open the workspace view and select the Catalog tab.
  2. Click Deploy to create an instance of your custom service. The custom service is displayed in the catalog with the name the system account owner provided while registering the service.

What to do next

Your application or product is now integrated with IBM Sovereign Core as a custom service and is ready to use.