120 lines
3.1 KiB
Markdown
120 lines
3.1 KiB
Markdown
# Edge Local Quickstart
|
|
|
|
Edge는 package 하나, Node는 bootstrap 한 줄로 설치한다.
|
|
이 문서는 Control Plane 없이 Edge host에서 bootstrap, local config, 진단, 단일 Edge 유지보수를 수행하는 Edge-local 경로다. 여러 Edge를 상시 관찰하거나 정책/감사/팀 운영을 수행하는 기본 운영면은 후속 Control Plane으로 둔다.
|
|
|
|
`scripts/dev/*` helper는 repo 내부 개발 진단용이다. field 기본 경로는 `iop-edge` package와 여기서 출력되는 one-line bootstrap command다.
|
|
|
|
## 1. Package
|
|
|
|
```bash
|
|
make build
|
|
```
|
|
|
|
결과: `build/packages/iop-edge-<edge-os>-<edge-arch>.tar.gz`
|
|
|
|
## 2. Edge
|
|
|
|
```bash
|
|
tar -xzf iop-edge-<edge-os>-<edge-arch>.tar.gz -C /opt
|
|
cd /opt/iop-edge-<edge-os>-<edge-arch>
|
|
|
|
./iop-edge config init
|
|
./iop-edge env
|
|
```
|
|
|
|
필요하면 `edge.yaml`의 host/port/model만 수정한다.
|
|
|
|
## 3. Node 등록
|
|
|
|
```bash
|
|
./iop-edge node register node-1
|
|
```
|
|
|
|
Ollama Node:
|
|
|
|
```bash
|
|
./iop-edge node register node-1 \
|
|
--adapter ollama \
|
|
--ollama-base-url http://127.0.0.1:11434
|
|
```
|
|
|
|
출력된 `curl ... | bash -s <token>` 한 줄을 복사한다.
|
|
|
|
## 4. Edge 실행
|
|
|
|
```bash
|
|
./iop-edge config check
|
|
./iop-edge serve
|
|
```
|
|
|
|
서비스 실행:
|
|
|
|
```bash
|
|
sudo ./iop-edge setup --enable --start
|
|
```
|
|
|
|
## 5. Node 설치
|
|
|
|
Node host에서 복사한 명령을 실행한다.
|
|
|
|
```bash
|
|
curl -fsSL http://<edge-host>:18080/bootstrap/node.sh | bash -s <token>
|
|
```
|
|
|
|
`node.sh`가 OS/architecture를 자동 감지한다.
|
|
|
|
## 6. 확인
|
|
|
|
```bash
|
|
tail -f logs/edge.log
|
|
./iop-edge nodes list
|
|
```
|
|
|
|
정상: `node registered`
|
|
|
|
## 운영 범위
|
|
|
|
- **Edge-local 필수**: package 설치, `edge.yaml` 생성/검증, effective environment 확인, node bootstrap command 발급, 단일 Edge smoke와 복구 진단
|
|
- **Control Plane 기본**: 여러 Edge 상태 조회, 팀 운영 UI, 정책/권한/audit, 반복 운영/리포트, fleet-wide command
|
|
- **Shared operation**: Edge 상태, node 및 후속 agent 등록 상태, command/event, run/cancel/status, bootstrap 발급 상태처럼 CLI와 Control Plane이 모두 다룰 수 있는 작업
|
|
|
|
새 command가 필요하면 먼저 이 셋 중 하나로 분류한다. Shared operation은 CLI와 Control Plane이 각각 별도 로직을 갖지 않고 Edge의 공통 operation/service 경계를 통해 노출한다.
|
|
|
|
## Build Options
|
|
|
|
```bash
|
|
make build
|
|
make build EDGE_TARGET=darwin-arm64
|
|
make build EDGE_TARGET=darwin-arm64 NODE_TARGETS="darwin-arm64"
|
|
make pack-node-target NODE_TARGET=darwin-arm64 && make pack-edge EDGE_TARGET=darwin-arm64
|
|
```
|
|
|
|
`EDGE_TARGET`는 package에 들어갈 Edge binary와 Edge package 이름을 정한다.
|
|
`NODE_TARGETS`/`NODE_TARGET`는 Node bootstrap artifact 대상을 정한다.
|
|
|
|
Apple Silicon Mac:
|
|
|
|
```bash
|
|
make build EDGE_TARGET=darwin-arm64
|
|
```
|
|
|
|
Intel Mac:
|
|
|
|
```bash
|
|
make build EDGE_TARGET=darwin-amd64
|
|
```
|
|
|
|
Node bootstrap artifact도 macOS용만 포함하려면 `NODE_TARGETS`를 함께 좁힌다.
|
|
|
|
```bash
|
|
make build EDGE_TARGET=darwin-arm64 NODE_TARGETS="darwin-arm64"
|
|
make build EDGE_TARGET=darwin-amd64 NODE_TARGETS="darwin-amd64"
|
|
```
|
|
|
|
결과 예시:
|
|
|
|
```bash
|
|
build/packages/iop-edge-darwin-arm64.tar.gz
|
|
build/packages/iop-edge-darwin-amd64.tar.gz
|
|
```
|