Commit 5b3c103c authored by Furkan Mustafa's avatar Furkan Mustafa

some draft documentation

parent 3271c50b
### API
I was thinking of also following docker daemon api conventions, but it looks stupid.
( https://docs.docker.com/engine/api/v1.24/#32-images )
```
GET /images[?scope=<local|cluster|origin>][?search=keyword]
GET /images/{imagename}[/info]
GET /images/{imagename}/versions[?scope=<local|cluster|origin>]
GET /images/{imagename}/versions/{tag|hash}/package.tar[.gz|.xz]
GET /images/{imagename}/versions/{tag|hash}/layers
GET /layers/{layer}[/info]
GET /layers/{layer}.tar[.gz|.xz]
GET /nodes
GET /nodes/{uuid}
GET /nodes/{uuid}/images
json: {"type":"pull","url":"docker://nginx:latest","name":"nginx","tag":"latest"} => POST /images
-- receive task info payload --
json: {"type":"upload","name":"nginx","tag":"latest"} => POST /images
-- receive task info payload --
stat --printf=%s image.tar | PUT /tasks/{task-uuid}/upload/size
cat image.tar | PUT /tasks/{task-uuid}/upload/stream
..or
docker inspect -f '{{.Size}}' ${IMAGE} | PUT /tasks/{task-uuid}/upload/size
docker save ${IMAGE} | PUT /tasks/{task-uuid}/upload/stream
GET /tasks
GET /tasks/{task-uuid}
GET /tasks/{task-uuid}/status
-- receive long-polling json-stream for task status --
WS /tasks
-- receive continous stream of all changes, events of tasks --
```
### Desired Client Behavior;
```
$ beiran images
--- lists local images ----
$ beiran images --available
or
$ beiran images --all
--- lists all images between connected peers ---
$ beiran pull image docker://nginx:latest
( we can follow the convention rkt people made here )
```
### Client Process Interruption
```
$ beiran pull nginx:latest
Downloading ... 35%
..
^C
$ beiran pull nginx:latest
Downloading ... 35%
^C
...
...
...
^C
```
beiran poc
==========
## What is beiran
- [Draft Spec](Draft-Spec.md)
- [Roadmap](ROADMAP.md)
## Using (PoC)
```
cd beiran
docker-compose up -d
```
See the [issues](https://git.rlab.io/poc/beiran/issues)
## poc-v0.1.0
- [ ] beirand: api endpoints (to be listed here one by one)
- [ ] beirand: tcp socket for http
- [ ] beirand: websocket over tcp/http
- [ ] beirand: local unix socket (http) for client communication
- [ ] beiran-cli: local unix socket connection to beirand
- [ ] folder structure
## poc-v0.0.0
- [x] Team Arrangements
- [x] Dev Environment
- [x] Initial Investigations
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment