You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/content/docs/aws/services/opensearch.mdx
+72-74Lines changed: 72 additions & 74 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,8 +1,6 @@
1
1
---
2
2
title: "OpenSearch Service"
3
-
linkTitle: "OpenSearch Service"
4
-
description: >
5
-
Get started with OpenSearch Service on LocalStack
3
+
description: Get started with OpenSearch Service on LocalStack
6
4
tags: ["Free"]
7
5
---
8
6
@@ -12,7 +10,7 @@ OpenSearch Service is an open-source search and analytics engine, offering devel
12
10
OpenSearch Service also offers log analytics, real-time application monitoring, and clickstream analysis.
13
11
14
12
LocalStack allows you to use the OpenSearch Service APIs in your local environment to create, manage, and operate the OpenSearch clusters.
15
-
The supported APIs are available on our [API coverage page]({{< ref "coverage_opensearch" >}}), which provides information on the extent of OpenSearch's integration with LocalStack.
13
+
The supported APIs are available on our [API coverage page](), which provides information on the extent of OpenSearch's integration with LocalStack.
16
14
17
15
The following versions of OpenSearch Service are supported by LocalStack:
18
16
@@ -42,20 +40,20 @@ To create an OpenSearch Service cluster, you can use the [`CreateDomain`](https:
42
40
OpenSearch Service domain is synonymous with an OpenSearch cluster.
43
41
Execute the following command to create a new OpenSearch domain:
Each time you establish a cluster using a new version of OpenSearch, the corresponding OpenSearch binary must be downloaded, a process that might require some time to complete.
50
48
In the LocalStack log you will see something like, where you can see the cluster starting up in the background.
51
49
52
50
You can open the LocalStack logs, to see that the OpenSearch Service cluster is being created in the background.
53
51
You can use the [`DescribeDomain`](https://docs.aws.amazon.com/opensearch-service/latest/APIReference/API_DescribeDomain.html) API to check the status of the cluster:
|`domain`|`<domain-name>.<region>.<engine-type>.localhost.localstack.cloud:4566`| The default strategy employing the `localhost.localstack.cloud` domain for routing to localhost. |
110
108
|`path`|`localhost:4566/<engine-type>/<region>/<domain-name>`| An alternative strategy useful if resolving LocalStack's localhost domain poses difficulties. |
111
-
|`port`|`localhost:<port-from-range>`| Directly exposes cluster(s) via ports from [the external service port range]({{< ref "external-ports" >}}). |
109
+
|`port`|`localhost:<port-from-range>`| Directly exposes cluster(s) via ports from [the external service port range](). |
112
110
113
111
Irrespective of the originating service for the clusters, the domain of each cluster consistently aligns with its engine type, be it OpenSearch or Elasticsearch.
114
112
Consequently, OpenSearch clusters incorporate `opensearch` within their domains (e.g., `my-domain.us-east-1.opensearch.localhost.localstack.cloud:4566`), while Elasticsearch clusters feature `es` in their domains (e.g., `my-domain.us-east-1.es.localhost.localstack.cloud:4566`).
@@ -121,16 +119,16 @@ Moreover, you can opt for custom domains, though it's important to incorporate t
121
119
122
120
Run the following command to create a new OpenSearch domain with a custom endpoint:
@@ -208,15 +208,15 @@ Save it in a file named `opensearch_domain.json`.
208
208
209
209
To provision it, use the following `awslocal` CLI command, assuming the aforementioned CLI input has been stored in a file named `opensearch_domain.json`:
Once the domain setup is complete (`Processing: false`), the cluster can only be accessed with the given master user credentials, via HTTP basic authentication:
The following output will be visible on your terminal:
222
222
@@ -232,22 +232,23 @@ It's important to note that any unauthorized requests will yield an HTTP respons
232
232
And you can directly use the official OpenSearch Dashboards Docker image to analyze data in your OpenSearch domain within LocalStack!
233
233
234
234
When using OpenSearch Dashboards with LocalStack, you need to make sure to:
235
-
- Enable the [advanced security options]({{< ref "#advanced-security-options" >}}) and set a username and a password.
235
+
- Enable the [advanced security options](#advanced-security-options) and set a username and a password.
236
236
This is required by OpenSearch Dashboards.
237
237
- Ensure that the OpenSearch Dashboards Docker container uses the LocalStack DNS.
238
-
You can find more information on how to connect your Docker container to Localstack in our [Network Troubleshooting guide]({{< ref "references/network-troubleshooting/endpoint-url/#from-your-container" >}}).
238
+
You can find more information on how to connect your Docker container to Localstack in our [Network Troubleshooting guide]().
239
239
240
240
First, you need to make sure to start LocalStack in a specific Docker network:
241
-
{{< command >}}
242
-
$ localstack start --network ls
243
-
{{< /command >}}
241
+
242
+
```bash
243
+
localstack start --network ls
244
+
```
244
245
245
246
Now you can provision a new OpenSearch domain.
246
-
Make sure to enable the [advanced security options]({{< ref "#advanced-security-options" >}}):
247
+
Make sure to enable the [advanced security options](#advanced-security-options):
Once the container is running, you can reach OpenSearch Dashboards at `http://localhost:5601` and you can log in with your OpenSearch domain credentials.
274
274
@@ -329,45 +329,43 @@ volumes:
329
329
330
330
You can start the Docker Compose environment using the following command:
331
331
332
-
{{< command >}}
333
-
$ docker-compose up -d
334
-
{{< /command >}}
332
+
```bash
333
+
docker-compose up -d
334
+
```
335
335
336
336
You can now create an OpenSearch cluster using the `awslocal` CLI:
The output will provide insights into the cluster's health and version information.
356
356
357
357
Finally create an example index using the following command:
358
358
359
-
{{< command >}}
360
-
$ curl -X PUT my-domain.us-east-1.opensearch.localhost.localstack.cloud:4566/my-index
361
-
{{< /command >}}
359
+
```bash
360
+
curl -X PUT my-domain.us-east-1.opensearch.localhost.localstack.cloud:4566/my-index
361
+
```
362
362
363
363
## Resource Browser
364
364
365
365
The LocalStack Web Application provides a Resource Browser for managing OpenSearch domains.
366
366
You can access the Resource Browser by opening the LocalStack Web Application in your browser, navigating to the **Resources** section, and then clicking on **OpenSearch Service** under the **Analytics** section.
The Resource Browser allows you to perform the following actions:
373
371
@@ -390,4 +388,4 @@ The `CustomEndpointOptions` in LocalStack offers the flexibility to utilize arbi
390
388
## Troubleshooting
391
389
392
390
If you encounter difficulties resolving subdomains while employing the `OPENSEARCH_ENDPOINT_STRATEGY=domain` (the default setting), it's advisable to investigate whether your DNS configuration might be obstructing rebind queries.
393
-
For further insights on addressing this issue, refer to the section on [DNS rebind protection]({{< ref "dns-server#dns-rebind-protection" >}}).
391
+
For further insights on addressing this issue, refer to the section on [DNS rebind protection](/aws/tooling/dns-server#dns-rebind-protection).
0 commit comments