add web module
(cherry picked from commit 3483d720e90a3084ce4a90ce459d33586004a068)
This commit is contained in:
parent
e12ee7fdda
commit
66c06e8ba2
Binary file not shown.
43
A-Ops.spec
43
A-Ops.spec
@ -1,3 +1,4 @@
|
||||
#needsrootforbuild
|
||||
Name: A-Ops
|
||||
Version: 1.0.1
|
||||
Release: 1
|
||||
@ -15,6 +16,9 @@ BuildRequires: librdkafka-devel libmicrohttpd-devel
|
||||
BuildRequires: python3-setuptools python3-connexion python3-werkzeug python3-libyang
|
||||
BuildRequires: git python3-devel systemd
|
||||
|
||||
# build for web
|
||||
BuildRequires: nodejs node-gyp npm
|
||||
|
||||
%description
|
||||
The intelligent ops toolkit for openEuler
|
||||
|
||||
@ -132,10 +136,25 @@ Requires: python3-werkzeug python3-connexion python3-swagger-ui-bundle
|
||||
python3 pakcage of gala-ragdoll
|
||||
|
||||
|
||||
%package -n aops-web
|
||||
Summary: website for A-Ops
|
||||
Requires: nginx
|
||||
|
||||
%description -n aops-web
|
||||
website for A-Ops, deployed by Nginx
|
||||
|
||||
|
||||
%define debug_package %{nil}
|
||||
|
||||
%prep
|
||||
%autosetup -n %{name}-v%{version}
|
||||
# prepare for web
|
||||
pushd aops-web
|
||||
npm config set registry https://mirrors.huaweicloud.com/repository/npm/
|
||||
npm cache clean -f
|
||||
npm install --global yarn
|
||||
yarn config set registry https://repo.huaweicloud.com/repository/npm
|
||||
popd
|
||||
|
||||
|
||||
%build
|
||||
@ -195,6 +214,11 @@ pushd gala-ragdoll
|
||||
%py3_build
|
||||
popd
|
||||
|
||||
#build for aops-web
|
||||
pushd aops-web
|
||||
yarn build
|
||||
popd
|
||||
|
||||
|
||||
%install
|
||||
# install for utils
|
||||
@ -247,6 +271,16 @@ pushd adoctor-cli
|
||||
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 gala-gopher
|
||||
pushd gala-gopher
|
||||
install -d %{buildroot}/opt/gala-gopher
|
||||
@ -392,10 +426,16 @@ fi
|
||||
%{python3_sitelib}/ragdoll-*.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
|
||||
|
||||
|
||||
%changelog
|
||||
* Mon Sep 6 2021 Lostwayzxc<luoshengwei@huawei.com> - 1.0.1-1
|
||||
- update src, add intelligent check and diagnosis module
|
||||
- update src, add intelligent check and diagnosis module, and
|
||||
- add web of the aops
|
||||
|
||||
* Thu Sep 2 2021 zhaoyuxing<zhaoyuxsing2@huawei.com> - 1.0.0-4
|
||||
- add service file in gala-spider
|
||||
@ -409,3 +449,4 @@ fi
|
||||
* Sat Jul 31 2021 orange-snn<songnannan2@huawei.com> - 1.0.0-1
|
||||
- Package init
|
||||
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user