Setting up a storage volume to store customizations for the common core services

If you plan to customize conda or pip or create custom Python packages, you must create a storage volume where the IBM Cloud Pak for Data common core services can store these customizations.

Who needs to complete this task?

A Cloud Pak for Data user with the Create service instances permission must complete this task.

When do you need to complete this task?
Complete this task if you plan to:
  • Customize conda
  • Customize pip
  • Create custom Python packages

If you there are multiple instances of Cloud Pak for Data on the cluster, you must complete this task for each instance where you plan to store customizations.

Before you begin

Best practice: You can run many of the commands in this task exactly as written if you set up environment variables for your installation. For instructions, see Setting up installation environment variables.

Ensure that you source the environment variables before you run the commands in this task.

  1. Work with an instance administrator to gather the following information:
    1. Confirm that the common core services are installed in the instance:
      oc get ccs --namespace=${PROJECT_CPD_INST_OPERANDS}
      • If the common core services are installed, the command returns information about the common core services custom resource.
      • If the common core services are not installed, the command returns an empty response.

        This task cannot be completed if the Cloud Pak for Data common core services are not installed.

    2. Get the URL of the Cloud Pak for Data instance:
      cpd-cli manage get-cpd-instance-details \
      --cpd_instance_ns=${PROJECT_CPD_INST_OPERANDS}
  2. If you don't already have a ZenApiKey, complete Generating an API authorization token.

About this task

When the common core services are installed, they create a persistent volume claim called cc-home-pvc. Use this persistent volume claim to create the cc-home storage volume for the customizations for the common core services.

Procedure

  1. Set the following environment variables:
    1. Set the CPD_URL environment variable to the URL returned by the cpd-cli manage get-cpd-instance-details command:
      export CPD_URL=<instance-url>
    2. Set the MY_TOKEN environment variable to your ZenApiKey authorization token:
      export MY_TOKEN=<my-auth-token>
  2. Create the cc-home storage volume:
    curl -k -X POST \
        ${CPD_URL}/zen-data/v1/volumes \
        -H "Authorization: ZenApiKey ${MY_TOKEN}" \
        -H "Content-Type: application/json" \
        -d '{
        "addon_type": "volumes",
        "addon_version": "-",
        "create_arguments": {
            "metadata": {
            "existing_pvc_name": "cc-home-pvc",
            "file_server": {
                "start": true
            }
            }
        },
        "namespace": "'${PROJECT_CPD_INST_OPERANDS}'",
        "display_name": "cc-home"
        }'  
    Wait for the file server deployment to be Running. The name of the deployment is derived from the display name (cc-home):
    oc get deployment volumes-cc-home-deploy \
    -n ${PROJECT_CPD_INST_OPERANDS} \
    -w
  3. Confirm that you have read/write access to the volume:
    1. Log in to the Cloud Pak for Data web client.
    2. From the navigation menu, select Administration > Storage volumes.
    3. Select the cc-home volume.
    4. Confirm that the status of the volume and the file server are Running.
    5. On the File browser tab, add a temporary file to confirm that you have write access to the volume.
    6. Delete the temporary file.

What to do next

Give any users who need to add customizations access to the storage volume. For more information, see Manage access to a storage volume.