-
Notifications
You must be signed in to change notification settings - Fork 171
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add toybox machine and move services around
- Loading branch information
Showing
14 changed files
with
69 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
#!/bin/bash | ||
|
||
sysctl -w net.ipv6.conf.all.accept_ra=2 | ||
sysctl -w net.ipv6.conf.ens18.accept_ra=2 | ||
|
||
# Allow traffic forwarding | ||
sysctl -w net.ipv4.ip_forward=1 | ||
sysctl -w net.ipv6.conf.all.forwarding=1 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
set dotenv-load := false | ||
|
||
_default: | ||
@just --list | ||
|
||
HOST := "erebe@192.168.1.10" | ||
|
||
wireguard: | ||
sops exec-env ../../secrets/wireguard.yml 'cp wireguard/wg0.conf secrets_decrypted/; for i in $(env | grep _KEY | cut -d = -f1); do sed -i "s#__${i}__#${!i}#g" secrets_decrypted/wg0.conf ; done' | ||
ssh {{HOST}} "sudo cat /etc/wireguard/wg0.conf" | diff - secrets_decrypted/wg0.conf || exit 0 | ||
rsync --rsync-path="sudo rsync" secrets_decrypted/wg0.conf {{HOST}}:/etc/wireguard/wg0.conf | ||
rsync --rsync-path="sudo rsync" config/allow-router-advertise {{HOST}}:/etc/network/if-pre-up.d/allow-router-advertise | ||
ssh {{HOST}} "sudo systemctl restart wg-quick@wg0.service && sudo systemctl enable wg-quick@wg0.service" | ||
|
||
k3s: | ||
ssh {{HOST}} "sudo mkdir -p /etc/rancher/k3s" | ||
rsync --rsync-path="sudo rsync" k3s/config.yaml {{HOST}}:/etc/rancher/k3s/config.yaml | ||
ssh {{HOST}} "curl -sfL https://get.k3s.io | K3S_VERSION="v1.27.4+k3s1" K3S_URL=https://[fd00:cafe::3]:6443 K3S_TOKEN=12345 sh -s -" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
node-name: "toybox" | ||
node-ip: "fd00:cafe::4,10.200.0.4" | ||
node-external-ip: "2001:861:3886:7e01:108b:87ff:fe77:c88" | ||
|
||
# https://docs.k3s.io/installation/network-options#dual-stack-ipv4--ipv6-networking | ||
kubelet-arg: "node-ip=::" | ||
token: 12345 | ||
node-label: [] | ||
node-taint: | ||
- kubernetes.io/hostname=toybox:NoSchedule | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
[Interface] | ||
Address = 10.200.0.4/32, fd00:cafe::4/128 | ||
PrivateKey = __TOYBOX_PRIVATE_KEY__ | ||
|
||
[Peer] | ||
PublicKey = __ROUTER_PUBLIC_KEY__ | ||
AllowedIPs = 10.200.0.0/24, fd00:cafe::/32 | ||
Endpoint = [2001:861:3886:7e00::1]:995 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters