---
title: Charmhub | Deploy OpenSearch using Charmhub - The Open Operator Collection
description: Deploy the latest version of OpenSearch on any cloud.
url: https://charmhub.io/opensearch/configurations
---

# OpenSearch

[Canonical](https://charmhub.io/publisher/data-platform "View all packages from Canonical")

* [Canonical](https://charmhub.io/publisher/data-platform "View all packages from Canonical")
* [Databases](https://charmhub.io/?filter=databases)

Platform:

24.04

22.04

2/stable 344

```
juju deploy opensearch --channel 2/stable
```

[Learn to deploy on juju >](https://juju.is/docs/juju/manage-applications)

* [cluster\_name](https://charmhub.io/opensearch/configurations#cluster_name)
* [init\_hold](https://charmhub.io/opensearch/configurations#init_hold)
* [plugin\_opensearch\_knn](https://charmhub.io/opensearch/configurations#plugin_opensearch_knn)
* [profile](https://charmhub.io/opensearch/configurations#profile)
* [roles](https://charmhub.io/opensearch/configurations#roles)
* [roles\_mapping](https://charmhub.io/opensearch/configurations#roles_mapping)

[Learn about configurations >](https://juju.is/docs/juju/configuration#heading--application-configuration)

* cluster\_name | string

  The name of the cluster.
  This option can only be set once per deployment. Once the cluster has been initialised, further changes
  to this option will be ignored. This setting is crucial to the cluster formation: only sub-clusters
  with the same name can form a fleet.
  If this option is left unset, and `init_hold` is false, the cluster name will be autogenerated.
  If `init_hold` is true, the cluster name will be set by the peer-cluster relation data.
  If set, and `init_hold` is false, the configured value will be used. If `init_hold` is true and
  the sub-cluster names do not match once related, the application will be put into Blocked state,
  and the cluster formation will not begin.
* init\_hold | boolean

  Whether a cluster should wait for a peer\_cluster relation to be initialized and started.
* plugin\_opensearch\_knn | boolean

  Default: True

  Enable opensearch-knn
* profile | string

  Default: testing

  Profile representing the scope of deployment, and used to tune resource allocation.
  Allowed values are: "production" or "testing".
  "production" will tune opensearch for maximum performance while "testing" will tune for
  minimal resources footprint.
  Performance tuning is described on: https://opensearch.org/docs/latest/tuning-your-cluster/performance/
* roles | string

  Comma separated list of the roles assigned to the nodes of this cluster. This option may contain spaces
  before/after the role names, make sure you remove leading/trailing spaces when splitting this list.
  Leave this setting blank to allow auto-assignment of roles.
  Only the the built-in roles are checked against, namely:
  cluster\_manager, data, data.hot, data.warm, data.cold, ingest, coordinating, voting\_only, ml.
  Other dynamic roles are not validated.
* roles\_mapping | string

  Default: {}

  Mapping between IAM user ids and data-integrator created roles. The mapping
  will be a json with the following format: `{<hydra-id>: <opensearch-role>, ...}`
  This option will always represent a complete state of expected assignments, passing
  an empty json will result on all roles/users to be unmapped on OpenSearch. Any
  hydra-id that is not found on the mapping will be revoked.
