Creating a new Search application service

Learn how to create additional search services to use with the HCL Compass helm chart.

Before you begin

Before you can create a new Search application service, you must first:
  • Untar the HCL Compass solution chart .tgz file.
     $ tar xzvf <hcl-cpmpass-solution-tgz-file>
  • Move the /charts/hcl-compass/ directory.
     $ cd <hcl-cpmpass-solution-tgz-folder>/charts/hcl-compass
     $ ls
     Chart.yaml  licenses  templates  values.yaml

About this task

If you require more than two search services, you must update the HCL Compass helm chart to add the new search application services. In this guide, you will create a new search application service named hcl-compass-search-app3.service and you will add it to the HCL Compass Helm chart.

Procedure

  1. Go to the /hcl-compass/template directory, copy the search-app1-service.yaml file to a new file named search-app3-service.yaml. Edit the search-app3-service.yaml file and replace app1 with app3 everywhere in the file.
  2. Go to the /hcl-compass/template directory, copy the search-app1-deployment.yaml file to a new file named search-app3-deployment.yaml. Edit the search-app3-deployment.yaml file and replace app1 with app3 everywhere in the file.
  3. Go to the /hcl-compass/template directory, copy the search-app1-secrets.yaml file to a new file named search-app3-secrets.yaml. Edit the search-app3-secrets.yaml file and replace app1 with app3 everywhere in the file.
  4. Go to the /hcl-compass/template directory, copy the search-app1-pvc.yaml file to a new file named search-app3-pvc.yaml. Edit the search-app3-pvc.yaml file and replace app1 with app3 everywhere in the file.
  5. Update the search-confimap.yaml file to include the following searchapp3 information:
       data:
        searchHostnames: |-
          ("{{ .Values.searchapp3.hostname }} {{ .Values.searchapp3.port }})
  6. Update the /hcl-compass/template/compass-statefulset.yaml file by adding the hcl-compass-search-app3.service to the initContainers:* key:
            {{- if .Values.searchapp3.service }}
              - name: init-mysearchapp3service
                image: busybox:1.28
                env:
                - name: searchapp3service
                  value: {{ include "hcl-compass.fullname" . }}-search-app3
                command: ['sh', '-c', "until nslookup $(searchapp3service).$(cat /var/run/secrets/kubernetes.io/serviceaccount/namespace).svc.cluster.local; do echo waiting for $(searchapp3service); sleep 2; done"]
            {{- end }}
  7. Create a new yaml file named search3-values.yaml and paste the following
    searchapp3:
      service: true
      replicaCount: 1                     # The replicaCount that can be 1 to n
      hostname: search-app3               # Host name of the docker container runs the Searchapp3 feature
      configSet: (“-username <Username> -password <User password> -dbset <dbset_name> -userdb <User database> -searchPort <Search_port_number>”)
      ports:
        - 8985                            # Search port number.
      db:                                 # Database connection setting
        connectionSet: ("-v <db_vendor> -d <db_name> -s <db_server> -u <user> -p <password> -dbset <dbset_name>" -ip <Database_IP_Address>)     
      properties:
        update: true
        valueSet: (\"-IndexWorkspace [true/false] -MaxHeapSize [val] -RetryAttempts [val] -RetryAttemptsPause [val] -IncrIndexMaxHeapSize [val] -FullIndexMaxHeapSize [val] -ProcRetryAttempts [val] -ProcRetryAttemptsPause [val]\")
    
  8. Add -f search3-values.yaml to the helm install or helm upgrade command.