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 shutdowncommand.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
--previewoption when you run the command. You can also run the following commands to get more information:- Run the
cpd-cli manage list-dependentscommand to see which components are dependent on the component you want to shut down. - Run the
cpd-cli manage get-cr-statuscommand to see which components are running in the namespace.
- Run the
--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
=trueto 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 fromshutdownInProgresstoshutdown. When you restart a service, any instances that were forcibly shut down restart automatically. --include_dependency- Specify
--include_dependency=trueto shut down any dependencies when you shut down the main component.You can run the
cpd-cli manage list-dependentscommand to see which components are dependent on the component you want to shut down. --preview- Specify
--preview=trueto preview the commands that will run when you issue this CLI command.
For more information about the
cpd-cli manage shutdowncommand, see manage shutdown in thecpd-clicommand reference.
oc patch shutdown command
oc patchshutdown command- Some services support shutdown and restart but do not support the use of the
cpd-cli manage shutdowncommand. To shut down these services, you run theoc patchcommand 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.
Procedures
Ensure that you source the environment variables before you run the commands in this task.
- Log the
cpd-cliin to the Red Hat OpenShift Container Platform cluster:${CPDM_OC_LOGIN}Remember:CPDM_OC_LOGINis an alias for thecpd-cli manage login-to-ocpcommand. - Shut down any of the following services as needed.
Common core services
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
--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.
- Run the following command to list all of the Cognos
Analytics service instances on the
cluster:
oc get caserviceinstance --all-namespacesIdentify the service instances that are associated with the instance of Cognos Analytics that you want to shut down.
- 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 - Replace
- 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}
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
--include_dependency option to true, the following dependent components
also are shut down:- Common core services (
ccs) - Redis
Data Gate
Shut down the Data Gate service instances before you shut down the service.
- 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} - 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"}}}' - 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
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
- If your deployment has instances of DataStage running on remote physical
locations, you must shut them down manually.
- Log in to Red Hat
OpenShift Container Platform as a user with sufficient permissions to
complete the task.
${REMOTE_OC_LOGIN}Remember:REMOTE_OC_LOGINis an alias for theoc logincommand when you are connecting to a remote cluster. - 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}}' - After you shut down the DataStage instances on the remote
cluster, log the
cpd-cliin to the cluster where the primary instance of Cloud Pak for Data is installed.${CPDM_OC_LOGIN}Remember:CPDM_OC_LOGINis an alias for thecpd-cli manage login-to-ocpcommand. - Log the
cpd-cliin to the Red Hat OpenShift Container Platform cluster:
- Log in to Red Hat
OpenShift Container Platform as a user with sufficient permissions to
complete the task.
- 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=trueTo shut down DataStage Enterprise Plus, set the
--componentsoption todatastage_ent_plus.
--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.
- Shut down the Data Virtualization service instance:
- Set the
INSTANCE_PROJECTto 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 theexportcommand:echo $PROJECT_CPD_INSTANCE_TETHERED
- If the service instance is in the operands project,
run:
- 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=mergeNote: If you run this command with thetrueoption, 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.
- Set the
- Run the following command to shut down the Data Virtualization
service:
When you set thecpd-cli manage shutdown \ --components=dv \ --cpd_instance_ns=${PROJECT_CPD_INST_OPERANDS} \ --include_dependency=true--include_dependencyoption 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. - Common core services (
Db2
Before you can shut down the Db2 service, you must shut down all instances.
- Run the following command to retrieve a list of your
instances:
oc get db2uFind the
instance_idof the instances that you want to shut down. - Shut down each instance by using the following commands for each
instance_id.- Export the
instance_idof your instance as an environment variable:export INSTANCE=<instance_id> - 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"}}}' - Wait for the db2ucluster to show
Readystatus underSTATEandShutdownstatus underMAINTENANCESTATE. - Check that the engine pod and the etcd pod have been terminated.
- Export the
- When all instances are shut down, run the following command to shut down the
Db2
service:
When you set thecpd-cli manage shutdown \ --components=db2oltp \ --cpd_instance_ns=${PROJECT_CPD_INST_OPERANDS} \ --include_dependency=true--include_dependencyoption 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.
- 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}" - 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=mergeNote: If you run this command with thetrueoption, 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. - Run the following command to shut down the Db2
Big SQL
service:
When you set thecpd-cli manage shutdown \ --components=bigsql \ --cpd_instance_ns=${PROJECT_CPD_INST_OPERANDS} \ --include_dependency=true--include_dependencyoption 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=trueWhen 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.
- Run the following command to retrieve a list of your
instances:
oc get db2uFind the
instance_idof the instances that you want to shut down. - Shut down each instance by using the following commands for each
instance_id.- Export the
instance_idof your instance as an environment variable:export INSTANCE=<instance_id> - 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"}}}' - Wait for the db2ucluster to show
Readystatus underSTATEandShutdownstatus underMAINTENANCESTATE. - Check that the engine pod and the etcd pod have been terminated.
- Export the
- When all instances are shut down, run the following command to shut down the
Db2 Warehouse
service:
When you set thecpd-cli manage shutdown \ --components=db2wh \ --cpd_instance_ns=${PROJECT_CPD_INST_OPERANDS} \ --include_dependency=true--include_dependencyoption 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 shutdowncommand. EDB Postgres was redesigned to shut down safely.
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:
- 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 -
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
- Run the following
command:
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=trueWhen you set the --include_dependency option to true, the
following dependent component also is shut down:- informix
--force=true when you run the cpd-cli
manage
shutdown command.MANTA Automated Data Lineage
cpd-cli manage shutdown \
--components=mantaflow \
--cpd_instance_ns=${PROJECT_CPD_INST_OPERANDS}MongoDB
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
--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.
- Run the following command to list all of the Planning Analytics service instances on the
cluster:
oc get paserviceinstance --all-namespacesIdentify the service instances that are associated with the instance of Planning Analytics that you want to shut down.
- 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 - Replace
- 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 thecpd-cli manage shutdowncommand with the--forceoption set totrueto 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=trueWhen 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
--include_dependency option to true, the
following dependent component also is shut down:- common core services
Watson Discovery
- Check whether the Watson Discovery
instance is healthy by running the following
command:
oc get wdall | grep -v NAME | column -t | sortYou 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-rabbitmqNote: If the Watson Discovery instance is not healthy, do not shutdown the Watson Discovery service. If the Watson Discovery instance is healthy, run the following command to shut down the Watson Discovery service.
When you set thecpd-cli manage shutdown \ --components=watson_discovery \ --cpd_instance_ns=${PROJECT_CPD_INST_OPERANDS} \ --include_dependency=true--include_dependencyoption 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)
- Cloud Native PostgreSQL (
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
--include_dependency option to true, the
following dependent component also is shut down:- common core services
Watson Machine Learning Accelerator
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)
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.
- Get the name of the Data Refinery custom
resource:
oc get DataRefinery --namespace=${PROJECT_CPD_INST_OPERANDS} - If the name of the Data Refinery custom resource is
datarefinery-sample, create a file namedrefinery-cr.yamlin yourworkdirectory with the following content:override_components_meta: datarefinery: cr_name: datarefinery-sample - 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
--include_dependencyoption to true, the following dependent components are also shut down:- common core services
- Watson Studio Runtimes
(
ws_runtimes)
- The name of the Data Refinery custom
resource is
- Get the name of the Data Refinery custom
resource:
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}
--force=true to the command.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
--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-configcommand 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 patchcommand to shut down the watsonx Assistant service:- Go to the project where watsonx Assistant is
installed:
oc project ${PROJECT_CPD_INST_OPERANDS} - 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}'` -
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
- Go to the project where watsonx Assistant is
installed:
- 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
--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
--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.
- Run the following command to shut down the service (the
wxdAddoncomponent):cpd-cli manage shutdown \ --components=watsonx_data \ --cpd_instance_ns=${PROJECT_CPD_INST_OPERANDS}
wxd or
wxdEngine), you can use oc patch commands. For example,
use these steps to shut down wxdEngine.- 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 - 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 - 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
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.
- 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"}}' - 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.
- 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 -uThe command returns a list of projects.
- For each project returned by the preceding command, complete the
following steps:
- Change to the
project:
oc project project-name - 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 doneThe 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.
- 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 - Repeat the preceding steps for each project that was returned in the output for step 1.
- Change to the
project:
- Run the following command to see which projects have pods that are
under the control of the scheduling service: