I would like to access OpenSearch launched from LocalStack using a GUI.
Is it possible to access the OpenSearch index from the LocalStack Resource Browser?
If setting up the GUI is required, are there any methods to utilize OpenSearch Dashboards?
Hi @enom!
Could you maybe explain a bit what you mean by that?
Do you mean setting up an OpenSearch Dashboard instance to visualize data in an OpenSearch Domain within LocalStack?
The OpenSearch Dashboard is a separate component available as a Docker container, so maybe we could just craft a Docker command which connects an OpenSearch Dashboard to the OpenSearch Instance in LocalStack?
How are you starting and configuring LocalStack? Do you use Docker-Compose? Or the official LocalStack CLI?
As you mentioned, I would like to set up an OpenSearch Dashboard instance to visualize data within an OpenSearch domain in LocalStack. However, this might not be an issue with LocalStack but rather with my code.
I believe it should be possible to establish a connection between OpenSearch within LocalStack and OpenSearch Dashboards.
I want to do like this,
.devcontainer.json
{
"name": "PoC",
"dockerComposeFile": "./docker-compose.yml",
"service": "devcontainer",
"workspaceFolder": "/workspaces/${localWorkspaceFolderBasename}",
"features": {
"ghcr.io/devcontainers/features/aws-cli:1": {},
"ghcr.io/devcontainers/features/github-cli:1": {},
"ghcr.io/devcontainers/features/node:1": {},
"ghcr.io/devcontainers-contrib/features/amplify-cli:2": {},
"ghcr.io/devcontainers-contrib/features/aws-cdk:2": {},
"ghcr.io/devcontainers-contrib/features/vue-cli:2": {},
"ghcr.io/devcontainers-contrib/features/localstack:2": {},
"ghcr.io/devcontainers/features/docker-in-docker:2": {}
},
// Use 'forwardPorts' to make a list of ports inside the container available locally.
"forwardPorts": [5601]
}
Ah, that’s an interesting setup, I wasn’t ware of the community driven devcontainers feature!
We do have a guide on how to setup networking between different containers: Accessing LocalStack via the endpoint URL | Docs
The most important thing is that *.localhost.localstack.cloud resolves to localhost by default, so you have to make sure that the container uses the DNS in LocalStack to resolve its own IP in the Docker network correctly…
The OpenSearch Dashboard is a separate component available as a Docker container, so maybe we could just craft a Docker command which connects an OpenSearch Dashboard to the OpenSearch Instance in LocalStack?
could you provide some ideas how to do so?
i wanted to obtain similar result. i’m using docker.
tho this approach requires using security plugin which is another pending issue on OS side, not related to localstack.
another question if you have the time: is it also possible set this up in k8s? i’ve been trying with minikube, deployed a opensearch-dashboard with dns configs for pod/service but didn’t get any positive results.