Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions iipod-metal/cloud-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,10 @@ write_files:
content: ${coder_init_service}
permissions: "0644"
encoding: b64
- path: /etc/kubernetes/manifests/ips.yaml
content: ${ip_manifest}
permissions: "0644"
encoding: b64
- path: /etc/kubernetes/manifests/iipod.yaml
content: ${iipod_manifest}
permissions: "0644"
Expand Down Expand Up @@ -153,9 +157,8 @@ packages:
- aria2
- apt-fast
runcmd:
- ip addr add ${elastic_ip} dev lo:0
# - ip addr add ${elastic_ip} dev lo:0
- su - ii -c "ssh-import-id gh:${username} gh:hh gh:heyste gh:zachmandeville"
- su - git -c "ssh-import-id gh:${username} gh:hh gh:heyste gh:zachmandeville"
- DEBIAN_FRONTENT=noninteractive apt-fast -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" install -y ttyd tmux kitty-terminfo
# emacs-gtk kitty novnc websockify postgresql-client tigervnc-standalone-server asciinema silversearcher-ag direnv jq
- systemctl stop ttyd
Expand Down
4 changes: 2 additions & 2 deletions iipod-metal/cluster/flux-system/gotk-sync.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ metadata:
spec:
interval: 1m0s
ref:
branch: mon423-hh
branch: tue0807-heyste
secretRef:
name: flux-system
url: ssh://ii@mon423-hh.ii.nz/home/ii/space-templates
url: ssh://git@tue0807-heyste.ii.nz:22/home/git/space-templates
---
apiVersion: kustomize.toolkit.fluxcd.io/v1
kind: Kustomization
Expand Down
3 changes: 3 additions & 0 deletions iipod-metal/etc/cloud/install-flux
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,6 @@ sudo su - ii -c \
cd space-templates
git remote add upstream git@github.com:cloudnative-coop/space-templates
"
sleep 15
export KUBECONFIG=/etc/kubernetes/admin.conf
kubectl apply -f /etc/kubernetes/ips.yaml
Empty file.
15 changes: 15 additions & 0 deletions iipod-metal/etc/kubernetes/manifests/ips.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
---
apiVersion: metallb.io/v1beta1
kind: IPAddressPool
metadata:
name: default
namespace: metallb-system
spec:
addresses:
- ${ip}
---
apiVersion: metallb.io/v1beta1
kind: L2Advertisement
metadata:
name: default
namespace: metallb-system
4 changes: 4 additions & 0 deletions iipod-metal/metal.tf
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,10 @@ resource "equinix_metal_device" "machine" {
username = "ii"
coder_agent_token = coder_agent.ii.token
}))
ip_manifest = base64encode(
templatefile("./etc/kubernetes/manifests/ips.yaml", {
ip = local.elastic_ip
}))
iipod_manifest = base64encode(
templatefile("./etc/kubernetes/manifests/iipod.yaml", {
coder_agent_token = coder_agent.iipod.token
Expand Down