Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add more details to cross-cluster page #20230811 #20231102 #20230804 #6657

Merged
Merged
Show file tree
Hide file tree
Changes from 6 commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
60695ac
adding more details to cross-cluster page #20230811 #20231102 #20230804
AntonEliatra Mar 12, 2024
955715b
adding more details to cross-cluster page #20230811 #20231102 #20230804
AntonEliatra Mar 12, 2024
5cf765a
adding more details to cross-cluster page #20230811 #20231102 #20230804
AntonEliatra Mar 13, 2024
b746ce7
adding more details to cross-cluster page #20230811 #20231102 #20230804
AntonEliatra Mar 13, 2024
57b9bf2
adding more details to cross-cluster page #20230811 #20231102 #20230804
AntonEliatra Mar 13, 2024
7e0121d
adding more details to cross-cluster page #20230811 #20231102 #20230804
AntonEliatra Mar 13, 2024
e2bf2d2
moving cross cluster search to new page #20230811 #20231102 #20230804
AntonEliatra Mar 20, 2024
ee357c7
moving cross cluster search to new page #20230811 #20231102 #20230804
AntonEliatra Mar 20, 2024
ff743b3
Light edits
hdhalter Mar 27, 2024
68ea214
A few more tweaks
hdhalter Mar 27, 2024
d66fecf
Merge branch 'main' into adding-details-for-ccs
Naarcha-AWS Mar 29, 2024
ab5f935
Apply suggestions from code review
Naarcha-AWS Mar 29, 2024
08abe61
Merge branch 'main' into adding-details-for-ccs
Naarcha-AWS Apr 3, 2024
f29373e
Apply suggestions from code review
AntonEliatra Apr 4, 2024
9bb46e9
fixes to cross-cluster page #20230811 #20231102 #20230804
AntonEliatra Apr 4, 2024
8a553eb
fixes to cross-cluster page #20230811 #20231102 #20230804
AntonEliatra Apr 4, 2024
e4614ac
Merge branch 'opensearch-project:main' into adding-details-for-ccs
AntonEliatra Apr 5, 2024
97934f2
adding more details to cross-cluster page #20230811 #20231102 #20230804
AntonEliatra Apr 5, 2024
c4a9e3b
Update _search-plugins/cross-cluster-search.md
AntonEliatra Apr 5, 2024
b463691
Merge branch 'main' into adding-details-for-ccs
Naarcha-AWS Apr 5, 2024
6028bc1
Merge branch 'main' into adding-details-for-ccs
Naarcha-AWS Apr 5, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
58 changes: 57 additions & 1 deletion _security/access-control/cross-cluster-search.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ humanresources:
![OpenSearch Dashboards UI for creating a cross-cluster search role]({{site.url}}{{site.baseurl}}/images/security-ccs.png)


## Walkthrough
## Walkthrough using Docker

Save this file as `docker-compose.yml` and run `docker-compose up` to start two single-node clusters on the same network:

Expand Down Expand Up @@ -167,6 +167,9 @@ curl -k -XPUT -H 'Content-Type: application/json' -u 'admin:<custom-admin-passwo
}
}'
```
All of the curl requests can also be sent using OpenSearch Dashboards Dev tools
{: .label .label-green }
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
{: .label .label-green }
{: .tip }

@AntonEliatra - You'll want to use Callouts for this type of info, not Labels.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we add another H2 above this section? Something like, "Configuring cross-cluster search from Dashboards"? (I would rethink the other headings, too.)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@hdhalter I dont think we discussed this today, can you elaborated please

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is only one screenshot just to demonstrate that all of the curl commands can be executed from dev tools, Do you mean to add more screenshots and expand on this?

![OpenSearch Dashboards UI for configuring remote cluster for Cross-cluster search]({{site.url}}{{site.baseurl}}/images/ccs-devtools.png)

On the remote cluster, index a document:

Expand Down Expand Up @@ -243,3 +246,56 @@ curl -XGET -k -u booksuser:password 'https://localhost:9250/opensearch-ccs-clust
}]
}
```

## Bare metal/virtual machines

If you are running OpenSearch on bare metal or using virtual machine, you can run the same commands, specifying the IP (or domain) of the OpenSearch cluster.
For example, in order to configure remote cluster for Cross-cluster search, find the IP of the remote node or domain of the remote cluster and run command:

```json
curl -k -XPUT -H 'Content-Type: application/json' -u 'admin:<custom-admin-password>' 'https://opensearch-domain-1:9200/_cluster/settings' -d '
{
"persistent": {
"cluster.remote": {
"opensearch-ccs-cluster2": {
"seeds": ["opensearch-domain-2:9300"]
}
}
}
}'
```
It is enough to point to only one of the node IPs on the remote cluster, as node discovery process will query all nodes in that cluster.
{: .label .label-green }
AntonEliatra marked this conversation as resolved.
Show resolved Hide resolved

You can now run queries across both clusters.

```bash
curl -XGET -k -u 'admin:<custom-admin-password>' 'https://opensearch-domain-1:9200/opensearch-ccs-cluster2:books/_search?pretty'
{
...
"hits": [{
"_index": "opensearch-ccs-cluster2:books",
"_id": "1",
"_score": 1.0,
"_source": {
"Dracula": "Bram Stoker"
}
}]
}
```

## Kubernetes/Helm
If you are using Kubernetes clusters to deploy your OpenSearch, you have to configure the remote cluster using LoadBalancer or Ingress. The services that get created using [Helm]({{site.url}}{{site.baseurl}}/install-and-configure/install-opensearch/helm/) example are of ClusterIP type and can only be accessible inside the cluster, therefore external services need to be used.

```json
curl -k -XPUT -H 'Content-Type: application/json' -u 'admin:<custom-admin-password>' 'https://opensearch-domain-1:9200/_cluster/settings' -d '
{
"persistent": {
"cluster.remote": {
"opensearch-ccs-cluster2": {
"seeds": ["ingress:9300"]
}
}
}
}'
```
Binary file added images/ccs-devtools.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading