Helix Search deployment and installation

This section describes the deployment and installation process for the Helix Core Search API, Helix Core server, and Elasticsearch. The Helix Search service can be deployed in a variety of ways depending on the customers use-case, see Installation scenarios.

Deployment

Helix Search requires the deployment of a number of elements:

Deploy the p4search service

The p4search service is a wrapped JAR that runs as a Windows or Linux service. It uses a Java properties file config.properties to store the services configuration details and connection information for the Helix server and Elasticsearch instance.

Installer layout

The directory layout after installation depends on the operating system but is typically located under:

  • Linux: /opt/perforce/helix-p4search/...
  • Windows: c:\Program Files\Perforce\helix-p4search\...
  - etc/
    - config.properties                        (configuration information for the p4search service)
    - debug-log4j2.xml                         (sample log configuration file for debug level) 
    - info-log4j2.xml                          (sample log configuration file for debug info) 
    - log4j2.xml                               (standard log configuration file) 
    - mapping.json                             (standard Elasticsearch field mappings) 
    - settings.json                            (standard Elasticsearch index settings) 
  - jre/                                       (Java RunTime)
  - lib/
    - p4search-xxx.jar                         (P4Search service)
    - p4search-filter-7.6.2-xxxx.zip           (Elasticsearch filter plugin for Elasticsearch 7.6.2)
    - p4search-filter-7.8.1-xxxx.zip           (Elasticsearch filter plugin for Elasticsearch 7.8.1)
    - p4search-filter-7.9.3-xxxx.zip           (Elasticsearch filter plugin for Elasticsearch 7.9.3)
    - p4search-filter-7.10.2-xxxx.zip          (Elasticsearch filter plugin for Elasticsearch 7.10.2)
    - p4search-filter-7.11.2-xxxx.zip          (Elasticsearch filter plugin for Elasticsearch 7.11.2)
    - p4search-filter-7.12.1-xxxx.zip          (Elasticsearch filter plugin for Elasticsearch 7.12.1)
    - p4search-filter-7.13.4-xxxx.zip          (Elasticsearch filter plugin for Elasticsearch 7.13.4)
    - p4search-filter-7.14.2-xxxx.zip          (Elasticsearch filter plugin for Elasticsearch 7.14.2)
    - p4search-filter-7.15.2-xxxx.zip          (Elasticsearch filter plugin for Elasticsearch 7.15.2)
  - log/
    - error.log                                (service wrapper error log)
    - p4search.log                             (P4Search service log)
  - sbin/
    - p4search                                 (service wrapper)
    - p4search.vmoptions                       (wrapper JVM options)
  - tmp/                                       (temporary file directory)

Deploy the Elasticsearch plugin p4search-filter

To deploy the Elasticsearch plugin p4search-filter:

  1. Remotely login to the Elasticsearch host.
  2. Change directory so you are in the Elasticsearch installation directory, typically /usr/share/elasticsearch/.
  3. To install the plugin, look in the p4search-installation/lib directory for the exact filename. For example, p4search-filter-7.6.2-2020.1.1955291.zip.
  4. Where:

    • 7.6.2 is the Elasticsearch version supported
    • 2020.1 is the Helix Search version supported
    • 1955291 is the changelist number of the file

  5. Install the plugin either:
    • from a local file, for example:
    • bin/elasticsearch-plugin install file:///path/to/plugin/p4search-filter-7.6.2-2020.1.1955291.zip

    • or using the Helix Search endpoint, for example:
    • bin/elasticsearch-plugin install http://<p4search host>:<p4search port>/api/v1.2/plugin/p4search-7.6.2-2020.1.1955291.zip

  • Restart Elasticsearch after installing the plugin.
  • Tip

    Advanced users: allocate more memory to Elasticsearch by changing the jvm.options file using an editor, defaults are -Xms8g and -Xmx4096m

    • Linux:/opt/perforce/helix-p4search/sbin/p4search.vmoptions
    • Windows:c:\Program Files\Perforce\helix-p4search/sbin/p4search.vmoptions

    For information on Elasticsearch plugin installation and testing, see the elastic.co documentation.

    Creating users required by external services

    You must create the Helix server users and tickets required by the external services.

    Creating the Perforce Service user

    Important
    • At security level 5 and above, the long lived ticket must be a local ticket and not an all hosts ticket.

    • Security level 6 requires the Helix server to have a valid server spec with the AllowedAddresses field set. For information about Security level 6, see Server security levels in the Helix Core Server Administrator Guide.

    The Perforce Service user can be a Standard or Service user with a minimum of admin permissions to authorize the proxy connection at security level 5 and above.

    The service user name and ticket details are required when you set the following configurables:

    • com.perforce.p4search.core.service.p4user

    • com.perforce.p4search.core.service.p4ticket

    Creating the index user (optional)

    The index user must have admin permissions to read content from Helix server, to set file attributes, and to install extensions. If the index user is undefined, the Perforce Service user is used.

    The index user name and ticket details are required when you set the following configurables:

    • com.perforce.p4search.core.index.p4user

    • com.perforce.p4search.core.index.p4ticket

    Creating the anonymous search user (optional)

    The anonymous search user is used for unsupported search web pages. The anonymous user needs read permission in the Helix server for the areas of the depot you want to allow search result access to.

    The anonymous user name and ticket details are required when you set the following configurables:

    • com.perforce.p4search.core.anonymous.p4user

    • com.perforce.p4search.core.anonymous.p4ticket

    Windows Helix Search install

    To install the Helix Search, Helix server, and Elasticsearch services:

    1. Check that you have met the prerequisites before starting the installation, see Prerequisites.
    2. Download the Helix Search installer from the Helix Search download page on the Perforce website.
    3. Double click on the installer to start it and confirm that you want the installer to make changes to your computer when prompted.
    4. To start the installation click Next >:
    5. Select the folder you want install to and click Next >:
    6. Configure the Helix Search service and click Next >.
    7. By default, the Helix Search service is public to machines on the same network.

      Tip

      You can configure the Helix Search web service to use HTTPS, see SSL security for Helix Search.

    8. Configure the Helix server and click Next >:
    9. Configure the Elasticsearch connection and click Next >:
    10. To complete the installation click Finish.
    11. To configure Helix Search do one of the following as an admin user:
      • Open the configuration web page using the connection details you set for the Helix Search service during the installation.
      • Edit the config.properties file in the installation directory.

    Linux Helix Search install

    1. Configure the Perforce package repository, on the server hosting Helix Search.

      As root, follow the instructions for your OS distribution:

    2. Import the Perforce package signing key, on the server hosting Helix Search.

      Follow the instructions for your OS distribution:

      For information about how to verify the authenticity of the signing key, see: https://www.perforce.com/perforce-packages

    3. Install the Helix Search package on the server hosting Helix Search.

      Follow the instructions for your OS distribution:

    4. Restart Helix Search service:
    5. Follow the instructions for your OS distribution:

    6. Check that everything is green by navigating to:
    7. http://myhelixsearch.mydomain.com:1601/p4search/settings/status

    8. To configure Helix Search do one of the following as an admin user:
      • Open the configuration web page using the connection details you set for the Helix Search service during the installation.
      • Edit the config.properties file in the installation directory.

    Useful topics