-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[DENA-415] Shared elasticsearch manifest (#16)
* change the repository structure- one generated manifest + kustomize overlays * improve example, regenerate charts * update paths, change secret name * remove unnecessary fiels * applying comments * regenerate manifests * update example * applying comments * remove namespace by default * groundwork for elasticsearch * split elasticsearch into two manifests * remove the multi node role cluster * update README * set pvc size * single node working deployment * kibana resources, remove unnecessary modifications * kibana annotations * latest es release * replace env variables dependent on namespace * test variable index before replacing * remove unused secret * add comment * move hosts patch to separate file
- Loading branch information
1 parent
02b3c2e
commit 3a29825
Showing
9 changed files
with
740 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
# Elasticsearch | ||
|
||
## TL;DR | ||
- [Is this Elasticsearch right for you?](#cluster-topology) | ||
- [Example kustomization file deploying Elasticsearch](example) | ||
- [Operations](#usage) | ||
- [Grafana dashboards](#metrics) | ||
|
||
## Source | ||
|
||
This manifest is build on the base of [Bitnami Elasticsearch Helm chart](https://github.com/bitnami/charts/tree/main/bitnami/elasticsearch). | ||
|
||
## Cluster topology | ||
### Multipurpose nodes | ||
This Elasticsearch manifest deploys cluster with multipurpose nodes. | ||
This is the simplest topology, which is suitable for small clusters. | ||
|
||
This means, all the nodes can be elected as master, | ||
used for data storage and for operations. | ||
|
||
|
||
### Nodes with dedicated roles | ||
For bigger clusters, it is recommended to use dedicated master and data nodes, | ||
optionally also ingest and coordinating nodes. Read more about node roles in [Elasticsearch documentation](https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-node.html). | ||
|
||
Manifest with dedicated node roles can be generated the same way as multipurpose one, by providing | ||
appropriate values to parameters like `data.replicaCount` in [gen.sh script](gen-yaml/gen.sh). | ||
|
||
If you need cluster with dedicated node roles, please contact us at #help-dev-enablement, | ||
we will be happy to help you add its manifest to the shared-kustomize-bases. | ||
|
||
## Usage | ||
### Scaling | ||
In order to add nodes to cluster, first scale down to 0 replicas | ||
in order to avoid inconsistencies in the configuration. | ||
|
||
## Metrics | ||
TODO | ||
|
||
## Backup | ||
TODO |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
apiVersion: kustomize.config.k8s.io/v1beta1 | ||
kind: Kustomization | ||
|
||
resources: | ||
#- ssh://github.com/utilitywarehouse/shared-kustomize-bases//elasticsearch/manifests?ref=v0.0.0 | ||
- ../manifests | ||
|
||
# OpsLevel annotations | ||
commonAnnotations: | ||
"app.uw.systems/description": "some es instance" | ||
"app.uw.systems/tier": "tier_4" | ||
|
||
patches: | ||
# PVC size | ||
- target: | ||
kind: StatefulSet | ||
name: elastisearch-master | ||
patch: |- | ||
- op: replace | ||
path: /spec/volumeClaimTemplates/0/spec/resources/requests/storage | ||
value: 10Gi | ||
# Resource requests and limits | ||
- target: | ||
kind: StatefulSet | ||
name: elasticsearch-master | ||
patch: |- | ||
- op: replace | ||
path: /spec/template/spec/containers/0/resources/requests/cpu | ||
value: "500m" | ||
- op: replace | ||
path: /spec/template/spec/containers/0/resources/limits/cpu | ||
value: "1000m" | ||
- op: replace | ||
path: /spec/template/spec/containers/0/resources/requests/memory | ||
value: "4Gi" | ||
- op: replace | ||
path: /spec/template/spec/containers/0/resources/limits/memory | ||
value: "8Gi" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
#!/bin/bash | ||
|
||
set -o errexit -o pipefail -o nounset | ||
|
||
# Fetch from helm repo: https://github.com/bitnami/charts/tree/main/bitnami/elasticsearch | ||
helm repo add bitnami https://charts.bitnami.com/bitnami | ||
|
||
helm template "elasticsearch" bitnami/elasticsearch --version "${BITNAMI_ES_RELEASE}" \ | ||
--set commonAnnotations."app\.uw\.systems\/repos"="https://github.com/utilitywarehouse/shared-kustomize-bases/tree/main/elasticsearch" \ | ||
--set global.kibanaEnabled="true" \ | ||
--set metrics.enabled="true" \ | ||
--set master.replicaCount="3" \ | ||
--set master.masterOnly="false" \ | ||
--set data.replicaCount="0" \ | ||
--set coordinating.replicaCount="0" \ | ||
--set ingest.replicaCount="0" \ | ||
--set master.resources.requests.cpu="250m" \ | ||
--set master.resources.limits.cpu="2000m" \ | ||
--set master.resources.requests.memory="4Gi" \ | ||
--set master.resources.limits.memory="8Gi" \ | ||
--set master.persistence.size="100Gi" \ | ||
--set sysctlImage.enabled="false" \ | ||
--set kibana.resources.requests.cpu="250m" \ | ||
--set kibana.resources.limits.cpu="1000m" \ | ||
--set kibana.resources.requests.memory="200Mi" \ | ||
--set kibana.resources.limits.memory="1Gi" \ | ||
--set kibana.commonAnnotations."app\.uw\.systems\/repos"="https://github.com/utilitywarehouse/shared-kustomize-bases/tree/main/elasticsearch" \ | ||
--set kibana.metrics.enabled="true" \ | ||
>"manifests/elasticsearch.yaml" |
Oops, something went wrong.