Skip to content

Commit

Permalink
Add install and configure section
Browse files Browse the repository at this point in the history
Signed-off-by: Naarcha-AWS <[email protected]>
  • Loading branch information
Naarcha-AWS committed Jan 23, 2023
1 parent 035bc00 commit 898dcfc
Show file tree
Hide file tree
Showing 28 changed files with 1,196 additions and 158 deletions.
2 changes: 1 addition & 1 deletion _clients/k8s-operator.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ The OpenSearch Kubernetes Operator is an open-source kubernetes operator that he

There are two ways to get started with the operator:

- [Use a Helm chart](#use-a-helm-chartuse-a-helm).
- [Use a Helm chart](#use-a-helm-chart).
- [Use a local installation](#use-a-local-installation).

### Use a Helm chart
Expand Down
6 changes: 6 additions & 0 deletions _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@ color_scheme: opensearch
# Define Jekyll collections
collections:
# Define a collection named "tests", its documents reside in the "_tests" directory
install-and-configure:
permalink: /:collection/:path/
output: true
upgrade-to:
permalink: /:collection/:path/
output: true
Expand Down Expand Up @@ -80,6 +83,9 @@ collections:
just_the_docs:
# Define the collections used in the theme
collections:
install-and-configure:
name: Install and configure
nav_fold: true
upgrade-to:
name: Upgrade to OpenSearch
# nav_exclude: true
Expand Down
12 changes: 0 additions & 12 deletions _dashboards/install/index.md

This file was deleted.

100 changes: 100 additions & 0 deletions _install-and-configure/configuration.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
---
layout: default
title: Configuring OpenSearch
nav_order: 10
---

# Configuring OpenSearch

Most OpenSearch configuration can take place in the cluster settings API. Certain operations require you to modify `opensearch.yml` and restart the cluster.

Whenever possible, use the cluster settings API instead; `opensearch.yml` is local to each node, whereas the API applies the setting to all nodes in the cluster. Certain settings, however, require `opensearch.yml`. In general, these settings relate to networking, cluster formation, and the local file system. To learn more, see [Cluster formation]({{site.url}}{{site.baseurl}}/opensearch/cluster/).

## Specify settings as environment variables

You can specify environment variables as arguments using `-E` when launching OpenSearch:

```bash
./opensearch -Ecluster.name=opensearch-cluster -Enode.name=opensearch-node1 -Ehttp.host=0.0.0.0 -Ediscovery.type=single-node
```

## Update cluster settings using the API

The first step in changing a setting is to view the current settings:

```
GET _cluster/settings?include_defaults=true
```

For a more concise summary of non-default settings:

```
GET _cluster/settings
```

Three categories of setting exist in the cluster settings API: persistent, transient, and default. Persistent settings, well, persist after a cluster restart. After a restart, OpenSearch clears transient settings.

If you specify the same setting in multiple places, OpenSearch uses the following precedence:

1. Transient settings
2. Persistent settings
3. Settings from `opensearch.yml`
4. Default settings

To change a setting, just specify the new one as either persistent or transient. This example shows the flat settings form:

```json
PUT _cluster/settings
{
"persistent" : {
"action.auto_create_index" : false
}
}
```

You can also use the expanded form, which lets you copy and paste from the GET response and change existing values:

```json
PUT _cluster/settings
{
"persistent": {
"action": {
"auto_create_index": false
}
}
}
```

For more information about the Cluster Settings API, see [Cluster settings]({{site.url}}{{site.baseurl}}/api-reference/cluster-settings/).


---

## Configuration file

You can find `opensearch.yml` in `/usr/share/opensearch/config/opensearch.yml` (Docker) or `/etc/opensearch/opensearch.yml` (most Linux distributions) on each node.

You can edit the `OPENSEARCH_PATH_CONF=/etc/opensearch` to change the config directory location. This variable is sourced from `/etc/default/opensearch`(Debian package) and `/etc/sysconfig/opensearch`(RPM package).

If you set your customized `OPENSEARCH_PATH_CONF` variable, be aware that other default environment variables will not be loaded.

You don't mark settings in `opensearch.yml` as persistent or transient, and settings use the flat form:

```yml
cluster.name: my-application
action.auto_create_index: true
compatibility.override_main_response_version: true
```
The demo configuration includes a number of settings for the security plugin that you should modify before using OpenSearch for a production workload. To learn more, see [Security]({{site.url}}{{site.baseurl}}/security-plugin/).
### (Optional) CORS header configuration
If you are working on a client application running against an OpenSearch cluster on a different domain, you can configure headers in `opensearch.yml` to allow for developing a local application on the same machine. Use [Cross Origin Resource Sharing](https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS) so your application can make calls to the OpenSearch API running locally. Add the following lines in your `custom-opensearch.yml` file (note that the "-" must be the first character in each line).
```yml
- http.host:0.0.0.0
- http.port:9200
- http.cors.allow-origin:"http://localhost"
- http.cors.enabled:true
- http.cors.allow-headers:X-Requested-With,X-Auth-Token,Content-Type,Content-Length,Authorization
- http.cors.allow-credentials:true
```
129 changes: 129 additions & 0 deletions _install-and-configure/install-dashboards/debian.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,129 @@
---
layout: default
title: Debian
parent: Install OpenSearch Dashboards
nav_order: 33
---

# Installing OpenSearch Dashboards (Debian)

Installing OpenSearch Dashboards using the Advanced Packaging Tool (APT) package manager simplifies the process considerably compared to the [Tarball]({{site.url}}{{site.baseurl}}/install-and-configure/install-dashboards/tar/) method. For example, the package manager handles several technical considerations, such as the installation path, location of configuration files, and creation of a service managed by `systemd`.

Before installing OpenSearch Dashboards you must configure an OpenSearch cluster. Refer to the OpenSearch [Debian]({{site.url}}{{site.baseurl}}/install-and-configure/install-opensearch/debian/) installation guide for steps.
{: .important}

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. Some example commands reference the `vi` text editor, but you may use any text editor available.
{:.note}

## Installing OpenSearch Dashboards from a package

1. Download the Debian package for the desired version directly from the [OpenSearch downloads page](https://opensearch.org/downloads.html){:target='\_blank'}. The Debian package can be downloaded for both **x64** and **arm64** architectures.
1. From the CLI, install using `dpkg`.
```bash
# x64
sudo dpkg -i opensearch-dashboards-{{site.opensearch_version}}-linux-x64.deb
# arm64
sudo dpkg -i opensearch-dashboards-{{site.opensearch_version}}-linux-arm64.deb
```
1. After the installation completes, reload the systemd manager configuration.
```bash
sudo systemctl daemon-reload
```
1. Enable OpenSearch as a service.
```bash
sudo systemctl enable opensearch-dashboards
```
1. Start the OpenSearch service.
```bash
sudo systemctl start opensearch-dashboards
```
1. Verify that OpenSearch launched correctly.
```bash
sudo systemctl status opensearch-dashboards
```

### Fingerprint verification

The Debian package is not signed. If you would like to verify the fingerprint, the OpenSearch Project provides a `.sig` file as well as the `.deb` package for use with GNU Privacy Guard (GPG).

1. Download the desired Debian package.
```bash
curl -SLO https://artifacts.opensearch.org/releases/bundle/opensearch-dashboards/{{site.opensearch_version}}/opensearch-dashboards-{{site.opensearch_version}}-linux-x64.deb
```
1. Download the corresponding signature file.
```bash
curl -SLO https://artifacts.opensearch.org/releases/bundle/opensearch-dashboards/{{site.opensearch_version}}/opensearch-dashboards-{{site.opensearch_version}}-linux-x64.deb.sig
```
1. Download and import the GPG key.
```bash
curl -o- https://artifacts.opensearch.org/publickeys/opensearch.pgp | gpg --import -
```
1. Verify the signature.
```bash
gpg --verify opensearch-dashboards-{{site.opensearch_version}}-linux-x64.deb.sig opensearch-dashboards-{{site.opensearch_version}}-linux-x64.deb
```

## Installing OpenSearch Dashboards from an APT repository

APT, the primary package management tool for Debian–based operating systems, allows you to download and install the Debian package from the APT repository.

1. Import the public GPG key. This key is used to verify that the APT repository is signed.
```bash
curl -o- https://artifacts.opensearch.org/publickeys/opensearch.pgp | sudo apt-key add -
```
1. Create an APT repository for OpenSearch.
```bash
echo "deb https://artifacts.opensearch.org/releases/bundle/opensearch-dashboards/2.x/apt stable main" | sudo tee -a /etc/apt/sources.list.d/opensearch-dashboards-2.x.list
```
1. Verify that the repository was created successfully.
```bash
sudo apt-get update
```
1. With the repository information added, list all available versions of OpenSearch:
```bash
sudo apt list -a opensearch-dashboards
```
1. Choose the version of OpenSearch you want to install:
- Unless otherwise indicated, the latest available version of OpenSearch is installed.
```bash
sudo apt-get install opensearch-dashboards
```
- To install a specific version of OpenSearch Dashboards, pass a version number after the package name.
```bash
# Specify the version manually using opensearch=<version>
sudo apt-get install opensearch-dashboards={{site.opensearch_version}}
```
1. Once complete, enable OpenSearch.
```bash
sudo systemctl enable opensearch-dashboards
```
1. Start OpenSearch.
```bash
sudo systemctl start opensearch-dashboards
```
1. Verify that OpenSearch launched correctly.
```bash
sudo systemctl status opensearch-dashboards
```

## Exploring OpenSearch Dashboards

By default, OpenSearch Dashboards, like OpenSearch, binds to `localhost` when you initially install it. As a result, OpenSearch Dashboards is not reachable from a remote host unless the configuration is updated.

1. Open `opensearch_dashboards.yml`.
```bash
sudo vi /etc/opensearch-dashboards/opensearch_dashboards.yml
```
1. Specify a network interface that OpenSearch Dashboards should bind to.
```bash
# Use 0.0.0.0 to bind to any available interface.
server.host: 0.0.0.0
```
1. Save and quit.
1. Restart OpenSearch Dashboards to apply the configuration change.
```bash
sudo systemctl restart opensearch-dashboards
```
1. From a web browser, navigate to OpenSearch Dashboards. The default port is 5601.
1. Log in with the default username `admin` and the default password `admin`.
1. Visit [Getting started with OpenSearch Dashboards]({{site.url}}{{site.baseurl}}/dashboards/index/) to learn more.
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ layout: default
title: Docker
parent: Install OpenSearch Dashboards
nav_order: 1
redirect_from:
- /dashboards/install/docker/
---

# Run OpenSearch Dashboards using Docker
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ layout: default
title: Helm
parent: Install OpenSearch Dashboards
nav_order: 35
redirect_from:
- /dashboards/install/helm/
---

# Run OpenSearch Dashboards using Helm
Expand Down
39 changes: 39 additions & 0 deletions _install-and-configure/install-dashboards/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
---
layout: default
title: Installing OpenSearch Dashboards
nav_order: 3
has_children: true
redirect_from:
- /dashboards/install/
- /dashboards/compatibility/
---

# Installing OpenSearch Dashboards

This section details how to install and configure OpenSearch Dashboards.

## Installation options

OpenSearch Dashboards has the following installation options:

- [Docker]({{site.url}}{{site.baseurl}}/install-and-configure/install-dashboards/docker/)
- [Tarball]({{site.url}}{{site.baseurl}}/install-and-configure/install-dashboards/tar/)
- [RPM]({{site.url}}{{site.baseurl}}/install-and-configure/install-dashboards/rpm/)
- [Debian]({{site.url}}{{site.baseurl}}/install-and-configure/install-dashboards/debian/)
- [Helm]({{site.url}}{{site.baseurl}}/install-and-configure/install-dashboards/helm/)
- [Windows]({{site.url}}{{site.baseurl}}/install-and-configure/install-dashboards/windows/)

## Browser compatibility

OpenSearch Dashboards supports the following web browsers:

- Chrome
- Firefox
- Safari
- Edge (Chromium)

Other Chromium-based browsers might work, as well. Internet Explorer and Microsoft Edge Legacy are **not** supported.

## Configuration

To learn how to configure TLS for OpenSearch Dashboards, see [Configure TLS]({{site.url}}{{site.baseurl}}/install-and-configure/install-dashboards/tls/).
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ layout: default
title: OpenSearch Dashboards plugins
parent: Install OpenSearch Dashboards
nav_order: 50
redirect_from:
- /dashboards/install/plugins
---

# Standalone plugin install
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ layout: default
title: RPM
parent: Install OpenSearch Dashboards
nav_order: 31
redirect_from:
- /dashboards/install/rpm/
---

{% comment %}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ layout: default
title: Tarball
parent: Install OpenSearch Dashboards
nav_order: 30
redirect_from:
- /dashboards/install/tar/
---

# Run OpenSearch Dashboards using the tarball
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ layout: default
title: Configure TLS
parent: Install OpenSearch Dashboards
nav_order: 40
redirect_from:
- /dashboards/install/tls/
---

# Configure TLS for OpenSearch Dashboards
Expand Down
Loading

0 comments on commit 898dcfc

Please sign in to comment.