Creating a OpenSearch instance is done by adding a OpenSearch resource to your namespace with detailed configuration in a GCP cluster. In your
Naisjob specifications, you specify an instance and access.
The minimal OpenSearch resource looks like this:
The actual name of the OpenSearch instance will be
opensearch-<TEAM NAME>-<INSTANCE NAME> (where
TEAM NAME is the same as the namespace your application resides in). The resource needs to have this full name in order to be accepted.
As we use Aivens operator, the OpenSearch resource is documented in detail in the Aiven documentation. Check the reference for any other fields that might be of interest.
A ServiceIntegration is used to integrate the OpenSearch instance with Prometheus. It is pretty straight forward, with little to no configuration needed.
Simple 5 steps procedure:
- Copy the below yaml into a file (it can be the same file as your OpenSearch instance)
<ENV>with the environment you are running in (ex.
prod) (in field
<MYTEAM>with your team name (in
<INSTANCE>with the name of your OpenSearch instance (in
<ENDPONT-ID>with the endpoint ID from the table below (in
- Deploy the resource using the same pipeline as you use for your OpenSearch instance
Prometheus Endpoint IDs¶
Previously, we defined the OpenSearch instances using Terraform in the aiven-iac IaC-repo. As we are moving away from Terraform for self-service services on Aiven, we will not be using this method anymore.