feat(dns): IPv4 for rescue01
All checks were successful
Check meta / check_meta (push) Successful in 18s
lint / check (push) Successful in 31s
Check meta / check_dns (push) Successful in 43s
build configuration / build_storage01 (pull_request) Successful in 1m2s
build configuration / build_compute01 (pull_request) Successful in 1m8s
build configuration / build_vault01 (pull_request) Successful in 58s
build configuration / build_web02 (pull_request) Successful in 59s
build configuration / build_web01 (pull_request) Successful in 1m27s
build configuration / build_rescue01 (pull_request) Successful in 55s

This commit is contained in:
sinavir 2024-03-29 11:41:13 +01:00
parent 23056a02c3
commit 92c2ff4521
3 changed files with 28 additions and 6 deletions

View file

@ -10,7 +10,22 @@ let
mkCNAME = host: { CNAME = [ host ]; }; mkCNAME = host: { CNAME = [ host ]; };
mkHosted = server: mapSingleFuse (_: mkCNAME "${server}.${meta.nodes.${server}.site}.infra"); mkHosted =
server:
{
dual ? [ ],
v4 ? [ ],
v6 ? [ ],
}:
let
base = "${server}.${meta.nodes.${server}.site}.infra";
mkHost = host: mapSingleFuse (_: mkCNAME host);
in
fuseAttrs [
(mkHost base dual)
(mkHost "v4.${base}" v4)
(mkHost "v6.${base}" v6)
];
cnames = builtins.mapAttrs (_: to: { CNAME = [ to ]; }) { cnames = builtins.mapAttrs (_: to: { CNAME = [ to ]; }) {
"dev" = "dev.pages.codeberg.page."; "dev" = "dev.pages.codeberg.page.";
@ -27,7 +42,7 @@ let
hosted = fuseAttrs ( hosted = fuseAttrs (
builtins.attrValues ( builtins.attrValues (
builtins.mapAttrs mkHosted { builtins.mapAttrs mkHosted {
compute01 = [ compute01.dual = [
"arkheon" # Arkheon "arkheon" # Arkheon
"cloud" # Nextcloud "cloud" # Nextcloud
"code" # Collabora Online "code" # Collabora Online
@ -44,9 +59,7 @@ let
"telegraf" # Telegraf "telegraf" # Telegraf
]; ];
rescue01 = [ "status" ]; storage01.dual = [
storage01 = [
"cachix" # Attic "cachix" # Attic
"git" # Forgejo "git" # Forgejo
"influx" # InfluxDB "influx" # InfluxDB
@ -61,7 +74,9 @@ let
"s3" "s3"
]; ];
web01 = [ rescue01.dual = [ "status" ];
web01.dual = [
"*.wp" # Wordpress "*.wp" # Wordpress
"analytics" # Plausible Analytics "analytics" # Plausible Analytics
"calendrier" # Metis "calendrier" # Metis
@ -166,6 +181,10 @@ in
{ {
A = ipv4; A = ipv4;
AAAA = ipv6; AAAA = ipv6;
subdomains = {
v4.A = ipv4;
v6.AAAA = ipv6;
};
} }
) )
) meta.nodes; ) meta.nodes;

View file

@ -172,5 +172,6 @@
}; };
}; };
hostId = "007f0200"; hostId = "007f0200";
addresses.ipv4 = [ "82.67.34.230" ];
}; };
} }

View file

@ -74,6 +74,8 @@
rescue01 = { rescue01 = {
site = "luj01"; site = "luj01";
deployment.targetHost = "v6.rescue01.luj01.infra.dgnum.eu";
stateVersion = "23.11"; stateVersion = "23.11";
vm-cluster = "Hyperviseur Luj"; vm-cluster = "Hyperviseur Luj";
}; };