Skip to content

Commit 2f4b340

Browse files
dhrubo-oskolchfa-awsnatebower
authored
documentation for plugin as a service (#9144)
* documentation for plugin as a service Signed-off-by: Dhrubo Saha <[email protected]> * addressed comments Signed-off-by: Dhrubo Saha <[email protected]> * Doc review Signed-off-by: Fanit Kolchina <[email protected]> * Add links to pages within section Signed-off-by: Fanit Kolchina <[email protected]> * Remove config APIs Signed-off-by: Fanit Kolchina <[email protected]> * Apply suggestions from code review Co-authored-by: Nathan Bower <[email protected]> Signed-off-by: kolchfa-aws <[email protected]> * Add flow framework settings Signed-off-by: Fanit Kolchina <[email protected]> * Fix link Signed-off-by: Fanit Kolchina <[email protected]> * Fix link Signed-off-by: Fanit Kolchina <[email protected]> --------- Signed-off-by: Dhrubo Saha <[email protected]> Signed-off-by: Fanit Kolchina <[email protected]> Signed-off-by: kolchfa-aws <[email protected]> Co-authored-by: Fanit Kolchina <[email protected]> Co-authored-by: kolchfa-aws <[email protected]> Co-authored-by: Nathan Bower <[email protected]>
1 parent c9c57f7 commit 2f4b340

File tree

3 files changed

+114
-4
lines changed

3 files changed

+114
-4
lines changed

_config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ collections:
5454
output: true
5555
search-plugins:
5656
permalink: /:collection/:path/
57-
output: true
57+
output: true
5858
ml-commons-plugin:
5959
permalink: /:collection/:path/
6060
output: true

_developer-documentation/index.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ layout: default
33
title: Developer documentation
44
nav_order: 1
55
has_children: false
6-
has_toc: false
76
nav_exclude: true
87
permalink: /developer-documentation/
98
redirect_from:
@@ -22,6 +21,7 @@ We welcome your contributions to the OpenSearch Project. Here are some helpful l
2221
- [OpenSearch Project roadmap](https://github.com/orgs/opensearch-project/projects/1)
2322
- [OpenSearch Community Forum](https://forum.opensearch.org/)
2423

25-
## What's new
24+
## In this section
2625

27-
New in version 2.9, OpenSearch introduces _extensions_---an easier-to-develop and more secure alternative to plugins---to simplify creating custom functionality for OpenSearch. To learn more about building extensions using _OpenSearch SDK for Java_, see [Extensions]({{site.url}}{{site.baseurl}}/developer-documentation/extensions/).
26+
- [Plugin as a service]({{site.url}}{{site.baseurl}}/developer-documentation/plugin-as-a-service/): Enables stateless OpenSearch plugins using external data stores, such as a remote OpenSearch cluster or cloud storage services.
27+
- [Extensions]({{site.url}}{{site.baseurl}}/developer-documentation/extensions/): An easier-to-develop and more secure alternative to plugins that simplifies creating custom functionality for OpenSearch.
Lines changed: 110 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,110 @@
1+
---
2+
layout: default
3+
title: Plugin as a service
4+
nav_order: 5
5+
has_children: false
6+
has_toc: false
7+
redirect_from:
8+
- /developer-documentation/plugin-as-a-service/
9+
---
10+
11+
# Plugin as a service
12+
Introduced 2.19
13+
{: .label .label-purple }
14+
15+
To extend core features, OpenSearch uses plugins, which have several limitations:
16+
- They operate in the same JVM as a cluster, sharing storage, memory, and state.
17+
- They require strict version compatibility.
18+
- They are restricted to a single tenant.
19+
20+
To address these challenges, you can use a _remote metadata SDK client_, which enables stateless OpenSearch plugins using external data stores, such as a remote OpenSearch cluster or cloud storage services. Using the client improves scalability and makes plugins more adaptable for large workloads. For more information about the client, see [SDK Client Repository](https://github.com/opensearch-project/opensearch-remote-metadata-sdk).
21+
22+
## Remote metadata storage
23+
24+
Remote metadata storage allows OpenSearch plugins to operate in a stateless manner, without relying on local JVM or cluster resources, by using external storage solutions. Instead of storing metadata within the OpenSearch cluster, plugins can save it in remote locations such as other OpenSearch clusters or cloud storage services. This approach improves scalability, reduces resource contention, and enables plugins to function independently of the core OpenSearch cluster.
25+
26+
Remote metadata storage offers the following benefits:
27+
28+
- **Scalability**: Offloading metadata storage to an external system reduces OpenSearch cluster memory and CPU usage.
29+
- **Multi-tenancy support**: Tenant-based storage separation enables cloud providers to offer more flexible plugin solutions, logically separating resources using tenant IDs.
30+
31+
### Supported storage backends
32+
33+
Remote metadata storage can be configured to use the following external backends:
34+
35+
- Remote OpenSearch clusters
36+
- Amazon DynamoDB
37+
38+
## Enabling multi-tenancy
39+
40+
To enable multi-tenancy in a plugin, update the following static settings. After the update, restart the cluster in order for the changes to take effect. For more information about ways to update the settings, see [Configuring OpenSearch]({{site.url}}{{site.baseurl}}/install-and-configure/configuring-opensearch/).
41+
42+
### Multi-tenancy setting
43+
44+
The following table lists the multi-tenancy setting.
45+
46+
| Setting | Data type | Description |
47+
|:---|:---|:---|
48+
| `multi_tenancy_enabled` | Boolean | Enables multi-tenancy for the plugin. |
49+
50+
### Remote metadata storage settings
51+
52+
The following table lists settings related to remote metadata storage configuration.
53+
54+
| Setting | Data type | Description |
55+
|:---|:---|:---|
56+
| `remote_metadata_type` | String | The remote metadata storage type. Valid values are: <br> - `RemoteOpenSearch`: A remote OpenSearch cluster compatible with OpenSearch Java Client. <br> - `AWSDynamoDB` : Amazon DynamoDB with zero-ETL replication to OpenSearch. <br> - `AWSOpenSearchService`: Amazon OpenSearch Service using AWS SDK v2. |
57+
| `remote_metadata_endpoint` | String | The remote metadata endpoint URL. |
58+
| `remote_metadata_region` | String | The AWS region in which metadata is stored. |
59+
| `remote_metadata_service_name` | String | The remote metadata service name. |
60+
61+
## Example
62+
63+
The following configuration enables multi-tenancy using a remote OpenSearch cluster:
64+
65+
```yaml
66+
plugins.<plugin_name>.multi_tenancy_enabled: true
67+
plugins.<plugin_name>.remote_metadata_type: "opensearch"
68+
plugins.<plugin_name>.remote_metadata_endpoint: "https://remote-store.example.com"
69+
plugins.<plugin_name>.remote_metadata_region: "us-west-2"
70+
plugins.<plugin_name>.remote_metadata_service_name: "remote-store-service"
71+
```
72+
{% include copy.html %}
73+
74+
## Supported plugins
75+
76+
OpenSearch supports multi-tenancy for the following plugins.
77+
78+
### ML Commons
79+
80+
The ML Commons plugin supports multi-tenancy for the following components:
81+
82+
- [Connectors]({{site.url}}{{site.baseurl}}/ml-commons-plugin/remote-models/connectors/)
83+
- [Model groups]({{site.url}}{{site.baseurl}}/ml-commons-plugin/model-access-control/#model-groups)
84+
- [Models]({{site.url}}{{site.baseurl}}/ml-commons-plugin/integrating-ml-models/) (externally hosted only)
85+
- [Agents]({{site.url}}{{site.baseurl}}/ml-commons-plugin/agents-tools/index/#agents)
86+
- [Tasks]({{site.url}}{{site.baseurl}}/ml-commons-plugin/api/tasks-apis/index/)
87+
88+
The following example configures multi-tenancy for the ML Commons plugin:
89+
90+
```yaml
91+
plugins.ml_commons.multi_tenancy_enabled: true
92+
plugins.ml_commons.remote_metadata_type: AWSDynamoDB
93+
plugins.ml_commons.remote_metadata_endpoint: <REMOTE_ENDPOINT>
94+
plugins.ml_commons.remote_metadata_region: <AWS_REGION>
95+
plugins.ml_commons.remote_metadata_service_name: <SERVICE_NAME>
96+
```
97+
{% include copy.html %}
98+
99+
### Flow Framework
100+
101+
The following example configures multi-tenancy for the Flow Framework plugin:
102+
103+
```yaml
104+
plugins.flow_framework.multi_tenancy_enabled: true
105+
plugins.flow_framework.remote_metadata_type: AWSDynamoDB
106+
plugins.flow_framework.remote_metadata_endpoint: <REMOTE_ENDPOINT>
107+
plugins.flow_framework.remote_metadata_region: <AWS_REGION>
108+
plugins.flow_framework.remote_metadata_service_name: <SERVICE_NAME>
109+
```
110+
{% include copy.html %}

0 commit comments

Comments
 (0)