forked from khuedoan/cloudlab
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
54 lines (40 loc) · 1.18 KB
/
Makefile
File metadata and controls
54 lines (40 loc) · 1.18 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
.POSIX:
.PHONY: default infra cluster system platform apps secrets edit-secrets test update
# TODO multiple clusters
export KUBECONFIG = $(shell pwd)/cluster/kubeconfig.yaml
default: infra cluster system platform apps
~/.terraform.d/credentials.tfrc.json:
# https://search.opentofu.org/provider/opentofu/tfe
tofu login app.terraform.io
infra/terraform.tfvars:
cp infra/terraform.tfvars.example infra/terraform.tfvars
nvim infra/terraform.tfvars
infra: ~/.terraform.d/credentials.tfrc.json infra/terraform.tfvars
cd infra \
&& tofu init \
&& tofu apply
cluster:
cd cluster && ansible-playbook \
--inventory inventory.yml \
--ask-vault-pass \
main.yml
system:
kubectl apply --server-side=true --namespace argocd --filename system/
platform:
kubectl apply --server-side=true --namespace argocd --filename platform/
apps:
kubectl apply --server-side=true --namespace argocd --filename apps/
secrets:
cd cluster && ansible-playbook \
--inventory inventory.yml \
--ask-vault-pass \
--tags secrets \
main.yml
edit-secrets:
ansible-vault edit ./cluster/roles/secrets/vars/main.yml
test:
cd test/e2e && go test
fmt:
cd test/e2e && go fmt ./...
update:
nix flake update