summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorunitexe <unitexe70@gmail.com>2025-06-08 11:21:00 -0500
committerunitexe <unitexe70@gmail.com>2025-06-08 11:21:12 -0500
commit7dde727add59580062f42e252d97d4f8ddfb4c9a (patch)
tree706e9ad7ff0efde848db770869f98591f690a79a
parent247a04aeb00efc21b44ef20cb72af62e12f91677 (diff)
Document listing services and methods via reflection, and inspecting container image archives in README
-rw-r--r--README.md68
1 files changed, 68 insertions, 0 deletions
diff --git a/README.md b/README.md
index ce5ee1e..342cb6b 100644
--- a/README.md
+++ b/README.md
@@ -2,6 +2,34 @@
A gRPC server that facilitates provisioning and updating containers.
## Usage
+### List Services
+Replace IP address accordingly.
+```bash
+grpcurl -plaintext 10.0.0.42:50052 list
+```
+
+Example output:
+```bash
+grpc.reflection.v1.ServerReflection
+unit.containers.v0.Ormos
+```
+
+### List Ormos Service Methods
+Replace IP address accordingly.
+```bash
+grpcurl -plaintext 10.0.0.42:50052 list unit.containers.v0.Ormos
+```
+
+Example output:
+```bash
+unit.containers.v0.Ormos.InspectImageArchive
+unit.containers.v0.Ormos.ListImageArchives
+unit.containers.v0.Ormos.ListUsbDevices
+unit.containers.v0.Ormos.LoadImageArchive
+unit.containers.v0.Ormos.MountUsbDevice
+unit.containers.v0.Ormos.UnmountUsbDevice
+```
+
### List USB Devices
Replace IP address accordingly.
```bash
@@ -64,6 +92,46 @@ Example output:
```
+### Inspect Container Image Archive
+Replace IP address and archive path accordingly, pretty printing underlying skopeo commands stdout if request successful.
+```bash
+grpcurl -plaintext -import-path ./proto -proto ormos.proto -d '{"file_path": "/mnt/usb/alpine-arm64.tar"}' '10.0.0.42:50052' unit.containers.v0.Ormos.InspectImageArchive | jq 'if .isSuccess then .stdout | fromjson else . end'
+```
+
+Example output (success):
+```json
+{
+ "Digest": "sha256:058c92d86112aa6f641b01ed238a07a3885b8c0815de3e423e5c5f789c398b45",
+ "RepoTags": [],
+ "Created": "2025-02-14T03:28:36Z",
+ "DockerVersion": "",
+ "Labels": null,
+ "Architecture": "arm64",
+ "Os": "linux",
+ "Layers": [
+ "sha256:a16e98724c05975ee8c40d8fe389c3481373d34ab20a1cf52ea2accc43f71f4c"
+ ],
+ "LayersData": [
+ {
+ "MIMEType": "application/vnd.docker.image.rootfs.diff.tar.gzip",
+ "Digest": "sha256:a16e98724c05975ee8c40d8fe389c3481373d34ab20a1cf52ea2accc43f71f4c",
+ "Size": 8461312,
+ "Annotations": null
+ }
+ ],
+ "Env": [
+ "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
+ ]
+}
+```
+
+Example output (failed):
+```json
+{
+ "stderr": "time=\"2025-06-08T16:15:16Z\" level=fatal msg=\"Error parsing image name \\\"docker-archive:/mnt/usb/dne.tar\\\": opening file \\\"/mnt/usb/dne.tar\\\": open /mnt/usb/dne.tar: no such file or directory\"\n"
+}
+```
+
### Unmount USB Device
Replace IP address accordingly.
```bash