@leverege/build-tools 2.42.2 → 2.43.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@leverege/build-tools",
3
- "version": "2.42.2",
3
+ "version": "2.43.0",
4
4
  "description": "A collection of build / support tools for Leverege developers",
5
5
  "main": "index.js",
6
6
  "repository": {
@@ -0,0 +1,108 @@
1
+ # Foundation Chart: https://artifacthub.io/packages/helm/elastic/elasticsearch
2
+ #
3
+ # These settings are for a vanilla initial system setup. For an example of a
4
+ # much beefier ES8 deployment take a look at prd-recovr-auto, which also uses
5
+ # much bigger nodes in the elastic node pool - n2-standard-16.
6
+ #
7
+ # On a production deployment there will most likely be resource definitions
8
+ # for each of the 4 ES node types in the cluster. See prd-recovr-auto for an
9
+ # example of a big beefy system.
10
+ #
11
+ global:
12
+ storageClass: "ssd"
13
+
14
+ fullnameOverride: "elasticsearch8"
15
+ namespaceOverride: "elastic"
16
+
17
+ coordinating:
18
+ replicaCount: 3
19
+ # resources: # default from bitnami chart
20
+ # limits: {}
21
+ # requests:
22
+ # cpu: 25m
23
+ # memory: 256Mi
24
+ affinity:
25
+ nodeAffinity:
26
+ requiredDuringSchedulingIgnoredDuringExecution:
27
+ nodeSelectorTerms:
28
+ - matchExpressions:
29
+ - key: target-env
30
+ operator: In
31
+ values:
32
+ - database
33
+ tolerations:
34
+ - key: "database"
35
+ operator: "Equal"
36
+ value: "true"
37
+ effect: "NoSchedule"
38
+
39
+ data:
40
+ replicaCount: 3
41
+ # resources: # defaults from bitnami chart
42
+ # limits: {}
43
+ # requests:
44
+ # cpu: 25m
45
+ # memory: 2048Mi
46
+ persistence:
47
+ enabled: true
48
+ size: 64Gi
49
+ affinity:
50
+ nodeAffinity:
51
+ requiredDuringSchedulingIgnoredDuringExecution:
52
+ nodeSelectorTerms:
53
+ - matchExpressions:
54
+ - key: target-env
55
+ operator: In
56
+ values:
57
+ - database
58
+ tolerations:
59
+ - key: "database"
60
+ operator: "Equal"
61
+ value: "true"
62
+ effect: "NoSchedule"
63
+
64
+ ingest:
65
+ replicaCount: 3
66
+ # no default resources specified
67
+ affinity:
68
+ nodeAffinity:
69
+ requiredDuringSchedulingIgnoredDuringExecution:
70
+ nodeSelectorTerms:
71
+ - matchExpressions:
72
+ - key: target-env
73
+ operator: In
74
+ values:
75
+ - database
76
+ tolerations:
77
+ - key: "database"
78
+ operator: "Equal"
79
+ value: "true"
80
+ effect: "NoSchedule"
81
+
82
+ master:
83
+ replicaCount: 3
84
+ # resources: # example from the bitnami chart
85
+ # ## Example:
86
+ # ## limits:
87
+ # ## cpu: 500m
88
+ # ## memory: 1Gi
89
+ # limits: {}
90
+ # ## Examples:
91
+ # ## requests:
92
+ # ## cpu: 250m
93
+ # ## memory: 256Mi
94
+ # requests: {}
95
+ affinity:
96
+ nodeAffinity:
97
+ requiredDuringSchedulingIgnoredDuringExecution:
98
+ nodeSelectorTerms:
99
+ - matchExpressions:
100
+ - key: target-env
101
+ operator: In
102
+ values:
103
+ - database
104
+ tolerations:
105
+ - key: "database"
106
+ operator: "Equal"
107
+ value: "true"
108
+ effect: "NoSchedule"
@@ -2,7 +2,8 @@
2
2
  #
3
3
  showInstalling "Elastic Search 8"
4
4
 
5
- LOCAL_ES_VALUES="elasticsearch8/elasticsearch-local.yaml"
5
+ LOCAL_ES_VALUES="elasticsearch8/elasticsearch-local-dev.yaml"
6
+ #LOCAL_ES_VALUES="elasticsearch8/elasticsearch-local-prd.yaml"
6
7
  [ ! -f "$LOCAL_ES_VALUES" ] && exitOnError 1 "Missing the local ES config file => `color y $LOCAL_ES_VALUES`"
7
8
 
8
9
  addBitnamiRepo latest
@@ -12,3 +13,20 @@ helm upgrade --install elasticsearch8 bitnami/elasticsearch \
12
13
  --values $LOCAL_ES_VALUES $HELM_WHAT
13
14
 
14
15
  removeHelmRepo bitnami
16
+
17
+ ## Installing ES8 exporter
18
+ addHelmRepo prometheus-community https://prometheus-community.github.io/helm-charts
19
+ helm upgrade --install elasticsearch8-exporter prometheus-community/prometheus-elasticsearch-exporter \
20
+ --namespace monitoring \
21
+ --version 5 \
22
+ -f - <<ELASTIC8_EXPORTER_CHART_MOD
23
+ fullnameOverride: elasticsearch8-exporter
24
+
25
+ service:
26
+ annotations:
27
+ prometheus.io/port: "9108"
28
+ prometheus.io/scrape: "true"
29
+ es:
30
+ uri: http://elasticsearch8.elastic.svc.cluster.local:9200
31
+ ELASTIC8_EXPORTER_CHART_MOD
32
+ removeHelmRepo prometheus-community
package/src/helmup.sh CHANGED
@@ -51,7 +51,7 @@ SYSTEM=(
51
51
 
52
52
  function isLeveregeService() {
53
53
  local answer=0
54
- [[ ${PLATFORM[@]} =~ $1 || ${AUXILIARY[@]} =~ $1 ]] && answer=1
54
+ [[ ${PLATFORM[@]} =~ $1 || ${AUXILIARY[@]} =~ $1 || ${SYSTEM[@]} =~ $1 ]] && answer=1
55
55
  echo $answer
56
56
  }
57
57
 
@@ -271,6 +271,8 @@ function installMonitoringEnvironment() {
271
271
  --namespace monitoring \
272
272
  --version 5 \
273
273
  -f - <<ELASTIC_EXPORTER_CHART_MOD
274
+ fullnameOverride: elasticsearch8-exporter
275
+
274
276
  service:
275
277
  annotations:
276
278
  prometheus.io/port: "9108"
@@ -634,7 +636,7 @@ function doInstall() {
634
636
  [ "$INVOKED_AS" == "helmwhat" ] && HELM_WHAT="--dry-run --debug"
635
637
 
636
638
  # helminit is used to redeploy an existing service
637
- if [ "$INVOKED_AS" == "helminit" ] && [ -f "$SERVICE/helmup.plugin" ];
639
+ if [ "$INVOKED_AS" == "helminit" ] && [[ $(isLeveregeService $SERVICE) -eq 1 ]];
638
640
  then
639
641
  yesToContinue "if are you `color y certain` you want to run `color y helminit`"
640
642
  local BACKUP_DIR="$SERVICE-bak"
File without changes
@@ -1,38 +0,0 @@
1
- # Foundation Chart: https://artifacthub.io/packages/helm/elastic/elasticsearch
2
- #
3
- # esJavaOpts: "" # example: "-Xmx1g -Xms1g"
4
- #
5
- # resources:
6
- # requests:
7
- # cpu: "1000m"
8
- # memory: "2Gi"
9
- # limits:
10
- # cpu: "1000m"
11
- # memory: "2Gi"
12
-
13
- tolerations:
14
- - key: "database"
15
- operator: "Equal"
16
- value: "true"
17
- effect: "NoSchedule"
18
-
19
- nodeAffinity:
20
- requiredDuringSchedulingIgnoredDuringExecution:
21
- nodeSelectorTerms:
22
- - matchExpressions:
23
- - key: target-env
24
- operator: In
25
- values:
26
- - database
27
-
28
- # RecovR Prd Settings - very beefy on an n2-standard-8
29
- #
30
- # esJavaOpts: "-Xmx8g -Xms8g"
31
- #
32
- # resources:
33
- # requests:
34
- # cpu: "6250m"
35
- # memory: "16Gi"
36
- # limits:
37
- # cpu: "6750m"
38
- # memory: "20Gi"
@@ -1,16 +0,0 @@
1
- #!/bin/bash
2
- #
3
- # Do not move to 7.17+ until the memory explosion problem is resolved
4
- #
5
- showInstalling "Elastic Search"
6
-
7
- LOCAL_ES_VALUES="elasticsearch/elasticsearch-local.yaml"
8
- [ ! -f "$LOCAL_ES_VALUES" ] && exitOnError 1 "Missing the local ES config file => `color y $LOCAL_ES_VALUES`"
9
-
10
- addHelmRepo elastic https://helm.elastic.co
11
- helm upgrade --install elasticsearch leverege/elasticsearch \
12
- --version 7.16 \
13
- --values $LOCAL_ES_VALUES \
14
- --set volumeClaimTemplate.storageClassName="ssd" $HELM_WHAT
15
-
16
- removeHelmRepo elastic
File without changes
@@ -1,51 +0,0 @@
1
- # client / coordinating nodes - smart load balancers
2
- nodeGroup: "client"
3
- clusterName: "elasticsearch"
4
-
5
- #esJavaOpts: "-Xmx1g -Xms1g"
6
- #
7
- resources:
8
- limits: #
9
- cpu: # 1000m default
10
- memory: "2Gi" # 2Gi
11
- requests: # values.yaml defaults
12
- cpu: "200m" # 1000m
13
- memory: "1500Mi" # 2Gi
14
-
15
- volumeClaimTemplate:
16
- storageClassName: "ssd"
17
- resources:
18
- requests:
19
- storage: "1Gi"
20
-
21
- roles: # client / coordinator
22
- master: "false"
23
- ingest: "false"
24
- data: "false"
25
- remote_cluster_client: "false"
26
- ml: "false"
27
-
28
- replicas: 3
29
- antiAffinity: "hard" # hard is default
30
-
31
- esConfig:
32
- elasticsearch.yml: |
33
- xpack.security.enabled: false
34
-
35
- persistence:
36
- enabled: false
37
-
38
- tolerations:
39
- - key: "elastic"
40
- operator: "Equal"
41
- value: "true"
42
- effect: "NoSchedule"
43
-
44
- nodeAffinity:
45
- requiredDuringSchedulingIgnoredDuringExecution:
46
- nodeSelectorTerms:
47
- - matchExpressions:
48
- - key: target-env
49
- operator: In
50
- values:
51
- - elastic
@@ -1,51 +0,0 @@
1
- #
2
- nodeGroup: "data"
3
- clusterName: "elasticsearch"
4
-
5
- esJavaOpts: "-Xmx4g -Xms4g"
6
-
7
- resources:
8
- limits: #
9
- cpu: # 1000m default
10
- memory: "8Gi" # 2Gi
11
- requests: # values.yaml defaults
12
- cpu: "1000m" # 1000m
13
- memory: "4Gi" # 2Gi
14
-
15
- volumeClaimTemplate:
16
- storageClassName: "ssd"
17
- resources:
18
- requests:
19
- storage: "64Gi"
20
-
21
- roles: # data
22
- master: "false"
23
- ingest: "true"
24
- data: "true"
25
- remote_cluster_client: "false"
26
- ml: "false"
27
-
28
- replicas: 3
29
- antiAffinity: "soft" # hard is default
30
-
31
- esConfig:
32
- elasticsearch.yml: |
33
- xpack.security.enabled: false
34
-
35
- persistence:
36
- enabled: true
37
-
38
- tolerations:
39
- - key: "elastic"
40
- operator: "Equal"
41
- value: "true"
42
- effect: "NoSchedule"
43
-
44
- nodeAffinity:
45
- requiredDuringSchedulingIgnoredDuringExecution:
46
- nodeSelectorTerms:
47
- - matchExpressions:
48
- - key: target-env
49
- operator: In
50
- values:
51
- - elastic
@@ -1,51 +0,0 @@
1
- # master - manages indexes, tracks nodes and shards
2
- nodeGroup: "master"
3
- clusterName: "elasticsearch"
4
-
5
- #esJavaOpts: "-Xmx1g -Xms1g"
6
- #
7
- resources:
8
- limits: #
9
- cpu: # 1000m default
10
- memory: "2Gi" # 2Gi
11
- requests: # values.yaml defaults
12
- cpu: "100m" # 1000m
13
- memory: "1500Mi" # 2Gi
14
-
15
- volumeClaimTemplate:
16
- storageClassName: "ssd"
17
- resources:
18
- requests:
19
- storage: "4Gi"
20
-
21
- roles: # master
22
- master: "true"
23
- ingest: "false"
24
- data: "false"
25
- remote_cluster_client: "false"
26
- ml: "false"
27
-
28
- replicas: 3
29
- antiAffinity: "hard" # hard is default
30
-
31
- esConfig:
32
- elasticsearch.yml: |
33
- xpack.security.enabled: false
34
-
35
- persistence:
36
- enabled: true
37
-
38
- tolerations:
39
- - key: "elastic"
40
- operator: "Equal"
41
- value: "true"
42
- effect: "NoSchedule"
43
-
44
- nodeAffinity:
45
- requiredDuringSchedulingIgnoredDuringExecution:
46
- nodeSelectorTerms:
47
- - matchExpressions:
48
- - key: target-env
49
- operator: In
50
- values:
51
- - elastic
@@ -1,23 +0,0 @@
1
- #!/bin/bash
2
- #
3
- # Do not move to 7.17+ until the memory explosion problem is resolved
4
- #
5
- ES_VERSION="7.16"
6
-
7
- showInstalling "Elastic Search Cluster v${ES_VERSION}"
8
-
9
- addHelmRepo elastic https://helm.elastic.co
10
-
11
- deployES() {
12
- ES_TYPE="elasticsearch-${1}"
13
- printf "\n Deploying ES cluster component: `color y "$ES_TYPE"`\n"
14
- helm upgrade --install $ES_TYPE elastic/elasticsearch \
15
- --version $ES_VERSION \
16
- --values elasticsearch-cluster/$ES_TYPE.yaml $HELM_WHAT
17
- }
18
-
19
- deployES "master"
20
- deployES "client"
21
- deployES "data"
22
-
23
- removeHelmRepo elastic