1
0
Fork 0

adsb: Move to podman and remove arion

This commit is contained in:
Daniel Kempkens 2023-03-19 13:04:48 +01:00
parent 84b6a38492
commit 4f68c3c328
Signed by: daniel
SSH key fingerprint: SHA256:Ks/MyhQYcPRQiwMKLAKquWCdCPe3JXlb1WttgnAoSeM
5 changed files with 124 additions and 146 deletions

View file

@ -1,11 +0,0 @@
{
systemd.tmpfiles.rules = [
"d /etc/container-adsb 0755 root root"
"d /etc/container-adsb/readsb 0755 1000 1000"
"d /etc/container-adsb/readsb/autogain 0755 1000 1000"
"d /etc/container-adsb/tar1090 0755 1000 1000"
"d /etc/container-adsb/tar1090/heatmap 0755 1000 1000"
];
}

View file

@ -1,16 +1,10 @@
let let
secret = import ../../secret/container/adsb; secret = import ../../secret/container/adsb;
custom-config = import ./config.nix;
in in
{ {
virtualisation.arion.projects.adsb.settings = { virtualisation.oci-containers.containers = {
services = {
readsb = { readsb = {
service = {
image = "ghcr.io/sdr-enthusiasts/docker-readsb-protobuf:latest"; image = "ghcr.io/sdr-enthusiasts/docker-readsb-protobuf:latest";
container_name = "readsb";
hostname = "readsb";
restart = "unless-stopped";
environment = { environment = {
"TZ" = "Europe/Berlin"; "TZ" = "Europe/Berlin";
"DISABLE_PERFORMANCE_GRAPHS" = "true"; "DISABLE_PERFORMANCE_GRAPHS" = "true";
@ -24,27 +18,21 @@ in
"READSB_MODEAC" = "true"; "READSB_MODEAC" = "true";
"READSB_RX_LOCATION_ACCURACY" = "2"; "READSB_RX_LOCATION_ACCURACY" = "2";
}; };
devices = [ "/dev/bus/usb:/dev/bus/usb" ];
volumes = [ volumes = [
"/etc/container-adsb/readsb/autogain:/run/autogain" "/etc/container-adsb/readsb/autogain:/run/autogain"
]; ];
tmpfs = [ extraOptions = [
"/run:exec,size=64M" "--device=/dev/bus/usb:/dev/bus/usb"
"/var/log:size=32M" "--tmpfs=/run:exec,size=64M"
"--tmpfs=/var/log:size=32M"
"--label=com.centurylinklabs.watchtower.enable=true"
"--label=io.containers.autoupdate=registry"
]; ];
labels = {
"com.centurylinklabs.watchtower.enable" = "true";
};
};
}; };
mlathub = { mlathub = {
service = {
image = "ghcr.io/sdr-enthusiasts/docker-readsb-protobuf:latest"; image = "ghcr.io/sdr-enthusiasts/docker-readsb-protobuf:latest";
container_name = "mlathub"; dependsOn = [ "readsb" "piaware" ];
hostname = "mlathub";
restart = "unless-stopped";
depends_on = [ "readsb" "piaware" ];
environment = { environment = {
"TZ" = "Europe/Berlin"; "TZ" = "Europe/Berlin";
"DISABLE_PERFORMANCE_GRAPHS" = "true"; "DISABLE_PERFORMANCE_GRAPHS" = "true";
@ -55,22 +43,17 @@ in
"READSB_NET_CONNECTOR" = "piaware,30105,beast_in"; "READSB_NET_CONNECTOR" = "piaware,30105,beast_in";
"READSB_NET_BEAST_OUTPUT_PORT" = "30105"; "READSB_NET_BEAST_OUTPUT_PORT" = "30105";
}; };
tmpfs = [ extraOptions = [
"/run:exec,size=64M" "--tmpfs=/run:exec,size=64M"
"/var/log:size=32M" "--tmpfs=/var/log:size=32M"
"--label=com.centurylinklabs.watchtower.enable=true"
"--label=io.containers.autoupdate=registry"
]; ];
labels = {
"com.centurylinklabs.watchtower.enable" = "true";
};
};
}; };
tar1090 = { tar1090 = {
service = {
image = "ghcr.io/sdr-enthusiasts/docker-tar1090:latest"; image = "ghcr.io/sdr-enthusiasts/docker-tar1090:latest";
container_name = "tar1090"; dependsOn = [ "readsb" "mlathub" ];
restart = "unless-stopped";
depends_on = [ "readsb" "mlathub" ];
ports = [ "8081:80" ]; ports = [ "8081:80" ];
environment = { environment = {
"TZ" = "Europe/Berlin"; "TZ" = "Europe/Berlin";
@ -87,22 +70,17 @@ in
volumes = [ volumes = [
"/etc/container-adsb/tar1090/heatmap:/var/globe_history" "/etc/container-adsb/tar1090/heatmap:/var/globe_history"
]; ];
tmpfs = [ extraOptions = [
"/run:exec,size=64M" "--tmpfs=/run:exec,size=64M"
"/var/log" "--tmpfs=/var/log"
"--label=com.centurylinklabs.watchtower.enable=true"
"--label=io.containers.autoupdate=registry"
]; ];
labels = {
"com.centurylinklabs.watchtower.enable" = "true";
};
};
}; };
fr24feed = { fr24feed = {
service = {
image = "ghcr.io/sdr-enthusiasts/docker-flightradar24:latest"; image = "ghcr.io/sdr-enthusiasts/docker-flightradar24:latest";
container_name = "fr24feed"; dependsOn = [ "readsb" ];
restart = "unless-stopped";
depends_on = [ "readsb" ];
environment = { environment = {
"TZ" = "Europe/Berlin"; "TZ" = "Europe/Berlin";
"BEASTHOST" = "readsb"; "BEASTHOST" = "readsb";
@ -110,18 +88,17 @@ in
"MLAT" = "yes"; "MLAT" = "yes";
"FR24KEY" = secret.container.adsb.fr24feed.key; "FR24KEY" = secret.container.adsb.fr24feed.key;
}; };
labels = { extraOptions = [
"com.centurylinklabs.watchtower.enable" = "true"; "--tmpfs=/run:exec,size=64M"
}; "--tmpfs=/var/log"
}; "--label=com.centurylinklabs.watchtower.enable=true"
"--label=io.containers.autoupdate=registry"
];
}; };
piaware = { piaware = {
service = {
image = "ghcr.io/sdr-enthusiasts/docker-piaware:latest"; image = "ghcr.io/sdr-enthusiasts/docker-piaware:latest";
container_name = "piaware"; dependsOn = [ "readsb" ];
restart = "unless-stopped";
depends_on = [ "readsb" ];
environment = { environment = {
"TZ" = "Europe/Berlin"; "TZ" = "Europe/Berlin";
"RECEIVER_TYPE" = "relay"; "RECEIVER_TYPE" = "relay";
@ -133,15 +110,22 @@ in
"LONG" = secret.container.adsb.readsb.lon; "LONG" = secret.container.adsb.readsb.lon;
"FEEDER_ID" = secret.container.adsb.piaware.feederId; "FEEDER_ID" = secret.container.adsb.piaware.feederId;
}; };
tmpfs = [ extraOptions = [
"/run:exec,size=64M" "--tmpfs=/run:exec,size=64M"
"/var/log" "--tmpfs=/var/log"
"--label=com.centurylinklabs.watchtower.enable=true"
"--label=io.containers.autoupdate=registry"
]; ];
labels = {
"com.centurylinklabs.watchtower.enable" = "true";
}; };
}; };
};
}; systemd.tmpfiles.rules = [
}; "d /etc/container-adsb 0755 root root"
} // custom-config
"d /etc/container-adsb/readsb 0755 1000 1000"
"d /etc/container-adsb/readsb/autogain 0755 1000 1000"
"d /etc/container-adsb/tar1090 0755 1000 1000"
"d /etc/container-adsb/tar1090/heatmap 0755 1000 1000"
];
}

View file

@ -44,6 +44,11 @@
}; };
}; };
networking.firewall.interfaces."podman+" = {
allowedUDPPorts = [ 443 ];
allowedTCPPorts = [ 443 ];
};
systemd.tmpfiles.rules = [ systemd.tmpfiles.rules = [
"d /etc/container-matrix/signald 0775 0 0" "d /etc/container-matrix/signald 0775 0 0"
"d /etc/container-matrix/signal 0775 1337 1337" "d /etc/container-matrix/signal 0775 1337 1337"

View file

@ -14,7 +14,7 @@ in
../nixos/git.nix ../nixos/git.nix
(import ../nixos/arion.nix (args // { inherit secret; })) ../nixos/arion.nix
../../container/adsb ../../container/adsb
]; ];

View file

@ -25,7 +25,7 @@
}; };
networking.firewall.interfaces."podman+" = { networking.firewall.interfaces."podman+" = {
allowedUDPPorts = [ 53 443 ]; allowedUDPPorts = [ 53 ];
allowedTCPPorts = [ 53 443 ]; allowedTCPPorts = [ 53 ];
}; };
} }