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

WIP: Distro guide #795

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft

WIP: Distro guide #795

wants to merge 1 commit into from

Conversation

ajeddeloh
Copy link
Contributor

@ajeddeloh ajeddeloh commented Apr 15, 2019

Addresses #649


## Failure

If Ignition fails, the system should isolate to `emergency.target` and not proceed to switch root. Ignition should give the user the system they specified or system at all.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

or no system at all


## The first boot is not special

Ignition has a `umount` stage to ensure that after Ignition runs the system continues booting as if it didn't. This is important to ensure the system will boot when Ignition does not run. Running Ignition should be a diversion in the initramfs, not a replacement.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This doesn't seem very clear to me. I think the point to emphasize is that after the initramfs gives way to the real root, the boot should proceed no differently than in subsequent boots where Ignition does not run.


## Base configs

Ignition supports supplying a "base config" that users' configs get merged into. This allows distros to do things like add default users or enable units. Distros should include a base config describing where any filesystems are mounted (e.g. if `/var` is a separate filesystem) to ensure that the `mount` stage mounts it and files are created where they should be.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should explain why distros might do these things in the base config. Generally distros shouldn't do things in the base config without a specific reason.

  • The purpose of adding users is to allow properties that can't be changed later (e.g. home directory) to be overridden by a user config.
  • The purpose of enabling units is that it might be done conditionally, by having the initramfs select a different config depending on the platform ID.


## Link time overrides and features

Ignition has a handleful of link-time knobs. SELinux support can be enabled or disabled and the path of some helper utilities Ignition uses can be configured. See the [distro package][distro-package] for a complete list.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

handful

@@ -0,0 +1,42 @@
# Distro Integration

Ignition is designed to be run from an initramfs, only on first boot. Parts of Ignition need to run before the rootfs is mounted and parts need to run after. Ignition requires systemd be running in the initramfs as well. This makes integration with distros somewhat complicated. As an example, the configuration for integrating Ignition with [Fedora CoreOS](fcos) can be found in the [ignition-dracut](ignition-dracut) repo.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is ignition-dracut not part of this repo? They're pretty tightly coupled as it is...

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm hoping we can do this, but there are still some things to split out first. See coreos/fedora-coreos-config#70 (comment) and coreos/ignition-dracut#76.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One thing I want to make clear is that using dracut is a way of including it in initramfs's, not the way of including it. We need to make sure the ignition-dracut modules do not have any distro-specific behavior as well.

@ajeddeloh
Copy link
Contributor Author

retest this please

1 similar comment
@ajeddeloh
Copy link
Contributor Author

retest this please

@ajeddeloh
Copy link
Contributor Author

(sorry for the noise, testing a webhook)

@ajeddeloh
Copy link
Contributor Author

retest this please

1 similar comment
@ajeddeloh
Copy link
Contributor Author

retest this please

@ajeddeloh
Copy link
Contributor Author

retest this please

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.

4 participants