diff options
Diffstat (limited to 'terraform')
-rw-r--r-- | terraform/dns/dn42.tf | 27 | ||||
-rw-r--r-- | terraform/dns/trygvis.tf | 14 | ||||
-rw-r--r-- | terraform/garasjepi-zigbee2mqtt/main.tf | 12 | ||||
-rw-r--r-- | terraform/hash-docker/traefik.tf | 6 | ||||
-rw-r--r-- | terraform/ipam6/ipam6.tf | 81 | ||||
-rw-r--r-- | terraform/lhn2pi-zigbee2mqtt/main.tf | 9 | ||||
-rw-r--r-- | terraform/modules/zigbee2mqtt/zigbee2mqtt.tf | 4 |
7 files changed, 104 insertions, 49 deletions
diff --git a/terraform/dns/dn42.tf b/terraform/dns/dn42.tf index 45fb19d..e23af28 100644 --- a/terraform/dns/dn42.tf +++ b/terraform/dns/dn42.tf @@ -11,7 +11,7 @@ resource "linode_domain_record" "dn42-coregonus" { domain_id = linode_domain.root.id name = "coregonus.dn42" record_type = "AAAA" - target = "fdb1:4242:3538:2005::ffff" + target = "fdb1:4242:3538:2009::4" } resource "linode_domain_record" "dn42-danneri" { @@ -25,14 +25,14 @@ resource "linode_domain_record" "dn42-garasjepi" { domain_id = linode_domain.root.id name = "garasjepi.dn42" record_type = "AAAA" - target = "fdb1:4242:3538:2005:37df:fafe:392:f991" + target = "fdb1:4242:3538:2006:e9f7:418f:49fd:8d2e" } resource "linode_domain_record" "dn42-ha-kv24" { domain_id = linode_domain.root.id name = "ha-kv24.dn42" record_type = "AAAA" - target = "fdb1:4242:3538:2005:c534:9d54:8212:1ced" + target = "fdb1:4242:3538:2006:18a:90f:4264:8ca0" } resource "linode_domain_record" "dn42-ha-lhn2" { @@ -49,6 +49,13 @@ resource "linode_domain_record" "dn42-hash" { target = "fdb1:4242:3538:2007::ffff" } +resource "linode_domain_record" "dn42-kjell" { + domain_id = linode_domain.root.id + name = "kjell.dn42" + record_type = "AAAA" + target = "fdb1:4242:3538:2006:2f0:cbff:fefe:d98c" +} + resource "linode_domain_record" "dn42-knot" { domain_id = linode_domain.root.id name = "knot.dn42" @@ -70,6 +77,13 @@ resource "linode_domain_record" "dn42-lhn2-z2m" { target = "fdb1:4242:3538:2008:9aed:e460:1711:7dd" } +resource "linode_domain_record" "dn42-lhn2ix" { + domain_id = linode_domain.root.id + name = "lhn2ix.dn42" + record_type = "AAAA" + target = "fdb1:4242:3538:2008::1" +} + resource "linode_domain_record" "dn42-lhn2pi" { domain_id = linode_domain.root.id name = "lhn2pi.dn42" @@ -77,6 +91,13 @@ resource "linode_domain_record" "dn42-lhn2pi" { target = "fdb1:4242:3538:2008::ffff" } +resource "linode_domain_record" "dn42-netbox" { + domain_id = linode_domain.root.id + name = "netbox.dn42" + record_type = "AAAA" + target = "fdb1:4242:3538:2006:be24:11ff:febb:5c7f" +} + resource "linode_domain_record" "dn42-node1" { domain_id = linode_domain.root.id name = "node1.dn42" diff --git a/terraform/dns/trygvis.tf b/terraform/dns/trygvis.tf index 667ba83..a19efcf 100644 --- a/terraform/dns/trygvis.tf +++ b/terraform/dns/trygvis.tf @@ -17,6 +17,13 @@ resource "linode_domain_record" "root-a" { target = "176.58.112.84" } +resource "linode_domain_record" "root-aaaa" { + domain_id = linode_domain.root.id + name = "" + record_type = "AAAA" + target = "2a01:7e00::f03c:91ff:feae:93a3" +} + resource "linode_domain_record" "root-mx" { domain_id = linode_domain.root.id name = "" @@ -165,6 +172,13 @@ resource "linode_domain_record" "kv24" { target = "trygvis.io" } +resource "linode_domain_record" "kv24ix" { + domain_id = linode_domain.root.id + name = "kv24ix" + record_type = "A" + target = "81.166.17.37" +} + resource "linode_domain_record" "lhn2" { domain_id = linode_domain.root.id name = "lhn2" diff --git a/terraform/garasjepi-zigbee2mqtt/main.tf b/terraform/garasjepi-zigbee2mqtt/main.tf index 4d5bb25..df23aea 100644 --- a/terraform/garasjepi-zigbee2mqtt/main.tf +++ b/terraform/garasjepi-zigbee2mqtt/main.tf @@ -12,9 +12,9 @@ provider "docker" { } locals { - host = "garasjepi.dn42.trygvis.io" - docker_image = "koenkk/zigbee2mqtt:1.42.0" - public_ip = module.ipam.hosts.garasjepi.address + host = "garasjepi.dn42.trygvis.io" + version = "2.6.0" + public_ip = module.ipam.hosts.garasjepi.address } module "ipam" { @@ -24,7 +24,7 @@ module "ipam" { module "zigbee2mqtt" { source = "../modules/zigbee2mqtt" - docker_version = "2.1" - public_ip = local.public_ip - serial_port = "/dev/serial/by-id/usb-dresden_elektronik_ingenieurtechnik_GmbH_ConBee_II_DE2698168-if00" + docker_version = local.version + public_ip = local.public_ip + serial_port = "/dev/serial/by-id/usb-dresden_elektronik_ingenieurtechnik_GmbH_ConBee_II_DE2698168-if00" } diff --git a/terraform/hash-docker/traefik.tf b/terraform/hash-docker/traefik.tf index 3708024..96f50ec 100644 --- a/terraform/hash-docker/traefik.tf +++ b/terraform/hash-docker/traefik.tf @@ -3,7 +3,7 @@ resource "docker_network" "traefik" { } resource "docker_image" "traefik" { - name = "traefik:2.9.8" + name = "traefik:3.3.4" } resource "docker_container" "traefik" { @@ -31,7 +31,9 @@ resource "docker_container" "traefik" { } command = [ - "--log.level=DEBUG", + "--log.level=INFO", + "--log.format=common", + "--log.noColor=true", "--api=true", "--api.dashboard=true", "--api.debug=true", diff --git a/terraform/ipam6/ipam6.tf b/terraform/ipam6/ipam6.tf index 79a350a..84c7a87 100644 --- a/terraform/ipam6/ipam6.tf +++ b/terraform/ipam6/ipam6.tf @@ -54,33 +54,11 @@ output "networks" { } } } - coregonus_dn42 = { - range = "fdb1:4242:3538:2005::/64" - address = "fdb1:4242:3538:2005::" - prefix = "64" - hosts = { - coregonus = { - address : "fdb1:4242:3538:2005::ffff" - prefix : "128" - } - } - } - coregonus_docker = { - range = "fdb1:4242:3538:2005:df01:676a:ec28:0a00/120" - address = "fdb1:4242:3538:2005:df01:676a:ec28:a00" - prefix = "120" - hosts = { - } - } kv24_pub = { range = "2a01:799:111d:1801::/64" address = "2a01:799:111d:1801::" prefix = "64" hosts = { - ha-kv24 = { - address : "fdb1:4242:3538:2005:c534:9d54:8212:1ced" - prefix : "64" - } } } kv24_dn42 = { @@ -93,9 +71,21 @@ output "networks" { prefix : "128" } garasjepi = { - address : "fdb1:4242:3538:2005:37df:fafe:392:f991" + address : "fdb1:4242:3538:2006:e9f7:418f:49fd:8d2e" prefix : "128" } + ha-kv24 = { + address : "fdb1:4242:3538:2006:18a:90f:4264:8ca0" + prefix : "64" + } + netbox = { + address : "fdb1:4242:3538:2006:be24:11ff:febb:5c7f" + prefix : "64" + } + kjell = { + address : "fdb1:4242:3538:2006:2f0:cbff:fefe:d98c" + prefix : "64" + } } } hash_dn42 = { @@ -121,6 +111,10 @@ output "networks" { address = "fdb1:4242:3538:2008::" prefix = "64" hosts = { + lhn2ix = { + address : "fdb1:4242:3538:2008::1" + prefix : "128" + } lhn2pi = { address : "fdb1:4242:3538:2008::ffff" prefix : "128" @@ -147,6 +141,17 @@ output "networks" { } } } + lhn2_service = { + range = "fdb1:4242:3538:2009::/64" + address = "fdb1:4242:3538:2009::" + prefix = "64" + hosts = { + coregonus = { + address : "fdb1:4242:3538:2009::4" + prefix : "64" + } + } + } danneri_cluster = { range = "fdb1:4242:3538:2008:aaaa:aaaa:aaaa::/112" address = "fdb1:4242:3538:2008:aaaa:aaaa:aaaa:0" @@ -185,26 +190,34 @@ output "hosts" { address : "fdb1:4242:3538:2004::ffff" prefix : "128" } - coregonus = { - address : "fdb1:4242:3538:2005::ffff" - prefix : "128" - } - ha-kv24 = { - address : "fdb1:4242:3538:2005:c534:9d54:8212:1ced" - prefix : "64" - } kv24ix = { address : "fdb1:4242:3538:2006::ffff" prefix : "128" } garasjepi = { - address : "fdb1:4242:3538:2005:37df:fafe:392:f991" + address : "fdb1:4242:3538:2006:e9f7:418f:49fd:8d2e" prefix : "128" } + ha-kv24 = { + address : "fdb1:4242:3538:2006:18a:90f:4264:8ca0" + prefix : "64" + } + netbox = { + address : "fdb1:4242:3538:2006:be24:11ff:febb:5c7f" + prefix : "64" + } + kjell = { + address : "fdb1:4242:3538:2006:2f0:cbff:fefe:d98c" + prefix : "64" + } hash = { address : "fdb1:4242:3538:2007::ffff" prefix : "128" } + lhn2ix = { + address : "fdb1:4242:3538:2008::1" + prefix : "128" + } lhn2pi = { address : "fdb1:4242:3538:2008::ffff" prefix : "128" @@ -229,5 +242,9 @@ output "hosts" { address : "fdb1:4242:3538:2008:5054:ff:fe4d:96c" prefix : "128" } + coregonus = { + address : "fdb1:4242:3538:2009::4" + prefix : "64" + } } } diff --git a/terraform/lhn2pi-zigbee2mqtt/main.tf b/terraform/lhn2pi-zigbee2mqtt/main.tf index 2857b99..f9a6adf 100644 --- a/terraform/lhn2pi-zigbee2mqtt/main.tf +++ b/terraform/lhn2pi-zigbee2mqtt/main.tf @@ -12,8 +12,8 @@ provider "docker" { } locals { - host = "lhn2pi.dn42.trygvis.io" - docker_image = "koenkk/zigbee2mqtt:1.42.0" + host = "lhn2pi.dn42.trygvis.io" + version = "2.3.0" public_ip = module.ipam.hosts.lhn2pi.address } @@ -24,6 +24,7 @@ module "ipam" { module "zigbee2mqtt" { source = "../modules/zigbee2mqtt" - public_ip = local.public_ip - serial_port = "/dev/serial/by-id/usb-dresden_elektronik_ingenieurtechnik_GmbH_ConBee_II_DE2688076-if00" + docker_version = local.version + public_ip = local.public_ip + serial_port = "/dev/serial/by-id/usb-dresden_elektronik_ingenieurtechnik_GmbH_ConBee_II_DE2688076-if00" } diff --git a/terraform/modules/zigbee2mqtt/zigbee2mqtt.tf b/terraform/modules/zigbee2mqtt/zigbee2mqtt.tf index 467c5e1..8723a38 100644 --- a/terraform/modules/zigbee2mqtt/zigbee2mqtt.tf +++ b/terraform/modules/zigbee2mqtt/zigbee2mqtt.tf @@ -16,7 +16,7 @@ resource "docker_container" "zigbee2mqtt" { name = "zigbee2mqtt" hostname = "zigbee2mqtt" # privileged = true - must_run = true + restart = "unless-stopped" network_mode = "host" @@ -40,6 +40,6 @@ resource "docker_container" "zigbee2mqtt" { devices { host_path = var.serial_port container_path = "/dev/ttyACM0" -# permissions = "rwm" + permissions = "rwm" } } |