提交 343a202b 编写于 作者: O openeuler-ci-bot 提交者: Gitee

!169 prepare for v0.3 release

Merge pull request !169 from 谢志鹏/master
VERSION = 0.2
VERSION = 0.3
.PHONY: all clean modules
PKGPATH=pkg
......@@ -13,7 +13,7 @@ ATUNEVERSION = $(VERSION)$(if $(SRCVERSION),($(SRCVERSION)))
GOLDFLAGS += -X gitee.com/openeuler/A-Tune/common/config.Version=$(ATUNEVERSION)
GOFLAGS = -ldflags "$(GOLDFLAGS)"
CERT_PATH=/etc/atuned
CERT_PATH=$(DESTDIR)/etc/atuned
GRPC_CERT_PATH=$(CERT_PATH)/grpc_certs
REST_CERT_PATH=$(CERT_PATH)/rest_certs
ENGINE_CERT_PATH=$(CERT_PATH)/engine_certs
......@@ -80,6 +80,7 @@ libinstall:
install -m 750 pkg/atuned $(BINDIR)
install -m 640 misc/atuned.service $(SYSTEMDDIR)
install -m 640 misc/atuned.cnf $(DESTDIR)/etc/atuned/
install -m 640 misc/engine.cnf $(DESTDIR)/etc/atuned/
install -m 640 rules/tuning/tuning_rules.grl $(DESTDIR)/etc/atuned/rules
install -m 640 misc/atune-engine.service $(SYSTEMDDIR)
install -m 640 database/atuned.db $(DESTDIR)/var/lib/atuned/
......@@ -91,13 +92,13 @@ libinstall:
\cp -rf resources/* $(DESTDIR)$(PREFIX)/$(LIBEXEC)/atuned/resources/
chmod -R 750 $(DESTDIR)$(PREFIX)/$(LIBEXEC)/atuned/resources/
\cp -rf profiles/* $(DESTDIR)$(PREFIX)/lib/atuned/profiles/
chmod -R 640 $(DESTDIR)$(PREFIX)/lib/atuned/profiles/
chmod -R 750 $(DESTDIR)$(PREFIX)/lib/atuned/profiles/
@echo "END INSTALL A-Tune"
rpm:
cd .. && tar -zcvf openeuler-A-Tune-v$(VERSION).tar.gz A-Tune
cd .. && tar -zcvf v$(VERSION).tar.gz A-Tune
mkdir -p ~/rpmbuild/{BUILD,RPMS,SOURCES,SPECS,SRPMS}
mv ../openeuler-A-Tune-v$(VERSION).tar.gz ~/rpmbuild/SOURCES
mv ../v$(VERSION).tar.gz ~/rpmbuild/SOURCES
rpmbuild -ba misc/atune.spec
models:
......
......@@ -31,7 +31,7 @@ yum install -y python3-dict2xml python3-flask-restful python3-pandas python3-sci
```
Or
```bash
pip3 install dict2xml Flask-RESTful pandas scikit-optimize==0.5.2 xgboost==0.90 scikit-learn==0.20.4
pip3 install dict2xml Flask-RESTful pandas scikit-optimize xgboost scikit-learn
```
#### 3. Download the source code.
......@@ -42,6 +42,7 @@ git clone https://gitee.com/openeuler/A-Tune.git
#### 4. Compile.
```bash
cd A-Tune
make models
make
```
......
......@@ -4,7 +4,7 @@ After=network.target
Requires=polkit.service
[Service]
ExecStart=python3 /usr/libexec/atuned/analysis/app_engine.py /etc/atuned/atuned.cnf
ExecStart=python3 /usr/libexec/atuned/analysis/app_engine.py /etc/atuned/engine.cnf
[Install]
WantedBy=multi-user.target
......@@ -2,20 +2,22 @@
Summary: AI auto tuning system
Name: atune
Version: 0.2
Version: 0.3
Release: 0.1
License: Mulan PSL v2
URL: https://gitee.com/openeuler/A-Tune
Source: openeuler-A-Tune-v%{version}.tar.gz
Source: https://gitee.com/openeuler/A-Tune/repository/archive/v%{version}.tar.gz
BuildRequires: rpm-build protobuf-compiler golang-bin python3-pytest procps-ng
BuildRequires: rpm-build golang-bin procps-ng
BuildRequires: sqlite >= 3.24.0 openssl
BuildRequires: python3-scikit-optimize python3-pandas python3-xgboost
Requires: systemd
Requires: atune-client
Requires: atune-db
Requires: python3-dict2xml
Requires: python3-flask-restful
Requires: python3-pandas
Requires: python3-lhsmdu
Requires: prefetch_tuning
Requires: perf
Requires: sysstat
......@@ -56,6 +58,10 @@ atune engine tool for manage atuned AI tuning system.
%autosetup -n A-Tune -p1
%build
sed -i "s/^rest_tls.*/rest_tls = false/" misc/atuned.cnf
sed -i "s/^engine_tls.*/engine_tls = false/" misc/atuned.cnf
sed -i "s/^engine_tls.*/engine_tls = false/" misc/engine.cnf
make models
%make_build
%install
......@@ -78,14 +84,17 @@ atune engine tool for manage atuned AI tuning system.
%exclude /usr/libexec/atuned/analysis/engine/
%attr(0750,root,root) %dir /usr/lib/atuned
%attr(0750,root,root) %dir /usr/lib/atuned/modules
%attr(0640,root,root) %dir /usr/lib/atuned/profiles
%attr(0750,root,root) %dir /usr/lib/atuned/profiles
%attr(0750,root,root) %dir /usr/libexec/atuned
%attr(0750,root,root) %dir /usr/libexec/atuned/scripts
%attr(0750,root,root) %dir /usr/libexec/atuned/analysis
%attr(0750,root,root) %dir /usr/share/atuned
%attr(0640,root,root) %dir /etc/atuned
%attr(0640,root,root) %dir /var/atuned
%attr(0640,root,root) /etc/atuned/*
%attr(0750,root,root) %dir /etc/atuned
%attr(0750,root,root) %dir /etc/atuned/rules
%attr(0750,root,root) %dir /var/atuned
%attr(0640,root,root) /etc/atuned/atuned.cnf
%exclude /etc/atuned/engine_certs/*
%exclude /etc/atuned/rest_certs/*
%files client
%attr(0750,root,root) %{_bindir}/atune-adm
......@@ -112,7 +121,11 @@ atune engine tool for manage atuned AI tuning system.
%exclude /usr/libexec/atuned/analysis/atuned/
%attr(0750,root,root) %dir /usr/libexec/atuned/analysis
%attr(0750,root,root) %dir /usr/libexec/atuned/resources
%attr(0640,root,root) %dir /etc/atuned
%attr(0750,root,root) %dir /etc/atuned
%exclude /etc/atuned/atuned.cnf
%exclude /etc/atuned/rules
%exclude /etc/atuned/engine_certs/*
%exclude /etc/atuned/rest_certs/*
%post
%systemd_post atuned.service
......
......@@ -67,8 +67,6 @@ engine_tls = true
tlsenginecacertfile = /etc/atuned/engine_certs/ca.crt
tlsengineclientcertfile = /etc/atuned/engine_certs/client.crt
tlsengineclientkeyfile = /etc/atuned/engine_certs/client.key
tlsengineservercertfile = /etc/atuned/engine_certs/server.crt
tlsengineserverkeyfile = /etc/atuned/engine_certs/server.key
#################################### log ###############################
[log]
......
# Copyright (c) 2019 Huawei Technologies Co., Ltd.
# A-Tune is licensed under the Mulan PSL v2.
# You can use this software according to the terms and conditions of the Mulan PSL v2.
# You may obtain a copy of Mulan PSL v2 at:
# http://license.coscl.org.cn/MulanPSL2
# THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR
# PURPOSE.
# See the Mulan PSL v2 for more details.
# Create: 2020-9-4
#################################### engine ###############################
[server]
# the tuning optimizer host and port, start by engine.service
# if engine_host is same as rest_host, two ports cannot be same
# the port can be set between 0 to 65535 which not be used
engine_host = localhost
engine_port = 3838
# enable engine server authentication SSL/TLS
# default is true
engine_tls = true
tlsenginecacertfile = /etc/atuned/engine_certs/ca.crt
tlsengineservercertfile = /etc/atuned/engine_certs/server.crt
tlsengineserverkeyfile = /etc/atuned/engine_certs/server.key
#################################### log ###############################
[log]
# either "debug", "info", "warn", "error", "critical", default is "info"
level = info
......@@ -105,5 +105,5 @@ def update_tuning_page(prj_name, num, timestamp, _):
if __name__ == '__main__':
config = ConfigParser()
config.read('/etc/atuned/atuned.cnf')
config.read('/etc/atuned/engine.cnf')
socketio.run(APP, host=config.get("server", "engine_host"), port=10086)
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册