-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathMakefile
More file actions
63 lines (49 loc) · 1.28 KB
/
Makefile
File metadata and controls
63 lines (49 loc) · 1.28 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
.POSIX:
.PHONY: default compose infra bootstrap vendor platform secrets apps test fmt tidy update
env ?= $(shell ls infra | fzf --prompt "Select environment: ")
default: infra platform apps
compose:
docker compose up --build --detach
infra:
cd infra/${env} && terragrunt apply --all
bootstrap: vendor platform secrets
vendor:
toolbox vendor \
--settings settings.yaml \
--hosts-file infra/_modules/nixos/hosts.json \
--host kube-1
platform:
toolbox gitops \
--path platform/${env} \
--hosts-file infra/_modules/nixos/hosts.json \
--host kube-1
secrets:
toolbox secrets \
--settings settings.yaml \
--hosts-file infra/_modules/nixos/hosts.json \
--host kube-1
apps:
toolbox apps \
--env ${env} \
--path apps \
--hosts-file infra/_modules/nixos/hosts.json \
--host kube-1
test:
cd test && CLOUDLAB_ENV=${env} go test
fmt:
nixfmt flake.nix
yamlfmt \
--exclude infra/_modules/cluster/roles/secrets/vars/main.yml \
--exclude infra/*/secrets.yaml \
.
terragrunt hcl format
cd infra/_modules && tofu fmt -recursive
cd infra/_modules/tfstate && go fmt ./...
cd test && go fmt ./...
tidy: fmt
cd infra && terragrunt init --backend=false --lock=false --all
update:
nix flake update
clean:
docker compose down --remove-orphans --volumes
k3d cluster delete local