You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Include gzipped version of assets in console tarball (#1031)
* gzip .js, .map, and .css files inside the tarball
* update nexus instructions with out/console-assets and prereqs script
* run workflow on PR (will manually delete tarball)
* don't run on PRs but keep the bit where we got rid of main.tar.gz
Copy file name to clipboardExpand all lines: docs/serve-from-nexus.md
+6-10Lines changed: 6 additions & 10 deletions
Original file line number
Diff line number
Diff line change
@@ -1,17 +1,13 @@
1
1
# Serving the Console from Nexus
2
2
3
-
## Wait! You probably don't need to build anything
3
+
## Wait! You probably don't need to do anything
4
4
5
-
Assets from commits on `main` are available at `dl.oxide.computer/releases/console/<sha>.tar.gz`. The latest `main` is probably what you want and can always be found at https://dl.oxide.computer/releases/console/main.tar.gz in addition to the path with the SHA.
5
+
Assets from commits on `main` are available at `dl.oxide.computer/releases/console/<sha>.tar.gz`. A console version is pinned in Omicron in the file `tools/console_version`, and the prereqs script `./tools/install_prerequisites.sh` will download the tarball and extract it in the right place.
6
6
7
-
If you want to use a version of the console that's already merged into `main`, just download the tarball and extract the files into the directory configured as `console.static_dir` in the Nexus config (the default in the example config `nexus/static`).
7
+
If you want to use a different commit than the one that's pinned, just change the commmit hash and SHA256 in that file (get the SHA256 at `https://dl.oxide.computer/releases/console/<commit>.sha256.txt`) and re-run the script.
8
8
9
9
Following the rest of the instructions is only necessary if you want to build the assets yourself, for example if you're making a change to the console and want to test it locally against Nexus.
10
10
11
-
### Choosing a Console version to download
12
-
13
-
Most of the time you will want the latest commit on `main`. Look at [`OMICRON_VERSION`](/OMICRON_VERSION) to see what Omicron SHA that version of the console expects. Often it will work with a newer version of the API, but don't be surprised if it doesn't.
14
-
15
11
## Dependencies
16
12
17
13
- Node.js (tested on 14+, 16+ recommended)
@@ -44,7 +40,7 @@ The only difference between this build and the one for local dev is that the lat
44
40
45
41
The build output lands in the `dist` directory. Now all you need to do is make `console.static_dir` in the Nexus config point to a directory containing these files.
46
42
47
-
If you're using the example Nexus config, `static_dir` is set there to `nexus/static` (treated as relative to CWD), so that's a reasonable default location for the files. Another option is to point Nexus directly at `dist` so you don't even have to copy them. Nexus accepts both absolute and relative paths.
43
+
If you're using the example Nexus config, `static_dir` is set there to `out/console-assets` (treated as relative to CWD), so that's a reasonable default location for the files. Another option is to point Nexus directly at `dist` so you don't even have to copy them. Nexus accepts both absolute and relative paths.
48
44
49
45
Whatever the directory is, the files need to be at top level, just like they are in `dist`:
50
46
@@ -67,13 +63,13 @@ If I have `console` and `omicron` sitting next to each other in the same directo
67
63
68
64
```toml
69
65
[console]
70
-
static_dir = "nexus/static"
66
+
static_dir = "out/console-assets"
71
67
```
72
68
73
69
I would run `yarn build-for-nexus` in `console` and then use the following command to copy the files over:
74
70
75
71
```bash
76
-
cp -R dist/ ../omicron/nexus/static
72
+
cp -R dist/ ../omicron/out/console-assets
77
73
```
78
74
79
75
The `/` after `dist` is there on purpose — if the target directory already exists, if I leave off the `/` it will copy `dist` into the target with its contents inside rather than the copying only the contents.
0 commit comments