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
- Determine a password for the OpenSearch instance deployed by the operator.
- 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. - Create a secret by using the following command:
oc apply -f os-secret.yml
- Determine an authentication key for the client ingestion server deployed by the operator.
- 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. - Create a secret by using the following command:
oc apply -f client-ingestion-secret.yml
- Determine a username and password for the search wrapper. You need to use these credentials when you configure the ZAssistantDeploy connection.
- 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
- Create a secret by using the following command:
oc apply -f wrapper-secret.yml
- 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
- 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
is the namespace which contains watsonx Orchestrate.$PROJECT_CPD_INST_OPERANDS
- Retrieve the username and password by running the following commands:
- Create a secret by using the following command:
oc apply -f cpd-secret.yml
- 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}"
- 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.comNote: 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.
- CLUSTER_DOMAIN - Enter the value by using the output from the previous
step. For example, clusterDomain: apps.mycluster.mysite.com
- Deploy the ZAssistantDeploy service by using
the following command:
oc apply -f deploy-zad.yml
Results
oc get pods -n wxa4z-zad