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

install: UI for forwarding network information into next boot #205

Closed
dustymabe opened this issue Apr 3, 2020 · 8 comments · Fixed by #212
Closed

install: UI for forwarding network information into next boot #205

dustymabe opened this issue Apr 3, 2020 · 8 comments · Fixed by #212
Labels

Comments

@dustymabe
Copy link
Member

Right now I'm working on an interactive experience for users to configure networking of the system in the booted Live ISO right before they run coreos-install install. As a user I'm currently:

  • getting the system booted up (no DHCP) to boot prompt
  • running nmtui to configure networking and gain internet access
  • run curl to grab ignition config
  • run coreos-installer to install to disk
  • reboot

I need to be able to take the networking information from the current system (for FCOS it would be /etc/NetworkManager/system-connections) into the initramfs of the firstboot. My current thinking is that we just copy the files from /etc/NetworkManager/system-connections into a directory in the boot partition like we do for other things and then have a systemd unit that runs in the initramfs to pick that information up and carry it forward.

Assuming that all sounds good what do we want the UI for this to look like? One option:

  • coreos-installer install --forward-networking[=/etc/NetworkManager/system-connections]
    • defaults to /etc/NetworkManager/system-connections but directory can be overridden
    • the option could be --networking-files= instead maybe?

Another option is that we make this more generic and make --initramfsfiles=/path/to/initramfs/rootfs and make a generic way to copy files into the initramfs environment but I don't know how much we should support something like this.

Thoughts?

@dustymabe
Copy link
Member Author

Talking with @bgilbert on this topic I think we settled on something like

  • short option -n
  • long option --forward-networking-files
  • the options optionally accept a value that is a path to a directory where the networking files are located
    • defaults to /etc/NetworkManager/system-connections

@dustymabe dustymabe added the jira label Apr 3, 2020
@bgilbert
Copy link
Contributor

bgilbert commented Apr 4, 2020

I'm so-so on --forward-networking-files. "files" are an implementation detali. --copy-network-config?

@dustymabe
Copy link
Member Author

I could go either way on those two. As long as you're still OK with the optional accepting a /path/to/networking/config/files/ to override the default.

@jlebon
Copy link
Member

jlebon commented Apr 7, 2020

Could also be a more generic --copy-config /etc/subpath.

@bgilbert
Copy link
Contributor

bgilbert commented Apr 7, 2020

@jlebon, I think going that far would start encouraging users to bypass Ignition.

@jlebon
Copy link
Member

jlebon commented Apr 7, 2020

Yeah, true. Though on that note, maybe what we actually want is to have whatever wraps NetworkManager-tui to spit out an Ignition config that can be merged into the main config (could easily build that functionality on top of coreos/butane#83).

That way users have the canonical config to use for future automated re-installs (and also for other bare metal hosts that need installing if the network config isn't inherently node-specific).

@jlebon
Copy link
Member

jlebon commented Apr 7, 2020

Though on that note, maybe what we actually want is to have whatever wraps NetworkManager-tui to spit out an Ignition config that can be merged into the main config (could easily build that functionality on top of coreos/butane#83).

Though reading #205 (comment) again, it seems like we're not planning on wrapping nmtui anymore, right?

So yeah, maybe this is too much friction and --copy-network-config is fine. Though would be cool to document the "discovery" path too of just using the live ISO to generate the keyfiles and converting them into an Ignition config.

@dustymabe
Copy link
Member Author

Though would be cool to document the "discovery" path too of just using the live ISO to generate the keyfiles and converting them into an Ignition config.

The problem with that is that the ignition config could have remote references so we need the networking in the initramfs.

dustymabe added a commit to dustymabe/coreos-installer that referenced this issue Apr 14, 2020
This will allow us to copy in networking configuration from a specified
location into a predetermined directory inside of `/boot/` of the
installed system (which follows the path of other postprocess steps).
Having this mechanism will allow for a user to interactively configure
networking in the Live ISO environment via `nmtui` and then have those
settings propagate forward into the installed system.

After the files are copied into the directory within `/boot/` a systemd
unit from the initramfs will pick them up on firstboot and propagate
them into the appropriate locations.

Fixes: coreos#205
dustymabe added a commit to dustymabe/coreos-installer that referenced this issue Apr 14, 2020
This will allow us to copy in networking configuration from a specified
location into a predetermined directory inside of `/boot/` of the
installed system (which follows the path of other postprocess steps).
Having this mechanism will allow for a user to interactively configure
networking in the Live ISO environment via `nmtui` and then have those
settings propagate forward into the installed system.

After the files are copied into the directory within `/boot/` a systemd
unit from the initramfs will pick them up on firstboot and propagate
them into the appropriate locations.

Fixes: coreos#205
@dustymabe dustymabe changed the title install: discuss UI for forwarding network information into next boot install: UI for forwarding network information into next boot Apr 14, 2020
dustymabe added a commit to dustymabe/coreos-installer that referenced this issue Apr 15, 2020
This will allow us to copy in networking configuration from a specified
location into a predetermined directory inside of `/boot/` of the
installed system (which follows the path of other postprocess steps).
Having this mechanism will allow for a user to interactively configure
networking in the Live ISO environment via `nmtui` and then have those
settings propagate forward into the installed system.

After the files are copied into the directory within `/boot/` a systemd
unit from the initramfs will pick them up on firstboot and propagate
them into the appropriate locations.

Fixes: coreos#205
dustymabe added a commit to dustymabe/coreos-installer that referenced this issue Apr 15, 2020
This will allow us to copy in networking configuration from a specified
location into a predetermined directory inside of `/boot/` of the
installed system (which follows the path of other postprocess steps).
Having this mechanism will allow for a user to interactively configure
networking in the Live ISO environment via `nmtui` and then have those
settings propagate forward into the installed system.

After the files are copied into the directory within `/boot/` a systemd
unit from the initramfs will pick them up on firstboot and propagate
them into the appropriate locations.

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

Successfully merging a pull request may close this issue.

3 participants