Creating or updating Search services for a database schema

Learn how to use the HCL Compass Helm chart to create or update Search services for a database schema.

The Search services are created based on the database schemas configuration. For each schema, you must create and enable a search service.
  • The hcl-compass helm chart default setting enables the hcl-compass-search-app1 service for the DefectTracking schema and a user database named SAMPL. The settings for the hcl-compass-search-app1 service are defined under the hcl-compass.searchapp1 key in the values.yaml file.
  • The hcl-compass helm chart default setting also enables the hcl-compass-search-app2 service for the EssentialSAFe schema and a user database named SAMPL. The settings for the hcl-compass-search-app2 service are defined under the hcl-compass.searchapp2 key in the values.yaml file. The hcl-compass-search-app2 service is set to disable by default.
Updating existing search services
You can update existing search services as you need. Each Search setting is defined with the following format in the values.yaml file:
hcl-compass:
  searchapp#:                         # You can set "#" as a value 1 to N.
    service: <true/false>             # You can enable or disable the search service by setting to true or false.
    replicaCount: <num_replicaCount>  # The replicaCount that can be 1 to n
    hostname: <host_name>             # Host name of the docker container runs the Search feature
    configSet: (“-username <Username> -password <User password> -dbset <dbset_name> -userdb <User database> -searchPort <search_port_number>”)
    port: <search_port>               # Search port number
    db:                               # Database connection setting
      connectionSet: ("-v <db_vendor> -d <db_name> -s <db_server> -u <user> -p <password> -dbset <dbset_name>")
    properties:
      update:false
      valueSet: (\"-IndexWorkspace [true/false] -MaxHeapSize [val] -RetryAttempts [val] -RetryAttemptsPause [val] -IncrIndexMaxHeapSize [val] -FullIndexMaxHeapSize [val] -ProcRetryAttempts [val] -ProcRetryAttemptsPause [val]\")

The hcl-compass.db.connectionSet should be based on your database connections.

You must update the hcl-compass-search-app1 and, if it applies to your configuration, the hcl-compass-search-app2 service configuration setting based on your database schema and user database.

Updating the default Search Properties values
The full text search feature is installed with default properties values and it sets the CPSolr.MaxHeapSize, CPTool.IncrIndexMaxHeapSize, and CPTool.FullIndexMaxHeapSize values to 4096. If you need to update those default properties values (for example, in searchapp1, set searchapp1.properties.update to true and set your updated properties values in searchapp1.properties.valueSet.
## Compass Database settings
hcl-compass:

## Compass search configuration settings for searchapp1 (DefectTracking).
  searchapp1:
    properties:
      update: true
      valueSet: (\"-IndexWorkspace [true/false] -MaxHeapSize [val] -RetryAttempts [val] -RetryAttemptsPause [val] -IncrIndexMaxHeapSize [val] -FullIndexMaxHeapSize [val] -ProcRetryAttempts [val] -ProcRetryAttemptsPause [val]\")
Disabling the hcl-compass-search-app1 service
Set the value for hcl-compass-search-app1.service to false.
      hcl-compass:
        searchapp1:
          service: false
Enabling the hcl-compass-search-app2 service
Set the value for hcl-compass-search-app2.service to true.
      hcl-compass:
        searchapp2:
          service: true
          db:                               #Database connection setting
            connectionSet: "-v <db_vendor> -d <db_name> -s <db_server> -u <user> -p <password> -dbset <dbset_name>"
Add a new database connection to the hcl.compass.db.connectionSet:
"-v <db_vendor> -d <db_name> -s <db_server> -u <user> -p <password> -dbset <dbset_name>"
Binding the Search data entity file to the Pods for Search Configuration
To use new search data entity files during the search configuration, use the following instructions to bind your search data entity files to the pod container. The hcl-compass helm chart will configure the search based on your new search data entity files.
  1. Create a new folder /path/to/your/search_data_entity:
    $ mkdir /path/to/your/search_data_entity
  2. Copy your search data entity file based on Entity_<dbset_name>_<User_database>.txt file format, where the <dbset_name> is the name of the database connection and <User_database> is the database name to the */path/to/your/search_data_entity folder.
    $ cp Entity_<dbset_name>_<User_database>.txt /path/to/your/search_data_entity/    
  3. Add all search data entity files from the */path/to/your/search_data_entity folder to confiMap file named entity_file.
    $ kubectl create cm entity-file --from-file=/path/to/your/search_data_entity/ --namespace [namespace_name]
  4. Check to ensure that the confiMap Entity_file is created and that it has the search data entity files that are contained in */path/to/your/search_data_entity.
    $ kubectl get cm entity-file -o yaml --namespace [namespace_name]
  5. Create entity_file.yaml. Set the value true to enable the entity file and set the name of confiMap to entity_file.
          hcl-compass:
            search:
              entityFile:
               enabled: false
               path: "/path/to/your/search_data_entity/""
               enabled: true
               configMapName: entity-file
  6. Add -f entity_file.yaml to the helm install or helm upgrade command.
If you require more than one search service and database connections, you can update the hcl-compass helm chart to add the new search application services and new database connection data. The following example illustrates when two database connections exist with two search services for each database connection. In this case, one is for the Defect Tracking schema, and the other is for the EssentialSAFe schema. You can create a new values .yaml file called db_values.yaml.
  1. Create db.yaml and paste the following.
## Compass Database settings
hcl-compass:
  db:
    connectionSet: ("-v Oracle -d xe -s oracle_host -u DefMaster -p c0mpass -dbset DefectTracking" "-v Oracle -d xe -s oracle_host -u SafeMaster -p c0mpass -dbset EssentialSAFe")

## Compass search configuration settings for searchapp1 (DefectTracking).
## searchapp1 will be used for the DefectTracking dbset.
  searchapp1:
    service: true
    replicaCount: 1
    hostname: search-def
    configSet: ("-username admin -password "" -dbset DefectTracking  -userdb SAMPL -searchPort 8983")
    port: 8983
    db:
      connectionSet: ("-v Oracle -d xe -s oracle_host -u DefMaster -p c0mpass -dbset DefectTracking")

## Compass search configuration settings for searchapp1 (EssentialSAFe).
## searchapp2 will be used for the EssentialSAFe dbset.
  searchapp2:
    service: true
    replicaCount: 1
    hostname: search-EssentialSAFe
    configSet: ("-username admin -password "" -dbset EssentialSAFe  -userdb SAMPL -searchPort 8984")
    port: 8984
    db:
      connectionSet: ("-v Oracle -d xe -s oracle_host -u SafeMaster -p c0mpass -dbset EssentialSAFe")

## Disable the internal oracle database service
  service:
    enabled:
    oracle: false

Add -f db_values.yaml to the helm install or helm upgrade command.