2023-05-24 13:37:59 +00:00
|
|
|
{ lib
|
|
|
|
, fetchFromGitHub
|
|
|
|
, python3
|
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2023-05-24 13:37:59 +00:00
|
|
|
python3.pkgs.buildPythonApplication rec {
|
|
|
|
pname = "elasticsearch-curator";
|
|
|
|
version = "8.0.4";
|
|
|
|
format = "pyproject";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "elastic";
|
|
|
|
repo = "curator";
|
2023-05-24 13:37:59 +00:00
|
|
|
rev = "refs/tags/v${version}";
|
|
|
|
hash = "sha256-FPp2BpfYsmNwwevYQ6EH3N1q0TjyeEsBeDM9EUbLl+Q=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2023-05-24 13:37:59 +00:00
|
|
|
pythonRelaxDeps = [
|
|
|
|
"click"
|
|
|
|
"ecs-logging"
|
|
|
|
"elasticsearch8"
|
|
|
|
"es_client"
|
|
|
|
"pyyaml"
|
|
|
|
];
|
|
|
|
|
|
|
|
nativeBuildInputs = with python3.pkgs; [
|
|
|
|
hatchling
|
|
|
|
pythonRelaxDepsHook
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2023-05-24 13:37:59 +00:00
|
|
|
propagatedBuildInputs = with python3.pkgs; [
|
|
|
|
certifi
|
2022-05-18 14:49:53 +00:00
|
|
|
click
|
2023-05-24 13:37:59 +00:00
|
|
|
ecs-logging
|
|
|
|
elasticsearch8
|
|
|
|
es-client
|
2022-05-18 14:49:53 +00:00
|
|
|
pyyaml
|
|
|
|
six
|
2023-05-24 13:37:59 +00:00
|
|
|
voluptuous
|
2020-04-24 23:36:52 +00:00
|
|
|
];
|
|
|
|
|
2023-05-24 13:37:59 +00:00
|
|
|
nativeCheckInputs = with python3.pkgs; [
|
2020-04-24 23:36:52 +00:00
|
|
|
mock
|
2023-05-24 13:37:59 +00:00
|
|
|
requests
|
2022-05-18 14:49:53 +00:00
|
|
|
pytestCheckHook
|
2020-04-24 23:36:52 +00:00
|
|
|
];
|
|
|
|
|
2022-05-18 14:49:53 +00:00
|
|
|
disabledTestPaths = [
|
2023-05-24 13:37:59 +00:00
|
|
|
# Test requires running elasticsearch
|
|
|
|
"tests/integration/test_alias.py"
|
|
|
|
"tests/integration/test_allocation.py"
|
|
|
|
"tests/integration/test_cli.py"
|
|
|
|
"tests/integration/test_close.py"
|
|
|
|
"tests/integration/test_clusterrouting.py"
|
|
|
|
"tests/integration/test_count_pattern.py"
|
|
|
|
"tests/integration/test_create_index.py"
|
|
|
|
"tests/integration/test_datemath.py"
|
|
|
|
"tests/integration/test_delete_indices.py"
|
|
|
|
"tests/integration/test_delete_snapshots.py"
|
|
|
|
"tests/integration/test_delete_snapshots.py"
|
|
|
|
"tests/integration/test_es_repo_mgr.py"
|
|
|
|
"tests/integration/test_forcemerge.py"
|
|
|
|
"tests/integration/test_integrations.py"
|
|
|
|
"tests/integration/test_open.py"
|
|
|
|
"tests/integration/test_reindex.py"
|
|
|
|
"tests/integration/test_replicas.py"
|
|
|
|
"tests/integration/test_restore.py"
|
|
|
|
"tests/integration/test_rollover.py"
|
|
|
|
"tests/integration/test_shrink.py"
|
|
|
|
"tests/integration/test_snapshot.py"
|
2022-05-18 14:49:53 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
disabledTests = [
|
2023-05-24 13:37:59 +00:00
|
|
|
# Test require access network
|
2022-05-18 14:49:53 +00:00
|
|
|
"test_api_key_not_set"
|
|
|
|
"test_api_key_set"
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
homepage = "https://github.com/elastic/curator";
|
|
|
|
description = "Curate, or manage, your Elasticsearch indices and snapshots";
|
|
|
|
license = licenses.asl20;
|
|
|
|
longDescription = ''
|
|
|
|
Elasticsearch Curator helps you curate, or manage, your Elasticsearch
|
|
|
|
indices and snapshots by:
|
|
|
|
|
|
|
|
* Obtaining the full list of indices (or snapshots) from the cluster, as the
|
|
|
|
actionable list
|
|
|
|
|
|
|
|
* Iterate through a list of user-defined filters to progressively remove
|
|
|
|
indices (or snapshots) from this actionable list as needed.
|
|
|
|
|
|
|
|
* Perform various actions on the items which remain in the actionable list.
|
|
|
|
'';
|
2023-05-24 13:37:59 +00:00
|
|
|
changelog = "https://github.com/elastic/curator/releases/tag/v${version}";
|
2020-04-24 23:36:52 +00:00
|
|
|
maintainers = with maintainers; [ basvandijk ];
|
|
|
|
};
|
|
|
|
}
|