-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathk8s-install.sh
More file actions
67 lines (59 loc) · 2.73 KB
/
k8s-install.sh
File metadata and controls
67 lines (59 loc) · 2.73 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
#!/bin/bash
OLLAMA_BASE_URL=""
OLLAMA_MODEL=""
OLLAMA_API_KEY=""
# paste key as one line
echo "JWT_PRIV_KEY" > priv.pem
echo "JWT_PUB_KEY" > pub.pem
DISCORD_WEBHOOK=""
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
helm dependency update ./helm/aihr
tar -xvzf helm/aihr/charts/grafana-9.2.10.tgz
rm helm/aihr/charts/grafana-9.2.10.tgz
cp -r ./dashboards/* ./helm/aihr/charts/grafana/dashboards/
helm upgrade --install ai-hr-dev ./helm/aihr \
--namespace ai-hr-dev --create-namespace \
-f "${SCRIPT_DIR}/helm/aihr/values-dev.yaml" \
-f "${SCRIPT_DIR}/helm/aihr/values-dev-prometheus.yaml" \
-f "${SCRIPT_DIR}/helm/aihr/values-dev-grafana.yaml" \
-f "${SCRIPT_DIR}/helm/aihr/values-dev-loki.yaml" \
-f "${SCRIPT_DIR}/helm/aihr/values-dev-promtail.yaml" \
-f "${SCRIPT_DIR}/helm/aihr/values-dev-frontend.yaml" \
-f "${SCRIPT_DIR}/helm/aihr/values-common-loki.yaml" \
-f "${SCRIPT_DIR}/helm/aihr/values-common-promtail.yaml" \
-f "${SCRIPT_DIR}/helm/aihr/values-common-prometheus.yaml" \
-f "${SCRIPT_DIR}/helm/aihr/values-common-grafana.yaml" \
-f "${SCRIPT_DIR}/helm/aihr/values-common-discord-alert.yaml" \
--set discordWebhook.url="${DISCORD_WEBHOOK}" \
--set global.ghcrUser=aet-devops25 \
--set global.ghcrRepo=team-1 \
--set global.imageTag="$(git rev-parse --short HEAD)" \
--set-file global.jwt.privateKey=priv.pem \
--set-file global.jwt.publicKey=pub.pem \
--set global.ollama.ollamaBaseUrl="${OLLAMA_BASE_URL}" \
--set global.ollama.ollamaModel="${OLLAMA_MODEL}" \
--set global.ollama.ollamaApiKey="${OLLAMA_API_KEY}" \
--wait --timeout 15m
helm upgrade --install ai-hr-prod ./helm/aihr \
--namespace ai-hr --create-namespace \
-f "${SCRIPT_DIR}/helm/aihr/values-prod.yaml" \
-f "${SCRIPT_DIR}/helm/aihr/values-prod-prometheus.yaml" \
-f "${SCRIPT_DIR}/helm/aihr/values-prod-grafana.yaml" \
-f "${SCRIPT_DIR}/helm/aihr/values-prod-loki.yaml" \
-f "${SCRIPT_DIR}/helm/aihr/values-prod-promtail.yaml" \
-f "${SCRIPT_DIR}/helm/aihr/values-prod-frontend.yaml" \
-f "${SCRIPT_DIR}/helm/aihr/values-common-loki.yaml" \
-f "${SCRIPT_DIR}/helm/aihr/values-common-promtail.yaml" \
-f "${SCRIPT_DIR}/helm/aihr/values-common-prometheus.yaml" \
-f "${SCRIPT_DIR}/helm/aihr/values-common-grafana.yaml" \
-f "${SCRIPT_DIR}/helm/aihr/values-common-discord-alert.yaml" \
--set discordWebhook.url="${DISCORD_WEBHOOK}" \
--set global.ghcrUser=aet-devops25 \
--set global.ghcrRepo=team-1 \
--set global.imageTag="$(git rev-parse --short HEAD)" \
--set-file global.jwt.privateKey=priv.pem \
--set-file global.jwt.publicKey=pub.pem \
--set global.ollama.ollamaBaseUrl="${OLLAMA_BASE_URL}" \
--set global.ollama.ollamaModel="${OLLAMA_MODEL}" \
--set global.ollama.ollamaApiKey="${OLLAMA_API_KEY}" \
--wait