@leverege/build-tools 2.51.0 → 2.51.1

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.51.0",
3
+ "version": "2.51.1",
4
4
  "description": "A collection of build / support tools for Leverege developers",
5
5
  "main": "index.js",
6
6
  "repository": {
@@ -58,13 +58,13 @@
58
58
  "ansi-colors": "^4.1.3",
59
59
  "chalk": "^5.3.0",
60
60
  "command-line-args": "^6.0.0",
61
- "command-line-usage": "^7.0.2",
61
+ "command-line-usage": "^7.0.3",
62
62
  "deepmerge": "^4.3.1",
63
63
  "enquirer": "^2.4.1",
64
- "execa": "^9.3.0",
64
+ "execa": "^9.3.1",
65
65
  "glob": "^11.0.0",
66
66
  "handlebars": "^4.7.8",
67
- "inquirer": "^10.0.1",
67
+ "inquirer": "^10.2.2",
68
68
  "js-yaml": "^4.1.0",
69
69
  "ms": "^2.1.3",
70
70
  "npm-registry-fetch": "^17.1.0",
@@ -72,12 +72,12 @@
72
72
  "parse-gitignore": "^2.0.0",
73
73
  "read-pkg": "^9.0.1",
74
74
  "readline-sync": "^1.4.10",
75
- "semver": "^7.6.2",
76
- "simple-git": "^3.25.0",
77
- "zx": "^8.1.4"
75
+ "semver": "^7.6.3",
76
+ "simple-git": "^3.26.0",
77
+ "zx": "^8.1.6"
78
78
  },
79
79
  "devDependencies": {
80
80
  "@leverege/eslint-config-leverege": "^4.2.0",
81
- "npm": "^10.8.2"
81
+ "npm": "^10.8.3"
82
82
  }
83
83
  }
@@ -7,13 +7,16 @@ metadata:
7
7
  namespace: cnpg-operands
8
8
  spec:
9
9
  instances: 1
10
- # logLevel: debug
10
+ logLevel: info # warning debug
11
+
12
+ monitoring:
13
+ enablePodMonitor: false # set true once monitoring is setup
11
14
 
12
15
  description: "Leverege Stack PostgreSQL DB"
13
- imageName: us-docker.pkg.dev/leverege-registry/system/images/leverege-pgsql:16.2-cnpg-tsdb2-beta.4
16
+ imageName: us-docker.pkg.dev/leverege-registry/system/images/leverege-pgsql:16.4-cnpg-tsdb2-rel.1
14
17
  bootstrap:
15
18
  initdb:
16
- # database: models
19
+ # database: models # do not set - let it default to cnpg app db
17
20
  postInitSQL:
18
21
  # - CREATE DATABASE app; # operator expects this
19
22
  # - CREATE ROLE app; # and this to exist on restore
@@ -23,9 +26,6 @@ spec:
23
26
  - CREATE DATABASE geotile;
24
27
  - CREATE DATABASE models;
25
28
  - CREATE DATABASE scheduler;
26
- # owner: imagine
27
- # secret:
28
- # name: cnpg-db-psql-stack-imagine-pw # imagine db pw
29
29
 
30
30
  enableSuperuserAccess: true
31
31
  superuserSecret:
@@ -52,7 +52,7 @@ spec:
52
52
  # to the default ones to make the cluster work
53
53
  postgresql:
54
54
  parameters:
55
- max_connections: "123"
55
+ # max_connections: "100"
56
56
  # max_worker_processes: "60"
57
57
  # max_worker_processes: "8"
58
58
  # max_parallel_workers: "8"
@@ -81,7 +81,7 @@ spec:
81
81
  # size: 1Gi
82
82
 
83
83
  backup:
84
- retentionPolicy: 30d
84
+ retentionPolicy: 7d # don't think this does anything?
85
85
  volumeSnapshot:
86
86
  labels:
87
87
  snapshotOf: cnpg-db-psql-stack
@@ -106,6 +106,6 @@ spec:
106
106
  schedule: "0 0 */12 * * *"
107
107
  cluster:
108
108
  name: cnpg-db-psql-stack
109
- method: barmanObjectStore # volumeSnapshot
109
+ method: volumeSnapshot # barmanObjectStore
110
110
  backupOwnerReference: self
111
111
  immediate: true
@@ -13,18 +13,19 @@ spec:
13
13
  enablePodMonitor: false # set true once monitoring is setup
14
14
 
15
15
  description: "Leverege Plain Timescale DB"
16
- imageName: us-docker.pkg.dev/leverege-registry/system/images/leverege-pgsql:16.2-cnpg-tsdb2-beta.4
16
+ imageName: us-docker.pkg.dev/leverege-registry/system/images/leverege-pgsql:16.3-cnpg-tsdb2-beta.2
17
17
  bootstrap:
18
18
  initdb:
19
+ # database: imagine # let it default to cnpg app db
19
20
  postInitTemplateSQL:
20
21
  - CREATE EXTENSION timescaledb;
21
22
  - CREATE EXTENSION jsquery;
22
- - CREATE DATABASE app; # for the operator restores
23
- - CREATE ROLE app; # same
24
- database: imagine
25
- owner: imagine
26
- secret:
27
- name: cnpg-db-tsdb-basic-imagine-pw # imagine db pw
23
+ - CREATE DATABASE imagine
24
+ # - CREATE DATABASE app; # for the operator restores
25
+ # - CREATE ROLE app; # same
26
+ # owner: imagine
27
+ # secret:
28
+ # name: cnpg-db-tsdb-basic-imagine-pw # imagine db pw
28
29
 
29
30
  enableSuperuserAccess: true
30
31
  superuserSecret:
@@ -54,7 +55,7 @@ spec:
54
55
  - timescaledb
55
56
  - jsquery
56
57
  parameters:
57
- max_connections: "123"
58
+ # max_connections: "100"
58
59
  # max_worker_processes: "60"
59
60
  # max_worker_processes: "8"
60
61
  # max_parallel_workers: "8"
@@ -108,6 +109,6 @@ spec:
108
109
  schedule: "0 0 */12 * * *"
109
110
  cluster:
110
111
  name: cnpg-db-tsdb-basic
111
- method: volumeSnapshot
112
+ method: volumeSnapshot # barmanObjectStore
112
113
  backupOwnerReference: self
113
114
  immediate: true
@@ -13,18 +13,15 @@ spec:
13
13
  enablePodMonitor: false # set true once monitoring is setup
14
14
 
15
15
  description: "Leverege Dense Timescale DB"
16
- imageName: us-docker.pkg.dev/leverege-registry/system/images/leverege-pgsql:16.2-cnpg-tsdb2-beta.4
16
+ imageName: us-docker.pkg.dev/leverege-registry/system/images/leverege-pgsql:16.3-cnpg-tsdb2-beta.2
17
17
  bootstrap:
18
18
  initdb:
19
19
  postInitTemplateSQL:
20
20
  - CREATE EXTENSION timescaledb;
21
21
  - CREATE EXTENSION jsquery;
22
- - CREATE DATABASE app; # for the operator restores
23
- - CREATE ROLE app; # same
24
- database: imagine
25
- owner: imagine
26
- secret:
27
- name: cnpg-db-tsdb-dense-imagine-pw # imagine db pw
22
+ - CREATE DATABASE imagine; # leverege tsdb db
23
+ # secret:
24
+ # name: cnpg-db-tsdb-dense-imagine-pw # imagine db pw
28
25
 
29
26
  enableSuperuserAccess: true
30
27
  superuserSecret:
@@ -1,10 +1,18 @@
1
1
  #!/bin/bash
2
2
  #
3
- # See => https://github.com/cloudnative-pg/charts
4
- addHelmRepo cnpg https://cloudnative-pg.github.io/charts
3
+ # See => https://cloudnative-pg.io/documentation/current/installation_upgrade/
5
4
 
6
- helm upgrade --install cnpg cnpg/cloudnative-pg \
7
- --namespace cnpg-system --create-namespace \
8
- --set webhook.port="10250" $HELM_WHAT
5
+ OPVER="1.24.0"
9
6
 
10
- removeHelmRepo cnpg
7
+ kubectl apply --server-side -f \
8
+ https://raw.githubusercontent.com/cloudnative-pg/cloudnative-pg/release-${OPVER%.*}/releases/cnpg-${OPVER}.yaml $K8S_WHAT
9
+
10
+ # Old approach used the helm chart.
11
+ #
12
+ #addHelmRepo cnpg https://cloudnative-pg.github.io/charts
13
+ #
14
+ #helm upgrade --install cnpg cnpg/cloudnative-pg \
15
+ # --namespace cnpg-system --create-namespace \
16
+ # --set webhook.port="10250" $HELM_WHAT
17
+ #
18
+ #removeHelmRepo cnpg
@@ -2,13 +2,14 @@
2
2
  #
3
3
  showInstalling "Elastic Search 8"
4
4
 
5
+ [ -z "$ELASTIC_CHART_VERSION" ] && ELASTIC_CHART_VERSION="21.3.10"
6
+
5
7
  OCI_CHART="oci://registry-1.docker.io/bitnamicharts/elasticsearch"
6
8
 
7
9
  LOCAL_ES_VALUES="elasticsearch8/elasticsearch-local-dev.yaml"
8
10
  #LOCAL_ES_VALUES="elasticsearch8/elasticsearch-local-prd.yaml"
9
11
  [ ! -f "$LOCAL_ES_VALUES" ] && exitOnError 1 "Missing the local ES config file => `color y $LOCAL_ES_VALUES`"
10
12
 
11
- [ -z "$ELASTIC_CHART_VERSION" ] && ELASTIC_CHART_VERSION="19.21.2"
12
13
  helm upgrade --install elasticsearch8 $OCI_CHART \
13
14
  --namespace elastic --create-namespace \
14
15
  --values $LOCAL_ES_VALUES \
@@ -18,7 +19,7 @@ helm upgrade --install elasticsearch8 $OCI_CHART \
18
19
  addHelmRepo prometheus-community https://prometheus-community.github.io/helm-charts
19
20
  helm upgrade --install elasticsearch8-exporter prometheus-community/prometheus-elasticsearch-exporter \
20
21
  --namespace monitoring --create-namespace \
21
- --version 5 \
22
+ --version 6 \
22
23
  -f - <<ELASTIC8_EXPORTER_CHART_MOD
23
24
  fullnameOverride: elasticsearch8-exporter
24
25
 
@@ -4,10 +4,13 @@ showInstalling "PostgreSQL Database"
4
4
 
5
5
  errorIfMissingSecret authz-postgres
6
6
 
7
- addBitnamiRepo # latest
7
+ # addBitnamiRepo # latest
8
8
 
9
- [ -z "$POSTGRESQL_CHART_VERSION" ] && POSTGRESQL_CHART_VERSION="10"
10
- helm upgrade --install postgres bitnami/postgresql \
9
+ OCI_CHART="oci://registry-1.docker.io/bitnamicharts/postgresql"
10
+
11
+ [ -z "$POSTGRESQL_CHART_VERSION" ] && POSTGRESQL_CHART_VERSION="15.5.22"
12
+
13
+ helm upgrade --install postgres $OCI_CHART \
11
14
  --values postgres/postgres-local.yaml \
12
15
  --version $POSTGRESQL_CHART_VERSION $HELM_WHAT
13
16
 
File without changes
@@ -1,13 +1,14 @@
1
1
  #!/bin/bash
2
2
  #
3
- showInstalling "The Prometheus Kube Stack"
3
+ showInstalling "The Prometheus Operator (kube-prometheus-stack)"
4
4
 
5
5
  addHelmRepo prometheus-community https://prometheus-community.github.io/helm-charts
6
6
 
7
- [ -z "$PROMETHEUS_STACK_CHART_VERSION" ] && PROMETHEUS_STACK_CHART_VERSION="57"
7
+ [ -z "$PROMETHEUS_STACK_CHART_VERSION" ] && PROMETHEUS_STACK_CHART_VERSION="62"
8
8
 
9
9
  helm upgrade --install prometheus-stack prometheus-community/kube-prometheus-stack \
10
10
  --namespace prometheus --create-namespace \
11
+ --values prometheus-operator/prometheus-stack.yaml \
11
12
  --version $PROMETHEUS_STACK_CHART_VERSION $HELM_WHAT
12
13
 
13
14
  removeHelmRepo prometheus-community
@@ -0,0 +1,59 @@
1
+ # Bootstrapped from the cnpg monitoring setup
2
+ enabled: true
3
+ kubeControllerManager:
4
+ enabled: false
5
+ nodeExporter:
6
+ enabled: false
7
+ defaultRules:
8
+ create: true
9
+ rules:
10
+ alertmanager: false
11
+ etcd: false
12
+ configReloaders: false
13
+ general: false
14
+ k8s: true
15
+ kubeApiserver: false
16
+ kubeApiserverAvailability: false
17
+ kubeApiserverSlos: false
18
+ kubelet: true
19
+ kubeProxy: false
20
+ kubePrometheusGeneral: false
21
+ kubePrometheusNodeRecording: false
22
+ kubernetesApps: false
23
+ kubernetesResources: false
24
+ kubernetesStorage: false
25
+ kubernetesSystem: false
26
+ kubeScheduler: false
27
+ kubeStateMetrics: false
28
+ network: false
29
+ node: true
30
+ nodeExporterAlerting: false
31
+ nodeExporterRecording: true
32
+ prometheus: false
33
+ prometheusOperator: false
34
+
35
+ #nodeSelector:
36
+ #workload: monitor
37
+ prometheus:
38
+ prometheusSpec:
39
+ podMonitorSelectorNilUsesHelmValues: false
40
+ ruleSelectorNilUsesHelmValues: false
41
+ serviceMonitorSelectorNilUsesHelmValues: false
42
+ probeSelectorNilUsesHelmValues: false
43
+ #nodeSelector:
44
+ #workload: monitor
45
+ grafana:
46
+ enabled: true
47
+ # -- the grafana admin password
48
+ adminPassword: prom-operator
49
+ defaultDashboardsEnabled: false
50
+ sidecar:
51
+ dashboards:
52
+ enabled: true
53
+ #nodeSelector:
54
+ #workload: monitor
55
+ alertmanager:
56
+ enabled: true
57
+ #alertManagerSpec:
58
+ #nodeSelector:
59
+ #workload: monitor
@@ -4,7 +4,7 @@ showInstalling "Redis"
4
4
 
5
5
  OCI_CHART="oci://registry-1.docker.io/bitnamicharts/redis"
6
6
 
7
- [ -z "$REDIS_CHART_VERSION" ] && REDIS_CHART_VERSION="19.6.1"
7
+ [ -z "$REDIS_CHART_VERSION" ] && REDIS_CHART_VERSION="20.0.5"
8
8
 
9
9
  helm upgrade --install redis $OCI_CHART \
10
10
  --values redis/redis-local.yaml \
@@ -10,8 +10,8 @@ config:
10
10
  DENSE_HISTORY_TDB_CACHE_KEY_PREFIX: "timescale-dh"
11
11
  DENSE_HISTORY_MIGRATE_PAGE_SIZE_LIMIT: "50"
12
12
 
13
- # PG_HOST: "cnpg-db-tsdb-dense-rw"
14
- PG_HOST: "cnpg-db-tsdb-dense-pool-rw.cnpg-operands"
13
+ PG_HOST: "cnpg-db-tsdb-dense-rw.cnpg-operands"
14
+ # PG_HOST: "cnpg-db-tsdb-dense-pool-rw.cnpg-operands"
15
15
 
16
16
  # password from secret
17
17
  PG_PASSWORD_SECRET: "cnpg-db-tsdb-dense-postgres-pw"
@@ -15,6 +15,9 @@ config:
15
15
 
16
16
  # CNPG override
17
17
  # PG_HOST: "cnpg-db-tsdb-basic-rw.cnpg-operands"
18
+ #
19
+ # PG_PASSWORD_SECRET: "cnpg-db-tsdb-basic-postgres-pw"
20
+ # PG_PASSWORD_KEY: "password"
18
21
 
19
22
  TRANSPORT_CONFIG: '{
20
23
  "type": "pubsub",
package/src/helmup.sh CHANGED
@@ -47,13 +47,26 @@ AUXILIARY=(
47
47
  vin-decoder-server
48
48
  )
49
49
 
50
- # zombie-killer disabled 20231228
50
+ # zombie-killer re-enabled 20240801
51
51
  SYSTEM=(
52
+ elasticsearch8
53
+ redis
54
+ cnpg-operator
55
+ preemptible-killer
56
+ zombie-killer
57
+ reflector
58
+ reloader
59
+ traefik
60
+ velero
61
+ )
62
+
63
+ SYSTEM_LEGACY=(
52
64
  elasticsearch8
53
65
  redis
54
66
  postgres
55
67
  timescale-db
56
68
  preemptible-killer
69
+ zombie-killer
57
70
  reflector
58
71
  reloader
59
72
  traefik
@@ -63,7 +76,7 @@ SYSTEM=(
63
76
 
64
77
  function isLeveregeService() {
65
78
  local answer=0
66
- [[ ${PLATFORM[@]} =~ $1 || ${AUXILIARY[@]} =~ $1 || ${SYSTEM[@]} =~ $1 ]] && answer=1
79
+ [[ ${PLATFORM[@]} =~ $1 || ${AUXILIARY[@]} =~ $1 || ${SYSTEM_LEGACY[@]}} =~ 1 || ${SYSTEM[@]} =~ $1 ]] && answer=1
67
80
  echo $answer
68
81
  }
69
82
 
@@ -880,6 +893,10 @@ CATBACKUP
880
893
  doInstall "${PLATFORM[@]}"
881
894
  ;;
882
895
 
896
+ "system-legacy")
897
+ doInstall "${SYSTEM_LEGACY[@]}"
898
+ ;;
899
+
883
900
  "system")
884
901
  doInstall "${SYSTEM[@]}"
885
902
  ;;
@@ -967,7 +984,7 @@ CATBACKUP
967
984
  bootstrapLocalSetup $SERVICE
968
985
  ;;
969
986
 
970
- "prometheus")
987
+ "prometheus"|"prometheus-operator")
971
988
  bootstrapLocalSetup $SERVICE
972
989
  ;;
973
990
 
package/src/overwhelm.mjs CHANGED
@@ -64,7 +64,7 @@ if ( !fs.existsSync( 'overwhelm.yaml' ) ) {
64
64
  process.exit( 1 )
65
65
  }
66
66
 
67
- if ( fs.existsSync( 'values-default.yaml' ) ) {
67
+ if ( !args.key && fs.existsSync( 'values-default.yaml' ) ) {
68
68
  log( chalk.red.bold( `
69
69
 
70
70
  ***ERROR overwhelm => values-default.yaml is no longer used/supported and will