-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMakefile
More file actions
78 lines (57 loc) · 2.04 KB
/
Makefile
File metadata and controls
78 lines (57 loc) · 2.04 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
.PHONY: deploy destroy status port-forward logs logs-auth logs-demo clean sync sync-apply jwt build-auth build-demo setup-dashboards seed-data
ENV ?= local
NS ?= dashverse
SYNC_DIR ?= /tmp/everse-sync
deploy: build-auth build-demo
cd terraform && tofu init && tofu apply -var-file="environments/$(ENV).tfvars" -auto-approve
destroy:
cd terraform && tofu destroy -var-file="environments/$(ENV).tfvars" -auto-approve
destroy-all: destroy
minikube delete --all
status:
kubectl get all -n $(NS)
port-forward:
./scripts/port-forward.sh
logs:
kubectl logs -n $(NS) -l app=dashverse --all-containers -f
logs-postgres:
kubectl logs -n $(NS) -l component=postgresql -f
logs-postgrest:
kubectl logs -n $(NS) -l component=postgrest -f
logs-superset:
kubectl logs -n $(NS) -l app.kubernetes.io/name=superset -f
logs-auth:
kubectl logs -n $(NS) -l app=auth-service -f
clean:
cd terraform && rm -rf .terraform .terraform.lock.hcl .tofu
sync:
./scripts/sync-everse.sh $(SYNC_DIR)
sync-apply:
./scripts/sync-everse.sh $(SYNC_DIR)
./scripts/import-everse.sh $(SYNC_DIR) $(NS) --apply
sync-trigger:
kubectl create job -n $(NS) --from=cronjob/everse-sync everse-sync-manual-$$(date +%s)
jwt:
./scripts/generate-jwt.sh $(NS)
build-auth:
ifeq ($(ENV),local)
minikube image build -t dashverse/auth-service:latest auth-service/
else
docker build -t dashverse/auth-service:latest auth-service/
endif
build-demo:
ifeq ($(ENV),local)
minikube image build -t dashverse/demo-portal:latest demo-portal/
else
docker build -t dashverse/demo-portal:latest demo-portal/
endif
logs-demo:
kubectl logs -n $(NS) -l app=demo-portal -f
setup-dashboards:
cd ansible && \
DATABASE_PASSWORD=$$(kubectl get secret $(NS)-secrets -n $(NS) -o jsonpath='{.data.postgres-password}' | base64 -d) \
SUPERSET_PASSWORD=$$(kubectl get secret $(NS)-secrets -n $(NS) -o jsonpath='{.data.superset-admin-password}' | base64 -d) \
ansible-playbook -i inventory/$(ENV).yml playbooks/configure_superset.yml
seed-data:
cd ansible && \
ansible-playbook -i inventory/$(ENV).yml playbooks/seed_data.yml