dannf / ubuntu-server-netboot

Other
43 stars 9 forks source link

Init autoinstall configuration #8

Closed tai271828 closed 3 years ago

tai271828 commented 3 years ago

Types of changes

Description

Inspired by this discourse post "Please test autoinstalls for 20.04!", I think that both autoinstall and ubuntu-server-netboot are getting much more mature to use. This pull request initiate the implementation to integrate both of them, so we may look forward to automating our pxe testing process.

Steps to Test This Pull Request

  1. Grab a UEFI bare metal, and deploy focal to it.
  2. install prerequisite package dependencies.
  3. (on the deployed focal) ubuntu-server-netboot$ sudo ./ubuntu-server-netboot.py --url http://cdimage.ubuntu.com/ubuntu/releases/20.04.2/release/ubuntu-20.04.2-live-server-arm64.iso --autoinstall-url http://<IP OF YOUR FOCAL>/

Platform tested: awrep6 (netboot server), d05-2, scobee

Expected Result

ubuntu-installer/grub/grub.cfg now has the inserted snippet autoinstall "ds=nocloud-net;s=http://<IP OF YOUR FOCAL>/" before ---.

Additional context

Ubuntu Server Guide - Autoinstall Quick Start Ubuntu Server Guide - Autoinstall

tai271828 commented 3 years ago

Looks like a lot of improvement is suggested. Let me convert this pull request to be "draft".

tai271828 commented 3 years ago

I have updated this pull request and its corresponding issue description. Please note there is a instruction to show the steps for testing the new features/options.

tai271828 commented 3 years ago

Sorry for unclear statement. The commit of black style fix is individual. Let me remove the commit for easier review. As what you proposed, we could merge the fix from pre-commit hook in another pull request. Trace this feature request by https://github.com/dannf/ubuntu-server-netboot/issues/13 .

dannf commented 3 years ago

Sorry for unclear statement. The commit of black style fix is individual. Let me remove the commit for easier review. As what you proposed, we could merge the fix from pre-commit hook in another pull request. Trace this feature request by #13 .

Oh, yeah, I think the black style fix is fine, and fine to include here as you've done - I just think we should add the .pre-commit.yaml at the same time to make sure that your cleanup doesn't bit rot with future commits :)

tai271828 commented 3 years ago

Re-upload the pull request with the re-based and updated code-base.

The update/fix is implemented by following our previous discussion and conclusion, including:

  1. Only focusing on the implementation of --autoinstall-url for grub.cfg. Drop the other commits, features and style fixes.
  2. Update the issue description

The features removed from the earlier version of this pull request are moved to another repository, which is essentially a command line wrapper of this tool, ubuntu-server-netboot. In my opinion, we could have two advantages 1) we could keep ubuntu-server-netboot doing one thing only and doing it well 2) satisfying the system admins who need to manually setup their own pxe server manually very often, so they could still have choice by using another wrapper.

tai271828 commented 3 years ago

Hi @dannf , thank you for the most recent review. I have updated the pull request according to your change requests.