2023-02-15 15:11:39 +00:00
|
|
|
let
|
2023-12-24 04:40:56 +00:00
|
|
|
opensearchTest =
|
|
|
|
extraSettings:
|
2023-02-15 15:11:39 +00:00
|
|
|
import ./make-test-python.nix (
|
2023-12-24 04:40:56 +00:00
|
|
|
{ pkgs, lib, ... }:
|
|
|
|
{
|
2023-02-15 15:11:39 +00:00
|
|
|
name = "opensearch";
|
|
|
|
meta.maintainers = with pkgs.lib.maintainers; [ shyim ];
|
2023-02-14 17:16:11 +00:00
|
|
|
|
2023-02-15 15:11:39 +00:00
|
|
|
nodes.machine = lib.mkMerge [
|
|
|
|
{
|
|
|
|
virtualisation.memorySize = 2048;
|
|
|
|
services.opensearch.enable = true;
|
|
|
|
}
|
|
|
|
extraSettings
|
|
|
|
];
|
2023-02-14 17:16:11 +00:00
|
|
|
|
2023-02-15 15:11:39 +00:00
|
|
|
testScript = ''
|
|
|
|
machine.start()
|
|
|
|
machine.wait_for_unit("opensearch.service")
|
|
|
|
machine.wait_for_open_port(9200)
|
2023-02-14 17:16:11 +00:00
|
|
|
|
2023-02-15 15:11:39 +00:00
|
|
|
machine.succeed(
|
|
|
|
"curl --fail localhost:9200"
|
|
|
|
)
|
|
|
|
'';
|
|
|
|
}
|
|
|
|
);
|
|
|
|
in
|
|
|
|
{
|
|
|
|
opensearch = opensearchTest { };
|
|
|
|
opensearchCustomPathAndUser = opensearchTest {
|
2023-12-24 04:40:56 +00:00
|
|
|
services.opensearch.dataDir = "/var/opensearch_test";
|
|
|
|
services.opensearch.user = "open_search";
|
|
|
|
services.opensearch.group = "open_search";
|
|
|
|
systemd.tmpfiles.rules = [
|
|
|
|
"d /var/opensearch_test 0700 open_search open_search -"
|
|
|
|
];
|
|
|
|
users = {
|
|
|
|
groups.open_search = { };
|
|
|
|
users.open_search = {
|
|
|
|
description = "OpenSearch daemon user";
|
|
|
|
group = "open_search";
|
|
|
|
isSystemUser = true;
|
2023-02-15 15:11:39 +00:00
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|