diff --git a/A-Ops-v1.2.1.tar.gz b/A-Ops-v1.2.2.tar.gz similarity index 80% rename from A-Ops-v1.2.1.tar.gz rename to A-Ops-v1.2.2.tar.gz index c5b7767728ba26df541519cbe9c89ea5f9c752f7..dcceddefb8a82c359e5b4c1fee2c47511228862b 100644 Binary files a/A-Ops-v1.2.1.tar.gz and b/A-Ops-v1.2.2.tar.gz differ diff --git a/A-Ops-web-node-modules.tar.gz b/A-Ops-web-node-modules.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..8505fc197f9b1e3f293b4145e2aae1901eb0f16f Binary files /dev/null and b/A-Ops-web-node-modules.tar.gz differ diff --git a/A-Ops.spec b/A-Ops.spec index 7ab939c0a5793dbddaf85fba8f22803570b4ab7f..2bf53661f6cf5859176b8bd8c8a3ea786cde3af5 100644 --- a/A-Ops.spec +++ b/A-Ops.spec @@ -1,10 +1,12 @@ Name: A-Ops -Version: v1.2.1 +Version: v1.2.2 Release: 1 Summary: The intelligent ops toolkit for openEuler License: MulanPSL2 URL: https://gitee.com/openeuler/A-Ops Source0: %{name}-%{version}.tar.gz +Source1: A-Ops-web-node-modules.tar.gz + %ifarch x86_64 patch0001: 0001-modify-to-adapt-to-oe2209-x86.patch %endif @@ -13,6 +15,9 @@ patch0001: 0001-modify-to-adapt-to-oe2209-arm.patch %endif +# build for web +BuildRequires: nodejs node-gyp nodejs-yarn + # build for gopher BuildRequires: cmake gcc-c++ yum elfutils-devel clang >= 10.0.1 llvm libconfig-devel BuildRequires: librdkafka-devel libmicrohttpd-devel uthash-devel libbpf libbpf-devel @@ -37,7 +42,7 @@ The intelligent ops toolkit for openEuler Summary: agent for A-Ops Requires: python3-requests python3-flask python3-connexion python3-configparser python3-jsonschema Requires: python3-flask-testing python3-libconf python3-swagger-ui-bundle -Requires: python3-concurrent-log-handler dmidecode +Requires: python3-concurrent-log-handler dmidecode python3-responses %description -n aops-agent agent for A-Ops @@ -48,7 +53,7 @@ Summary: utils for A-Ops Requires: python3-concurrent-log-handler python3-xmltodict python3-pyyaml python3-marshmallow >= 3.13.0 Requires: python3-requests python3-xlrd python3-prettytable python3-pygments python3-sqlalchemy Requires: python3-elasticsearch >= 7 python3-prometheus-api-client python3-urllib3 python3-werkzeug -Requires: python3-flask python3-flask-restful +Requires: python3-flask python3-flask-restful python3-PyMySQL %description -n aops-utils utils for A-Ops @@ -58,13 +63,24 @@ utils for A-Ops Summary: manager of A-ops Requires: aops-utils = %{version}-%{release} ansible >= 2.9.0 Requires: python3-pyyaml python3-marshmallow >= 3.13.0 python3-flask python3-flask-restful -Requires: python3-requests sshpass python3-uWSGI python3-sqlalchemy python3-werkzeug +Requires: python3-requests sshpass python3-uWSGI python3-sqlalchemy python3-werkzeug python3-PyMySQL %description -n aops-manager manager of A-ops, support software deployment and installation, account management, host management, host group management, task and template management of ansible. +%package -n aops-check +Summary: check module for A-Ops +Requires: aops-utils = %{version}-%{release} +Requires: python3-requests python3-flask python3-flask-restful python3-marshmallow >= 3.13.0 +Requires: python3-numpy python3-pandas python3-prometheus-api-client +Requires: python3-sqlalchemy python3-PyMySQL + +%description -n aops-check +check module for A-Ops + + %package -n gala-gopher Summary: Intelligent ops toolkit for openEuler Requires: bash glibc elfutils zlib elfutils-devel @@ -138,10 +154,25 @@ Requires: python3-pandas python3-requests python3-scikit-learn python3-pytorch Python3 package of python3-gala-anteater +%package -n aops-web +Summary: website for A-Ops +Requires: nginx + +%description -n aops-web +website for A-Ops, deployed by Nginx + +%package -n aops-tools +Summary: aops tools + +%description -n aops-tools +tools for aops, it's about agent deploy + + %prep %setup -# %setup -T -D -a 1 +%setup -T -D -a 1 %patch0001 -p1 +cp -rf A-Ops-web-node-modules/node_modules aops-web/ %build @@ -160,6 +191,11 @@ pushd aops-manager %py3_build popd +# build for aops-check +pushd aops-check +%py3_build +popd + #build for gala-gopher pushd gala-gopher/build sh build.sh --release @@ -180,6 +216,11 @@ pushd gala-anteater %py3_build popd +#build for aops-web +pushd aops-web +yarn build +popd + %install # install for agent @@ -201,6 +242,11 @@ mkdir -p %{buildroot}/%{python3_sitelib}/aops_manager/deploy_manager/tasks cp -r aops_manager/deploy_manager/tasks/* %{buildroot}/%{python3_sitelib}/aops_manager/deploy_manager/tasks popd +# install for check +pushd aops-check +%py3_install +popd + #install for gala-gopher pushd gala-gopher/build install -d %{buildroot}/opt/gala-gopher @@ -232,6 +278,22 @@ pushd gala-anteater %py3_install popd +# install for web +pushd aops-web +mkdir -p %{buildroot}/opt/aops_web +cp -r dist %{buildroot}/opt/aops_web/ +mkdir -p %{buildroot}/%{_sysconfdir}/nginx +cp -r deploy/aops-nginx.conf %{buildroot}/%{_sysconfdir}/nginx/ +mkdir -p %{buildroot}/usr/lib/systemd/system +cp -r deploy/aops-web.service %{buildroot}/usr/lib/systemd/system/ +popd + +# install for aops tools +pushd aops-tools +mkdir -p %{buildroot}/opt/aops/ +cp -r aops_tools %{buildroot}/opt/aops/ +popd + %post -n gala-gopher %systemd_post gala-gopher.service @@ -304,7 +366,6 @@ fi %files -n aops-agent %attr(0644,root,root) %{_sysconfdir}/aops/agent.conf -%attr(0644,root,root) %{_sysconfdir}/aops/agent_token.json %attr(0755,root,root) %{_unitdir}/aops-agent.service %{python3_sitelib}/aops_agent*.egg-info %{python3_sitelib}/aops_agent/* @@ -329,6 +390,14 @@ fi %{python3_sitelib}/aops_manager/* +%files -n aops-check +%attr(0644,root,root) %{_sysconfdir}/aops/check.ini +%attr(0755,root,root) %{_bindir}/aops-check +%attr(0755,root,root) %{_unitdir}/aops-check.service +%{python3_sitelib}/aops_check*.egg-info +%{python3_sitelib}/aops_check/* + + %files -n gala-gopher %defattr(-,root,root) %dir /opt/gala-gopher @@ -396,7 +465,21 @@ fi %{python3_sitelib}/gala_anteater-*.egg-info +%files -n aops-web +%attr(0755, root, root) /opt/aops_web/dist/* +%attr(0755, root, root) %{_sysconfdir}/nginx/aops-nginx.conf +%attr(0755, root, root) %{_unitdir}/aops-web.service + +%files -n aops-tools +%attr(0755, root, root) /opt/aops/aops_tools/* + + %changelog +* Wed Aug 10 2022 zhuyuncheng - v1.2.2-1 +- New release 1.2.2, bug fix and add new module. +- add missed requirement python3-PyMySQL +- add new module, check and web + * Wed Aug 10 2022 zhaoyuxing - v1.2.1-1 - New release 1.2.1, bug fix. - modify patch for gala-gopher and rm patch for gala-anteater. @@ -476,3 +559,4 @@ fi * Sat Jul 31 2021 orange-snn - 1.0.0-1 - Package init +