Skip to content

Commit

Permalink
nixos/phoebus-olog: use FerretDB intead of MongoDB
Browse files Browse the repository at this point in the history
to prevent having to compile MongoDB,
which requires a lot of resources
  • Loading branch information
minijackson committed Jan 14, 2025
1 parent 8225949 commit c59c3af
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 6 deletions.
7 changes: 7 additions & 0 deletions docs/release-notes/2411.rst
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,10 @@ Breaking changes
but if you used it by mistake,
make sure to include ``modbusSupport.dbd``,
and ``drvAsynIPPort.dbd`` or ``drvAsynSerialPort.dbd`` instead.

Other notable changes
---------------------

- :nix:option:`services.phoebus-olog` now uses FerretDB instead of MongoDB,
which prevents having to compile a resource intensive project
due to its license.
7 changes: 5 additions & 2 deletions nixos/modules/phoebus/olog.nix
Original file line number Diff line number Diff line change
Expand Up @@ -105,15 +105,18 @@ in {
description = "Phoebus Alarm Server";

wantedBy = ["multi-user.target"];
after = ["elasticsearch.service" "mongodb.service"];
after = ["elasticsearch.service" "ferretdb.service"];

serviceConfig = {
ExecStart = "${lib.getExe pkgs.epnix.phoebus-olog} --spring.config.location=file://${configFile}";
DynamicUser = true;
# TODO: systemd hardening. Currently level 8.2 EXPOSED
};
};
services.mongodb.enable = true;
services.ferretdb = {
enable = true;
settings.FERRETDB_TELEMETRY = "disable";
};
};

meta.maintainers = with epnixLib.maintainers; [minijackson];
Expand Down
5 changes: 1 addition & 4 deletions nixos/tests/phoebus/olog.nix
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,6 @@
# not open-source. But as we're using it run tests, not exposing
# any service, this should be fine.
"elasticsearch"

# MongoDB also uses the SSPL.
"mongodb"
];

networking.firewall.allowedTCPPorts = [8181];
Expand Down Expand Up @@ -56,7 +53,7 @@
with subtest("Olog connected to ElasticSearch"):
assert status["elastic"]["status"] == "Connected"
with subtest("Olog connected to MongoDB"):
with subtest("Olog connected to MongoDB (FerretDB)"):
assert "state=CONNECTED" in status["mongoDB"]
def get(uri: str) -> Any:
Expand Down

0 comments on commit c59c3af

Please sign in to comment.