Creating a custom runtime environment

You can build a custom images to modify the configuration of the SPSS Modeler runtime environment. You can use a custom runtime environment to optimize the standard configuration to better suit your needs. Custom runtime environments allow you to add custom libraries, drivers, or other software components to an existing runtime definition.

Before you begin

Cluster administrator A cluster administrator must perform this task.

You must have the following prerequisites:

  • Access to the cluster URL where your runtime is deployed.
  • Appropriate permissions to download and upload runtime definitions.
Note: If you use custom runtime environments, you are responsible for updating your custom environments with all the latest updates that are made to the available runtime definitions. You are responsible for installing new fix packs, security updates, or any other updates. When new versions are released, rebuilding all of your custom runtime environments is the best way to keep them updated.

About this task

The following steps are a general overview of how to create a customer runtime environment.

Creating a custom runtime environment involves downloading an existing runtime definition, modifying it to meet your needs, and uploading the customized version back to the cluster. The custom runtime environment can then be used when you build SPSS Modeler flows.

Procedure

  1. Generate an API authorization token.
    Follow the steps in Generating a ZenApiKey authorization token to create your authorization token.
  2. Prepare to build a new image.
    1. Get the registry URL to use for Docker commands and in scripts.

      The SPSS Modeler runtime images are stored in a Docker image registry. Use a private registry. You can use the URL to the registry that was used during installation IBM® Software Hub. You can use a different registry, but then you need to configure Red Hat® OpenShift® so it can pull images from that registry. The registry that you use can be outside of the Red Hat OpenShift cluster.

      Use the same URL for all commands and in all the scripts that you run.

    2. Download the configuration file for the SPSS Modeler runtime image that you want to customize. For more information, see Downloading the runtime definition.

      The following curl command is an example:

      myRuntimeDefinition=spss-modeler; curl -k -X GET -H "Authorization: ZenApiKey ${ZenApiKey}" "https://${cpd_url}/v2/runtime_definitions?include=launch_configuration" | jq '.resources[] | select(.entity.name=="'${myRuntimeDefinition}'") | .entity'  > ${myRuntimeDefinition}.json
    3. Download the image in the configuration. For more information, see Downloading the runtime image.
  3. Create the custom runtime image with the files that you downloaded.
    1. Change the displayName field to a unique name for your custom runtime.

      For example, change displayName from spss-modeler to spss-modeler-custom.

    2. Add customizations and build a new image.

      Modify the configuration settings, add custom libraries, or make other changes as needed. See Creating a custom image.

  4. Push the image to the container server to register it.
    For more information, see Pushing the image to the registry.
  5. Upload the configuration file to use the new custom image.
    Follow the steps in Uploading the custom configuration to upload your customized runtime definition.

    The following curl command is an example:

    curl -k -X POST -H "Authorization: ZenApiKey ${ZenApiKey}" -H "Content-Type:application/json" "https://${cpd_url}/v2/runtime_definitions" -d @/${path-to-runtime-definition}/spss-modeler.json
  6. Add the custom runtime definition to an environment template.
    1. From the navigation menu, click Manage > Environments.
    2. In the Environments page, click the Templates tab.
    3. Click New template.
    4. For Software version, select the option with your custom runtime name.

      For example, select the option with spss-modeler-custom.

What to do next

When you create a new project or deployment, select your custom runtime environment from the Environment definition list