Skip to content

Commit 7559b62

Browse files
authored
Merge pull request #58 from oxidecomputer/more-client-fixes
More client tweaks & fixes
2 parents 8f106d6 + 2483d35 commit 7559b62

2 files changed

Lines changed: 71 additions & 5 deletions

File tree

README.md

Lines changed: 70 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,60 @@
11
# Oxide Support Shell
22

3-
Proper user docs coming soon, for now see
4-
[RFD 620](https://rfd.shared.oxide.computer/rfd/620)
5-
for motivation and examples.
3+
The Oxide Support Shell (`sush`) is a tool that runs jobs on an
4+
Oxide rack. Jobs must be authorized by Oxide support, but support
5+
personnel need not have direct access to the rack;
6+
see [RFD 620](https://rfd.shared.oxide.computer/rfd/620)
7+
for requirements, design constraints, and intended use cases.
8+
9+
At the core of `sush` are _signed job requests_:
10+
11+
```json
12+
{
13+
"payload": {
14+
"job_id": "caught-cream-rifle-void-river-snack-rural-sight",
15+
"command": "fortune"
16+
},
17+
"key_id": "much-hedgehog-cup-bleak-energy-village-lawn-pumpkin",
18+
"signature": {
19+
"r": "absorb-view-praise-light-gentle-casual-force-indicate-dignity-sense-woman-chapter-kiwi-slot-gown-measure-repeat-crater-crush-across-toilet-clarify-wage-toss",
20+
"s": "above-already-valve-educate-can-clutch-imitate-snap-chunk-quit-mask-canvas-stadium-attend-refuse-banner-helmet-step-hood-symptom-time-beyond-earth-render"
21+
}
22+
}
23+
```
24+
25+
These are job authorizations produced by Oxide (via the Online Signing Service)
26+
and may be relayed to the customer, possibly over a low-bandwidth channel,
27+
who then relays them to the rack (via the `sush` client). When Oxide support
28+
runs a session directly, on our own racks or via a jumphost, the client can
29+
reach both the signing service and the rack, so it performs the relay itself
30+
and the signed requests never surface. Notice that all IDs and signature
31+
components are encoded as human-readable codephrases.
32+
33+
Here is a simple job running across a four-sled racklette:
34+
35+
```
36+
sush# job start -w hostname
37+
👋 Please confirm user presence to sign with key `federal-worth-fee-seed-skin-interest-road-luggage`
38+
✅ Session is now `front-edit-bless-suggest-defy-bacon-retire-person`
39+
✅ Signed request for job `kingdom-owner-dilemma-craft-soda-hungry-lumber-festival`
40+
✅ Job ID: kingdom-owner-dilemma-craft-soda-hungry-lumber-festival
41+
913-0000019:BRM23230010 Stopped, exit 0 (5ms 545us 307ns), 12 B out, 0 B err
42+
913-0000019:BRM23230018 Stopped, exit 0 (6ms 165us 887ns), 12 B out, 0 B err
43+
913-0000019:BRM27230037 Stopped, exit 0 (5ms 927us 316ns), 12 B out, 0 B err
44+
913-0000023:2F8JEXDK Stopped, exit 0 (5ms 282us 774ns), 9 B out, 0 B err
45+
» 913-0000019:BRM23230010 «
46+
✅ Job stdout:
47+
BRM23230010
48+
» 913-0000019:BRM23230018 «
49+
✅ Job stdout:
50+
BRM23230018
51+
» 913-0000019:BRM27230037 «
52+
✅ Job stdout:
53+
BRM27230037
54+
» 913-0000023:2F8JEXDK «
55+
✅ Job stdout:
56+
2F8JEXDK
57+
```
658

759
## Local Testing Quickstart
860

@@ -73,4 +125,18 @@ drop-fatigue-pink-spirit-eight-entry-praise-skill
73125
$
74126
```
75127

76-
See `help` for a list of other commands.
128+
Job output may also be streamed using the `--streaming` flag, which
129+
skips recording the job's standard output so that large core files
130+
and other artifacts can leave the rack without exhausting output
131+
storage (which may be on a ramdisk). Streamed output is written to
132+
a local file (`--file` is required) and verified against the recorded
133+
length and hash.
134+
135+
Jobs of any type take a `--target` option naming the sleds to run on.
136+
The default target is `*`, meaning every sled. Comma-separated lists
137+
of cubby numbers, serial numbers, and full baseboard IDs are also
138+
accepted. Interactive and streaming jobs must target exactly one sled,
139+
which defaults to the sled they are talking to.
140+
141+
The `version` command shows which versions of `sush` are running where
142+
in the rack. See `help` for a list of other commands.

client/src/cli.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -309,7 +309,7 @@ impl CommandContext for Cli {
309309
fn job_output_target(&mut self, target: &BaseboardId) {
310310
match self.get_output_format() {
311311
OutputFormat::Json => println!("{}", json!({ "target": target.to_string() })),
312-
OutputFormat::Text => println!(" {target} "),
312+
OutputFormat::Text => println!(" » {target} «"),
313313
}
314314
}
315315

0 commit comments

Comments
 (0)