-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathMakefile
87 lines (74 loc) · 2.88 KB
/
Makefile
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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
branch = main # defaults
all:
echo "package, upload, index. deploy will do all."
deploy: package upload index
echo "done"
package:
git checkout $(branch)
rm -rf .deploy/*
helm package charts/orb -u --destination .deploy
upload:
git checkout $(branch)
cr upload --config cr-config.yaml --token $(ghtoken)
index:
git checkout gh-pages
cr index -i ./index.yaml --config cr-config.yaml --token $(ghtoken) -c https://orb-community.github.io/orb-helm/
git commit -a -m "release"
git push
git checkout $(branch)
prepare-helm:
cd charts/orb && helm repo add jaegertracing https://jaegertracing.github.io/helm-charts
cd charts/orb && rm -rf Chart.lock && helm dependency build
cd ../..
kind-create-all: kind-create-cluster kind-load-images kind-install-orb
kind-upgrade-all: kind-load-images kind-upgrade-orb
kind-create-cluster:
kind create cluster --image kindest/node:v1.23.0 --config=./kind/config.yaml
kind-delete-cluster:
kind delete cluster
kind-load-images:
kind load docker-image ns1labs/orb-fleet:develop
kind load docker-image ns1labs/orb-policies:develop
kind load docker-image ns1labs/orb-sinks:develop
kind load docker-image ns1labs/orb-sinker:develop
kind load docker-image ns1labs/orb-migrate:develop
kind load docker-image ns1labs/orb-ui:develop
kind-install-orb:
kubectl create namespace orb
kubectl create secret generic orb-auth-service --from-literal=jwtSecret=MY_SECRET -n orb
kubectl create secret generic orb-user-service [email protected] --from-literal=adminPassword=pass123456 -n orb
kubectl create secret generic orb-sinks-encryption-key --from-literal=key=MY_SINKS_SECRET -n orb
helm install \
--set fleet.image.pullPolicy=Never \
--set policies.image.pullPolicy=Never \
--set sinks.image.pullPolicy=Never \
--set sinker.image.pullPolicy=Never \
--set ui.image.pullPolicy=Never \
--set defaults.replicaCount=1 \
--set nginx_internal.kindDeploy=true \
--set keto.keto.config.dsn=postgres://postgres:orb@kind-orb-postgresql-keto:5432/keto \
--set keto.keto.autoMigrate=true \
--set ingress.hostname=kubernetes.docker.internal \
-n orb \
kind-orb ./charts/orb
kubectl apply -f ./kind/nginx.yaml
kind-upgrade-orb:
helm upgrade \
--set fleet.image.pullPolicy=Never \
--set policies.image.pullPolicy=Never \
--set sinks.image.pullPolicy=Never \
--set sinker.image.pullPolicy=Never \
--set ui.image.pullPolicy=Never \
--set defaults.replicaCount=1 \
--set nginx_internal.kindDeploy=true \
--set keto.keto.config.dsn=postgres://postgres:orb@kind-orb-postgresql-keto:5432/keto \
--set keto.keto.autoMigrate=true \
--set ingress.hostname=kubernetes.docker.internal \
-n orb \
kind-orb ./charts/orb
kind-delete-orb:
kubectl delete -f ./kind/nginx.yaml
helm delete -n orb kind-orb
kubectl delete secret generic orb-user-service -n orb
kubectl delete secret generic orb-auth-service -n orb
kubectl delete namespace orb