gala-anteater/add-systemd-service-for-anteater.patch
Zhen Chen 1f46c219ad Model optimization and bugfix
- fix str2enum bug & data query refactor
- add systemd service for anteater
- remove 'sys-level' config param
- add chinese descriptions
- Update TCP Establish Model & Add Nic Loss Detector
- Add disk throughput detector

(cherry picked from commit f3c17e8c6a619a7803afd89b945ae3f36d17f9b0)
2023-01-17 22:40:46 +08:00

82 lines
2.3 KiB
Diff

From 2ef581e4960dd0ba49bbe371496933841da001fe Mon Sep 17 00:00:00 2001
From: lizhenxing11 <lizhenxing11@huawei.com>
Date: Mon, 9 Jan 2023 15:08:01 +0800
Subject: [PATCH] add systemd service for anteater
add manifest.in
---
MANIFEST.in | 11 +++++++++++
service/gala-anteater.service | 12 ++++++++++++
setup.py | 5 +++--
3 files changed, 26 insertions(+), 2 deletions(-)
create mode 100644 MANIFEST.in
create mode 100644 service/gala-anteater.service
diff --git a/MANIFEST.in b/MANIFEST.in
new file mode 100644
index 0000000..7120af9
--- /dev/null
+++ b/MANIFEST.in
@@ -0,0 +1,11 @@
+include LICENSE
+include README.en.md
+include README.md
+include requirements.txt
+
+recursive-include service *
+recursive-include tests *
+recursive-include docs *
+
+recursive-exclude * __pycache__
+recursive-exclude * *.py[co]
\ No newline at end of file
diff --git a/service/gala-anteater.service b/service/gala-anteater.service
new file mode 100644
index 0000000..24af354
--- /dev/null
+++ b/service/gala-anteater.service
@@ -0,0 +1,12 @@
+[Unit]
+Description=A-Ops gala-anteater service
+After=network.target
+
+[Service]
+Type=exec
+ExecStart=/usr/bin/gala-anteater
+Restart=on-failure
+RestartSec=1
+
+[Install]
+WantedBy=multi-user.target
\ No newline at end of file
diff --git a/setup.py b/setup.py
index 4471a0f..e075391 100644
--- a/setup.py
+++ b/setup.py
@@ -23,11 +23,12 @@ setup(
description="Times Series Anomaly Detection Platform on Operating System",
url="https://gitee.com/openeuler/A-Ops/tree/master/gala-anteater",
keywords=["Anomaly Detection", "Time Series Analysis", "Operating System"],
- packages=find_packages(where="."),
+ packages=find_packages(where=".", exclude=("tests",)),
data_files=[
('/etc/gala-anteater/config/', glob('config/gala-anteater.yaml')),
('/etc/gala-anteater/config/', glob('config/log.settings.ini')),
('/etc/gala-anteater/config/module/', glob('config/module/*')),
+ ('/usr/lib/systemd/system/', glob('service/*')),
],
install_requires=[
"APScheduler",
@@ -42,7 +43,7 @@ setup(
],
entry_points={
"console_scripts": [
- "gala-anteater = anteater.main:main",
+ "gala-anteater=anteater.main:main",
]
}
)
--
2.33.0