Skip to content
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

Add sled-agent and maghemite to ZFS image, autoboot sled agent #57

Open
wants to merge 1 commit into
base: download-and-unpack
Choose a base branch
from

Conversation

smklein
Copy link
Contributor

@smklein smklein commented Mar 4, 2023

WARNING: Depends on...

@jclulow
Copy link
Collaborator

jclulow commented Mar 6, 2023

I have made a minor change to illumos/image-builder to allow a template to specify an include file by an absolute path, and to allow that absolute path to be provided via a feature flag.

I also took a swing at a basic mechanism for layering on a pre-organised proto area to helios-build experiment-image. If you provide the -P <dir> argument, we'll layer on anything that is under <dir> by generating a partial template for inclusion and passing it to image-builder, with -E so that it can find the files referenced by extsrc in that generated template. Metadata for the files and directories in the manifest are generated by combining the mode bits from the files in the proto area with some heuristics about what the user/group owner should be in the target file system that make sense for our OS image.

If you can modify the omicron PR that produces the archive of Omicron bits that go into the global zone, as per my comment on the PR, then I suspect you'll be able to at least generate an image via:

$ mkdir /tmp/omicron-proto
$ cd /tmp/omicron-proto
$ tar xvfz /tmp/omicron-gz.tar.gz
oxide.json
root/
root/opt/
root/opt/oxide/
...
root/opt/oxide/sled-agent/sled-agent
...
root/lib/svc/manifest/site/sled-agent.xml
...

$ cd ~/helios
$ ./helios-build experiment-image \
    -p helios-netdev=https://pkg.oxide.computer/helios-netdev \
    -F optever=0.21 \
    -B \
    -P /tmp/omicron-proto/root

(Make sure you pull the latest helios.git and run gmake setup to get -P and the image-builder support on which it depends)

@smklein
Copy link
Contributor Author

smklein commented Mar 6, 2023

@jclulow : I tested this on #56 , using the new package format.

./helios-build experiment-image -p helios-netdev=https://pkg.oxide.computer/helios-netdev -F optever=0.21 -B -P tmp/omicron/global-zone-packages/root

And it seems to build an image without error! Admittedly, I haven't actually unpacked the contents of that image, but this is a start

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants