Deploying the ZAssistantDeploy service on your cluster

You deploy the ZAssistantDeploy service on your cluster to use the OpenSearch capability that allows you to ingest your documents into your search database.

Procedure

  1. Determine a password for the OpenSearch instance deployed by the operator.
  2. Place the following YAML in the os-secret.yml file:
    apiVersion: v1
    kind: Secret
    metadata:
      name: opensearch-creds
      namespace: wxa4z-zad
    type: Opaque
    stringData:
      password: <OPENSEARCH_PASSWORD>
    
    Make sure to update the OpenSearch password.
  3. Create a secret by using the following command:
    oc apply -f os-secret.yml
  4. Determine an authentication key for the client ingestion server deployed by the operator.
  5. Place the following YAML in the client-ingestion-secret.yml file.
    apiVersion: v1
    kind: Secret
    metadata:
     name: client-ingestion-authkey
     namespace: wxa4z-zad
    type: Opaque
    stringData:
     authkey: <CLIENT_INGESTION_AUTHKEY>
    Make sure to update the client ingestion authkey.
  6. Create a secret by using the following command:
    oc apply -f client-ingestion-secret.yml
  7. Determine a username and password for the search wrapper.
    You need to use these credentials when you configure the ZAssistantDeploy connection.
  8. Place the following YAML code in the wrapper-secret.yml file:
    apiVersion: v1
    stringData:
     username: <wrapper username>
     password: <wrapper password>
    kind: Secret
    metadata: 
     name: wrapper-creds
     namespace: wxa4z-zad
    type: Opaque
  9. Create a secret by using the following command:
    oc apply -f wrapper-secret.yml
  10. Copy the following YAML code into the cpd-secret.yml file:
    kind: Secret 
    apiVersion: v1
    metadata: 
      name: cpd-creds 
      namespace: wxa4z-zad 
    stringData: 
      username: <cpd username> 
      password: <cpd password> 
    type: Opaque
    1. Retrieve the username and password by running the following commands:
      oc -n $PROJECT_CPD_INST_OPERANDS get secret ibm-iam-bindinfo-platform-auth-idp-credentials -o go-template="{{.data.admin_username | base64decode}}"
      oc -n $PROJECT_CPD_INST_OPERANDS get secret ibm-iam-bindinfo-platform-auth-idp-credentials -o go-template="{{.data.admin_password | base64decode}}"
      where $PROJECT_CPD_INST_OPERANDS is the namespace which contains watsonx Orchestrate.
  11. Create a secret by using the following command:
    oc apply -f cpd-secret.yml
  12. Get the domain used for routes on your cluster by using the following command:
    oc -n openshift-ingress-operator get ingresscontroller default -o jsonpath="{.status.domain}"
  13. Copy the following YAML code into the deploy-zad.yml file.
    apiVersion: wxa4z.watsonx.ibm.com/v1
    kind: ZAssistantDeploy
    metadata:
      name: zassistantdeploy
      namespace: wxa4z-zad
    spec:
      namespace: wxa4z-zad
      clusterDomain: <CLUSTER_DOMAIN>
    
      assistantBootstrap:
        enabled: false
        assistantName: <ASSISTANT_NAME>
        cpdUrl: <CPD_URL>
        secretName: cpd-creds
        wrapperSecretName: wrapper-creds
        wrapperUrl: <WRAPPER_URL>
        multiturn: true
        resources:
          requests:
            cpu: "100m"
            memory: "100Mi"
    
      opensearch:
        secretName: opensearch-creds
    
        persistence:
          enabled: true
          storageClass: <CLUSTER_STORAGECLASS>
          accessModes:
            - ReadWriteOnce
          size: 24Gi
    
      wrapper:
        secretName: wrapper-creds
        resources:
          requests:
            cpu: "4"
            memory: "4Gi"
          limits:
            cpu: "4"
            memory: "8Gi"
    
      clientIngestion:
        secretName: client-ingestion-authkey
    
        resources:
          limits:
            cpu: 2
            memory: 2Gi
            nvidia.com/gpu: "1"
          requests:
            cpu: 1
            memory: 1Gi
            nvidia.com/gpu: "1"
        pvc:
          storageClass: <CLUSTER_STORAGECLASS>
          enabled: true
          size: 24Gi
    Update the following fields:
    • CLUSTER_DOMAIN - Enter the value by using the output from the previous step. For example, clusterDomain: apps.mycluster.mysite.com
      Note: The cluster domain update is required only if you want to use the server certificate verification when ingesting data.
    • CLUSTER_STORAGECLASS - Enter a file-based storage class.
    • Under assistantBootstrap, update the following fields:
      • Enabled: Update the value to True to use the assistant bootstrap feature.
      • ASSISTANT_NAME: Enter the name of assistant that you want to create.
      • CPD_URL: Enter the CPD URL where you want to create the assistant.
      • WRAPPER_URL: Enter the URL of the search wrapper that you will be using for conversational search in the bootstrapped assistant.
        Note: Set the WRAPPER_URL to the empty string ("") or omit this field to use the local search wrapper.
      Update the value to True to use the ZAssistantDeploy feature.
  14. Deploy the ZAssistantDeploy service by using the following command:
    oc apply -f deploy-zad.yml

Results

The deployment of the ZAssistantDeploy service begins and might take up to 15 minutes or more for the images to download and the deployment to complete. However, you can check the status by running the following command:
oc get pods -n wxa4z-zad