From e7a3658cacd9204e23f0d2348e258c321c9a38ef Mon Sep 17 00:00:00 2001 From: Huawei Date: Fri, 10 Jul 2026 05:43:45 +0000 Subject: [PATCH] =?UTF-8?q?docs:=20=E6=9B=B4=E6=96=B0=E5=B7=A5=E5=85=B7?= =?UTF-8?q?=E5=AE=89=E8=A3=85=E6=8C=87=E5=8D=97=EF=BC=8C=E5=BC=95=E7=94=A8?= =?UTF-8?q?=20SuiteHub=20Packages?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- suite-user/TOOLS.md | 45 ++++++++++++++++++++++++--------------------- 1 file changed, 24 insertions(+), 21 deletions(-) diff --git a/suite-user/TOOLS.md b/suite-user/TOOLS.md index f386561..561a476 100644 --- a/suite-user/TOOLS.md +++ b/suite-user/TOOLS.md @@ -9,8 +9,8 @@ https://suites.mercator.cn ## CLI(可选) ```bash -# 安装 -pip install https://git.mercator.cn/SuiteHub/agentgis-cli/raw/branch/main/dist/agentgis_cli-0.1.0-py3-none-any.whl +# 安装 agentgis-cli +pip install https://git.mercator.cn/api/packages/SuiteHub/generic/agentgis-cli/0.1.0/agentgis_cli-0.1.0-py3-none-any.whl # 配置 API Key agc config set api-key mk_xxxxxxxxx @@ -21,9 +21,6 @@ agc run --inputs '{"input_path": "/data/myfile.shp"}' # 查看套件列表 agc suites list -# 查看套件列表 -agc suites list - # 查看执行状态 agc status ``` @@ -34,23 +31,24 @@ gis-actions 是套件的本地执行引擎,跑在你的机器上。 ### 前提条件 -- **Python 3.10+**(验证:`python3 --version`) +- **Debian / Ubuntu 系统** - **Docker**(验证:`docker ps`) - - Linux:`apt install docker.io` 或 `yum install docker` - - Windows/Mac:安装 Docker Desktop + - `sudo apt install docker.io` - 能访问 `registry.mercator.cn`(拉取 gis-base 镜像) ### 安装 ```bash -# 下载 gis-actions 包 -# 或从源码安装 -# gis-actions 安装方式待定 +# 下载并安装 gis-actions +wget -O agentgis-worker.deb https://git.mercator.cn/api/packages/SuiteHub/generic/gis-actions/v2.0.0-alpha/agentgis-worker_2.0.0-alpha_all.deb +sudo dpkg -i agentgis-worker.deb + +# 安装后会自动配置 systemd 服务和 Docker insecure-registry ``` ### 配置 -创建 `config.json`: +编辑 `/etc/agentgis/worker.json`: ```json { @@ -74,23 +72,28 @@ API Key 从 https://auth.mercator.cn 获取。 ### 启动 ```bash -python3 -m gis_actions --config config.json +sudo systemctl start agentgis-worker +sudo systemctl status agentgis-worker ``` -启动后自动连接调度中心,注册自身,开始等待任务。 -保持终端开着,或使用进程管理工具(systemd / supervisor)后台运行。 - -### 验证是否运行成功 +### 验证 ```bash -# 查看日志输出,应看到: -# Worker xxx started, polling https://suites.mercator.cn every 5s -# Worker registered successfully +journalctl -u agentgis-worker -f +# 应看到:Worker xxx started, polling https://suites.mercator.cn every 5s ``` ### 停止 -Ctrl+C 停止。脚本包自动清理,不留痕迹。 +```bash +sudo systemctl stop agentgis-worker +``` + +### 卸载 + +```bash +sudo dpkg --purge agentgis-worker +``` ### 数据流向