From a513690004a27b4330d810def3b37772e5e6e8b2 Mon Sep 17 00:00:00 2001 From: KokaKiwi Date: Wed, 15 May 2024 11:50:49 +0200 Subject: [PATCH 1/5] cluster(prod): Add dathomir site and onion node --- cluster/prod/cluster.nix | 6 ++++++ cluster/prod/known_hosts | 1 + cluster/prod/node/onion.nix | 10 ++++++++++ cluster/prod/node/onion.site.nix | 1 + cluster/prod/site/dathomir.nix | 7 +++++++ cluster/prod/ssh_config | 2 ++ 6 files changed, 27 insertions(+) create mode 100644 cluster/prod/node/onion.nix create mode 120000 cluster/prod/node/onion.site.nix create mode 100644 cluster/prod/site/dathomir.nix diff --git a/cluster/prod/cluster.nix b/cluster/prod/cluster.nix index 4b9b41a..c4f5306 100644 --- a/cluster/prod/cluster.nix +++ b/cluster/prod/cluster.nix @@ -75,6 +75,12 @@ address = "10.83.4.2"; endpoint = "82.65.41.110:33742"; }; + "onion" = { + siteName = "dathomir"; + publicKey = "gpeqalqAUaYlMuebv3glQeZyE64+OpkyIHFhfStJQA4="; + address = "10.83.5.1"; + endpoint = "82.64.238.84:33740"; + }; }; # Pin Nomad version diff --git a/cluster/prod/known_hosts b/cluster/prod/known_hosts index 1c80749..a4a7d7b 100644 --- a/cluster/prod/known_hosts +++ b/cluster/prod/known_hosts @@ -9,3 +9,4 @@ concombre.machine.deuxfleurs.fr ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIL3N0QOFNGkC courgette.machine.deuxfleurs.fr ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPCXJeo6yeQeTN7D7OZwLd8zbyU1jWywlhQ29yyk7x+G abricot.machine.deuxfleurs.fr ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPhHUQtc5lukPMFkiWf/sTgaUpwNFXHCJoQKu4ooRFy+ ananas.machine.deuxfleurs.fr ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIHs0zAyBy70oyV56qaMaMAKR7VjEDnsm5LEyZJbM95BL +onion.machine.deuxfleurs.fr ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAINjBQ67fxwuDDzRPveTko/Sgf0cev3tIvlr3CfAmhF0C diff --git a/cluster/prod/node/onion.nix b/cluster/prod/node/onion.nix new file mode 100644 index 0000000..0e3c719 --- /dev/null +++ b/cluster/prod/node/onion.nix @@ -0,0 +1,10 @@ +{ ... }: +{ + boot.loader.systemd-boot.enable = true; + boot.loader.timeout = 20; + boot.loader.efi.canTouchEfiVariables = true; + + deuxfleurs.hostName = "onion"; + deuxfleurs.staticIPv4.address = "192.168.1.34"; + deuxfleurs.staticIPv6.address = "2a01:e0a:5e4:1d0:223:24ff:feb0:e866"; +} diff --git a/cluster/prod/node/onion.site.nix b/cluster/prod/node/onion.site.nix new file mode 120000 index 0000000..5e41391 --- /dev/null +++ b/cluster/prod/node/onion.site.nix @@ -0,0 +1 @@ +../site/dathomir.nix \ No newline at end of file diff --git a/cluster/prod/site/dathomir.nix b/cluster/prod/site/dathomir.nix new file mode 100644 index 0000000..87d9b56 --- /dev/null +++ b/cluster/prod/site/dathomir.nix @@ -0,0 +1,7 @@ +{ ... }: +{ + deuxfleurs.siteName = "dathomir"; + deuxfleurs.cnameTarget = "dathomir.site.deuxfleurs.fr"; + deuxfleurs.publicIPv4 = "82.64.238.84"; + deuxfleurs.staticIPv4.defaultGateway = "192.168.1.1"; +} diff --git a/cluster/prod/ssh_config b/cluster/prod/ssh_config index 37b8953..c056a22 100644 --- a/cluster/prod/ssh_config +++ b/cluster/prod/ssh_config @@ -33,3 +33,5 @@ Host abricot Host ananas HostName ananas.machine.deuxfleurs.fr +Host onion + HostName onion.machine.deuxfleurs.fr -- 2.45.2 From 57628b508e74866dd5bfaaa2294d5b9396cbd6be Mon Sep 17 00:00:00 2001 From: KokaKiwi Date: Sun, 26 May 2024 17:04:18 +0200 Subject: [PATCH 2/5] cluster(prod): Add io --- cluster/prod/cluster.nix | 6 ++++++ cluster/prod/known_hosts | 1 + cluster/prod/node/io.nix | 9 +++++++++ cluster/prod/node/io.site.nix | 1 + cluster/prod/ssh_config | 3 +++ 5 files changed, 20 insertions(+) create mode 100644 cluster/prod/node/io.nix create mode 120000 cluster/prod/node/io.site.nix diff --git a/cluster/prod/cluster.nix b/cluster/prod/cluster.nix index c4f5306..bc53aa0 100644 --- a/cluster/prod/cluster.nix +++ b/cluster/prod/cluster.nix @@ -81,6 +81,12 @@ address = "10.83.5.1"; endpoint = "82.64.238.84:33740"; }; + "io" = { + siteName = "dathomir"; + publicKey = "3+VvWJtABOAd6zUCMROhqGbNtkQRtoIkVmYn0M81jQw="; + address = "10.83.5.3"; + endpoint = "82.64.238.84:33742"; + }; }; # Pin Nomad version diff --git a/cluster/prod/known_hosts b/cluster/prod/known_hosts index a4a7d7b..d6959ae 100644 --- a/cluster/prod/known_hosts +++ b/cluster/prod/known_hosts @@ -10,3 +10,4 @@ courgette.machine.deuxfleurs.fr ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPCXJeo6yeQe abricot.machine.deuxfleurs.fr ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPhHUQtc5lukPMFkiWf/sTgaUpwNFXHCJoQKu4ooRFy+ ananas.machine.deuxfleurs.fr ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIHs0zAyBy70oyV56qaMaMAKR7VjEDnsm5LEyZJbM95BL onion.machine.deuxfleurs.fr ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAINjBQ67fxwuDDzRPveTko/Sgf0cev3tIvlr3CfAmhF0C +io.machine.deuxfleurs.fr ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIIvgCJ7Jew7ou1RZuaT41Sd+ucZAgxUwtdieqNqoC3+T diff --git a/cluster/prod/node/io.nix b/cluster/prod/node/io.nix new file mode 100644 index 0000000..4e53102 --- /dev/null +++ b/cluster/prod/node/io.nix @@ -0,0 +1,9 @@ +{ ... }: +{ + boot.loader.grub.enable = true; + boot.loader.grub.device = "/dev/sda"; + + deuxfleurs.hostName = "io"; + deuxfleurs.staticIPv4.address = "192.168.1.36"; + deuxfleurs.staticIPv6.address = "2a01:e0a:5e4:1d0:52e5:49ff:fe5c:5f35"; +} diff --git a/cluster/prod/node/io.site.nix b/cluster/prod/node/io.site.nix new file mode 120000 index 0000000..5e41391 --- /dev/null +++ b/cluster/prod/node/io.site.nix @@ -0,0 +1 @@ +../site/dathomir.nix \ No newline at end of file diff --git a/cluster/prod/ssh_config b/cluster/prod/ssh_config index c056a22..d93602a 100644 --- a/cluster/prod/ssh_config +++ b/cluster/prod/ssh_config @@ -35,3 +35,6 @@ Host ananas Host onion HostName onion.machine.deuxfleurs.fr + +Host io + HostName io.machine.deuxfleurs.fr -- 2.45.2 From 3776734e5022145888fece61aadf2e360f9911c8 Mon Sep 17 00:00:00 2001 From: KokaKiwi Date: Sun, 26 May 2024 17:04:33 +0200 Subject: [PATCH 3/5] style: Fix spacetab in cluster/prod/ssh_config --- cluster/prod/ssh_config | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/cluster/prod/ssh_config b/cluster/prod/ssh_config index d93602a..6198c40 100644 --- a/cluster/prod/ssh_config +++ b/cluster/prod/ssh_config @@ -1,37 +1,37 @@ UserKnownHostsFile ./cluster/prod/known_hosts Host concombre - HostName concombre.machine.deuxfleurs.fr + HostName concombre.machine.deuxfleurs.fr Host courgette - HostName courgette.machine.deuxfleurs.fr + HostName courgette.machine.deuxfleurs.fr Host celeri - HostName celeri.machine.deuxfleurs.fr + HostName celeri.machine.deuxfleurs.fr Host dahlia - HostName dahlia.machine.deuxfleurs.fr + HostName dahlia.machine.deuxfleurs.fr Host diplotaxis - HostName diplotaxis.machine.deuxfleurs.fr + HostName diplotaxis.machine.deuxfleurs.fr Host doradille - HostName doradille.machine.deuxfleurs.fr + HostName doradille.machine.deuxfleurs.fr Host df-ykl - HostName df-ykl.machine.deuxfleurs.fr + HostName df-ykl.machine.deuxfleurs.fr Host df-ymf - HostName df-ymf.machine.deuxfleurs.fr + HostName df-ymf.machine.deuxfleurs.fr Host df-ymk - HostName df-ymk.machine.deuxfleurs.fr + HostName df-ymk.machine.deuxfleurs.fr Host abricot - HostName abricot.machine.deuxfleurs.fr + HostName abricot.machine.deuxfleurs.fr Host ananas - HostName ananas.machine.deuxfleurs.fr + HostName ananas.machine.deuxfleurs.fr Host onion HostName onion.machine.deuxfleurs.fr -- 2.45.2 From 435cbeebfb93f988ef469fe0b037662c49795946 Mon Sep 17 00:00:00 2001 From: KokaKiwi Date: Sun, 26 May 2024 18:24:28 +0200 Subject: [PATCH 4/5] cluster(prod): Add oseille --- cluster/prod/cluster.nix | 6 ++++++ cluster/prod/known_hosts | 1 + cluster/prod/node/oseille.nix | 10 ++++++++++ cluster/prod/node/oseille.site.nix | 1 + cluster/prod/ssh_config | 3 +++ 5 files changed, 21 insertions(+) create mode 100644 cluster/prod/node/oseille.nix create mode 120000 cluster/prod/node/oseille.site.nix diff --git a/cluster/prod/cluster.nix b/cluster/prod/cluster.nix index bc53aa0..c5008e6 100644 --- a/cluster/prod/cluster.nix +++ b/cluster/prod/cluster.nix @@ -81,6 +81,12 @@ address = "10.83.5.1"; endpoint = "82.64.238.84:33740"; }; + "oseille" = { + siteName = "dathomir"; + publicKey = "T87GzAQt02i00iOMbEm7McA/VL9OBrG/kCrgoNh5MmY="; + address = "10.83.5.2"; + endpoint = "82.64.238.84:33741"; + }; "io" = { siteName = "dathomir"; publicKey = "3+VvWJtABOAd6zUCMROhqGbNtkQRtoIkVmYn0M81jQw="; diff --git a/cluster/prod/known_hosts b/cluster/prod/known_hosts index d6959ae..3b6bf7f 100644 --- a/cluster/prod/known_hosts +++ b/cluster/prod/known_hosts @@ -10,4 +10,5 @@ courgette.machine.deuxfleurs.fr ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPCXJeo6yeQe abricot.machine.deuxfleurs.fr ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPhHUQtc5lukPMFkiWf/sTgaUpwNFXHCJoQKu4ooRFy+ ananas.machine.deuxfleurs.fr ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIHs0zAyBy70oyV56qaMaMAKR7VjEDnsm5LEyZJbM95BL onion.machine.deuxfleurs.fr ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAINjBQ67fxwuDDzRPveTko/Sgf0cev3tIvlr3CfAmhF0C +oseille.machine.deuxfleurs.fr ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIAgQdQ5UVFFn+DXN90ut9+V7NtEopQJnES3r8soKTZW4 io.machine.deuxfleurs.fr ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIIvgCJ7Jew7ou1RZuaT41Sd+ucZAgxUwtdieqNqoC3+T diff --git a/cluster/prod/node/oseille.nix b/cluster/prod/node/oseille.nix new file mode 100644 index 0000000..5c68121 --- /dev/null +++ b/cluster/prod/node/oseille.nix @@ -0,0 +1,10 @@ +{ ... }: +{ + boot.loader.systemd-boot.enable = true; + boot.loader.timeout = 20; + boot.loader.efi.canTouchEfiVariables = true; + + deuxfleurs.hostName = "oseille"; + deuxfleurs.staticIPv4.address = "192.168.1.35"; + deuxfleurs.staticIPv6.address = "2a01:e0a:5e4:1d0:223:24ff:feaf:f90b"; +} diff --git a/cluster/prod/node/oseille.site.nix b/cluster/prod/node/oseille.site.nix new file mode 120000 index 0000000..5e41391 --- /dev/null +++ b/cluster/prod/node/oseille.site.nix @@ -0,0 +1 @@ +../site/dathomir.nix \ No newline at end of file diff --git a/cluster/prod/ssh_config b/cluster/prod/ssh_config index 6198c40..d7aeafd 100644 --- a/cluster/prod/ssh_config +++ b/cluster/prod/ssh_config @@ -36,5 +36,8 @@ Host ananas Host onion HostName onion.machine.deuxfleurs.fr +Host oseille + HostName oseille.machine.deuxfleurs.fr + Host io HostName io.machine.deuxfleurs.fr -- 2.45.2 From 37a2f781eb3e094fbf96741878dc2414958de793 Mon Sep 17 00:00:00 2001 From: KokaKiwi Date: Sun, 26 May 2024 23:00:39 +0200 Subject: [PATCH 5/5] prod(cluster/dathomir): Open more SSH ports --- cluster/prod/node/io.nix | 2 ++ cluster/prod/node/onion.nix | 2 ++ cluster/prod/node/oseille.nix | 2 ++ 3 files changed, 6 insertions(+) diff --git a/cluster/prod/node/io.nix b/cluster/prod/node/io.nix index 4e53102..e6d3c3a 100644 --- a/cluster/prod/node/io.nix +++ b/cluster/prod/node/io.nix @@ -3,6 +3,8 @@ boot.loader.grub.enable = true; boot.loader.grub.device = "/dev/sda"; + services.openssh.ports = [ 22 33603 ]; + deuxfleurs.hostName = "io"; deuxfleurs.staticIPv4.address = "192.168.1.36"; deuxfleurs.staticIPv6.address = "2a01:e0a:5e4:1d0:52e5:49ff:fe5c:5f35"; diff --git a/cluster/prod/node/onion.nix b/cluster/prod/node/onion.nix index 0e3c719..8b6f8d6 100644 --- a/cluster/prod/node/onion.nix +++ b/cluster/prod/node/onion.nix @@ -4,6 +4,8 @@ boot.loader.timeout = 20; boot.loader.efi.canTouchEfiVariables = true; + services.openssh.ports = [ 22 33601 ]; + deuxfleurs.hostName = "onion"; deuxfleurs.staticIPv4.address = "192.168.1.34"; deuxfleurs.staticIPv6.address = "2a01:e0a:5e4:1d0:223:24ff:feb0:e866"; diff --git a/cluster/prod/node/oseille.nix b/cluster/prod/node/oseille.nix index 5c68121..b0f7723 100644 --- a/cluster/prod/node/oseille.nix +++ b/cluster/prod/node/oseille.nix @@ -4,6 +4,8 @@ boot.loader.timeout = 20; boot.loader.efi.canTouchEfiVariables = true; + services.openssh.ports = [ 22 33602 ]; + deuxfleurs.hostName = "oseille"; deuxfleurs.staticIPv4.address = "192.168.1.35"; deuxfleurs.staticIPv6.address = "2a01:e0a:5e4:1d0:223:24ff:feaf:f90b"; -- 2.45.2