-
Notifications
You must be signed in to change notification settings - Fork 66
[buildomat] Job to create Helios trampoline image #2508
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 22 commits
Commits
Show all changes
32 commits
Select commit
Hold shift + click to select a range
77fb889
Package all globzl zone tarballs into single tarball
smklein eced651
switch variant asic
smklein 170ee34
update name of global zone packages
smklein 2b63d56
More attempts to correctly use this assembled GZ package
smklein 748b0e9
try again with supplementary package
smklein 3d34f05
/opt/oxide paths
smklein dcc9f6e
Pfexec
smklein 6e83601
I forgot maghemite
smklein 0a195c1
jk it's called mg-ddm
smklein 4c7127a
... are config files load-bearing to create virtual hw?
smklein 8532c7e
fix typo
smklein 8874d34
layered fs approach
smklein c9fda84
Merge branch 'main' into publish-gz
smklein 0055c16
Specify image type
smklein 73b4cec
path to config files
smklein 3316604
Make the gz package generation purely additive for now
smklein c70be86
Merge branch 'main' into publish-gz
smklein 6474dba
Assemble installinator files into an overlay tarball
smklein 6191828
Merge branch 'main' into publish-gz
smklein 02db5da
Merge branch 'publish-gz' into publish-installinator-gz
smklein 143b826
[buildomat] Job to create Helios trampoline image
smklein c132208
Tweak flags for recovery
smklein 296e331
Publish paths under '/work'
smklein f560bdb
Merge branch 'main' into publish-gz
smklein 49d3a0e
Merge branch 'publish-gz' into publish-installinator-gz
smklein ac13ea1
Merge branch 'publish-installinator-gz' into buildomat-recovery-image
smklein 1c951f1
source, review
smklein 163b866
abs
smklein a7b200c
Merge branch 'main' into publish-gz
smklein 15f8c38
Merge branch 'publish-gz' into publish-installinator-gz
smklein 102f42d
Merge branch 'publish-installinator-gz' into buildomat-recovery-image
smklein 0868db2
merge w/host changes
smklein File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,89 @@ | ||
| #!/bin/bash | ||
| #: | ||
| #: name = "helios / build recovery OS image" | ||
| #: variety = "basic" | ||
| #: target = "helios-latest" | ||
| #: rust_toolchain = "1.66.1" | ||
| #: output_rules = [ | ||
| #: "=/work/helios/image/output/zfs.img", | ||
| #: "=/work/helios/image/output/rom", | ||
| #: ] | ||
| #: skip_clone = true | ||
| #: access_repos = [ | ||
| #: "oxidecomputer/amd-apcb", | ||
| #: "oxidecomputer/amd-efs", | ||
| #: "oxidecomputer/amd-firmware", | ||
| #: "oxidecomputer/amd-flash", | ||
| #: "oxidecomputer/amd-host-image-builder", | ||
| #: "oxidecomputer/boot-image-tools", | ||
| #: "oxidecomputer/chelsio-t6-roms", | ||
| #: "oxidecomputer/helios", | ||
| #: "oxidecomputer/helios-omnios-build", | ||
| #: "oxidecomputer/helios-omnios-extra", | ||
| #: "oxidecomputer/nanobl-rs", | ||
| #: ] | ||
| #: | ||
| #: [dependencies.package] | ||
| #: job = "helios / package" | ||
| #: | ||
|
|
||
| set -o errexit | ||
| set -o pipefail | ||
| set -o xtrace | ||
|
|
||
| cargo --version | ||
| rustc --version | ||
|
|
||
| # | ||
| # The token authentication mechanism that affords us access to other private | ||
| # repositories requires that we use HTTPS URLs for GitHub, rather than SSH. | ||
| # | ||
| override_urls=( | ||
| 'git://github.com/' | ||
| '[email protected]:' | ||
| 'ssh://github.com/' | ||
| 'ssh://[email protected]/' | ||
| ) | ||
| for (( i = 0; i < ${#override_urls[@]}; i++ )); do | ||
| git config --add --global url.https://github.com/.insteadOf \ | ||
| "${override_urls[$i]}" | ||
| done | ||
|
|
||
| # | ||
| # Require that cargo use the git CLI instead of the built-in support. This | ||
| # achieves two things: first, SSH URLs should be transformed on fetch without | ||
| # requiring Cargo.toml rewriting, which is especially difficult in transitive | ||
| # dependencies; second, Cargo does not seem willing on its own to look in | ||
| # ~/.netrc and find the temporary token that buildomat generates for our job, | ||
| # so we must use git which uses curl. | ||
| # | ||
| export CARGO_NET_GIT_FETCH_WITH_CLI=true | ||
|
|
||
| pfexec mkdir -p /work | ||
| cd /work | ||
|
|
||
| # /work/gz: Global Zone artifacts to be placed in the Helios image. | ||
| mkdir gz && cd gz | ||
| ptime -m tar xvzf /input/package/work/trampoline-global-zone-packages.tar.gz | ||
| cd - | ||
|
|
||
| # TODO: Consider importing zones here too? | ||
|
|
||
| # Checkout helios at a pinned commit | ||
| git clone https://github.com/oxidecomputer/helios.git | ||
| cd helios | ||
| git checkout ac8a7e7ef9e9b5ef27334bc8016f5d123f852449 | ||
|
|
||
| # Create the "./helios-build" command, which lets us build images | ||
| gmake setup | ||
|
|
||
| # Commands that "./helios-build" would ask us to run (either explicitly | ||
| # or implicitly, to avoid an error). | ||
| pfexec pkg install /system/zones/brand/omicron1/tools | ||
| pfexec zfs create -p rpool/images/build | ||
|
|
||
| ./helios-build experiment-image \ | ||
| -p helios-netdev=https://pkg.oxide.computer/helios-netdev \ | ||
| -F optever=0.21 \ | ||
| -P /work/gz/root \ | ||
| -R | ||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.