-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
113 lines (91 loc) · 4.38 KB
/
Makefile
File metadata and controls
113 lines (91 loc) · 4.38 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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
.PHONY: build push deploy deploy-hanzo deploy-lux deploy-pars deploy-zoo deploy-network dev frontend-install-dependencies frontend-build
IMAGE := ghcr.io/hanzoai/status
TAG := latest
CTX := do-sfo3-hanzo-k8s
build:
docker build --no-cache -t $(IMAGE):$(TAG) .
push: build
docker push $(IMAGE):$(TAG)
# Frontend (Vite SPA)
frontend-install-dependencies:
cd web/app && pnpm install --frozen-lockfile
frontend-build:
cd web/app && pnpm build
# Local dev: run with hanzo brand config
dev:
docker run --rm -it \
-p 8080:8080 \
-v $(PWD)/config/hanzo.yaml:/config/config.yaml:ro \
$(IMAGE):$(TAG)
dev-lux:
docker run --rm -it \
-p 8080:8080 \
-v $(PWD)/config/lux.yaml:/config/config.yaml:ro \
$(IMAGE):$(TAG)
dev-pars:
docker run --rm -it \
-p 8080:8080 \
-v $(PWD)/config/pars.yaml:/config/config.yaml:ro \
$(IMAGE):$(TAG)
dev-zoo:
docker run --rm -it \
-p 8080:8080 \
-v $(PWD)/config/zoo.yaml:/config/config.yaml:ro \
$(IMAGE):$(TAG)
# Deploy all brands
deploy: deploy-hanzo deploy-lux deploy-pars deploy-zoo deploy-network
# Individual brand deploys
deploy-hanzo:
kubectl --context $(CTX) apply -k k8s/hanzo/
kubectl --context $(CTX) -n hanzo rollout restart deployment/status
kubectl --context $(CTX) -n hanzo rollout status deployment/status --timeout=120s
deploy-lux:
kubectl --context $(CTX) apply -k k8s/lux/
kubectl --context $(CTX) -n lux-system rollout restart deployment/status
kubectl --context $(CTX) -n lux-system rollout status deployment/status --timeout=120s
deploy-pars:
kubectl --context $(CTX) apply -k k8s/pars/
kubectl --context $(CTX) -n pars-system rollout restart deployment/status
kubectl --context $(CTX) -n pars-system rollout status deployment/status --timeout=120s
deploy-zoo:
kubectl --context $(CTX) apply -k k8s/zoo/
kubectl --context $(CTX) -n zoo-system rollout restart deployment/status
kubectl --context $(CTX) -n zoo-system rollout status deployment/status --timeout=120s
deploy-network:
kubectl --context $(CTX) apply -k k8s/hanzo-network/
kubectl --context $(CTX) -n hanzo-network rollout restart deployment/status
kubectl --context $(CTX) -n hanzo-network rollout status deployment/status --timeout=120s
# Update configs only (no image change)
config-hanzo:
kubectl --context $(CTX) -n hanzo create configmap status-config --from-file=config.yaml=config/hanzo.yaml --dry-run=client -o yaml | kubectl --context $(CTX) apply -f -
kubectl --context $(CTX) -n hanzo rollout restart deployment/status
config-lux:
kubectl --context $(CTX) -n lux-system create configmap status-config --from-file=config.yaml=config/lux.yaml --dry-run=client -o yaml | kubectl --context $(CTX) apply -f -
kubectl --context $(CTX) -n lux-system rollout restart deployment/status
config-pars:
kubectl --context $(CTX) -n pars-system create configmap status-config --from-file=config.yaml=config/pars.yaml --dry-run=client -o yaml | kubectl --context $(CTX) apply -f -
kubectl --context $(CTX) -n pars-system rollout restart deployment/status
config-zoo:
kubectl --context $(CTX) -n zoo-system create configmap status-config --from-file=config.yaml=config/zoo.yaml --dry-run=client -o yaml | kubectl --context $(CTX) apply -f -
kubectl --context $(CTX) -n zoo-system rollout restart deployment/status
config-network:
kubectl --context $(CTX) -n hanzo-network create configmap status-config --from-file=config.yaml=config/hanzo-network.yaml --dry-run=client -o yaml | kubectl --context $(CTX) apply -f -
kubectl --context $(CTX) -n hanzo-network rollout restart deployment/status
# Update all configs
config: config-hanzo config-lux config-pars config-zoo config-network
# Status check
status:
@echo "=== Hanzo (status.hanzo.ai) ==="
@kubectl --context $(CTX) -n hanzo get pods -l app=status -o wide 2>/dev/null || echo " Not deployed"
@echo ""
@echo "=== Lux (status.lux.network) ==="
@kubectl --context $(CTX) -n lux-system get pods -l app=status -o wide 2>/dev/null || echo " Not deployed"
@echo ""
@echo "=== Pars (status.pars.network) ==="
@kubectl --context $(CTX) -n pars-system get pods -l app=status -o wide 2>/dev/null || echo " Not deployed"
@echo ""
@echo "=== Zoo (status.zoo.network) ==="
@kubectl --context $(CTX) -n zoo-system get pods -l app=status -o wide 2>/dev/null || echo " Not deployed"
@echo ""
@echo "=== Network (status.hanzo.network) ==="
@kubectl --context $(CTX) -n hanzo-network get pods -l app=status -o wide 2>/dev/null || echo " Not deployed"