Get a single record
The get command provides read access to a single record. Type the get command without any additional parameters
for the comprehensive list:
$ onprem get
Usage: onprem get <COMMAND>
Commands:
api-key
device
...
Output Formats
Supported output formats include [arrow, json, markdown, ps, and wide]. The ps and wide
format definitions are borrowed from
kubectl.
Examples
Get a device
$ onprem get device c6uuol7qrh9u4hh2bo60
┌──────────────────────┬─────────┬──────────────┬─────────────┬───────────────────────────────────┬─────────────────┬─────────┐
│ id ┆ name ┆ manufacturer ┆ model ┆ uuid ┆ lastIpAddr ┆ tainted │
│ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- │
│ str ┆ str ┆ str ┆ str ┆ str ┆ str ┆ bool │
╞══════════════════════╪═════════╪══════════════╪═════════════╪═══════════════════════════════════╪═════════════════╪═════════╡
│ chai28932ckjgou9an3g ┆ c006-n2 ┆ NVIDIA ┆ Jetson Nano ┆ 8ed6b72b-9056-5f3e-8ef4-9a1e537d… ┆ 192.168.241.162 ┆ false │
└──────────────────────┴─────────┴──────────────┴─────────────┴───────────────────────────────────┴─────────────────┴─────────┘
Get a device as JSON
$ onprem get device c6uuol7qrh9u4hh2bo60 -o json > mydevice.json
Get a device config bundle
If you are going to embed the On Prem Agent into an embedded Linux firmware, you can get the agent to boot from a static device config bundle.
Device config bundles are tar archives containing a device_config.pb Protobuf snapshot of metadata,
plus a files/ directory containing assets such as lambda scripts, model files, or WASM modules.
To download a device config, first find one to focus on:
$ onprem list devices
┌──────────────────────┬─────────────┬──────────────┬────────────────┬─────────────────────────────────┐
│ id ┆ name ┆ manufacturer ┆ model ┆ uuid │
│ --- ┆ --- ┆ --- ┆ --- ┆ --- │
│ str ┆ str ┆ str ┆ str ┆ str │
╞══════════════════════╪═════════════╪══════════════╪════════════════╪═════════════════════════════════╡
│ d2u94urm3mk8evm350ug ┆ MacBook Pro ┆ Apple Inc. ┆ MacBookPro18,2 ┆ DDC1AFED-1FA7-5445-AD6A-016B1F… │
└──────────────────────┴─────────────┴──────────────┴────────────────┴─────────────────────────────────┘
Then download it:
$ onprem get device-config d2u94urm3mk8evm350ug -o my-device-config.tar
Device config downloaded to my-device-config.tar
$ ls -al *.tar
-rw-r--r-- 1 davidr staff 2048 Feb 27 13:36 my-device-config.tar
Then to boot the Agent from the bundle, configure it as follows:
$ vi /etc/on-prem/agent.yml
...
device_config_path: /path-to/my-device-config.tar