Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

This section explains the installation and testing of Elasticsearch (ES) in Windows.

...

  1. Download Elasticsearch 8.6.2

  2. Unzip the file in the preferred location.

  3. Open the command prompt as administrator and go to {directory}\elasticsearch-8.6.2\bin path.

  4. Run ES with the elasticsearch.bat command.
    When you run ES in a terminal for the first time, you get a password on the terminal as below. You must note down the password for future reference.

  5. Run https://localhost:9200 in browser with default user 'elastic'. Use the ES password that you get in step4.

    Image RemovedImage RemovedImage AddedImage Added
  6. Configure Zephyr with https://localhost:9200 ES URL.

  7. Stop the Zephyr application and navigate to the {ZephyrDir}/tomcat/webapps/flex/WEB-INF/classes location.

  8. Make changes as mentioned below steps, in the jdbc.properties for ES running on HTTPS.

  9. Uncomment elastic.rest.prop.xpack.security.user and change password after colon(:) with the ES password you got after running ES the first time.

...

  1. Execute the below given CURL to generate an API key:

    Code Block
    curl --location --request POST 'https://localhost:9200/_security/api_key' \
    --header 'Authorization: Basic ZWxhc3RpYzpwYXNzd29yZA==' \
    --header 'Content-Type: application/json' \
    --data-raw '{
        "name": "my-api-key",
        "role_descriptors": {
            "role-zephyr": {
                "cluster": [
                    "all"
                ],
                "index": [
                    {
                        "names": [
                            "zephyr-*"
                        ],
                        "privileges": [
                            "all"
                        ]
                    }
                ]
            }
        }
    }'
  2. Refer to the generated API key response:

    Code Block
    {
        "id": "i_n-KIgBbJC5TV1xKsjr",
        "name": "my-api-key",
        "api_key": "oSkuars1Rh-m4diuKe18hw",
        "encoded": "aV9uLUtJZ0JiSkM1VFYxeEtzanI6b1NrdWFyczFSaC1tNGRpdUtlMThodw=="
    }
  3. The <apiKey> would be base64 encoding of id:api_key i.e. base64 encoding of o3PG-n0Bf9efLymhVjzN:eR9bKD5OTeywOxovC7It2Q. We can use online utility like this(Base64 Encode and Decode - Online ) for base64 encoding.

  4. Build the Zephyr application.

  5. Stop Zephyr. Make changes in jdbc.properties file as mentioned below.

    Add following properties in jdbc.properties file:

    Code Block
    elastic.rest.prop.api.key.id=<id>
    elastic.rest.prop.api.key.secret=<api_key>
  6. Start the Zephyr service.


Install ES as a service in windows

Info

You can also install Elasticsearch on Windows as a service. To do that:

  1. Open the command prompt as a user or admin.

  2. Navigate to the <Elasticsearch>/bin folder.

  3. Run the following command:
    elasticsearch-service.bat install

Now check your Windows services. You will see the running Elasticsearch service.

Connect Zephyr to Elasticsearch

Elasticsearch must be running before you install Zephyr Enterprise. You connect Zephyr to Elasticsearch during product installation. To do this, specify either the IP address of your Elasticsearch server, or its host name depending on the settings you have specified in the elasticsearch.ymlfile.

  • Single-node installation
    Specify http://192.168.0.1:9200, or http://localhost:9200when prompted to configure Elasticsearch.

  • Cluster installation
    Specify the following IP addresses and port numbers when prompted to configure Elasticsearch. Use commas to separate them:

    http://192.168.0.1:9200,http://192.168.0.2:9200,http://192.168.0.3:9200

...