Uploading the changed configuration

After the custom image was registered, you need to update the JSON configuration file and upload it to the Cloud Pak for Data cluster.

To upload the custom image:

  1. Rename the JSON configuration file that you downloaded to start using the custom image. The name you use should be something like custom-def-name-server.json, where custom-def-name is a name that is unique across all Cloud Pak for Data clusters.

    Important: The renamed JSON file name must end with -server.json, for example custom-runtime-def-1-server.json.

  2. Open the JSON configuration file that you renamed in an editor.
  3. Find the line containing the “image” attribute. It has the following format "image":"<docker registry>/<image name>:<image tag>, and a value such as "image": "image-registry.openshift-image-registry.svc:5000/wslocal-x86-runtime-python36:master-273".
  4. If you are using a Docker registry that runs outside the Cloud Pak for Data OpenShift cluster, use the registry URL that you used when you registered the custom image. If you’re using the Docker registry that runs on the Cloud Pak for Data OpenShift cluster, leave the value as is.
  5. Change <image name>:<image tag> to the values you used when you registered your custom image.
  6. Save the file.
  7. Upload the JSON file to the Cloud Pak for Data cluster. You can use the Cloud Pak for Data API.

    1. Get the required platform access token. The command returns the bearer token in the accessToken field:
       curl <CloudPakforData_URL>/v1/preauth/validateAuth -u <username>:<password>
      
    2. Upload the JSON file:
       curl -X PUT \
         'https://<CloudPakforData_URL>/zen-data/v1/volumes/files/%2F_global_%2Fconfig%2F.runtime-definitions%2Fibm' \
         -H 'Authorization: Bearer <platform-access-token>' \
         -H 'content-type: multipart/form-data' \
         -F upFile=@/path/to/runtime/def/<custom-def-name>-server.json
      

      Important: The uploaded JSON file name must end with server.json and the same file name must be used across all clusters to enable exporting and importing analytics projects across cluster boundaries.

      If the changed JSON file was uploaded successfully, you will see the following response:

       {
           "_messageCode_": "Success",
           "message": "Successfully uploaded file and created the necessary directory    
                      structure"
      }
      
  8. Ensure that the new custom image is prepulled to each compute node. See Image download optimization.