!3 add custom topo feature

From: @Wangjunqi123 
Reviewed-by: @yangzhao_kl 
Signed-off-by: @yangzhao_kl
This commit is contained in:
openeuler-ci-bot 2024-03-19 03:57:44 +00:00 committed by Gitee
commit 1ec44d8521
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
6 changed files with 38 additions and 19 deletions

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -1,13 +1,17 @@
%define debug_package %{nil} %define debug_package %{nil}
Name: PilotGo-plugin-topology Name: PilotGo-plugin-topology
Version: 1.0.1 Version: 1.0.2
Release: 2 Release: 1
Summary: system application architecture detection plugin for PilotGo Summary: system application architecture detection plugin for PilotGo
License: MulanPSL-2.0 License: MulanPSL-2.0
URL: https://gitee.com/openeuler/PilotGo-plugin-topology URL: https://gitee.com/openeuler/PilotGo-plugin-topology
Source0: https://gitee.com/src-openeuler/PilotGo-plugin-topology/%{name}-%{version}.tar.gz Source0: https://gitee.com/src-openeuler/PilotGo-plugin-topology/%{name}-%{version}.tar.gz
# tar -xvf Source0
# cd %{Name}-%{Version}/web/
# run 'yarn install and yarn build' in it
# tar -czvf %{Name}-web.tar.gz dist
Source1: PilotGo-plugin-topology-web.tar.gz
BuildRequires: systemd BuildRequires: systemd
BuildRequires: golang BuildRequires: golang
@ -30,40 +34,55 @@ PilotGo-plugin-topology agent.
%prep %prep
%autosetup -p1 -n %{name}-%{version} %autosetup -p1 -n %{name}-%{version}
#tar -xzvf %{SOURCE1} tar -xzvf %{SOURCE1}
%build %build
cp -rf dist/* server/handler/
# server # server
cd server cd server
cp -r ../web/dist/* handler/ GOWORK=off GO111MODULE=on go build -mod=vendor -tags=production -o PilotGo-plugin-topology-server main.go
GO111MODULE=on go build -mod=vendor -tags=production -o PilotGo-plugin-topology-server main.go
# agent # agent
cd ../agent cd ../agent
GO111MODULE=on go build -mod=vendor -o PilotGo-plugin-topology-agent main.go GOWORK=off GO111MODULE=on go build -mod=vendor -o PilotGo-plugin-topology-agent main.go
%install %install
mkdir -p %{buildroot}/opt/PilotGo/plugin/topology/{server/log,agent/log}
# server # server
install -D -m 0755 server/PilotGo-plugin-topology-server %{buildroot}%{_bindir}/PilotGo-plugin-topology-server install -D -m 0755 server/PilotGo-plugin-topology-server %{buildroot}/opt/PilotGo/plugin/topology/server
install -D -m 0644 conf/config_server.yaml.templete %{buildroot}/opt/PilotGo/plugin/topology/server/config_server.yaml install -D -m 0644 conf/topo_server.yaml.templete %{buildroot}/opt/PilotGo/plugin/topology/server/topo_server.yaml
install -D -m 0644 scripts/PilotGo-plugin-topology-server.service %{buildroot}/usr/lib/systemd/system/PilotGo-plugin-topology-server.service install -D -m 0644 scripts/PilotGo-plugin-topology-server.service %{buildroot}%{_unitdir}/PilotGo-plugin-topology-server.service
# agent # agent
install -D -m 0755 agent/PilotGo-plugin-topology-agent %{buildroot}%{_bindir}/PilotGo-plugin-topology-agent install -D -m 0755 agent/PilotGo-plugin-topology-agent %{buildroot}/opt/PilotGo/plugin/topology/agent
install -D -m 0644 conf/config_agent.yaml.templete %{buildroot}/opt/PilotGo/plugin/topology/agent/config_agent.yaml install -D -m 0644 conf/topo_agent.yaml.templete %{buildroot}/opt/PilotGo/plugin/topology/agent/topo_agent.yaml
install -D -m 0644 scripts/PilotGo-plugin-topology-agent.service %{buildroot}/usr/lib/systemd/system/PilotGo-plugin-topology-agent.service install -D -m 0644 scripts/PilotGo-plugin-topology-agent.service %{buildroot}%{_unitdir}/PilotGo-plugin-topology-agent.service
%files server %files server
%{_bindir}/PilotGo-plugin-topology-server %dir /opt/PilotGo
/opt/PilotGo/plugin/topology/server/config_server.yaml %dir /opt/PilotGo/plugin
/usr/lib/systemd/system/PilotGo-plugin-topology-server.service %dir /opt/PilotGo/plugin/topology
%dir /opt/PilotGo/plugin/topology/server
%dir /opt/PilotGo/plugin/topology/server/log
/opt/PilotGo/plugin/topology/server/PilotGo-plugin-topology-server
/opt/PilotGo/plugin/topology/server/topo_server.yaml
%{_unitdir}/PilotGo-plugin-topology-server.service
%files agent %files agent
%{_bindir}/PilotGo-plugin-topology-agent %dir /opt/PilotGo
/opt/PilotGo/plugin/topology/agent/config_agent.yaml %dir /opt/PilotGo/plugin
/usr/lib/systemd/system/PilotGo-plugin-topology-agent.service %dir /opt/PilotGo/plugin/topology
%dir /opt/PilotGo/plugin/topology/agent
%dir /opt/PilotGo/plugin/topology/agent/log
/opt/PilotGo/plugin/topology/agent/PilotGo-plugin-topology-agent
/opt/PilotGo/plugin/topology/agent/topo_agent.yaml
%{_unitdir}/PilotGo-plugin-topology-agent.service
%changelog %changelog
* Tue Mar 19 2024 wangjunqi <wangjunqi@kylinos.cn> - 1.0.2-1
- add custom topo feature
* Wed Oct 18 2023 wangjunqi <wangjunqi@kylinos.cn> - 1.0.1-2 * Wed Oct 18 2023 wangjunqi <wangjunqi@kylinos.cn> - 1.0.1-2
- change configuration file path to /opt - change configuration file path to /opt
* Tue Oct 10 2023 wangjunqi <wangjunqi@kylinos.cn> - 1.0.1-1 * Tue Oct 10 2023 wangjunqi <wangjunqi@kylinos.cn> - 1.0.1-1
- Package init - Package init

0
README.en.md Normal file → Executable file
View File

0
README.md Normal file → Executable file
View File