项目
在 GitHub 查看
srl-labs/clab-api-server
关于
The api-server for containerlab
系统与基础设施实测星标增长
- 24小时
- 0
- 7天
- 0
- 15天
- 0
- 1个月
- 正在收集历史
各周期内的星标净变化,周期相互重叠,并非每日新增。缺失的测量保持空白。星标代表关注度,不代表软件质量。
README.md
原文Containerlab API Server
Run containerlab labs on a Linux host and drive them over HTTPS. One server, every lab, every user, one REST API: deploy, inspect, exec, capture, and share labs from scripts, CI, or the Containerlab Apps.
Documentation: srl-labs.github.io/clab-api-server · API reference
Install
On a Linux host with Docker (amd64 or arm64):
curl -fsSL https://raw.githubusercontent.com/srl-labs/clab-api-server/main/install.sh | sudo bash -s -- install
sudo usermod -aG clab_api <username>
sudo systemctl enable --now clab-api-server
The server listens on https://<host>:8090. Containerlab is built in; there is nothing else to install. For containers, plain binaries, and Kubernetes, see Install.
Use
TOKEN=$(curl -sk -X POST https://localhost:8090/login \
-H 'Content-Type: application/json' \
-d '{"username":"<username>","password":"<password>"}' | jq -r .token)
curl -sk -H "Authorization: Bearer $TOKEN" https://localhost:8090/api/v1/labs
Next: the quick start deploys a lab end to end. A running server also serves Swagger UI at /swagger/index.html and ReDoc at /redoc.
Develop
task # tidy, generate the OpenAPI spec, build into dist/
task test # integration tests against a running server
task docs # preview the documentation site
See Develop and test.
License
探索相关项目
加载中…