Introduction
IBM Content Assistant (ICA) leverages generative AI and retrieval-augmented generation (RAG) to enhance enterprise content management within IBM Cloud Pak® for Business Automation (CP4BA). To store document embeddings and perform high-performance semantic retrieval, ICA requires a reliable vector database.
Starting with CP4BA version 26.0.0 and ICA version 1.0.3, you can seamlessly reuse the OpenSearch operator deployed in your existing CP4BA environment to provision a dedicated OpenSearch cluster configured specifically for vector workloads.
By enabling the OpenSearch k-NN (k-Nearest Neighbors) plugin and configuring a dedicated cluster with appropriate security roles, CP4BA OpenSearch serves as an enterprise-grade vector database for ICA without requiring external infrastructure or additional licensing.
Why This Integration Matters
- Maximize Existing CP4BA Infrastructure: Eliminates the overhead of provisioning, managing, and maintaining standalone external vector databases.
- Native Vector Search Support: The k-NN plugin enables fast cosine similarity, Euclidean distance, and dot product vector searches directly inside OpenSearch.
- Robust Security Posture: Reuses the trusted CP4BA Root CA certificate issuer (
opensearch-tls-issuer) and creates a dedicated GenAI service user (genai-service-user) with least-privilege role mappings for index management (ibm-genai-*).
- Automated Deployment: The IBM Content Assistant deployment scripts (
prerequisites.py) automate certificate creation, OpenSearch Custom Resource (CR) generation, and permission configuration.
What This Blog Covers
This blog walks you through the end-to-end automated setup using the ICA prerequisite scripts:
- Generating configuration templates in
gather mode.
- Generating OpenSearch YAML artifacts in
generate mode.
- Deploying the dedicated OpenSearch cluster and automated permission configuration job.
- Validating connectivity and deploying IBM Content Assistant with CP4BA OpenSearch.
(Note: For environments requiring manual creation of OpenSearch YAML files without scripts, direct references to the official IBM Documentation are provided at the end of this blog.)
Prerequisites and System Requirements
Before you begin configuring OpenSearch for IBM Content Assistant, ensure your environment meets the following prerequisites:
- Software Versions:
- IBM Cloud Pak for Business Automation (CP4BA): Version
26.0.0 or later installed on the cluster.
- IBM Content Assistant (ICA): Version
1.0.3 or later deployment package (cert-kubernetes-content-assistant).
- Co-location / Namespace: CP4BA must be installed in the same OpenShift/Kubernetes cluster where IBM Content Assistant is being deployed.
- Licensing: The license type selected during deployment must be "CP4BA — Cloud Pak for Business Automation" to enable the entitlement for reusing the CP4BA OpenSearch instance as a vector database.
- Storage Class: A valid Block Storage Class with
ReadWriteOnce (RWO) capability must be available in the cluster to allocate persistent storage volumes for OpenSearch data nodes.
- Operator Readiness: The Content Assistant operator must be deployed prior to running prerequisite scripts (using
python3 deploy_operator.py).
- Tooling & Permissions: Cluster administrator privileges (logged into
oc or kubectl CLI) and Python 3.x installed locally.
Step 1: Gathering Configuration with prerequisites.py
The ICA deployment workflow uses the prerequisites.py script to collect environment parameters, configure AI providers, and establish database definitions.
1. Execute Gather Mode
After installing the Content Assistant operator via python3 deploy_operator.py, run the prerequisite script in gather mode:
python3 prerequisites.py gather
When prompted during script execution, select Y for OpenSearch vector database integration:
Use OpenSearch (CP4BA) as your Vector Database? (Y/n) Y
Complete the remaining interactive prompts.
2. Update the Generated Property Files
The script generates three configuration TOML files in the scripts/propertyFile/<namespace>/ directory:
cas_deployment.toml
cas_properties.toml
cas_vector_database.toml
A. cas_deployment.toml (Block Storage Configuration)
When CP4BA OpenSearch is selected, an additional storage parameter is generated. Set this to your cluster's block storage class:
# Block storage class for OpenSearch (only used when OpenSearch is selected as vector database)
BLOCK_STORAGE_CLASS = "<your-block-storage-class>"
B. cas_properties.toml (AI Provider Details)
Configure your LLM connection details as per standard ICA deployment requirements.
C. cas_vector_database.toml (Vector DB Properties)
The script automatically populates the connection endpoints and defaults tailored for the CP4BA OpenSearch cluster:
# Vector Database label
DATABASE_LABEL = "VECTORDB"
# In-cluster service URL for the ICA OpenSearch instance
DATABASE_URL = "https://ica-opensearch.<namespace>.svc.cluster.local:9200"
# Authentication type (BASICAUTH or OIDC)
DATABASE_AUTH_TYPE = "BASICAUTH"
# Enable SSL for Vector Database communication
DATABASE_SSL_ENABLED = true
# Vector Database Type
DATABASE_TYPE = "opensearch"
# Dedicated service username for ICA
DATABASE_USERNAME = "genai-service-user"
# Password for the vector database service user (Must meet strong password complexity requirements)
DATABASE_USER_PASSWORD = "<Set_Your_Secure_Password>"
Security Note: Specify a strong, complex password in DATABASE_USER_PASSWORD. This credential is automatically encoded into the OpenSearch security jobs and secrets during the next step.
Step 2: Generating and Applying OpenSearch Cluster Artifacts
Once the property files are configured with your block storage class and service user credentials, generate the Kubernetes manifests.
1. Execute Generate Mode
Run the prerequisites.py script in generate mode:
python3 prerequisites.py generate
This creates a dedicated opensearch/ folder containing all required Kubernetes YAML manifests under:
cert-kubernetes-content-assistant/scripts/generatedFiles/<namespace>/opensearch/
The generated files include:
opensearch_admin_secret.yaml: Secret containing administrator credentials for the OpenSearch instance.
opensearch_genai_secret.yaml: Secret containing credentials for the genai-service-user.
opensearch_route.yaml: Custom TLS certificate configuration using the CP4BA certificate issuer.
opensearch_cluster.yaml: OpenSearch Custom Resource (CR) configuring the 3-node cluster with the k-NN plugin enabled.
opensearch_cluster_permission_job.yaml: Kubernetes Job that configures OpenSearch security roles, users, and index permissions.
2. Apply YAML Manifests to the Cluster
Navigate to the generated opensearch directory and apply the manifests in order:
cd cert-kubernetes-content-assistant/scripts/generatedFiles/<namespace>/opensearch
Step 2.1: Create Admin and Service User Secrets
kubectl apply -f opensearch_admin_secret.yaml
kubectl apply -f opensearch_genai_secret.yaml
Step 2.2: Create the TLS Route Certificate
kubectl apply -f opensearch_route.yaml
Note on Certificate Trust: This creates a certificate named ica-opensearch-tls-secret. It reuses the opensearch-tls-issuer provisioned by the CP4BA deployment, establishing mutual trust backed by the icp4a-root-ca.
Step 2.3: Deploy the Dedicated OpenSearch Cluster
kubectl apply -f opensearch_cluster.yaml
This deploys the OpenSearch Custom Resource (ica-opensearch), provisioning 3 data/master pods configured with persistent block storage and vector search capabilities enabled.
Step 2.4: Verify OpenSearch Cluster Readiness
Monitor the cluster status until the phase reaches Available and all 3 replicas are running:
kubectl get cluster -n <namespace>
Expected Output:
NAME QUIESCE PHASE VERSION READY REPLICAS
ica-opensearch false Available 3.5.0 3
Verify the pods:
kubectl get pods -n <namespace> | grep ica-opensearch
Expected Output:
ica-opensearch-all-000 1/1 Running 0 7m35s
ica-opensearch-all-001 1/1 Running 0 6m2s
ica-opensearch-all-002 1/1 Running 0 3m20s
ica-opensearch-snapshot-repo-m7zkr 0/1 Completed 0
Step 2.5: Configure Roles and Permissions
Once the OpenSearch cluster pods are fully running and ready, apply the permissions job:
kubectl apply -f opensearch_cluster_permission_job.yaml
This automated job executes the internal security configuration calls to:
- Create the
genai-service-user.
- Define specific index-level privileges for
ibm-genai-* indices (e.g., create_index, indices:data/write/*, indices:data/read/*, and vector query capabilities).
- Map the service user to the designated roles.
Step 3: Validating and Deploying IBM Content Assistant
With the OpenSearch cluster running and security permissions established, finalize the IBM Content Assistant deployment:
1. Execute Validate Mode
Run prerequisites.py in validate mode:
python3 prerequisites.py validate
The validate step performs end-to-end checks to ensure that:
- OpenSearch connectivity and authentication succeed using the
genai-service-user credentials.
- The required index permissions and SSL configurations are operational.
- AI provider endpoints and credentials are verified.
2. Complete Deployment
During the execution of the validate step, the script prompts whether you want to apply the secrets and Custom Resource (CR) to the cluster. Enter Y to apply the configuration.
The Content Assistant operator will then proceed with deploying the IBM Content Assistant service pods, automatically configuring its embedding pipelines and vector storage against the newly provisioned ica-opensearch vector database.
Summary
Reusing the OpenSearch operator from your IBM Cloud Pak for Business Automation deployment provides a streamlined, secure, and native foundation for vector search in IBM Content Assistant. By leveraging the built-in k-NN search plugin and script automation, you eliminate the complexity of maintaining third-party vector databases while ensuring full compliance with CP4BA certificate authority and enterprise security standards.
References & Further Reading
- Official IBM Documentation: