Installing OpenSearch¶
This section explains the steps to customize the OpenSearch Helm chart configuration to suit your infrastructure, focusing on storage, node scheduling and resource allocation.
Prerequisites¶
The following conditions must be fulfilled to install the OpenSearch.
- Environment: AWS
- Objective: POC for OpenSearch vs Elasticsearch
- Deployment tool: Helm + ArgoCD
Configuring OpenSearch¶
-
Update the
values.yaml
file for OpenSearch to configure storage, node affinity and tolerations.#line: 186: storageClass: "longhorn-ssd" accessModes: - ReadWriteOnce size: 50Gi #line: 224 nodeAffinity: requiredDuringSchedulingIgnoredDuringExecution: nodeSelectorTerms: - matchExpressions: - key: iaas operator: In values: - "true" #line:326 tolerations: - effect: NoSchedule key: domain operator: Equal value: iaas
-
Update the
values.yaml
file for OpenSearch dashboards to configure toleration and node affinity.#line 158 tolerations: - effect: NoSchedule key: domain operator: Equal value: iaas affinity: nodeAffinity: requiredDuringSchedulingIgnoredDuringExecution: nodeSelectorTerms: - matchExpressions: - key: iaas operator: In values: - "true"
-
Deploy services via ArgoCD.
- Deploy OpenSearch:
helm install opensearch ./opensearch -n mdsp-bk-opensearch
- Deploy OpenSearch Dashboards:
helm install opensearch-dashboard ./opensearch-dashboards -n mdsp-bk-opensearch
-
Check service status using the following command:
kubectl get pods -n mdsp-bk-opensearch
Verify that both services are running successfully.
Rebuilding OpenSearch dashboards image¶
The default dashboard must log in automatically. To disable the default dashboard login functionality, rebuild the OpenSearch dashboards image by removing the securityDashboards
plugin. For more information, refer to the Dockerfile.
FROM opensearchproject/opensearch-dashboards:1.1.0
RUN /usr/share/opensearch-dashboards/bin/opensearch-dashboards-plugin remove securityDashboards
#COPY --chown=opensearch-dashboards:opensearch-dashboards opensearch_dashboards.yml /usr/share/opensearch-dashboards/config/
#docker build registry.cn-shanghai.aliyuncs.com/mdsp-pvt/opensearch-dashboard:1.1.0 .
Reference Documentation¶
- OpenSearch Installation Guide
- Helm Chart - OpenSearch 1.1.0
- Helm Chart - OpenSearch Dashboards 1.1.0