Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds installation and configuration section #2062

Closed
wants to merge 6 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
layout: default
title: Configuration
nav_order: 5
nav_order: 10
---

# OpenSearch configuration
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,24 @@
---
layout: default
title: Install OpenSearch
nav_order: 2
redirect_from:
- /opensearch/install/
has_children: true
title: Install and Configure OpenSearch
nav_order: 5
---

# Install and configure OpenSearch

OpenSearch has two installation options at this time: Docker images and tarballs.
OpenSearch has the following installation options:

- [Docker]
- [Tarball]
- [RPM]
- [Ansible]
- [Helm]
- [Windows]

For OpenSearch configuration instructions, see [Configuration]

OpenSearch does not support direct version downgrades. If your environment must be downgraded, we recommend using snapshots to create a restore point, then restoring the snapshot to a cluster built with the target version. To learn more about restore points, see [Restore snapshots]({{site.url}}{{site.baseurl}}/opensearch/snapshots/snapshot-restore#restore-snapshots).
{: .note }
{: .note }

For OpenSearch configuration instructions, see [Configuration]

Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ layout: default
title: Ansible playbook
parent: Install OpenSearch
nav_order: 60
redirect_from:
- /opensearch/install/ansible/
---

# Ansible playbook
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,16 @@
layout: default
title: Docker
parent: Install OpenSearch
nav_order: 3
nav_order: 5
redirect_from:
- /opensearch/install/docker/
---

# Why use OpenSearch with Docker?

[Docker](https://www.docker.com/) greatly simplifies the process of configuring and managing your OpenSearch clusters. You can pull official images from [Docker Hub](https://hub.docker.com/u/opensearchproject) or [Amazon Elastic Container Registry (Amazon ECR)](https://gallery.ecr.aws/opensearchproject/) and quickly deploy a cluster using [Docker Compose](https://github.com/docker/compose) and any of the sample Docker Compose files included in this guide. Experienced OpenSearch users can further customize their deployment by creating a custom Docker Compose file.

Docker containers are portable and will run on any compatible host that supports Docker (such as Linux, MacOS, or Windows). The portability of a Docker container offers flexibility over other installations methods, like [RPM]({{site.url}}{{site.baseurl}}/opensearch/install/rpm/) or a manual [Tarball]({{site.url}}{{site.baseurl}}/opensearch/install/tar/) installation, which both require additional configuration after downloading and unpacking.
Docker containers are portable and will run on any compatible host that supports Docker (such as Linux, MacOS, or Windows). The portability of a Docker container offers flexibility over other installations methods, like [RPM]({{site.url}}{{site.baseurl}}/install-and-configure/install/rpm/) or a manual [Tarball]({{site.url}}{{site.baseurl}}/install-and-configure/install/tar/) installation, which both require additional configuration after downloading and unpacking.

This guide assumes that you are comfortable working from the Linux command line interface (CLI). You should understand how to input commands, navigate between directories, and edit text files. For help with [Docker](https://www.docker.com/) or [Docker Compose](https://github.com/docker/compose), refer to the official documentation on their websites.
{:.note}
Expand All @@ -28,7 +30,7 @@ If you need to install Docker Compose manually and your host supports Python, yo

## Important host settings

Before launching OpenSearch you should review some [important system settings]({{site.url}}{{site.baseurl}}/opensearch/install/important-settings/){:target='\_blank'} that can impact the performance of your services.
Before launching OpenSearch you should review some [important system settings]({{site.url}}{{site.baseurl}}/install-and-configure/install/index/#important-settings/){:target='\_blank'} that can impact the performance of your services.
1. Disable memory paging and swapping performance on the host to improve performance.
```bash
sudo swapoff -a
Expand Down Expand Up @@ -454,7 +456,7 @@ COPY --chown=opensearch:opensearch my-root-cas.pem /usr/share/opensearch/config/

## Related links

- [OpenSearch configuration]({{site.url}}{{site.baseurl}}/opensearch/configuration/)
- [OpenSearch configuration]({{site.url}}{{site.baseurl}}/install-and-configure/configuration/)
- [Performance analyzer]({{site.url}}{{site.baseurl}}/monitoring-plugins/pa/index/)
- [Install and configure OpenSearch Dashboards]({{site.url}}{{site.baseurl}}/dashboards/install/index/)
- [About the security plugin]({{site.url}}{{site.baseurl}}/security-plugin/index/)
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ layout: default
title: Helm
parent: Install OpenSearch
nav_order: 6
redirect_from:
- /opensearch/install/helm/
---

# Run OpenSearch using Helm
Expand Down
96 changes: 96 additions & 0 deletions _install-and-configure/install/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
---
layout: default
title: Install OpenSearch
nav_order: 1
redirect_from:
- /opensearch/install/
- /opensearch/install/compatibility/
- /opensearch/install/important-settings/
---

# Install OpenSearch

This section details how to install OpenSearch on your host, including which operating system's are [compatible with OpenSearch](#operating-system-compatibility), which [ports to open](#network-requirements), and which [important settings](#important-settings) to configure on your host.

## Operating system compatibility

We recommend installing OpenSearch on Red Hat Enterprise Linux (RHEL) or Debian-based Linux distributions that use [systemd](https://en.wikipedia.org/wiki/Systemd), such as CentOS, Amazon Linux 2, or Ubuntu Long-Term Support (LTS). OpenSearch should work on most Linux distributions, but we only test a handful. We recommend RHEL 7 or 8, CentOS 7 or 8, Amazon Linux 2, or Ubuntu 16.04, 18.04, or 20.04 for any version of OpenSearch. OpenSearch also supports Windows Server 2019.

Avoid using a network file system for node storage in a production workflow. Using a network file system for node storage can cause performance issues in your cluster due to factors such as network conditions (like latency or limited throughput) or read/write speeds. You should use solid-state drives (SSDs) installed on the host for node storage where possible.
{: .note}

## Java compatibility

The OpenSearch distribution for Linux ships with a compatible [Adoptium JDK](https://adoptium.net/) version of Java in the `jdk` directory. To find the JDK version, run `./jdk/bin/java -version`. For example, the OpenSearch 1.0.0 tarball ships with Java 15.0.1+9 (non-LTS), OpenSearch 1.3.0 ships with Java 11.0.14.1+1 (LTS), and OpenSearch 2.0.0 ships with Java 17.0.2+8 (LTS). OpenSearch is tested with all compatible Java versions.

OpenSearch Version | Compatible Java Versions | Bundled Java Version
:---------- | :-------- | :-----------
1.0 - 1.2.x | 11, 15 | 15.0.1+9
1.3.x | 8, 11, 14 | 11.0.14.1+1
2.0.0 | 11, 17 | 17.0.2+8

To use a different Java installation, set the `OPENSEARCH_JAVA_HOME` or `JAVA_HOME` environment variable to the Java install location. For example:
```bash
export OPENSEARCH_JAVA_HOME=/path/to/opensearch-{{site.opensearch_version}}/jdk
```

## Network requirements

The following ports need to be open for OpenSearch components.

Port number | OpenSearch component
:--- | :---
443 | OpenSearch Dashboards in AWS OpenSearch Service with encryption in transit (TLS)
5601 | OpenSearch Dashboards
9200 | OpenSearch REST API
9250 | Cross-cluster search
9300 | Node communication and transport
9600 | Performance Analyzer

## Important settings

For production workloads, make sure the [Linux setting](https://www.kernel.org/doc/Documentation/sysctl/vm.txt) `vm.max_map_count` is set to at least 262144. Even if you use the Docker image, set this value on the *host machine*. To check the current value, run this command:

```bash
cat /proc/sys/vm/max_map_count
```

To increase the value, add the following line to `/etc/sysctl.conf`:

```
vm.max_map_count=262144
```

Then run `sudo sysctl -p` to reload.

The [sample docker-compose.yml]({{site.url}}{{site.baseurl}}/opensearch/install/docker#sample-docker-composeyml) file also contains several key settings:

- `bootstrap.memory_lock=true`

Disables swapping (along with `memlock`). Swapping can dramatically decrease performance and stability, so you should ensure it is disabled on production clusters.

- `OPENSEARCH_JAVA_OPTS=-Xms512m -Xmx512m`

Sets the size of the Java heap (we recommend half of system RAM).

- `nofile 65536`

Sets a limit of 65536 open files for the OpenSearch user.

- `port 9600`

Allows you to access Performance Analyzer on port 9600.

Do not declare the same JVM options in multiple locations because it can result in unexpected behavior or a failure of the OpenSearch service to start. If you declare JVM options using an environment variable, such as `OPENSEARCH_JAVA_OPTS=-Xms3g -Xmx3g`, then you should comment out any references to that JVM option in `config/jvm.options`. Conversely, if you define JVM options in `config/jvm.options`, then you should not define those JVM options using environment variables.
{: .note}

## Next steps

Choose your compatiable operating system or method from the following options to install OpenSearch:

- [Docker]
- [Tarball]
- [RPM]
- [Ansible]
- [Helm]
- [Windows]
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ layout: default
title: RPM
parent: Install OpenSearch
nav_order: 51
redirect_from:
- /opensearch/install/rpm/
---

{% comment %}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@
layout: default
title: Tarball
parent: Install OpenSearch
nav_order: 50
nav_order: 10
redirect_from:
- /opensearch/install/tar/
---

# Tarball
Expand Down Expand Up @@ -535,7 +537,7 @@ The following configuration is only suitable for testing in a non-production env

## Related links

- [OpenSearch configuration]({{site.url}}{{site.baseurl}}/opensearch/configuration/)
- [OpenSearch configuration]({{site.url}}{{site.baseurl}}/install-and-configure/configuration/)
- [Configure Performance Analyzer for Tarball Installation]({{site.url}}{{site.baseurl}}/monitoring-plugins/pa/index/#install-performance-analyzer)
- [Install and configure OpenSearch Dashboards]({{site.url}}{{site.baseurl}}/dashboards/install/index/)
- [OpenSearch plugin installation]({{site.url}}{{site.baseurl}}/opensearch/install/plugins/)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ layout: default
title: Windows
parent: Install OpenSearch
nav_order: 65
redirect_from:
- /opensearch/install/windows
---

# Install OpenSearch on Windows
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
---
layout: default
title: OpenSearch plugin installation
parent: Install OpenSearch
nav_order: 90
title: Plugin installation
nav_order: 20
---

# OpenSearch plugin installation
Expand Down
28 changes: 0 additions & 28 deletions _opensearch/install/compatibility.md

This file was deleted.

57 changes: 0 additions & 57 deletions _opensearch/install/important-settings.md

This file was deleted.

Loading