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.
Using the web client to shut down services
You can shut down services by using the web client. In the web client, you can check the current status of a service, and you can shut down if you need.

You can shut down only services that use the cpd-cli manage shutdown command to shut down.

Warning: For some services, you can use the web client to shut them down, but you must use the cpd-cli manage restart command to restart them.

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.
    Important: Some services are dependencies for other services. You must shut down all the services that depend on them first. In particular, these services can be shut down only after most or all other services have shutdown:

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

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.

You can also use the web client to shut down Cognos Analytics as long as there are no service instances currently running.

  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 (ibm_redis_cp)
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 IBM Software Hub 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 IBM Software Hub, 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:
    • Cloud Native PostgreSQL (postgresql)
    • Common core services (ccs)
    • Db2U (db2u)
    • OpenSearch (opencontent_opensearch)
    • 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 db2ucluster,db2uinstance

    The command finds instances that are Db2uInstance or Db2uCluster custom resources and returns the full object name, for example, db2uinstance.db2u.databases.ibm.com/db2uinstance-sample. Find the instances that you want to shut down.

  2. Shut down each instance by using the following commands.
    1. Export the full object name of your instance as an environment variable:
      export INSTANCE=<instance_id>

      For example, export INSTANCE=db2uinstance.db2u.databases.ibm.com/db2uinstance-sample

    2. Shut down the instance:
      oc patch ${INSTANCE} \
      --namespace ${PROJECT_CPD_INST_OPERANDS} \
      --type=merge \
      --patch '{"metadata":  {"annotations": {"db2u.databases.ibm.com/maintenance-shutdown":  "true"}}}'
    3. Run the following command to check your instances shut down:
      oc get db2ucluster,db2uinstance
      The instances show Ready status under STATE and Shutdown status under MAINTENANCESTATE when they shut down, for example:
      NAME                                                      STATE   MAINTENANCESTATE   AGE
      db2uinstance.db2u.databases.ibm.com/db2uinstance-sample          Ready   Shutdown           23d
    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

    You can also forcibly shut down the service and all running instances by including --force=true when you run the cpd-cli manage shutdown command.

    Note: Shutting down the service might take some time. The amount of time can depend on many factors, such as the number Db2U deployments. You can use the oc get db2ucluster,db2uinstance command to check the state for the instances.


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 (ibm_redis_cp)

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 db2ucluster,db2uinstance

    The command finds instances that are Db2uInstance or Db2uCluster custom resources and returns the full object name, for example, db2uinstance.db2u.databases.ibm.com/db2uinstance-sample. Find the instances that you want to shut down.

  2. Shut down each instance by using the following commands.
    1. Export the full object name of your instance as an environment variable:
      export INSTANCE=<instance_id>

      For example, export INSTANCE=db2uinstance.db2u.databases.ibm.com/db2uinstance-sample

    2. Shut down the instance:
      oc patch ${INSTANCE} \
      -n ${PROJECT_CPD_INST_OPERANDS} \
      --type=merge \
      --patch '{"metadata":  {"annotations": {"db2u.databases.ibm.com/maintenance-shutdown":  "true"}}}'
    3. Run the following command to check your instances shut down:
      oc get db2ucluster,db2uinstance
      The instances show Ready status under STATE and Shutdown status under MAINTENANCESTATE when they shut down, for example:
      NAME                                                      STATE   MAINTENANCESTATE   AGE
      db2uinstance.db2u.databases.ibm.com/db2uinstance-sample          Ready   Shutdown           23d
    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

    You can also forcibly shut down the service and all running instances by including --force=true when you run the cpd-cli manage shutdown command.

    Note: Shutting down the service might take some time. The amount of time can depend on many factors, such as the number Db2U deployments. You can use the oc get db2ucluster,db2uinstance command to check the state for the instances.


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
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=${PROJECT_CPD_INST_OPERANDS}
Note: You cannot use the --force option to forcibly shut down edb_cp4d.


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}


Unstructured Data Integration

Run the following command to shut down the Unstructured Data Integration service:

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


IBM Knowledge Catalog

Run the following command to shut down the IBM Knowledge Catalog service:

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


IBM Knowledge Catalog Standard

Run the following command to shut down the IBM Knowledge Catalog Standard service:

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


IBM Knowledge Catalog Premium

Run the following command to shut down the IBM Knowledge Catalog Premium service:

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


IBM Manta Data Lineage

Run the following command to shut down the IBM Manta Data Lineage service:

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


IBM Master Data Management

Run the following command to shut down the IBM Master Data Management service:

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


IBM StreamSets

Run the following command to shut down the IBM StreamSets service:

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


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 also 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}


OpenPages

You can shut down either a specific OpenPages instance, or the OpenPages service and all OpenPages instances.

  • If you want to shut down a specific OpenPages instance, run the following command:
    Note: Use --extra-vars=cr_name=${OPENPAGES_INSTANCE_NAME} in the command only when you need to specify the instance name because the service instances does not use the default name.
    cpd-cli manage shutdown \
    --components=openpages_instance \
    --cpd_instance_ns=${PROJECT_CPD_INST_OPERANDS} \
    --extra-vars='{"override_components_meta":{"openpages_instance":{"skip_shutdown_check":false}}}' \
    --extra-vars=cr_name=${OPENPAGES_INSTANCE_NAME}
  • If you want to shut down both the OpenPages service and all OpenPages instances, run the following command:
    cpd-cli manage shutdown \
    --components=openpages \
    --cpd_instance_ns=${PROJECT_CPD_INST_OPERANDS} \
    --force=true \
    --extra-vars=cr_name=${OPENPAGES_SERVICE_CR_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> \
    --type=merge \
    --patch '{"spec":{"shutdown":"true"}}'
  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)

If Watson Studio Runtimes fails to shutdown, it might be caused by the graceful shutdown that Watson Studio Runtimes uses. You can use --force=true to force Watson Studio Runtimes to shut down.



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)
    • OpenSearch (opencontent_opensearch)
    • 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 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)
  • 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 (if no other services require them)
    • Data Refinery
    • Watson Studio Runtimes (ws_runtimes)

    If Watson Studio Runtimes fails to shutdown, it might be caused by the graceful shutdown that Watson Studio Runtimes uses. You can use --force=true to force Watson Studio Runtimes to shut down.



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)

If Watson Studio Runtimes fails to shutdown, it might be caused by the graceful shutdown that Watson Studio Runtimes uses. You can use --force=true to force Watson Studio Runtimes to shut down.



watsonx Assistant

Run the following command to shut down the watsonx Assistant service:

cpd-cli manage shutdown \
--components=watson_assistant \
--cpd_instance_ns=${PROJECT_CPD_INST_OPERANDS}
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)
  • Redis (ibm_redis_cp)
  • Watson data governor (data_governor)
  • Watson Gateway (watson_gateway)


watsonx BI

Run the following command to shut down the watsonx™ BI service:

cpd-cli manage shutdown \
--components=watsonx_bi_assistant \
--cpd_instance_ns=${PROJECT_CPD_INST_OPERANDS}
When you add --include_dependency=true, the following dependent component is also shut down:
  • Inference foundation models (watsonx_ai_ifm)


watsonx Code Assistant

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

cpd-cli manage shutdown \
--components=wca \
--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 (ccs)
  • Inference foundation models (watsonx_ai_ifm)
  • OpenSearch (opencontent_opensearch)


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)
  • Inference foundation models (watsonx_ai_ifm)
  • OpenSearch (opencontent_opensearch)


watsonx Code Assistant for Z Understand

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

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


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.data intelligence

Run the following command to shut down the watsonx.data intelligence service:

cpd-cli manage shutdown \
--components=watsonx_dataintelligence \
--cpd_instance_ns=${PROJECT_CPD_INST_OPERANDS} \
--include_dependency=false


watsonx.data Premium

Run the following command to shut down the watsonx.data Premium service:

cpd-cli manage shutdown \
--components=watsonx_data_premium \
--cpd_instance_ns=${PROJECT_CPD_INST_OPERANDS}
Note: Components, such as wxdAddon, might take a few minutes to shut down.


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}


watsonx Orchestrate

Run the following command to shut down the watsonx Orchestrate service.

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


IBM Software Hub control plane
Important: Only shut down the IBM Software Hub 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 IBM Software Hub, you can proceed to shut down the 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.