@leverege/build-tools 2.14.2 → 2.15.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/lib/server/repo-init/config.tgz +0 -0
- package/package.json +5 -5
- package/src/helmdn +1 -0
- package/src/helmup +40 -31
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@leverege/build-tools",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.15.0",
|
|
4
4
|
"description": "A collection of build / support tools for Leverege developers",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"repository": {
|
|
@@ -68,14 +68,14 @@
|
|
|
68
68
|
"parse-gitignore": "^1.0.1",
|
|
69
69
|
"readline-sync": "^1.4.10",
|
|
70
70
|
"semver": "^7.3.7",
|
|
71
|
-
"simple-git": "^3.
|
|
71
|
+
"simple-git": "^3.9.0"
|
|
72
72
|
},
|
|
73
73
|
"devDependencies": {
|
|
74
74
|
"@babel/cli": "^7.17.10",
|
|
75
|
-
"@babel/core": "^7.18.
|
|
76
|
-
"@babel/node": "^7.
|
|
75
|
+
"@babel/core": "^7.18.5",
|
|
76
|
+
"@babel/node": "^7.18.5",
|
|
77
77
|
"@leverege/babel-preset-leverege-node": "^2.0.0",
|
|
78
78
|
"@leverege/eslint-config-leverege": "^3.0.1",
|
|
79
|
-
"npm": "^8.12.
|
|
79
|
+
"npm": "^8.12.2"
|
|
80
80
|
}
|
|
81
81
|
}
|
package/src/helmdn
CHANGED
package/src/helmup
CHANGED
|
@@ -25,6 +25,7 @@ PLATFORM=(
|
|
|
25
25
|
transponder-bq
|
|
26
26
|
transponder-rt
|
|
27
27
|
transponder-postgres
|
|
28
|
+
transponder-tsdb
|
|
28
29
|
)
|
|
29
30
|
|
|
30
31
|
SYSTEM=(
|
|
@@ -149,7 +150,7 @@ function installPrometheus() {
|
|
|
149
150
|
}
|
|
150
151
|
|
|
151
152
|
function installMonitoringCharts(){
|
|
152
|
-
showInstalling "
|
|
153
|
+
showInstalling "Monitoring Components"
|
|
153
154
|
createNamespaceIfNeeded monitoring
|
|
154
155
|
|
|
155
156
|
# Add necessary helm repositories - note that stable is deprecated
|
|
@@ -160,8 +161,8 @@ function installMonitoringCharts(){
|
|
|
160
161
|
|
|
161
162
|
IFS='_'
|
|
162
163
|
read -ra ADDR <<< "$currContext"
|
|
163
|
-
|
|
164
164
|
KUBERNETES_ENV=${ADDR[0]} # should be either gke or eks
|
|
165
|
+
GCP_PROJECT_ID=${ADDR[1]} # project id is the second string split by _
|
|
165
166
|
|
|
166
167
|
## Installing stackdriver exporter in GKE
|
|
167
168
|
if [[ "$KUBERNETES_ENV" = "gke" ]];
|
|
@@ -173,28 +174,16 @@ function installMonitoringCharts(){
|
|
|
173
174
|
|
|
174
175
|
The stackdriver-exporter SA already exists which means installing the
|
|
175
176
|
helm chart is going to fail because it wants to manage that aspect of the
|
|
176
|
-
system.
|
|
177
|
+
system. This most likely because the stackdriver exporter is already
|
|
178
|
+
installed and running. Run the following helm command to uninstall first:
|
|
179
|
+
|
|
180
|
+
`color y "overwhelm && helm uninstall -n monitoring stackdriver-exporter"`
|
|
177
181
|
|
|
178
182
|
SA_EXISTS
|
|
179
|
-
|
|
180
|
-
exitOnError 1 "Must remove the SA in order to proceed - `color r DANGER`"
|
|
183
|
+
exitOnError 1 "uninstall the existing deployment in order to proceed"
|
|
181
184
|
fi
|
|
182
185
|
|
|
183
|
-
GCP_PROJECT_ID=${ADDR[1]} # project id is the second string split by _
|
|
184
186
|
SDEXP_SA='stackdriver-exporter'
|
|
185
|
-
helm upgrade --install stackdriver-exporter \
|
|
186
|
-
prometheus-community/prometheus-stackdriver-exporter \
|
|
187
|
-
--namespace monitoring \
|
|
188
|
-
--values stackdriver-exporter/values.yaml \
|
|
189
|
-
--version 1.12.0
|
|
190
|
-
|
|
191
|
-
# Verify the Kubernetes SA
|
|
192
|
-
kubectl get sa -n monitoring $SDEXP_SA
|
|
193
|
-
if [[ $? -eq 1 ]];
|
|
194
|
-
then
|
|
195
|
-
printf "The $SDEXP_SA SA seems to be missing, which is weird - creating it now\n"
|
|
196
|
-
kubectl create sa -n monitoring stackdriver-exporter
|
|
197
|
-
fi
|
|
198
187
|
|
|
199
188
|
# NOTE: The k8s SA != GCP SA - the former is created by the helm chart
|
|
200
189
|
# that installs the stackdriver-exporter, the latter is handled here in
|
|
@@ -203,7 +192,8 @@ SA_EXISTS
|
|
|
203
192
|
# Create GCP SA and bind policies
|
|
204
193
|
printf "\n*** Creating GCP SA with monitoring/viewer ***\n"
|
|
205
194
|
gcloud iam service-accounts create $SDEXP_SA \
|
|
206
|
-
--project "$GCP_PROJECT_ID"
|
|
195
|
+
--project "$GCP_PROJECT_ID" \
|
|
196
|
+
--display-name "Prometheus Stackdriver Exporter"
|
|
207
197
|
warnOnError $? "the GCP SA $SDEXP_SA may already exist"
|
|
208
198
|
|
|
209
199
|
printf "\n*** Binding IAM role of monitoring viewer to stackdriver-exporter in $GCP_PROJECT_ID\n"
|
|
@@ -218,11 +208,26 @@ SA_EXISTS
|
|
|
218
208
|
--member "serviceAccount:$GCP_PROJECT_ID.svc.id.goog[monitoring/$SDEXP_SA]" \
|
|
219
209
|
"$SDEXP_SA@$GCP_PROJECT_ID.iam.gserviceaccount.com"
|
|
220
210
|
|
|
221
|
-
#
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
--namespace monitoring
|
|
211
|
+
# The GCP SA is now up but slight delay before launch helm to let the IAM update occur
|
|
212
|
+
sleep 2
|
|
213
|
+
helm upgrade --install stackdriver-exporter \
|
|
214
|
+
prometheus-community/prometheus-stackdriver-exporter \
|
|
215
|
+
--namespace monitoring \
|
|
216
|
+
--values stackdriver-exporter/values.yaml \
|
|
217
|
+
--version 3
|
|
218
|
+
|
|
219
|
+
# Verify the Kubernetes SA
|
|
220
|
+
kubectl get sa -n monitoring $SDEXP_SA
|
|
221
|
+
if [[ $? -eq 1 ]];
|
|
222
|
+
then
|
|
223
|
+
printf "The $SDEXP_SA SA seems to be missing - did startup fail?\n"
|
|
224
|
+
else
|
|
225
|
+
# Annotate Kubernetes SA
|
|
226
|
+
printf "\n*** Annotating the stackdriver-exporter SA\n"
|
|
227
|
+
kubectl annotate serviceaccount $SDEXP_SA \
|
|
228
|
+
"iam.gke.io/gcp-service-account=$SDEXP_SA@$GCP_PROJECT_ID.iam.gserviceaccount.com" \
|
|
229
|
+
--namespace monitoring
|
|
230
|
+
fi
|
|
226
231
|
fi
|
|
227
232
|
|
|
228
233
|
## Install Prometheus
|
|
@@ -232,14 +237,14 @@ SA_EXISTS
|
|
|
232
237
|
helm upgrade --install elasticsearch-exporter prometheus-community/prometheus-elasticsearch-exporter \
|
|
233
238
|
--namespace monitoring \
|
|
234
239
|
--values elasticsearch-exporter/values-es-exporter.yaml \
|
|
235
|
-
--version 4.
|
|
240
|
+
--version 4.13
|
|
236
241
|
|
|
237
242
|
## Install Grafana
|
|
238
243
|
addHelmRepo grafana https://grafana.github.io/helm-charts
|
|
239
244
|
helm upgrade --install grafana grafana/grafana \
|
|
240
245
|
--namespace monitoring \
|
|
241
246
|
--values grafana/values-grafana.yaml \
|
|
242
|
-
--version 6
|
|
247
|
+
--version 6 # latest v8 grafana
|
|
243
248
|
|
|
244
249
|
## Clean up
|
|
245
250
|
removeHelmRepo prometheus-community
|
|
@@ -321,7 +326,6 @@ function installPreemptibleKiller() {
|
|
|
321
326
|
printf "\nCreating the gcloud $SVC_ACCT service account (SA)\n"
|
|
322
327
|
gcloud iam service-accounts create $SVC_ACCT \
|
|
323
328
|
--project $PROJECT_ID \
|
|
324
|
-
--display-name "Estafette Node Killer"
|
|
325
329
|
warnOnError $? "SA creation may have failed or it already exists"
|
|
326
330
|
|
|
327
331
|
printf "\nCreate the $SVC_ACCT IAM role\n"
|
|
@@ -456,7 +460,7 @@ NEED_MANAGED_SECRET
|
|
|
456
460
|
addHelmRepo jetstack https://charts.jetstack.io
|
|
457
461
|
helm upgrade --install cert-manager jetstack/cert-manager \
|
|
458
462
|
--namespace cert-manager --set installCRDs=true \
|
|
459
|
-
--version v1.
|
|
463
|
+
--version v1.8
|
|
460
464
|
|
|
461
465
|
cat<<DELAY
|
|
462
466
|
|
|
@@ -531,10 +535,12 @@ TRAEFIK_CFG
|
|
|
531
535
|
|
|
532
536
|
addHelmRepo traefik https://helm.traefik.io/traefik
|
|
533
537
|
|
|
538
|
+
[ -z "$TRAEFIK_HELM_CHART" ] && TRAEFIK_HELM_CHART="10"
|
|
534
539
|
helm upgrade --install traefik traefik/traefik \
|
|
535
540
|
--namespace traefik \
|
|
536
|
-
--
|
|
537
|
-
|
|
541
|
+
--version $TRAEFIK_HELM_CHART \
|
|
542
|
+
--values $TRAEFIK_HA_YAML
|
|
543
|
+
|
|
538
544
|
removeHelmRepo traefik
|
|
539
545
|
}
|
|
540
546
|
|
|
@@ -644,6 +650,7 @@ function installVelero() {
|
|
|
644
650
|
## Helpful debugging link => https://github.com/vmware-tanzu/helm-charts/issues/351
|
|
645
651
|
addHelmRepo vmware-tanzu https://vmware-tanzu.github.io/helm-charts
|
|
646
652
|
helm upgrade --install velero vmware-tanzu/velero \
|
|
653
|
+
--version 2.29 \
|
|
647
654
|
--namespace velero \
|
|
648
655
|
--set credentials.useSecret="false" \
|
|
649
656
|
--set configuration.provider="gcp" \
|
|
@@ -798,6 +805,7 @@ function doInstall() {
|
|
|
798
805
|
checkSSDStorageClass
|
|
799
806
|
addHelmRepo elastic https://helm.elastic.co
|
|
800
807
|
helm upgrade --install elasticsearch elastic/elasticsearch \
|
|
808
|
+
--version 7 \
|
|
801
809
|
--values $LOCAL_ES_VALUES \
|
|
802
810
|
--set volumeClaimTemplate.storageClassName="ssd"
|
|
803
811
|
removeHelmRepo elastic
|
|
@@ -833,6 +841,7 @@ function doInstall() {
|
|
|
833
841
|
[ -z "$REDIS_HELM_CHART" ] && REDIS_HELM_CHART="13.0.1" # latest breaks us => "v14+"
|
|
834
842
|
helm upgrade --install redis bitnami/redis \
|
|
835
843
|
-f redis/redis-values.yaml \
|
|
844
|
+
--set auth.enabled=false \
|
|
836
845
|
--version $REDIS_HELM_CHART
|
|
837
846
|
printf "\n\nTo start a specific version => `color g 'REDIS_HELM_CHART="13.0.1" helmup redis'`\n\n"
|
|
838
847
|
removeHelmRepo bitnami
|