Select your language

OpenSearch can be run as a separate service on our Managed Flex Servers. The following guide shows how to set up OpenSearch and manage it using Custom Service Control (CSC).

Introduction

OpenSearch is an open-source search engine and analytics platform licensed under the Apache license. It originated in 2021 from a spin-off of Elasticsearch and is a project of the Linux Foundation.

Hostpoint provides you with OpenSearch as a self-managed service. This means that you have to install and manage the application on your own server, but we offer support in the form of this guide.

Request the installation

To use OpenSearch on your Managed Flex Server, you must first request the installation from us.

To do so, create a support code in the Hostpoint Control Panel as described in this guide.

Then send the support code to our technical support team (support@hostpoint.ch) and ask us to set up OpenSearch on your server.

Our technical support team will then set up the following for you:

  • The OpenSearch installation on your server
  • The directory structure under ~/app/opensearch/ with the subfolders config, data, logs, and tmp
  • The configuration files jvm.options, log4j2.properties, and opensearch.yml in the folder ~/app/opensearch/config/
  • The configuration files are preconfigured with the correct paths for your server.

Configure OpenSearch

Create a CSC service

Now, use the following command to create a new custom service for OpenSearch:

hpservices supervisord add opensearch

On successful execution, you should receive the following response:

successfully created dir for opensearch: /home/username/.services/supervisord/opensearch
successfully created dir for opensearch: /home/username/.services/supervisord/opensearch/log
supervisord service config file written: /home/username/.services/supervisord/opensearch/service.conf

Configure service.conf

A configuration framework is created in the file ~/.services/supervisord/opensearch/service.conf for the new service. OpenSearch requires a few minor adjustments.

Open the file in vim or another editor and copy the following content exactly as shown:

[program:opensearch]
command=/usr/local/lib/opensearch/bin/opensearch
autostart=true
stopwaitsecs=10
stdout_logfile=%(ENV_HOME)s/.services/supervisord/opensearch/log/default.log
stdout_logfile_maxbytes=1MB
stdout_logfile_backups=10
stderr_logfile=%(ENV_HOME)s/.services/supervisord/opensearch/log/default.err
stderr_logfile_maxbytes=10MB
stderr_logfile_backups=10
environment=OPENSEARCH_JAVA_HOME="/usr/local",OPENSEARCH_PATH_CONF="%(ENV_HOME)s/app/opensearch/config",JAVA_VERSION=25,OPENSEARCH_TMPDIR="%(ENV_HOME)s/app/opensearch/tmp"

The environment line contains several important environment variables:

  • OPENSEARCH_JAVA_HOME specifies the path to the Java installation.
  • OPENSEARCH_PATH_CONF points to your configuration directory containing the three configuration files.
  • JAVA_VERSION specifies the Java version to use.
  • OPENSEARCH_TMPDIR defines a fixed directory for temporary files. Without this setting, OpenSearch would create a new random directory under /tmp on every restart, which would result in numerous orphaned directories.

Integration

Using supervisorctl update, you can apply the new configuration to OpenSearch:


supervisorctl update
opensearch: added process group

Then check the status of the service with the following command:

supervisorctl status opensearch

For more detailed information on working with the CSC and the options it offers, refer to the Custom Service Control guide.

Testing

Test your new OpenSearch instance with the following command:

curl http://127.0.0.1:9200/

If everything is configured correctly, you should receive a JSON response with the name and the OpenSearch version.

If not, we recommend that you review the instructions again. If it still doesn't work, please feel free to contact us.

Please note the following:

  1. We do not monitor your OpenSearch instance, which means that we are unfortunately unable to respond to errors or crashes.
  2. During major OpenSearch updates, the service may not restart automatically. In this case, you must restart the service with the command supervisorctl restart opensearch.
  3. Your self-created OpenSearch instance is not displayed in the server overview in the Hostpoint Control Panel.
Please use this form only to provide feedback on the above guide.
For support requests please use this form instead.

 

 

© 2001 - Hostpoint AG
Cookie

Wir verwenden Cookies  🍪

We use Cookies  🍪

Nous utilisons des cookies  🍪

Utilizziamo dei cookie  🍪

Die digitalen Auftritte von Hostpoint (Website, Control Panel, Support Center etc.) verwenden Cookies. Diese werden dazu verwendet, um Daten über Besucherinteraktionen zu sammeln. Wenn Sie auf «Akzeptieren» klicken, stimmen Sie der Verwendung dieser Cookies für Werbezwecke, Website-Analyse und Support zu. Gewisse essenzielle Cookies sind jedoch für eine ordnungsgemässe Funktion dieser Seiten unerlässlich und können deshalb nicht deaktiviert werden. Auch ohne Ihre Zustimmung können gewisse Daten in anonymisierter Form für statistische Zwecke und zur Verbesserung unserer Websites verwendet werden. Bitte beachten Sie unsere Datenschutzerklärung.

Hostpoint's digital presences (website, Control Panel, Support Center, etc.) use cookies. These are used to collect data on visitor interactions. If you click “Accept”, you agree to the use of these cookies for advertising purposes, website analysis and support. However, certain cookies are essential for the proper functioning of these pages and therefore cannot be disabled. Even without your consent, certain data may be used in anonymized form for statistical purposes and to improve our websites. Please note our Privacy policy.

Le sites Web de Hostpoint (site Web, Control Panel, Centre d'assistance, etc.) utilisent des cookies. Ces cookies servent à collecter des données sur les interactions des visiteurs. En cliquant sur «Accepter», vous consentez à l’utilisation de ces cookies à des fins de publicité, d’analyse du site Web et d’assistance. Certains cookies essentiels sont cependant indispensables au bon fonctionnement de notre sites Web et ne peuvent donc pas être désactivés. Même sans votre consentement, certaines données peuvent être utilisées sous forme anonymisée à des fins statistiques et pour améliorer notre sites Web. Veuillez prendre connaissance de notre Déclaration de protection des données.

Le presenze digitali di Hostpoint (sito web, Pannello di controllo, Support Center, ecc.) utilizzano i cookie. Questi vengono utilizzati per raccogliere dati sulle interazioni dei visitatori. Facendo clic su «Accetta», acconsente all’utilizzo di questi cookie per scopi pubblicitari, di analisi del sito web e di supporto. Alcuni cookie essenziali sono tuttavia indispensabili per il corretto funzionamento di questi siti web e pertanto non possono essere disattivati. Anche senza il Suo consenso, determinati dati potrebbero essere utilizzati in forma anonima per fini statistici e per l’ottimizzazione dei nostri siti web. Si prega di tenere conto della nostra Dichiarazione per la pivacy.

Ablehnen
Decline
Refuser
Rifiuta
Akzeptieren
Accept
Accepter
Accetta