Configuring the connection from the microservice to the Elasticsearch search engine

Configure the location of the Elasticsearch search engine, as well as how to access it, by passing command line switches in the microservice installation or startup script. (You can also set them on the command line when you run the actual script.)

Procedure

  1. Access the bin\ subdirectory of the microservice.
  2. Do one of the following:
    • If you are installing the microservice on a Windows machine, open installService.ps1 for editing.
    • If you are installing the microservice on a Unix machine, open start.sh for editing.
  3. Modify the script to set the following property-value pairs:
    PropertyValue descriptionDefault if not specified
    es.hostThe name of the host on which your Elasticsearch instance runs localhost
    es.portThe number of the port on which your Elasticsearch instance runs 9200
    es.usernameIf the Elasticsearch instance is secured, the name of a user who can access the Elasticsearch instance none (Elasticsearch instance is not secured)
    es.passwordIf the Elasticsearch instance is secured, the password of the user abovenone (Elasticsearch instance is not secured)
    es.schemeIf you connect to the Elasticsearch instance through HTTPS, https none (connect through HTTP)
    es.ingest.usernameIf you connect to the Elasticsearch instance through Basic Authentication (typically to connect to an external Elasticsearch like Elastic Cloud), the name of a user who can access the Elasticsearch ingest node none (no Basic Authentication set up for the Elasticsearch instance)
    es.ingest.passwordIf you connect to the Elasticsearch instance through Basic Authentication, the password of the user abovenone (no Basic Authentication set up for the Elasticsearch instance)
  4. Save and close your script.