Skip to content

Commit

Permalink
Merge pull request #80 from kinvolk/kai/management-node-pxe
Browse files Browse the repository at this point in the history
management-node-ipxe: disable all detected LVM partitions
  • Loading branch information
pothos authored May 14, 2021
2 parents db797fd + 0448c22 commit 85679f9
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion docs/management_node.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ It is recommended to automate this in a PXE environment but manual installation
Using the following iPXE script `install.ipxe` the management node OS installation can be automated.
The latest Flatcar Container Linux Stable release will be written to disk, then the kernel console parameters are customized, and finally IPMI is used to set persistent booting from disk in EFI mode before the automatic reboot into the installed OS happens.

The full URL for an iPXE script chain is `https://raw.githubusercontent.com/kinvolk/racker/main/management-node-ipxe/install.ipxe`.
The full URL for an iPXE script chain (`chain --replace --autofree https://…`) is `https://raw.githubusercontent.com/kinvolk/racker/main/management-node-ipxe/install.ipxe`.
Since iPXE does not work well with all SSL servers, you may need to host it elsewhere, preferably with HTTP.
Here are its contents:

```
Expand Down
2 changes: 1 addition & 1 deletion management-node-ipxe/install-ignition.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"ignition":{"config":{},"security":{"tls":{}},"timeouts":{},"version":"2.3.0"},"networkd":{},"passwd":{},"storage":{"files":[{"filesystem":"root","path":"/opt/installer","contents":{"source":"data:,%23!%2Fbin%2Fbash%20-ex%0A%23%20unmount%20any%20leftovers%20at%20the%20beginning%20before%20we%20modify%20the%20disk%20the%20mount%20uses%0Aumount%20%2Ftmp%2Foemfs%20%7C%7C%20true%0Alvchange%20-an%20%2Fdev%2Fmapper%2Fvg*%20%7C%7C%20true%0Aflatcar-install%20-s%0Audevadm%20settle%0AOEM_DEV%3D%22%24(blkid%20-t%20%22LABEL%3DOEM%22%20-o%20device)%22%0Amkdir%20-p%20%2Ftmp%2Foemfs%0Amount%20%22%24%7BOEM_DEV%7D%22%20%2Ftmp%2Foemfs%0Aecho%20'set%20linux_append%3D%22flatcar.autologin%22'%20%3E%3E%20%2Ftmp%2Foemfs%2Fgrub.cfg%0Aecho%20'set%20linux_console%3D%22console%3DttyS1%2C57600n8%20earlyprintk%3Dserial%2CttyS1%2C57600n8%22'%20%3E%3E%20%2Ftmp%2Foemfs%2Fgrub.cfg%0Aumount%20%2Ftmp%2Foemfs%0A%23%20Disable%20bootflag%20invalidation%20timer%20and%20set%20persistent%20EFI%20booting%20from%20disk%0Adocker%20run%20--privileged%20--net%20host%20--rm%20quay.io%2Fkinvolk%2Fracker%3Alatest%20sh%20-c%20'ipmitool%20raw%200x0%200x8%200x3%200x1f%20%26%26%20ipmitool%20raw%200x00%200x08%200x05%200xe0%200x08%200x00%200x00%200x00'%0Asystemctl%20reboot%0A","verification":{}},"mode":493}]},"systemd":{"units":[{"contents":"[Unit]\nRequires=network-online.target\nAfter=network-online.target\n[Service]\nType=oneshot\nRemainAfterExit=true\nRestart=on-failure\nRestartSec=10s\nExecStart=/opt/installer\n[Install]\nWantedBy=multi-user.target\n","enabled":true,"name":"installer.service"}]}}
{"ignition":{"config":{},"security":{"tls":{}},"timeouts":{},"version":"2.3.0"},"networkd":{},"passwd":{},"storage":{"files":[{"filesystem":"root","path":"/opt/installer","contents":{"source":"data:,%23!%2Fbin%2Fbash%20-ex%0A%23%20unmount%20any%20leftovers%20at%20the%20beginning%20before%20we%20modify%20the%20disk%20the%20mount%20uses%0Aumount%20%2Ftmp%2Foemfs%20%7C%7C%20true%0Alvchange%20-an%20%2Fdev%2Fmapper%2F*%20%7C%7C%20true%0Aflatcar-install%20-s%0Audevadm%20settle%0AOEM_DEV%3D%22%24(blkid%20-t%20%22LABEL%3DOEM%22%20-o%20device)%22%0Amkdir%20-p%20%2Ftmp%2Foemfs%0Amount%20%22%24%7BOEM_DEV%7D%22%20%2Ftmp%2Foemfs%0Aecho%20'set%20linux_append%3D%22flatcar.autologin%22'%20%3E%3E%20%2Ftmp%2Foemfs%2Fgrub.cfg%0Aecho%20'set%20linux_console%3D%22console%3DttyS1%2C57600n8%20earlyprintk%3Dserial%2CttyS1%2C57600n8%22'%20%3E%3E%20%2Ftmp%2Foemfs%2Fgrub.cfg%0Aumount%20%2Ftmp%2Foemfs%0A%23%20Disable%20bootflag%20invalidation%20timer%20and%20set%20persistent%20EFI%20booting%20from%20disk%0Adocker%20run%20--privileged%20--net%20host%20--rm%20quay.io%2Fkinvolk%2Fracker%3Alatest%20sh%20-c%20'ipmitool%20raw%200x0%200x8%200x3%200x1f%20%26%26%20ipmitool%20raw%200x00%200x08%200x05%200xe0%200x08%200x00%200x00%200x00'%0Asystemctl%20reboot%0A","verification":{}},"mode":493}]},"systemd":{"units":[{"contents":"[Unit]\nRequires=network-online.target\nAfter=network-online.target\n[Service]\nType=oneshot\nRemainAfterExit=true\nRestart=on-failure\nRestartSec=10s\nExecStart=/opt/installer\n[Install]\nWantedBy=multi-user.target\n","enabled":true,"name":"installer.service"}]}}
2 changes: 1 addition & 1 deletion management-node-ipxe/install-ignition.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ storage:
#!/bin/bash -ex
# unmount any leftovers at the beginning before we modify the disk the mount uses
umount /tmp/oemfs || true
lvchange -an /dev/mapper/vg* || true
lvchange -an /dev/mapper/* || true
flatcar-install -s
udevadm settle
OEM_DEV="$(blkid -t "LABEL=OEM" -o device)"
Expand Down

0 comments on commit 85679f9

Please sign in to comment.