代码拉取完成,页面将自动刷新
同步操作将从 WeBank/open-monitor 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
current_dir=$(shell pwd)
version=$(PLUGIN_VERSION)
project_dir=$(shell basename "${current_dir}")
project_name=open-monitor
clean:
rm -rf monitor-server/monitor-server
rm -rf monitor-agent/agent_manager/agent_manager
rm -rf monitor-agent/archive_mysql_tool/archive_mysql_tool
rm -rf monitor-agent/node_exporter/node_exporter_new
rm -rf build/conf/node_exporter/node_exporter_new
rm -rf build/conf/node_exporter/VERSION
rm -rf monitor-agent/ping_exporter/ping_exporter
rm -rf monitor-agent/db_data_exporter/db_data_exporter
rm -rf monitor-agent/transgateway/transgateway
rm -rf monitor-ui/dist
rm -rf monitor-ui/plugin
build: clean
chmod +x ./build/*.sh
docker run --rm -v $(current_dir):/go/src/github.com/WeBankPartners/$(project_dir) --name build_monitor_server ccr.ccs.tencentyun.com/webankpartners/golang-ext:v1.15.6 /bin/bash /go/src/github.com/WeBankPartners/$(project_dir)/build/build-server.sh
./build/build-ui.sh $(current_dir)
image: build
docker build -t $(project_name):$(version) .
agent:
chmod +x ./build/build-agent.sh
chmod +x ./build/node_exporter/control
chmod +x ./build/node_exporter/start.sh
./build/build-agent.sh
package: image agent
mkdir -p plugin
cp -r monitor-ui/plugin/* plugin/
zip -r ui.zip plugin
rm -rf plugin
cp build/register.xml ./
cp wiki/db/monitor_sql_01_struct.sql ./init.sql
cat wiki/db/monitor_sql_02_base_data_en.sql >> ./init.sql
sed -i "s~{{PLUGIN_VERSION}}~$(version)~g" ./register.xml
docker save -o image.tar $(project_name):$(version)
zip wecube-plugins-monitor-$(version).zip image.tar init.sql register.xml ui.zip node_exporter.tar.gz
rm -f register.xml
rm -f init.sql
rm -f ui.zip
rm -rf ./*.tar
rm -f node_exporter.tar.gz
docker rmi $(project_name):$(version)
upload: package
$(eval container_id:=$(shell docker run -v $(current_dir):/package -itd --entrypoint=/bin/sh minio/mc))
docker exec $(container_id) mc config host add wecubeS3 $(s3_server_url) $(s3_access_key) $(s3_secret_key) wecubeS3
docker exec $(container_id) mc cp /package/wecube-plugins-monitor-$(version).zip wecubeS3/wecube-plugin-package-bucket
docker rm -f $(container_id)
rm -rf wecube-plugins-monitor-$(version).zip
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。