---
title: Deploy OpenSearch with AI on Blossom
url: "/deploy/opensearch/"
canonical_url: https://blossom88.com/deploy/opensearch/
markdown_url: https://blossom88.com/deploy/opensearch.md
summary: Index a sample catalog, give your app read-only search, and save a view in
  OpenSearch Dashboards.
categories:
- deployment
- search
stack:
- Java
- OpenSearch
- OpenSearch Dashboards
---

# Deploy OpenSearch with AI on Blossom

[OpenSearch](https://opensearch.org/) indexes data for search and analysis.
Use it to give an app fast search over a catalog and let your team inspect
the same results in Dashboards.

## Ask Your Agent

> **Ask your AI agent:** Deploy OpenSearch with Dashboards on Blossom. Help me search a small catalog with a read-only account.
>
> Follow this guide: https://blossom88.com/deploy/opensearch/

[Install the Blossom CLI and skill](https://docs.blossom88.com/learn/getting-started/install/) on your agent's machine and [choose a Location in your cloud account](https://docs.blossom88.com/learn/getting-started/choose-your-cloud/#connect-your-provider).

## How It Runs

| Part | Role | Where |
|---|---|---|
| OpenSearch | Index documents and apply account permissions | Blossom Persistent Service |
| Dashboards | Browse results and save searches | Blossom App Capacity |
| Volume | Keep indexes, roles, and saved searches | Blossom Persistent Capacity |

## Deploy OpenSearch and Dashboards

Keep the search node on the private Environment network and run it as a
single [Persistent Service](/docs/apps/persistent-services/). Enable Blossom
Account access for Dashboards. Use a private certificate authority you
already trust or create one for the Environment. Keep its signing key
and your search and dashboard credentials private.

<details class="optional-reading" markdown="1">
<summary>Notes for your agent</summary>

Use the official images for OpenSearch and Dashboards. The tested pair used
OpenSearch 3.10.1 and Dashboards 3.10.0. Run OpenSearch on port 9200 with
one writer, set `discovery.type: single-node` and `node.store.allow_mmap:
false`, and mount `/usr/share/opensearch/data`. Allow memory for Java and
its native allocations. OpenSearch Dashboards uses port 5601 on regular
App Capacity.

Keep the Security plugin enabled and use
[your own TLS certificates](https://docs.opensearch.org/latest/security/configuration/generate-certificates/).
Include the private search hostname in the server certificate. Disable the
demo security setup and give Dashboards its own service account and the CA
so it can verify the search endpoint. Give the operator a separate login
with saved-search access, and restrict the app reader to its catalog index.

The [search](/deploy/recipes/opensearch/search-start.sh) and
[Dashboards](/deploy/recipes/opensearch/dashboards-start.sh) startup scripts
name the private runtime variables for the CA certificate, node certificate
and key, Security plugin user and role files, and dashboard configuration.
Pass the Base64-encoded YAML and PEM bytes. Configure Dashboards to verify
the node hostname and certificate with that CA. Preserve the private
runtime settings alongside the Volume on replacement.

</details>

<details class="optional-reading" markdown="1">
<summary>Commands your agent runs</summary>

    blossom app_plan:preview --data opensearch-plan.yml
    blossom service:create --data opensearch-search.yml
    blossom service:create --data opensearch-dashboards.yml
    blossom env_var:push --environment environment-100 --file private-runtime.env
    blossom environment:deploy --id environment-100 --follow

</details>

## Search a Sample Catalog

Index a sample product. Sign in to Dashboards, open **Discover**, and save
a search that finds it. Test the app’s reader separately so it can query
the catalog and cannot change the records.

![Open the saved catalog search in Discover.](/deploy/assets/images/opensearch/opensearch-discover.webp)

> **Ask your AI agent:** Index a sample product. Save a search for it in Dashboards and verify that my app’s reader can search the catalog.

> Follow this guide: https://blossom88.com/deploy/opensearch/



## Reopen the Saved Search

Replace both Containers while keeping the search Volume and TLS configuration.
Sign back in and open the saved search to see the same document.

![Open the original notebook document after replacing both Containers.](/deploy/assets/images/opensearch/opensearch-document.webp)


> **Ask your AI agent:** Replace both Containers and check that I can still open the same saved search and product in Dashboards.

> Follow this guide: https://blossom88.com/deploy/opensearch/



## What You Get

- A private OpenSearch node and an account-gated Dashboards URL
- A sample catalog your app can search with its own read-only login
- A saved search you can reopen after Container replacement

Tested on Blossom: A read-only catalog query and the saved Dashboards search returned the same product after both Containers were replaced.
