feat: 补充 GIS Actions 部署步骤
This commit is contained in:
+58
-9
@@ -28,14 +28,48 @@ agc suites list
|
|||||||
agc status <task-id>
|
agc status <task-id>
|
||||||
```
|
```
|
||||||
|
|
||||||
## gis-actions(本地执行器)
|
## gis-actions(本地执行器部署)
|
||||||
|
|
||||||
gis-actions 运行在你的机器上,是套件的本地执行引擎。
|
gis-actions 是套件的本地执行引擎,跑在你的机器上。
|
||||||
|
|
||||||
### 安装前提
|
### 前提条件
|
||||||
|
|
||||||
- Python 3
|
- **Python 3.10+**(验证:`python3 --version`)
|
||||||
- Docker
|
- **Docker**(验证:`docker ps`)
|
||||||
|
- Linux:`apt install docker.io` 或 `yum install docker`
|
||||||
|
- Windows/Mac:安装 Docker Desktop
|
||||||
|
- 能访问 `registry.mercator.cn`(拉取 gis-base 镜像)
|
||||||
|
|
||||||
|
### 安装
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# 下载 gis-actions 包
|
||||||
|
# 或从源码安装
|
||||||
|
pip install gis-actions
|
||||||
|
```
|
||||||
|
|
||||||
|
### 配置
|
||||||
|
|
||||||
|
创建 `config.json`:
|
||||||
|
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"worker": {
|
||||||
|
"id": "my-machine-001",
|
||||||
|
"capabilities": ["gis-operations"]
|
||||||
|
},
|
||||||
|
"scheduler": {
|
||||||
|
"url": "https://suites.mercator.cn",
|
||||||
|
"poll_interval": 5,
|
||||||
|
"heartbeat_interval": 30
|
||||||
|
},
|
||||||
|
"auth": {
|
||||||
|
"api_key": "你的 API Key"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
API Key 从 https://auth.mercator.cn 获取。
|
||||||
|
|
||||||
### 启动
|
### 启动
|
||||||
|
|
||||||
@@ -43,7 +77,20 @@ gis-actions 运行在你的机器上,是套件的本地执行引擎。
|
|||||||
python3 -m gis_actions --config config.json
|
python3 -m gis_actions --config config.json
|
||||||
```
|
```
|
||||||
|
|
||||||
启动后自动连接调度中心,等待执行任务。
|
启动后自动连接调度中心,注册自身,开始等待任务。
|
||||||
|
保持终端开着,或使用进程管理工具(systemd / supervisor)后台运行。
|
||||||
|
|
||||||
|
### 验证是否运行成功
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# 查看日志输出,应看到:
|
||||||
|
# Worker xxx started, polling https://suites.mercator.cn every 5s
|
||||||
|
# Worker registered successfully
|
||||||
|
```
|
||||||
|
|
||||||
|
### 停止
|
||||||
|
|
||||||
|
Ctrl+C 停止。脚本包自动清理,不留痕迹。
|
||||||
|
|
||||||
### 数据流向
|
### 数据流向
|
||||||
|
|
||||||
@@ -52,10 +99,12 @@ python3 -m gis_actions --config config.json
|
|||||||
│
|
│
|
||||||
▼
|
▼
|
||||||
gis-actions(你的机器)
|
gis-actions(你的机器)
|
||||||
│ docker run gis-base
|
│ ← 从调度中心拉取任务
|
||||||
│ 套件脚本处理文件
|
│ ← 下载套件脚本包
|
||||||
|
│ ← docker run gis-base + 套件脚本
|
||||||
|
│ → 结果写入 /tmp/output/
|
||||||
▼
|
▼
|
||||||
结果文件(你的机器 /tmp/output/)
|
结果文件(你的机器)
|
||||||
```
|
```
|
||||||
|
|
||||||
## 支持的输入类型
|
## 支持的输入类型
|
||||||
|
|||||||
Reference in New Issue
Block a user