mirror of
https://github.com/outbackdingo/homelab-v.git
synced 2026-08-25 14:53:19 +00:00
feat: install Netbird as a VPN solution
Also configure Netbird OIDC client in Keycloak using Crossplane
This commit is contained in:
@@ -31,19 +31,37 @@ tofu state rm "module.volumes.module.proxmox-volume[\"pv-qbittorrent-config\"].r
|
||||
## import proxmox volume
|
||||
|
||||
```shell
|
||||
tofu import 'module.volumes.module.proxmox-volume["pv-jellyfin-config"].restapi_object.proxmox-volume' /api2/json/nodes/euclid/storage/local-zfs/content/local-zfs:vm-9999-pv-jellyfin-config
|
||||
tofu import 'module.volumes.module.proxmox-volume["pv-keycloak-db"].restapi_object.proxmox-volume' /api2/json/nodes/euclid/storage/local-zfs/content/local-zfs:vm-9999-pv-keycloak-db
|
||||
tofu import 'module.volumes.module.proxmox-volume["pv-lidarr-config"].restapi_object.proxmox-volume' /api2/json/nodes/cantor/storage/local-zfs/content/local-zfs:vm-9999-pv-lidarr-config
|
||||
tofu import "module.volumes.module.proxmox-volume[\"pv-radarr-config\"].restapi_object.proxmox-volume" /api2/json/nodes/cantor/storage/local-zfs/content/local-zfs:vm-9999-pv-radarr-config
|
||||
tofu import "module.volumes.module.proxmox-volume[\"pv-sonarr-config\"].restapi_object.proxmox-volume" /api2/json/nodes/cantor/storage/local-zfs/content/local-zfs:vm-9999-pv-sonarr-config
|
||||
|
||||
tofu import "module.volumes.module.proxmox-volume[\"pv-qbittorrent-config\"].restapi_object.proxmox-volume" /api2/json/nodes/euclid/storage/local-zfs/content/local-zfs:vm-9999-pv-qbittorrent-config
|
||||
|
||||
tofu import "module.volumes.module.proxmox-volume[\"pv-plex-config\"].restapi_object.proxmox-volume" /api2/json/nodes/abel/storage/local-zfs/content/local-zfs:vm-9999-pv-plex-config
|
||||
tofu import "module.volumes.module.proxmox-volume[\"pv-jellyfin-config\"].restapi_object.proxmox-volume" /api2/json/nodes/abel/storage/local-zfs/content/local-zfs:vm-9999-pv-jellyfin-config
|
||||
tofu import 'module.volumes.module.proxmox-volume["pv-netbird-management"].restapi_object.proxmox-volume' /api2/json/nodes/abel/storage/local-zfs/content/local-zfs:vm-9999-pv-netbird-management
|
||||
tofu import 'module.volumes.module.proxmox-volume["pv-netbird-signal"].restapi_object.proxmox-volume' /api2/json/nodes/abel/storage/local-zfs/content/local-zfs:vm-9999-pv-netbird-signal
|
||||
tofu import 'module.volumes.module.proxmox-volume["pv-plex-config"].restapi_object.proxmox-volume' /api2/json/nodes/abel/storage/local-zfs/content/local-zfs:vm-9999-pv-plex-config
|
||||
tofu import 'module.volumes.module.proxmox-volume["pv-prometheus"].restapi_object.proxmox-volume' /api2/json/nodes/abel/storage/local-zfs/content/local-zfs:vm-9999-pv-prometheus
|
||||
tofu import 'module.volumes.module.proxmox-volume["pv-prowlarr-config"].restapi_object.proxmox-volume' /api2/json/nodes/euclid/storage/local-zfs/content/local-zfs:vm-9999-pv-prowlarr-config
|
||||
tofu import 'module.volumes.module.proxmox-volume["pv-radarr-config"].restapi_object.proxmox-volume' /api2/json/nodes/cantor/storage/local-zfs/content/local-zfs:vm-9999-pv-radarr-config
|
||||
tofu import 'module.volumes.module.proxmox-volume["pv-remark42"].restapi_object.proxmox-volume' /api2/json/nodes/euclid/storage/local-zfs/content/local-zfs:vm-9999-pv-remark42
|
||||
tofu import 'module.volumes.module.proxmox-volume["pv-sonarr-config"].restapi_object.proxmox-volume' /api2/json/nodes/cantor/storage/local-zfs/content/local-zfs:vm-9999-pv-sonarr-config
|
||||
tofu import 'module.volumes.module.proxmox-volume["pv-torrent-config"].restapi_object.proxmox-volume' /api2/json/nodes/euclid/storage/local-zfs/content/local-zfs:vm-9999-pv-torrent-config
|
||||
```
|
||||
|
||||
## import persistent volume
|
||||
|
||||
```shell
|
||||
tofu import 'module.volumes.module.persistent-volume["pv-torrent-config"].kubernetes_persistent_volume.pv' pv-torrent-config
|
||||
tofu state rm module.volumes.module.persistent-volume
|
||||
```
|
||||
|
||||
```shell
|
||||
tofu import 'module.volumes.module.persistent-volume["pv-jellyfin-config"].kubernetes_persistent_volume.pv' pv-jellyfin-config
|
||||
tofu import 'module.volumes.module.persistent-volume["pv-keycloak-db"].kubernetes_persistent_volume.pv' pv-keycloak-db
|
||||
tofu import 'module.volumes.module.persistent-volume["pv-lidarr-config"].kubernetes_persistent_volume.pv' pv-lidarr-config
|
||||
tofu import 'module.volumes.module.persistent-volume["pv-netbird-management"].kubernetes_persistent_volume.pv' pv-netbird-management
|
||||
tofu import 'module.volumes.module.persistent-volume["pv-netbird-signal"].kubernetes_persistent_volume.pv' pv-netbird-signal
|
||||
tofu import 'module.volumes.module.persistent-volume["pv-plex-config"].kubernetes_persistent_volume.pv' pv-plex-config
|
||||
tofu import 'module.volumes.module.persistent-volume["pv-prometheus"].kubernetes_persistent_volume.pv' pv-prometheus
|
||||
tofu import 'module.volumes.module.persistent-volume["pv-prowlarr-config"].kubernetes_persistent_volume.pv' pv-prowlarr-config
|
||||
tofu import 'module.volumes.module.persistent-volume["pv-radarr-config"].kubernetes_persistent_volume.pv' pv-radarr-config
|
||||
tofu import 'module.volumes.module.persistent-volume["pv-remark42"].kubernetes_persistent_volume.pv' pv-remark42
|
||||
tofu import 'module.volumes.module.persistent-volume["pv-sonarr-config"].kubernetes_persistent_volume.pv' pv-sonarr-config
|
||||
tofu import 'module.volumes.module.persistent-volume["pv-torrent-config"].kubernetes_persistent_volume.pv' pv-torrent-config
|
||||
```
|
||||
@@ -15,6 +15,10 @@ resource "restapi_object" "proxmox-volume" {
|
||||
size = var.volume.size
|
||||
format = var.volume.format
|
||||
})
|
||||
|
||||
lifecycle {
|
||||
prevent_destroy = true
|
||||
}
|
||||
}
|
||||
|
||||
output "node" {
|
||||
|
||||
+22
-6
@@ -6,7 +6,7 @@ module "talos" {
|
||||
}
|
||||
|
||||
image = {
|
||||
version = "v1.7.5"
|
||||
version = "v1.7.6"
|
||||
schematic = file("${path.module}/talos/image/schematic.yaml")
|
||||
}
|
||||
|
||||
@@ -17,7 +17,7 @@ module "talos" {
|
||||
|
||||
cluster = {
|
||||
name = "talos"
|
||||
endpoint = "192.168.1.100"
|
||||
endpoint = "192.168.1.101"
|
||||
gateway = "192.168.1.1"
|
||||
talos_version = "v1.7"
|
||||
proxmox_cluster = "homelab"
|
||||
@@ -29,18 +29,17 @@ module "talos" {
|
||||
machine_type = "controlplane"
|
||||
ip = "192.168.1.100"
|
||||
mac_address = "BC:24:11:2E:C8:00"
|
||||
vm_id = 8000
|
||||
vm_id = 800
|
||||
cpu = 8
|
||||
ram_dedicated = 20480
|
||||
igpu = true
|
||||
update = true
|
||||
}
|
||||
"ctrl-01" = {
|
||||
host_node = "euclid"
|
||||
machine_type = "controlplane"
|
||||
ip = "192.168.1.101"
|
||||
mac_address = "BC:24:11:2E:C8:01"
|
||||
vm_id = 8001
|
||||
vm_id = 801
|
||||
cpu = 4
|
||||
ram_dedicated = 20480
|
||||
igpu = true
|
||||
@@ -50,10 +49,19 @@ module "talos" {
|
||||
machine_type = "controlplane"
|
||||
ip = "192.168.1.102"
|
||||
mac_address = "BC:24:11:2E:C8:02"
|
||||
vm_id = 8002
|
||||
vm_id = 802
|
||||
cpu = 4
|
||||
ram_dedicated = 4096
|
||||
}
|
||||
"work-00" = {
|
||||
host_node = "abel"
|
||||
machine_type = "controlplane"
|
||||
ip = "192.168.1.110"
|
||||
mac_address = "BC:24:11:2E:A8:00"
|
||||
vm_id = 810
|
||||
cpu = 8
|
||||
ram_dedicated = 4096
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -127,6 +135,14 @@ module "volumes" {
|
||||
node = "euclid"
|
||||
size = "12G"
|
||||
}
|
||||
pv-netbird-signal = {
|
||||
node = "abel"
|
||||
size = "1G"
|
||||
}
|
||||
pv-netbird-management = {
|
||||
node = "abel"
|
||||
size = "1G"
|
||||
}
|
||||
pv-plex-config = {
|
||||
node = "abel"
|
||||
size = "12G"
|
||||
|
||||
@@ -46,7 +46,9 @@ resource "talos_machine_configuration_apply" "this" {
|
||||
}
|
||||
|
||||
resource "talos_machine_bootstrap" "this" {
|
||||
node = [for k, v in var.nodes : v.ip if v.machine_type == "controlplane"][0]
|
||||
depends_on = [talos_machine_configuration_apply.this]
|
||||
for_each = var.nodes
|
||||
node = each.value.ip
|
||||
endpoint = var.cluster.endpoint
|
||||
client_configuration = talos_machine_secrets.this.client_configuration
|
||||
}
|
||||
@@ -70,7 +72,7 @@ data "talos_cluster_kubeconfig" "this" {
|
||||
talos_machine_bootstrap.this,
|
||||
data.talos_cluster_health.this
|
||||
]
|
||||
node = [for k, v in var.nodes : v.ip if v.machine_type == "controlplane"][0]
|
||||
node = [for k, v in var.nodes : v.ip if v.machine_type == "controlplane"][1]
|
||||
endpoint = var.cluster.endpoint
|
||||
client_configuration = talos_machine_secrets.this.client_configuration
|
||||
timeouts = {
|
||||
|
||||
Reference in New Issue
Block a user