add custom topo feature

This commit is contained in:
Wangjunqi123 2024-03-19 11:23:31 +08:00
parent 38940eb9a9
commit e56e8e874f
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}
Name: PilotGo-plugin-topology
Version: 1.0.1
Release: 2
Version: 1.0.2
Release: 1
Summary: system application architecture detection plugin for PilotGo
License: MulanPSL-2.0
URL: https://gitee.com/openeuler/PilotGo-plugin-topology
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: golang
@ -30,40 +34,55 @@ PilotGo-plugin-topology agent.
%prep
%autosetup -p1 -n %{name}-%{version}
#tar -xzvf %{SOURCE1}
tar -xzvf %{SOURCE1}
%build
cp -rf dist/* server/handler/
# server
cd server
cp -r ../web/dist/* handler/
GO111MODULE=on go build -mod=vendor -tags=production -o PilotGo-plugin-topology-server main.go
GOWORK=off GO111MODULE=on go build -mod=vendor -tags=production -o PilotGo-plugin-topology-server main.go
# 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
mkdir -p %{buildroot}/opt/PilotGo/plugin/topology/{server/log,agent/log}
# server
install -D -m 0755 server/PilotGo-plugin-topology-server %{buildroot}%{_bindir}/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 scripts/PilotGo-plugin-topology-server.service %{buildroot}/usr/lib/systemd/system/PilotGo-plugin-topology-server.service
install -D -m 0755 server/PilotGo-plugin-topology-server %{buildroot}/opt/PilotGo/plugin/topology/server
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}%{_unitdir}/PilotGo-plugin-topology-server.service
# agent
install -D -m 0755 agent/PilotGo-plugin-topology-agent %{buildroot}%{_bindir}/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 scripts/PilotGo-plugin-topology-agent.service %{buildroot}/usr/lib/systemd/system/PilotGo-plugin-topology-agent.service
install -D -m 0755 agent/PilotGo-plugin-topology-agent %{buildroot}/opt/PilotGo/plugin/topology/agent
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}%{_unitdir}/PilotGo-plugin-topology-agent.service
%files server
%{_bindir}/PilotGo-plugin-topology-server
/opt/PilotGo/plugin/topology/server/config_server.yaml
/usr/lib/systemd/system/PilotGo-plugin-topology-server.service
%dir /opt/PilotGo
%dir /opt/PilotGo/plugin
%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
%{_bindir}/PilotGo-plugin-topology-agent
/opt/PilotGo/plugin/topology/agent/config_agent.yaml
/usr/lib/systemd/system/PilotGo-plugin-topology-agent.service
%dir /opt/PilotGo
%dir /opt/PilotGo/plugin
%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
* 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
- change configuration file path to /opt
* Tue Oct 10 2023 wangjunqi <wangjunqi@kylinos.cn> - 1.0.1-1
- Package init

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

0
README.md Normal file → Executable file
View File