Managing OpenSearch plugins
When creating a cluster in Managed Service for OpenSearch, you can specify a list of required plugins and they will be installed in the cluster automatically. For a full list of available plugins, see Additional plugins.
Retrieving a list of installed plugins
- In the management console
, go to the folder page and select Managed Service for OpenSearch. - Click the cluster name.
If you do not have the Yandex Cloud command line interface yet, install and initialize it.
The folder specified in the CLI profile is used by default. You can specify a different folder using the --folder-name
or --folder-id
parameter.
To get a list of installed plugins, request information about an OpenSearch cluster:
yc managed-opensearch cluster get <cluster_name_or_ID>
You can find a list of plugins in the config.opensearch.plugins
parameter.
You can request the cluster name and ID with a list of clusters in the folder.
To get a list of installed plugins, use the get REST API method for the Cluster resource or the ClusterService/Get gRPC API call and provide the cluster ID in the clusterId
request parameter.
Enabled plugins will be on the config.opensearch.plugins
list.
You can get the cluster ID with a list of clusters in the folder.
Editing a list of installed plugins
- In the management console
, go to the folder page and select Managed Service for OpenSearch. - Select the cluster and click
Edit in the top panel. - Under Basic parameters, specify the plugins you want to install.
- Click Save.
If you do not have the Yandex Cloud command line interface yet, install and initialize it.
The folder specified in the CLI profile is used by default. You can specify a different folder using the --folder-name
or --folder-id
parameter.
To change the list of installed OpenSearch plugins, run the command:
yc managed-opensearch cluster update <cluster_name_or_ID> \
--plugins <plugins>
In the --plugins
parameter, list the required plugins separated by commas. To keep the previously installed plugins, specify them in the --plugins
parameter as well.
You can request the cluster name and ID with a list of clusters in the folder.
-
Open the current Terraform configuration file with an infrastructure plan.
For more information about creating this file, see Creating clusters.
For a complete list of available Managed Service for OpenSearch cluster configuration fields, see the Terraform provider documentation
. -
In the cluster description, change the list of clusters for the
plugins
parameter underconfig
. If there is no such parameter, add it.resource "yandex_mdb_opensearch_cluster" "<cluster_name>" { ... config { plugins = ["<list_of_plugin_names>"] ... } }
-
Make sure the settings are correct.
-
Using the command line, navigate to the folder that contains the up-to-date Terraform configuration files with an infrastructure plan.
-
Run the command:
terraform validate
If there are errors in the configuration files, Terraform will point to them.
-
-
Confirm updating the resources.
-
Run the command to view planned changes:
terraform plan
If the resource configuration descriptions are correct, the terminal will display a list of the resources to modify and their parameters. This is a test step. No resources are updated.
-
If you are happy with the planned changes, apply them:
-
Run the command:
terraform apply
-
Confirm the update of resources.
-
Wait for the operation to complete.
-
-
To update the list of installed plugins, use the update REST API method for the Cluster resource or the ClusterService/Update gRPC API call and provide the following in the request:
-
Cluster ID in the
clusterId
parameter.You can get the cluster ID with a list of clusters in the folder.
-
List of plugins in the
configSpec.opensearchSpec.plugins
parameter. The plugins that are not included in the list will be disabled.
Warning
The API method will assign default values to all the parameters of the object you are modifying unless you explicitly provide them in your request. To avoid this, list the settings you want to change in the updateMask
parameter as a single comma-separated string.