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

Can we use Ignition in other distros like Ubuntu #809

Closed
kgrvamsi opened this issue May 8, 2019 · 4 comments
Closed

Can we use Ignition in other distros like Ubuntu #809

kgrvamsi opened this issue May 8, 2019 · 4 comments

Comments

@kgrvamsi
Copy link

kgrvamsi commented May 8, 2019

Feature Request

Environment

Ubuntu (12.04,14.04,16.04)

What hardware/cloud provider/hypervisor is being used to run Ignition?
Vmware,Openstack

Desired Feature

Can Ignition support Other distro's like ubuntu to replace cloud -init?if so is there any document that is part of the official documentation?

@ajeddeloh
Copy link
Contributor

See #649 and https://github.com/coreos/ignition-dracut/

Because Ignition runs in the initramfs, it is harder to include in distros than cloudinit. It's also only run on first boot and that needs to be managed by the distro somehow. Furthermore, that means the distro image needs to ship with Ignition ready to run on first boot, not having the system boot up, turn on Ignition, then reboot. That being said, there's no reason it can't be included!

@kgrvamsi
Copy link
Author

kgrvamsi commented May 9, 2019

Thanks @ajeddeloh so with that said if the ignition binary is included as part of the iso image and if we add it as part of the init script or systemd to run as a service and configure the respective resources(disk,hostname,network) then it would like in the same flow as cloud-init would do on a cloud image correct?

@ajeddeloh
Copy link
Contributor

init script

Ignition is meant to run on systemd systems. It even needs systemd in the initramfs. I wouldn't advise trying it with initscripts.

Including Ignition means baking it into the initramfs in some way. Most distros these days use dracut to create the initramfs. For cloud and virtualized environments (those without an installer) this means the Ignition dracut modules need to be included in the environment building the image when dracut is invoked. I don't what that process looks like for ubuntu.

Bare metal is a little different, since there's some overlap between what installers traditionally do (e.g. partitioning, creating filesystems) and what Ignition does. On Container Linux, Fedora CoreOS and Red Hat CoreOS the installer is "dumb" and just dd's a premade image (complete with partition table, bootloader, filesystems, etc) to the disk then inject the desired Ignition config to be used when the system boots up. This eliminates the overlap and ensure the cloud and metal cases are the same (since we use the same or very similar images for both). In this case, just like the cloud case, Ignition needs to be baked into the initramfs of the image being installed when that image is built.

For experimental purposes where running on first boot is not critical, you could install those dracut modules on a running system, run dracut, then reboot to see if it works.

Hopefully that clears things up and gives you a place to start experimenting. There's also a couple talks on Ignition if you're interested.

Finally, it's worth calling out that there are two different versions of Ignition currently supported: the Legacy 0.x line used by Container Linux and the 2.x line used by Fedora CoreOS. Somewhat confusingly the legacy versions support up to spec 2.3.0 and the new versions support spec 3.0.0+. You should be looking to use the new version (which is the master branch in both the ignition and ignition-dracut repos).

@ajeddeloh
Copy link
Contributor

Closing as a dup of #649

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

No branches or pull requests

2 participants