Skip to content

Commit

Permalink
feat: Adding documentation for OpenSearch installations (#4400)
Browse files Browse the repository at this point in the history
* feat: Adding documentation for OpenSearch installations

* feat: Addressing comments from review
  • Loading branch information
grlimacan authored Oct 7, 2024
1 parent fa7bb49 commit 2993c5c
Show file tree
Hide file tree
Showing 8 changed files with 55 additions and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ description: "Explains how Optimize copes with the deletion of engine data."

The engine slows down if the historic data grows significantly over time, particularly in cases where the amount of data streaming in each day is large. One solution to this is to remove old data from the engine on a regular basis, yet still importing the data to Optimize so it can be used for deeper analytics.

To support the described use-case, Optimize does not care if you delete any data on the engine side. Specifically, Optimize does not sync with the engine on data deletion. If you want to remove any data from Optimize, you can either erase the data from Elasticsearch or use the [Optimize History Cleanup Feature](./../../configuration/history-cleanup/).
To support the described use-case, Optimize does not care if you delete any data on the engine side. Specifically, Optimize does not sync with the engine on data deletion. If you want to remove any data from Optimize, you can either erase the data from the database or use the [Optimize History Cleanup Feature](./../../configuration/history-cleanup/).

The subsections below describe the ways in which Optimize handles data deletion from the engine.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ To perform an import and provide the full set of features, Optimize requires a c

## Camunda 8 specific configuration

For Camunda 8, Optimize is importing process data from exported zeebe records as created by the [Zeebe Elasticsearch Exporter](https://github.com/camunda/camunda/tree/main/zeebe/exporters/elasticsearch-exporter) from the same Elasticsearch cluster that Optimize used to store it's own data. For the relevant configuration options, refer to the [Camunda 8 import configuration](./system-configuration-platform-8.md).
For Camunda 8, Optimize is importing process data from exported zeebe records as created by the [Zeebe Elasticsearch Exporter](https://github.com/camunda/camunda/tree/main/zeebe/exporters/elasticsearch-exporter) (or [Zeebe OpenSearch Exporter](https://github.com/camunda/camunda/tree/main/zeebe/exporters/opensearch-exporter)) from the same cluster that Optimize used to store its own data. For the relevant configuration options, refer to the [Camunda 8 import configuration](./system-configuration-platform-8.md).

## Recommended additional configurations

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ This guide also identifies areas where we consider security issues to be relevan
[
{label: 'Camunda 7', value: 'c7' },
{label: 'Optimize', value: 'optimize' },
{label: 'Elasticsearch', value: 'elasticsearch' }
{label: 'Database', value: 'database' }
]
}>

Expand Down Expand Up @@ -59,11 +59,11 @@ Authorization controls what data a user can access and change in Optimize once a

</TabItem>

<TabItem value='elasticsearch'>
<TabItem value='database'>

Optimize stores its data in Elasticsearch, which is a search engine that acts as a document-based datastore. To protect access to this data, Elasticsearch should be configured carefully as well. Refer to the official [Secure the Elastic Stack](https://www.elastic.co/guide/en/elasticsearch/reference/master/secure-cluster.html#secure-cluster) documentation of Elasticsearch.
Optimize stores its data in Elasticsearch or OpenSearch, which are search engines that act as a document-based datastore. To protect access to this data, the database should be configured carefully as well. Refer to the official security guidelines for [ElasticSearch](https://www.elastic.co/guide/en/elasticsearch/reference/master/secure-cluster.html#secure-cluster) or [OpenSearch](https://opensearch.org/docs/latest/getting-started/security).

Within the Optimize configuration, you can then enable SSL and/or the credentials to be used when Camunda Optimize connects to Elasticsearch. See [Elasticsearch Security](./system-configuration.md#elasticsearch-security) for details.
Within the Optimize configuration, you can then enable SSL and/or the credentials to be used when Camunda Optimize connects to the database. See [Elasticsearch Security](./system-configuration.md#elasticsearch-security) or [OpenSearch Security](./system-configuration.md#opensearch-security) for details.

</TabItem>
</Tabs>
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ Changing the value of `*.settings.index.prefix` after an instance was already ru
:::

:::note
OpenSearch support is currently only available for `ccsm` mode. Moreover, OpenSearch support in Optimize is limited to data import and the raw data report. The remaining functionality will be delivered with upcoming patches.
Not all Optimize features are supported when using OpenSearch as a database. For a full list of the features that are currently supported, please refer to the [Camunda 7](https://github.com/camunda/issues/issues/705) and [Camunda 8](https://github.com/camunda/issues/issues/635) OpenSearch features.
:::

\* Elasticsearch index prefix settings path: `es.settings.index.prefix`<br/> \* OpenSearch index prefix settings path: `opensearch.settings.index.prefix`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ Define a secured connection to be able to communicate with a secured Elasticsear
These settings are only relevant when operating Optimize with OpenSearch.

:::note
OpenSearch support is currently only available for `ccsm` mode. Moreover, OpenSearch support in Optimize is limited to data import and the raw data report. The remaining functionality will be delivered with upcoming patches.
Not all Optimize features are supported when using OpenSearch as a database. For a full list of the features that are currently supported, please refer to the [Camunda 7](https://github.com/camunda/issues/issues/705) and [Camunda 8](https://github.com/camunda/issues/issues/635) OpenSearch features.
:::

#### Connection settings
Expand All @@ -208,12 +208,13 @@ You can define a number of connection points in a cluster. Therefore, everything
| opensearch.connection.responseConsumerBufferLimitInMb | 100 | Maximum size of the OpenSearch response consumer heap buffer. This can be increased to resolve errors from OpenSearch relating to the entity content being too long. |
| opensearch.connection.pathPrefix | | The path prefix under which OpenSearch is available. |
| opensearch.connection.nodes[*].host | localhost | The address/hostname under which the OpenSearch node is available. |
| opensearch.connection.nodes[*].httpPort | 9200 | A port number used by OpenSearch to accept HTTP connections. |
| opensearch.connection.nodes[*].httpPort | 9205 | A port number used by OpenSearch to accept HTTP connections. |
| opensearch.connection.proxy.enabled | false | Whether an HTTP proxy should be used for requests to OpenSearch. |
| opensearch.connection.proxy.host | null | The proxy host to use, must be set if `opensearch.connection.proxy.enabled = true`. |
| opensearch.connection.proxy.port | null | The proxy port to use, must be set if `opensearch.connection.proxy.enabled = true`. |
| opensearch.connection.proxy.sslEnabled | false | Whether this proxy is using a secured connection (HTTPS). |
| opensearch.connection.skipHostnameVerification | false | Determines whether the hostname verification should be skipped. |
| opensearch.connection.awsEnabled | false | Determines if AWS credentials shall be used for authentication |

#### Index settings

Expand Down
50 changes: 42 additions & 8 deletions optimize/self-managed/optimize-deployment/install-and-start.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,12 +54,12 @@ or `elasticsearch-startup.bat` on Windows:
.\elasticsearch-startup.bat
```

#### Production distribution without Elasticsearch
#### Production distribution without a database

This distribution is intended to be used in production. To install it, take the following steps:

1. [Download](https://docs.camunda.org/enterprise/download/#camunda-optimize) the production archive, which contains all the required files to startup Camunda Optimize without Elasticsearch.
2. [Configure the Elasticsearch connection](./configuration/getting-started.md#elasticsearch-configuration) to connect to your pre-installed Elasticsearch instance and [configure the Camunda 7 connection](./configuration/getting-started.md#camunda-platform-7-configuration) to connect Optimize to your running engine.
1. [Download](https://docs.camunda.org/enterprise/download/#camunda-optimize) the production archive, which contains all the required files to startup Camunda Optimize without a database.
2. [Configure the database connection](./configuration/getting-started.md#elasticsearchopensearch-configuration) to connect to your pre-installed Elasticsearch/OpenSearch instance and [configure the Camunda 7 connection](./configuration/getting-started.md#camunda-platform-7-configuration) to connect Optimize to your running engine.
3. Start your Optimize instance by running the script `optimize-startup.sh` on Linux and Mac:

```bash
Expand All @@ -85,10 +85,14 @@ Password: ******
Login Succeeded
```

After that, [configure the Elasticsearch connection](./configuration/getting-started.md#elasticsearch-configuration) to connect to your pre-installed Elasticsearch instance and [configure the Camunda connection](./configuration/getting-started.md#camunda-platform-7-configuration) to connect Optimize to your running engine. For very simple use cases with only one Camunda Engine and one Elasticsearch node, you can use environment variables instead of mounting configuration files into the Docker container:
After that, [configure the database connection](./configuration/getting-started.md#elasticsearchopensearch-configuration) to connect to your pre-installed Elasticsearch/OpenSearch instance and [configure the Camunda connection](./configuration/getting-started.md#camunda-platform-7-configuration) to connect Optimize to your running engine. For very simple use cases with only one Camunda Engine and one database node, you can use environment variables instead of mounting configuration files into the Docker container:

#### Getting started with the Optimize Docker image

:::note
Not all Optimize features are supported when using OpenSearch as a database. For a full list of the features that are currently supported, please refer to the [Camunda 7](https://github.com/camunda/issues/issues/705) and [Camunda 8](https://github.com/camunda/issues/issues/635) OpenSearch features.
:::

##### Full local setup

To start the Optimize Docker image and connect to an already locally running Camunda 7 as well as Elasticsearch instance you could run the following command:
Expand All @@ -98,7 +102,15 @@ docker run -d --name optimize --network host \
registry.camunda.cloud/optimize-ee/optimize:{{< currentVersionAlias >}}
```

##### Connect to remote Camunda 7 and Elasticsearch
If you wish to connect to an OpenSearch database instead, please make sure to additionally set the environment variable `CAMUNDA_OPTIMIZE_DATABASE` to `opensearch`.

```
docker run -d --name optimize --network host \
-e CAMUNDA_OPTIMIZE_DATABASE=opensearch \
registry.camunda.cloud/optimize-ee/optimize:{{< currentVersionAlias >}}
```

##### Connect to remote Camunda 7 and database

If, however, your Camunda 7 as well as Elasticsearch instance reside on a different host, you may provide their destination via the corresponding environment variables:

Expand All @@ -110,20 +122,42 @@ docker run -d --name optimize -p 8090:8090 -p 8091:8091 \
registry.camunda.cloud/optimize-ee/optimize:{{< currentVersionAlias >}}
```

Alternatively, for OpenSearch:

```
docker run -d --name optimize -p 8090:8090 -p 8091:8091 \
-e OPTIMIZE_CAMUNDABPM_REST_URL=http://yourCamBpm.org/engine-rest \
-e CAMUNDA_OPTIMIZE_DATABASE=opensearch \
-e CAMUNDA_OPTIMIZE_OPENSEARCH_HOST=yourOpenSearchHost \
-e CAMUNDA_OPTIMIZE_OPENSEARCH_HTTP_PORT=9205 \
registry.camunda.cloud/optimize-ee/optimize:{{< currentVersionAlias >}}
```

#### Available environment variables

There is only a limited set of configuration keys exposed via environment variables. These mainly serve the purpose of testing and exploring Optimize. For production configurations, we recommend following the setup in documentation on [configuration using a `environment-config.yaml` file](#configuration-using-a-yaml-file).

The most important environment variables you may have to configure are related to the connection to the Camunda 7 REST API, as well as Elasticsearch:
The most important environment variables you may have to configure are related to the connection to the Camunda 7 REST API, as well as Elasticsearch/OpenSearch:

- `OPTIMIZE_CAMUNDABPM_REST_URL`: The base URL that will be used for connections to the Camunda Engine REST API (default: `http://localhost:8080/engine-rest`)
- `OPTIMIZE_CAMUNDABPM_WEBAPPS_URL`: The endpoint where to find the Camunda web apps for the given engine (default: `http://localhost:8080/camunda`)

For an ElasticSearch installation:

- `OPTIMIZE_ELASTICSEARCH_HOST`: The address/hostname under which the Elasticsearch node is available (default: `localhost`)
- `OPTIMIZE_ELASTICSEARCH_HTTP_PORT`: The port number used by Elasticsearch to accept HTTP connections (default: `9200`)
- `CAMUNDA_OPTIMIZE_ELASTICSEARCH_SECURITY_USERNAME`: The username for authentication in environments where a secured Elasticsearch connection is configured.
- `CAMUNDA_OPTIMIZE_ELASTICSEARCH_SECURITY_PASSWORD`: The password for authentication in environments where a secured Elasticsearch connection is configured.

A complete sample can be found within [Connect to remote Camunda 7 and Elasticsearch](#connect-to-remote-camunda-platform-7-and-elasticsearch).
For an OpenSearch installation:

- `CAMUNDA_OPTIMIZE_DATABASE`: The database type to connect to, in this case `opensearch` (default: `elasticsearch`)
- `CAMUNDA_OPTIMIZE_OPENSEARCH_HOST`: The address/hostname under which the OpenSearch node is available (default: `localhost`)
- `CAMUNDA_OPTIMIZE_OPENSEARCH_HTTP_PORT`: The port number used by OpenSearch to accept HTTP connections (default: `9205`)
- `CAMUNDA_OPTIMIZE_OPENSEARCH_SECURITY_USERNAME`: The username for authentication in environments where a secured OpenSearch connection is configured.
- `CAMUNDA_OPTIMIZE_OPENSEARCH_SECURITY_PASSWORD`: The password for authentication in environments where a secured OpenSearch connection is configured.

A complete sample can be found within [Connect to remote Camunda 7 and database](#connect-to-remote-camunda-7-and-database).

Furthermore, there are also environment variables specific to the [event-based process](components/userguide/additional-features/event-based-processes.md) feature you may make use of:

Expand Down Expand Up @@ -176,4 +210,4 @@ Then, you can use the users from the Camunda 7 to log in to Optimize. For detail

## Next steps

To get started configuring the Optimize web container, Elasticsearch, Camunda 7, Camunda 8, and more, visit the [getting started section](./configuration/getting-started.md) of our configuration documentation.
To get started configuring the Optimize web container, Elasticsearch/OpenSearch, Camunda 7, Camunda 8, and more, visit the [getting started section](./configuration/getting-started.md) of our configuration documentation.
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ To update Optimize to version 3.14, perform the steps in the [migration and upda

The update to 3.14 can be performed from any 3.13 release.

Moreover for users of Optimize 3.7.3 with OpenSearch, there is also a direct update path from 3.7.3 to 3.14. The required steps are described in the [migration and update instructions](./instructions.md).
For users of Optimize 3.7.3 with OpenSearch, there is a direct update path from 3.7.3 to 3.14. The required steps are described in the [migration and update instructions](./instructions.md).

Here you will find information about:

Expand All @@ -21,7 +21,7 @@ Here you will find information about:

## Limitations

Not all features of Optimize are yet supported when using it with OpenSearch as a database. For a full list of the features that are now supported, please refer to the [Camunda 7 OpenSearch features](https://github.com/camunda/issues/issues/705).
Not all Optimize features are supported when using OpenSearch as a database. For a full list of the features that are currently supported, please refer to the [Camunda 7 OpenSearch features](https://github.com/camunda/issues/issues/705).

## Versioning

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ Here you will find information about:

## Limitations

Not all features of Optimize are yet supported when using it with OpenSearch as a database. For a full list of the features that are now supported, please refer to the [Camunda 8 OpenSearch features](https://github.com/camunda/issues/issues/635).
Not all Optimize features are supported when using OpenSearch as a database. For a full list of the features that are currently supported, please refer to the [Camunda 8 OpenSearch features](https://github.com/camunda/issues/issues/635).

## Versioning

Expand Down

0 comments on commit 2993c5c

Please sign in to comment.