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

There are no docs for how to incorporate Ignition in a distro #649

Open
ajeddeloh opened this issue Oct 16, 2018 · 8 comments
Open

There are no docs for how to incorporate Ignition in a distro #649

ajeddeloh opened this issue Oct 16, 2018 · 8 comments

Comments

@ajeddeloh
Copy link
Contributor

Bug

Operating System Version

Any

Ignition Version

Any

Environment

Any

Expected Behavior

Requirements for Ignition to run in the initramfs are documented

Actual Behavior

There are no docs outlining how to include Ignition in the initramfs.

Reproduction Steps

  1. Be a distro maintainer
  2. See this snazzy thing called Ignition
  3. Be lost at what needs to happen to include it in the initramfs

Other Information

cc @thkukuk since they might have some insight on what things would be helpful in that kind of document.

@thkukuk
Copy link
Contributor

thkukuk commented Oct 17, 2018 via email

@bgilbert
Copy link
Contributor

bgilbert commented Oct 18, 2018

Some notes:

Requirements from the distro include:

  • Pass the correct platform ID for the current platform on the Ignition command line
    • For security reasons, we strongly recommend hardcoding the platform ID into the OS image rather than trying to detect it at runtime
  • Ensure the ignition.firstboot kernel argument is set only on first boot
  • Start networking in the initramfs if the fetch-offline stage indicates that it needs network
  • Provide a kernel-arguments helper script, if the kernelArguments section is to be supported
  • Properly configure networking on DigitalOcean and private networking on Packet
  • If desired, copy an injected user config (e.g. from /boot/ignition/config.ign, or from /config.ign in an appended initrd) to /usr/lib/ignition/user.ign in the initrd. Consider deleting a persistent injected config (e.g. /boot/ignition) after Ignition completes successfully.
  • If the distro supports running Ignition from a live OS image that isn't installed to disk, provide an is-live-image command in the initrd that exits 0 in the live image case.

@rfairley
Copy link
Contributor

rfairley commented Mar 4, 2019

In #751, to document use of a build flag useAuthorizedKeysFile, I was initially looking for a file somewhere in https://github.com/coreos/ignition/tree/master/doc that could contain info on requirements pertaining to the distro. Adding another doc like distribution-integration.md or distribution-requirements.md would stand out I think.

@bgilbert
Copy link
Contributor

We're trying to make ignition-dracut distro-independent, so we should reference that too.

coreos/ignition-dracut#56 requires the ignition binary to be installed into the dracut module directory. More generally, ignition should never be installed in the PATH.

@purpleidea
Copy link

Looks like this is similar to #763 and @dustymabe gave some great tips over there.

@arithx
Copy link
Contributor

arithx commented Aug 4, 2020

In #960 we added LUKS support and are now writing entries to /etc/crypttab when creating LUKS devices expecting that something (e.x.: systemd-cryptsetup-generator / clevis-luks-askpass) will create hooks to unlock the devices in the real root.

@bgilbert
Copy link
Contributor

In #1250 / #1254 / #1267 we added a report in /etc/.ignition-result.json that the OS can use to get information about how the Ignition run went.

@bgilbert
Copy link
Contributor

bgilbert commented Nov 7, 2022

See also discussion in coreos/fedora-coreos-tracker#1311.

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

No branches or pull requests

6 participants