Shutting down services

In some situations, when you are not using a service but you plan to use it in the future, you can manually shut the service down to prevent it from using resources. You can restart the service when you need to use it again.

Who needs to complete this task?
You must be either:
  • A cluster administrator
  • An instance administrator
When do you need to complete this task?
When you want to temporarily shutdown a service that you are not using. For example, over holidays or during maintenance, you might shut down a service to conserve CPU and memory resources, and then restart the service when you want to use it again.

In most cases, you shut down services by using one of the following commands:


cpd-cli manage shutdown
cpd-cli manage shutdown
You shut down a service by using the cpd-cli manage shutdown command.

The command accepts the following options:

--components
The main component to shut down, and any dependent components, which are separated by commas. If you attempt to shut down a component that has dependencies that you don't specify, the process shuts down as many components as possible. You might receive an error message. To determine the dependencies of the component that you want to shut down, include the --preview option when you run the command. You can also run the following commands to get more information:
  • Run the cpd-cli manage list-dependents command to see which components are dependent on the component you want to shut down.
  • Run the cpd-cli manage get-cr-status command to see which components are running in the namespace.
--cpd_instance_ns
The project (namespace) where the component that you want to shut down is installed.

Use the ${PROJECT_CPD_INST_OPERANDS} environment variable to specify the project.

--tethered_instance_ns
A tethered project (namespace) where the shutdown command will shut down installed service instances.

Use the ${PROJECT_CPD_INSTANCE_TETHERED} environment variable to specify the project.

--force
Specify =true to shut down the service without waiting for jobs to exit. Any service instances that are running are shut down. Wait for the status to progress from shutdownInProgress to shutdown. When you restart a service, any instances that were forcibly shut down restart automatically.
--include_dependency
Specify --include_dependency=true to shut down any dependencies when you shut down the main component.

You can run the cpd-cli manage list-dependents command to see which components are dependent on the component you want to shut down.

--preview
Specify --preview=true to preview the commands that will run when you issue this CLI command.

For more information about the cpd-cli manage shutdown command, see manage shutdown in the cpd-cli command reference.

Note: You cannot shut down a service when autoscaling is enabled for the service. For more information, see Automatically scaling resources for services.


oc patch shutdown command
oc patch shutdown command
Some services support shutdown and restart but do not support the use of the cpd-cli manage shutdown command. To shut down these services, you run the oc patch command to update the shutdown parameter in the service custom resource (CR) to manually shut down the service. Only the specified service is shut down. No dependent services are shut down.
The shutdown parameter accepts the following values:
true
The operator shuts down its deployments and any dynamic workloads such as jobs and environments. The operator might wait for running jobs to end before it shuts down fully. During that time, the service must not start any new dynamic workloads.

If you shut down a service that has running instances, the CR has a status of shutdownError. Otherwise, the status initially is shutdownInProgress and then eventually shutdown.

force
The service immediately shuts down without waiting for jobs to exit. Any service instances that are running are shut down. Wait for the status to progress from shutdownInProgress to shutdown.
false
The service is restarted. If you previously forced a shutdown that shut down service instances, this setting also restarts those service instances. You can also remove the shutdown setting from the CR to restart the service. Wait for the status to progress from shutdown to InProgress to Completed.

Procedures

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

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

  1. Log the cpd-cli in to the Red Hat OpenShift Container Platform cluster:
    ${CPDM_OC_LOGIN}
    Remember: CPDM_OC_LOGIN is an alias for the cpd-cli manage login-to-ocp command.
  2. Shut down any of the following services as needed.

Common core services
Restriction: The common core services are a dependency for multiple services. The common core services can be shut down only when the services that have a dependency on the common core services are also shut down. You can run the cpd-cli manage list-dependents command to determine which components have a dependency on the common core services. When you shut down those components, use the --include_dependency option to also shut down the common core services and any other dependencies.



AI Factsheets

Run the following command to shut down the AI Factsheets service:

cpd-cli manage shutdown \
--components=factsheet \
--cpd_instance_ns=${PROJECT_CPD_INST_OPERANDS} \
--include_dependency=true
When you set the --include_dependency option to true, the following dependent component also is shut down:
  • common core services


Analytics Engine powered by Apache Spark

5.0.1 or later

Run the following command to shut down the Analytics Engine powered by Apache Spark service:

cpd-cli manage shutdown \
--components=analyticsengine \
--cpd_instance_ns=${PROJECT_CPD_INST_OPERANDS}


Cognos Analytics

Shut down any Cognos Analytics service instances before you shut down the service.

  1. Run the following command to list all of the Cognos Analytics service instances on the cluster:
    oc get caserviceinstance --all-namespaces

    Identify the service instances that are associated with the instance of Cognos Analytics that you want to shut down.

  2. For each service instance that is associated with the instance of Cognos Analytics that you want to shut down, run the following command to shut down the service instance.
    Each time that you run the command, replace the following values:
    • Replace <instance-id> with the appropriate ID from the list of service instances.
    • Replace <instance-namespace> with the namespace where the service instance is deployed.
    oc patch caserviceinstance <instance-id> \
    --namespace <instance-namespace> \
    --patch '{"spec":{"shutdown":"true"}}' \
    --type=merge
  3. Run the following command to shut down the Cognos Analytics service:
    cpd-cli manage shutdown \
    --components=cognos_analytics \
    --cpd_instance_ns=${PROJECT_CPD_INST_OPERANDS}
Note: You can also run the cpd-cli manage shutdown command with the --force option set to true to shut down all instances and the service.


Cognos Dashboards

Run the following command to shut down the Cognos Dashboards service:

cpd-cli manage shutdown \
--components=dashboard \
--cpd_instance_ns=${PROJECT_CPD_INST_OPERANDS} \
--include_dependency=true
When you set the --include_dependency option to true, the following dependent components also are shut down:
  • Common core services (ccs)
  • Redis
Note: If the Redis component is shut down, it might not restart as expected later. For more information, see Cannot restart Cognos Dashboards services.


Data Gate

Shut down the Data Gate service instances before you shut down the service.

  1. Run the following command to list all of the service instances in the project where Data Gate is installed:
    oc get datagateinstanceservices --namespace ${PROJECT_CPD_INST_OPERANDS}
  2. For each service instance, run the following command to shut down the Data Gate service instance.

    Each time that you run the command, replace <instance-id> with the appropriate ID from the list of service instances.

    export DATAGATE_INSTANCE_ID=<instance-id>
    
    cpd-cli manage shutdown --components=datagate_instance --cpd_instance_ns=${PROJECT_CPD_INST_OPERANDS} --extra-vars=cr_name=${DATAGATE_INSTANCE_ID} --extra-vars='{"override_components_meta":{"datagate_instance":{"cr_apply_support":"true"}}}'
  3. Run the following command to shut down the Data Gate service:
    cpd-cli manage shutdown \
    --components=datagate \
    --cpd_instance_ns=${PROJECT_CPD_INST_OPERANDS}


Data Product Hub

Run the following command to shut down the Data Product Hub service:

cpd-cli manage shutdown \
--components=dataproduct \
--cpd_instance_ns=${PROJECT_CPD_INST_OPERANDS}


Data Refinery
Restriction: The Data Refinery service is a dependency for multiple services. The Data Refinery service can be shut down only when the services that have a dependency on Data Refinery are also shut down.

Run the cpd-cli manage list-dependents command to determine which components have a dependency on Data Refinery. When you shut down those components, use the --include_dependency option to also shut down Data Refinery and any other dependencies.



DataStage
  1. If your deployment has instances of DataStage running on remote physical locations, you must shut them down manually.
    1. Log in to Red Hat OpenShift Container Platform as a user with sufficient permissions to complete the task.
      ${REMOTE_OC_LOGIN}
      Remember: REMOTE_OC_LOGIN is an alias for the oc login command when you are connecting to a remote cluster.
    2. Run the following command to shut down the instances of DataStage:
      oc -n ${REMOTE_PROJECT_MANAGEMENT} \
      get pxruntime | awk 'NR>1 { print $1 }' | xargs -I % \
      oc -n ${REMOTE_PROJECT_MANAGEMENT} \
      patch pxruntime % \
      --type=merge -p '{"spec":{"shutdown": true}}'
      
    3. After you shut down the DataStage instances on the remote cluster, log the cpd-cli in to the cluster where the primary instance of Cloud Pak for Data is installed.
      ${CPDM_OC_LOGIN}
      Remember: CPDM_OC_LOGIN is an alias for the cpd-cli manage login-to-ocp command.
    4. Log the cpd-cli in to the Red Hat OpenShift Container Platform cluster:
  2. Run the following command to shut down the DataStage service on the primary cluster:
    cpd-cli manage shutdown \
    --components=datastage_ent \
    --cpd_instance_ns=${PROJECT_CPD_INST_OPERANDS} \
    --include_dependency=true

    To shut down DataStage Enterprise Plus, set the --components option to datastage_ent_plus.

When you set the --include_dependency option to true, the following dependent component also is shut down:
  • common core services


Data Virtualization

Shut down the Data Virtualization service instance before you shut down the service.

  1. Shut down the Data Virtualization service instance:
    1. Set the INSTANCE_PROJECT to the project where the service instance exists:
      • If the service instance is in the operands project, run:
        export INSTANCE_PROJECT=${PROJECT_CPD_INST_OPERANDS}
      • If the service instance is in a tethered project, run:
        export INSTANCE_PROJECT=${PROJECT_CPD_INSTANCE_TETHERED}
        Important: If multiple tethered projects are associated with this instance of Cloud Pak for Data, make sure that the ${PROJECT_CPD_INSTANCE_TETHERED} environment variable is set to the correct project name before you run the export command:
        echo $PROJECT_CPD_INSTANCE_TETHERED
    2. Run the following command to shut down the Data Virtualization service instance:
      oc patch bigsql db2u-dv \
      --namespace ${INSTANCE_PROJECT} \
      --patch '{"spec": {"shutdown": "true"}}' \
      --type=merge
      Note: If you run this command with the true option, you might still interrupt workloads. Running queries might fail before the graceful shutdown deadline. Ensure that workloads are complete before you shut down the service instance.
  2. Run the following command to shut down the Data Virtualization service:
    cpd-cli manage shutdown \
    --components=dv \
    --cpd_instance_ns=${PROJECT_CPD_INST_OPERANDS} \
    --include_dependency=true
    When you set the --include_dependency option to true, the following dependent components also are shut down:
    • Common core services (ccs)
    • Db2U (db2u)
    • OpenSearch (opencontent_elasticsearch)
    • Redis (ibm_redis_cp)

    You can include the --tethered_instance_ns=<project-name> argument to shut down an instance in a tethered project.



Db2

Before you can shut down the Db2 service, you must shut down all instances.

  1. Run the following command to retrieve a list of your instances:
    oc get db2u

    Find the instance_id of the instances that you want to shut down.

  2. Shut down each instance by using the following commands for each instance_id.
    1. Export the instance_id of your instance as an environment variable:
      export INSTANCE=<instance_id>
    2. Shut down the instance:
      oc patch db2u ${INSTANCE} \
      -n ${PROJECT_CPD_INST_OPERANDS} \
      --type=merge \
      --patch '{"metadata":  {"annotations": {"db2u.databases.ibm.com/maintenance-shutdown":  "true"}}}'
    3. Wait for the db2ucluster to show Ready status under STATE and Shutdown status under MAINTENANCESTATE.
    4. Check that the engine pod and the etcd pod have been terminated.
  3. When all instances are shut down, run the following command to shut down the Db2 service:
    cpd-cli manage shutdown \
    --components=db2oltp \
    --cpd_instance_ns=${PROJECT_CPD_INST_OPERANDS} \
    --include_dependency=true
    When you set the --include_dependency option to true, the following dependent component also is shut down:
    • Db2U


Db2 Big SQL

Shut down the Db2 Big SQL service instances before you shut down the service.

  1. Run the following command to get the list of Db2 Big SQL service instance IDs:
    oc get cm \
    --namespace ${PROJECT_CPD_INST_OPERANDS} \
    -l component=db2bigsql \
    -o custom-columns="Instance Id:{.data.instance_id}, \
    InstanceName:{.data.instance_name}, \
    Created:{.metadata.creationTimestamp}"
  2. For each service instance, run the following command to shut down the Db2 Big SQL service instance.

    Each time that you run the command, replace <instance-id> with the appropriate ID from the list of service instances.

    oc patch bigsql bigsql-<instance-id> \
    --namespace ${PROJECT_CPD_INST_OPERANDS} \
    --patch '{"spec":{"shutdown":"true"}}' \
    --type=merge
    Note: If you run this command with the true option, you might still interrupt workloads. Running queries might fail before the graceful shutdown deadline. Ensure that workloads are complete before you shut down the service instance.
  3. Run the following command to shut down the Db2 Big SQL service:
    cpd-cli manage shutdown \
    --components=bigsql \
    --cpd_instance_ns=${PROJECT_CPD_INST_OPERANDS} \
    --include_dependency=true
    When you set the --include_dependency option to true, the following dependent component also is shut down:
    • Db2U


Db2 Data Management Console

Run the following command to shut down the Db2 Data Management Console service:

cpd-cli manage shutdown \
--components=dmc \
--cpd_instance_ns=${PROJECT_CPD_INST_OPERANDS} \
--include_dependency=true \
--force=true
When you set the --include_dependency option to true, the following dependent component also is shut down:
  • Redis

When you include --force=true, you forcibly shut down the service and all running service instances.



Db2 Warehouse

Before you can shut down the Db2 Warehouse service, you must shut down all instances.

  1. Run the following command to retrieve a list of your instances:
    oc get db2u

    Find the instance_id of the instances that you want to shut down.

  2. Shut down each instance by using the following commands for each instance_id.
    1. Export the instance_id of your instance as an environment variable:
      export INSTANCE=<instance_id>
    2. Shut down the instance:
      oc patch db2u ${INSTANCE} \
      -n ${PROJECT_CPD_INST_OPERANDS} \
      --type=merge \
      --patch '{"metadata":  {"annotations": {"db2u.databases.ibm.com/maintenance-shutdown":  "true"}}}'
    3. Wait for the db2ucluster to show Ready status under STATE and Shutdown status under MAINTENANCESTATE.
    4. Check that the engine pod and the etcd pod have been terminated.
  3. When all instances are shut down, run the following command to shut down the Db2 Warehouse service:
    cpd-cli manage shutdown \
    --components=db2wh \
    --cpd_instance_ns=${PROJECT_CPD_INST_OPERANDS} \
    --include_dependency=true
    When you set the --include_dependency option to true, the following dependent component also is shut down:
    • Db2U


Decision Optimization

Run the following command to shut down the Decision Optimization service:

cpd-cli manage shutdown \
--components=dods \
--cpd_instance_ns=${PROJECT_CPD_INST_OPERANDS}


EDB Postgres

The command that you run depends on the version of IBM Cloud Pak for Data that you are running:

Version 5.0.0 or 5.0.1
Restriction: EDB Postgres is designed to keep PostgreSQL clusters running and available at all times to prevent data loss. When you use the command to shut down EDB Postgres, the service scales down to one pod, which continues to run at its minimum supported configuration.

Run the following command to scale down the EDB Postgres service:

oc patch CPDEdbInstance <yourEDBInstanceName> \
--namespace ${PROJECT_CPD_INST_OPERANDS} \
--type=merge \
--patch '{"spec": {"shutdown": true}}'

The replica pods are scaled down to 1. When you restart PostgreSQL, the pods return to their previous state.

Version 5.0.2 and later
Note: EDB Postgres fully shuts down when you use the cpd-cli manage shutdown command. EDB Postgres was redesigned to shut down safely.
Run the following command to shut down the EDB Postgres service:
cpd-cli manage shutdown \
--components=edb_cp4d \
--cpd_instance_ns=zen


Execution Engine for Apache Hadoop

Run the following command to shut down the Execution Engine for Apache Hadoop service:

cpd-cli manage shutdown \
--components=hee \
--cpd_instance_ns=${PROJECT_CPD_INST_OPERANDS}


IBM Match 360 with Watson

Complete one of the following steps to shut down the IBM Match 360 service or to put IBM Match 360 into maintenance mode and then shut down FoundationDB:

  • To shut down the IBM Match 360 service, run the following command:
    cpd-cli manage shutdown \
    --components=match360 \
    --cpd_instance_ns=${PROJECT_CPD_INST_OPERANDS}
  • To put IBM Match 360 in to maintenance mode and to shut down FoundationDB, complete the following steps:
    1. Run the following command:
      oc patch mdm mdm-cr -n ${PROJECT_CPD_INST_OPERANDS} -p "{\"spec\":{\"ignoreForMaintenance\": true}" --type=merge 
      oc patch fdbcluster mdm-foundationdb-cluster -n ${PROJECT_CPD_INST_OPERANDS} -patch '{"spec":{"shutdown":"true"}}' --type=merge
    2. To check the status of IBM Match 360 and FoundationDB, run the following command:

      oc get mdm mdm-cr -n ${PROJECT_CPD_INST_OPERANDS} -o yaml 
      oc get  fdbcluster fdbcluster mdm-foundationdb-cluster -n ${PROJECT_CPD_INST_OPERANDS} -o yaml 
      


Informix

Run the following command to shut down the Informix service:

cpd-cli manage shutdown \
--components=informix_cp4d \
--cpd_instance_ns=${PROJECT_CPD_INST_OPERANDS} \
--include_dependency=true
When you set the --include_dependency option to true, the following dependent component also is shut down:
  • informix
Note: You can forcibly shut down the service and all running instances by including --force=true when you run the cpd-cli manage shutdown command.


MANTA Automated Data Lineage
Run the following command to shut down the MANTA Automated Data Lineage service:
cpd-cli manage shutdown \
--components=mantaflow \
--cpd_instance_ns=${PROJECT_CPD_INST_OPERANDS}


MongoDB
Restriction: MongoDB is designed to keep the MongoDB clusters running and available at all times. MongoDB does not fully shut down to prevent data loss. When you use the command to shut down MongoDB, the service scales down to one pod. However, the pod continues to run at its minimum supported configuration.

Run the following command to scale down the MongoDB service:

oc patch CPDMongoDB <yourMongoDBInstanceName> \
--namespace ${PROJECT_CPD_INST_OPERANDS} \
--type=merge \
--patch '{"spec": {"shutdown": true}}'

If you use the command to set shutdown=true, the replica pods are scaled down to 1.

If you use the command to set shutdown=false, the pods return to their original/previous state.



OpenPages

Ensure that you shut down any OpenPages service instances before you shut down the service.

Run the following command to shut down an OpenPages instance or service. Replace <service_or_instance> with openpages to shut down the service or openpages_instance to shut down an instance. Use --extra-vars=cr_name=${OPENPAGES_INSTANCE_NAME} in the command only when you need to specify the instance name because the instance does not use the default name.

cpd-cli manage shutdown \
--components=<service_or_instance> \
--cpd_instance_ns=${PROJECT_CPD_INST_OPERANDS} \
--extra-vars=cr_name=${OPENPAGES_INSTANCE_NAME}


Orchestration Pipelines

Run the following command to shut down the Orchestration Pipelines service:

cpd-cli manage shutdown \
--components=ws_pipelines \
--cpd_instance_ns=${PROJECT_CPD_INST_OPERANDS} \
--include_dependency=true
When you set the --include_dependency option to true, the following dependent component also is shut down:
  • common core services


Planning Analytics

Shut down any Planning Analytics service instances before you shut down the service.

  1. Run the following command to list all of the Planning Analytics service instances on the cluster:
    oc get paserviceinstance --all-namespaces

    Identify the service instances that are associated with the instance of Planning Analytics that you want to shut down.

  2. For each service instance that is associated with the instance of Planning Analytics that you want to shut down, run the following command to shut down the service instance.
    Each time that you run the command, replace the following values:
    • Replace <instance-id> with the appropriate ID from the list of service instances.
    • Replace <instance-namespace> with the namespace where the service instance is deployed.
    oc patch paserviceinstance <instance-id> \
    --namespace <instance-namespace> \
    --patch '{"spec":{"shutdown":"true"}}' \
    --type=merge
  3. Run the following command to shut down the Planning Analytics service:
    cpd-cli manage shutdown \
    --components=planning_analytics \
    --cpd_instance_ns=${PROJECT_CPD_INST_OPERANDS}
    Note: You can also run the cpd-cli manage shutdown command with the --force option set to true to shut down all instances and the service.


Product Master

Run the following command to shut down the Product Master service:

cpd-cli manage shutdown \
--components=productmaster_instance \
--cpd_instance_ns=${PROJECT_CPD_INST_OPERANDS}


RStudio Server Runtimes

Run the following command to shut down the RStudio® Server Runtimes service:

cpd-cli manage shutdown \
--components=rstudio \
--cpd_instance_ns=${PROJECT_CPD_INST_OPERANDS}


SPSS Modeler

Run the following command to shut down the SPSS Modeler service:

cpd-cli manage shutdown \
--components=spss \
--cpd_instance_ns=${PROJECT_CPD_INST_OPERANDS} \
--include_dependency=true
When you set the --include_dependency option to true, the following dependent components also are shut down:
  • Elasticsearch (opencontent_elasticsearch)
  • Common core services (ccs)
  • Data Refinery (datarefinery)
  • Canvas (canvasbase)
  • Watson Studio Runtimes (ws_runtimes)
  • Watson Studio (ws)


Synthetic Data Generator

Run the following command to shut down the Synthetic Data Generator service:

cpd-cli manage shutdown \
--components=syntheticdata \
--cpd_instance_ns=${PROJECT_CPD_INST_OPERANDS} \
--include_dependency=true
When you set the --include_dependency option to true, the following dependent component also is shut down:
  • common core services


Watson Discovery
  1. Check whether the Watson Discovery instance is healthy by running the following command:
    oc get wdall | grep -v NAME | column -t | sort
    You can run the following command to check the datastore status.
    oc get cluster/wd-discovery-cn-postgres etcdcluster/wd-discovery-etcd elasticsearchcluster/wd rabbitmqcluster/wd-rabbitmq
    Note: If the Watson Discovery instance is not healthy, do not shutdown the Watson Discovery service.
  2. If the Watson Discovery instance is healthy, run the following command to shut down the Watson Discovery service.

    cpd-cli manage shutdown \
    --components=watson_discovery \
    --cpd_instance_ns=${PROJECT_CPD_INST_OPERANDS} \
    --include_dependency=true
    When you set the --include_dependency option to true, the following dependent components also are shut down:
    • Cloud Native PostgreSQL (postgresql)
    • etcd (opencontent_etcd)
    • OpenSearch (opencontent_elasticsearch)
    • MinIO (opencontent_minio)
    • RabbitMQ (opencontent_rabbitmq)
    • Watson Gateway (watson_gateway)


Watson Machine Learning

Run the following command to shut down the Watson Machine Learning service:

cpd-cli manage shutdown \
--components=wml \
--cpd_instance_ns=${PROJECT_CPD_INST_OPERANDS} \
--include_dependency=true
When you set the --include_dependency option to true, the following dependent component also is shut down:
  • common core services


Watson Machine Learning Accelerator
Run the following command to shut down the Watson Machine Learning Accelerator service:
cpd-cli manage shutdown \
--components=wml_accelerator \
--cpd_instance_ns=${PROJECT_CPD_INST_OPERANDS}


Watson OpenScale

Run the following command to shut down the Watson OpenScale service.

cpd-cli manage shutdown \
--components=openscale \
--cpd_instance_ns=${PROJECT_CPD_INST_OPERANDS}


Watson Speech services

Run the following command to shut down the Watson Speech services:

cpd-cli manage shutdown \
--components=watson_speech \
--cpd_instance_ns=${PROJECT_CPD_INST_OPERANDS}

The following dependent components are also shut down when you shut down Watson Speech services:

  • Cloud Native PostgreSQL (postgresql)
  • 5.0.0 MinIO (opencontent_minio)

    5.0.1 or later MinIO is no longer a dependency.

  • RabbitMQ (opencontent_rabbitmq)
  • Watson Gateway (watson_gateway)
Note: When the Watson Speech services are shut down, the PostgreSQL server process stops. However, the PostgreSQL pods that are associated with the Watson Speech services remain in Running state.


Watson Studio
Shut down only the Watson Studio service

Run the following command to shut down the Watson Studio service:

cpd-cli manage shutdown \
--components=ws \
--cpd_instance_ns=${PROJECT_CPD_INST_OPERANDS}
Shut down the Watson Studio service and its dependencies

Data Refinery is a dependency of the Watson Studio service. You might need to complete additional steps to shut down the Data Refinery service when you shut down the Watson Studio service.

  1. Get the name of the Data Refinery custom resource:
    oc get DataRefinery --namespace=${PROJECT_CPD_INST_OPERANDS}
  2. If the name of the Data Refinery custom resource is datarefinery-sample, create a file named refinery-cr.yaml in your work directory with the following content:
    override_components_meta:
      datarefinery:
        cr_name: datarefinery-sample
  3. Run the appropriate command based on the name of the Data Refinery custom resource:
    The name of the Data Refinery custom resource is datarefinery-cr
    cpd-cli manage shutdown \
    --components=ws \
    --cpd_instance_ns=${PROJECT_CPD_INST_OPERANDS} \
    --include_dependency=true
    The name of the Data Refinery custom resource is datarefinery-sample
    cpd-cli manage shutdown \
    --components=ws \
    --cpd_instance_ns=${PROJECT_CPD_INST_OPERANDS} \
    --include_dependency=true \
    --param-file=/tmp/work/refinery-cr.yaml
    When you set the --include_dependency option to true, the following dependent components are also shut down:
    • common core services
    • Watson Studio Runtimes (ws_runtimes)


Watson Studio Runtimes

Watson Studio is a dependent component of Watson Studio Runtimes.

Run the following command to shut them down together:

cpd-cli manage shutdown \
--components=ws,ws_runtimes \
--cpd_instance_ns=${PROJECT_CPD_INST_OPERANDS}
This command performs a graceful shutdown, which delays the shutdown until users close all their active runtimes. To immediately shut down the services and stop any active runtimes, add --force=true to the command.
Note: The graceful shutdown has a 2-hour timeout. The shutdown fails if any runtimes are still active after 2 hours.


watsonx.ai

Run the following command to shut down the watsonx.ai service:

cpd-cli manage shutdown \
--components=watsonx_ai \
--cpd_instance_ns=${PROJECT_CPD_INST_OPERANDS} \
--include_dependency=false \
--force=true
When you set the --include_dependency option to true, the following dependent components also are shut down:
  • Common core services (ccs)
  • Elasticsearch (opencontent_elasticsearch)
  • Data Refinery (datarefinery)
  • watsonx_ai_ifm
  • Watson Machine Learning (wml)
  • Watson Studio Runtimes (ws_runtimes)
  • Watson Studio (ws)


watsonx Assistant

The command that you run depends on the version of IBM Cloud Pak for Data that you are running:

Version 5.0.1 and later
5.0.1 or later Use the cpd-cli manage apply-scale-config command to shut down the watsonx Assistant service:
cpd-cli manage shutdown \
--components=watson_assistant \
--cpd_instance_ns=${PROJECT_CPD_INST_OPERANDS}
Version 5.0.0
5.0.0 Use the oc patch command to shut down the watsonx Assistant service:
  1. Go to the project where watsonx Assistant is installed:
    oc project ${PROJECT_CPD_INST_OPERANDS}
  2. Export the name of your watsonx Assistant instance as an environment variable:
    export INSTANCE=`oc get wa -n ${PROJECT_CPD_INST_OPERANDS} |grep -v NAME| awk '{print $1}'`
  3. Run the following command to shut down the watsonx Assistant service instance:

    oc patch wa ${INSTANCE} \
    --namespace ${PROJECT_CPD_INST_OPERANDS} \
    --patch '{"spec": {"shutdown": true}}' \
    --type=merge
When the watsonx Assistant service shuts down, its dependent components also shut down. If any dependent components are shared with other services, only the custom resources created by watsonx Assistant shut down. The following dependent components shut down with watsonx Assistant:
  • Cloud Native PostgreSQL (postgresql)
  • etcd (opencontent_etcd)
  • OpenSearch (opencontent_elasticsearch)
  • 5.0.0 MinIO (opencontent_minio)

    5.0.1 or later MinIO is no longer a dependency.

  • Redis (ibm_redis_cp)
  • Watson data governor (data_governor)
  • Watson Gateway (watson_gateway)


watsonx Code Assistant for Red Hat Ansible Lightspeed

Run the following command to shut down the watsonx Code Assistant for Red Hat Ansible® Lightspeed service:

cpd-cli manage shutdown \
--components=wca_ansible \
--cpd_instance_ns=${PROJECT_CPD_INST_OPERANDS} \
--include_dependency=false
When you set the --include_dependency option to true, the following dependent components are also shut down:
  • Common core services (ccs)
  • Elasticsearch (opencontent_elasticsearch)
  • Data Refinery (datarefinery)
  • watsonx.ai (watsonx_ai)
  • watsonx_ai_ifm
  • Watson Machine Learning (wml)
  • Watson Studio Runtimes (ws_runtimes)
  • Watson Studio (ws)


watsonx Code Assistant for Z

Run the following command to shut down the watsonx Code Assistant for Z service:

cpd-cli manage shutdown \
--components=wca_z \
--cpd_instance_ns=${PROJECT_CPD_INST_OPERANDS} \
--include_dependency=false
When you set the --include_dependency option to true, the following dependent components are also shut down:
  • Common core services (ccs)
  • Elasticsearch (opencontent_elasticsearch)
  • watsonx_ai_ifm


watsonx.data

To shut down the watsonx.data service, you must shut down wxdAddon, which provides the watsonx.data service.

When the watsonx.data service is shutdown, the PostgreSQL server process stops. However, the PostgreSQL pods that are associated with the watsonx.data instance remain in Running state.

  1. Run the following command to shut down the service (the wxdAddon component):
    cpd-cli manage shutdown \
    --components=watsonx_data \
    --cpd_instance_ns=${PROJECT_CPD_INST_OPERANDS}
Tip: If you want to shut down only one component (such as wxd or wxdEngine), you can use oc patch commands. For example, use these steps to shut down wxdEngine.
  1. Run the following command with the namespace to get the engine or service instance names:
    oc get wxdengine --namespace ${PROJECT_CPD_INST_OPERANDS}

    An example of the result:

    
    NAME                  AGE
    lakehouse-presto-01   38h
    lakehouse-presto250   10h
  2. Configure and run the following command to shut down the engine or service
    oc patch wxdEngine <engine_or_service_instance> \
    --namespace ${PROJECT_CPD_INST_OPERANDS} \
    --patch '{"spec":{"shutdown":"true"}}' \
    --type=merge
  3. Alternatively, to force shutdown, run the following command:
    oc patch  wxdEngine <engine_or_service_instance>  \
    --namespace ${PROJECT_CPD_INST_OPERANDS} \
    --patch '{"spec":{"shutdown":"force"}}' \
    --type=merge


watsonx.governance

Run the following command to shut down the watsonx.governance service:

cpd-cli manage shutdown \
--components=watsonx_governance \
--cpd_instance_ns=${PROJECT_CPD_INST_OPERANDS}


Cloud Pak for Data control plane
Important: Only shut down the Cloud Pak for Data control plane and the Scheduling service if you already shut down all other services. If you have shut down the services that are running on the Cloud Pak for Data control plane, you can proceed to shut down the Cloud Pak for Data control plane and the Scheduling service, if it is installed, as needed.

Run the following command to shut down the control plane:

cpd-cli manage shutdown \
--components=cpd_platform \
--cpd_instance_ns=${PROJECT_CPD_INST_OPERANDS}


Scheduling service

If you installed the Scheduling service, you must shut it down after you shut down all other services and the control plane, and you must restart it before you restart the control plane and any other services.

  1. Run the following command to shut down the scheduling service:
    oc patch Scheduling ibm-cpd-scheduler \
    --namespace ${PROJECT_SCHEDULING_SERVICE} \
    --type=merge \
    --patch '{"spec": {"shutdown": "true"}}'
  2. After you shut down the scheduling service, delete any pending pods that are waiting to be scheduled by the scheduling service. When the pods restart, they are scheduled by the default OpenShift scheduler.
    1. Run the following command to see which projects have pods that are under the control of the scheduling service:
      oc get po -A --no-headers | while read namespace name ready status misc; do
        schedulerName=`oc get po -n$namespace $name -o=jsonpath="{.spec.schedulerName}"`
        if [ "$schedulerName" == "ibm-cpd-scheduler" -a "$status" == "Pending" ]; then
          echo "$namespace"
        fi
      done | sort -u

      The command returns a list of projects.

    2. For each project returned by the preceding command, complete the following steps:
      1. Change to the project:
        oc project project-name
      2. Run the command to list the pending pods in the project that are still under the control of the scheduling service:
        oc get po --no-headers | while read name ready status misc; do
         schedulerName=`oc get po $name -o=jsonpath='{.spec.schedulerName}'`
         if [ "$schedulerName" == "ibm-cpd-scheduler" -a $status == "Pending" ]; then
          echo "Pod $name is pending, and schedulerName is set to ibm-cpd-scheduler"
         fi
        done

        The command returns a list of pods. If the command does not return any pods, there are no pending pods that need to be restarted in this project.

      3. Run the following command to delete the pods:
        oc get po --no-headers | while read name ready status misc; do
         schedulerName=`oc get po $name -o=jsonpath='{.spec.schedulerName}'`
         if [ "$schedulerName" == "ibm-cpd-scheduler" -a $status == "Pending" ]; then
          oc delete po $name
         fi
        done
      4. Repeat the preceding steps for each project that was returned in the output for step 1.