-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathjustfile
50 lines (41 loc) · 1015 Bytes
/
justfile
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
#################
## infra setup ##
#################
tofu-platform:
#!/bin/fish
cd tofu/platform
tofu-op apply
tofu-zones:
#!/bin/fish
cd tofu/zones
run zone-gen
tofu-op apply
iac:
#!/bin/fish
run pyinfra --yes \
iac/inventory.py \
iac/vk_nodes.py
tofu-kubernetes:
#!/bin/fish
proxy-vk
cd tofu/kubernetes
tofu-op apply
cluster:
#!/bin/fish
proxy-vk
if kubectl get namespace flux-system &>/dev/null
nop "flux-system already bootstrapped"; exit 0
end
set tmp_dir (mktemp -d)
op item get --vault Infra FLUX_SSH_KEY \
--reveal --fields "private key" \
| sed '/^"$/d' > $tmp_dir/ssh-key
flux bootstrap git \
--url=ssh://[email protected]/idletea/infra \
--branch=trunk \
--author-name=flux \
--path=cluster/flux \
--cluster-domain=vk.idte.net \
--private-key-file="$tmp_dir/ssh-key"
rm -rf $tmp_dir