Appendix: Using Debian PreseedΒΆ
Scyld ClusterWare supports using Debian preseed to install full distributions on a diskful compute node.
Steps:
1. Enable clusterware compute node Internet access, which allows for network installation. See Configure IP Forwarding for details.
Download the proper netboot installer kernel and initramfs.
The Debian 10 netboot kernel and initramfs links:
Create a preseed file for the intended installation.
A Debian 10 example:
d-i mirror/country string us
d-i mirror/http/hostname string http.us.debian.org
d-i mirror/http/directory string /debian
d-i mirror/http/proxy string
d-i mirror/suite string buster
d-i netcfg/choose_interface select auto
d-i netcfg/wireless_wep string
d-i passwd/root-login boolean true
d-i passwd/root-password password root4me
d-i passwd/root-password-again password root4me
d-i passwd/user-fullname string Debian User
d-i passwd/username string debian
d-i passwd/user-password password insecure
d-i passwd/user-password-again password insecure
d-i clock-setup/utc boolean true
d-i time/zone string US/Eastern
d-i partman-auto/disk string /dev/sda
d-i partman-auto/method string lvm
d-i partman-lvm/device_remove_lvm boolean true
d-i partman-lvm/device_remove_lvm_span boolean true
d-i partman-auto/purge_lvm_from_device boolean true
d-i partman-lvm/confirm boolean true
d-i partman-lvm/confirm_nooverwrite boolean true
d-i partman-auto-lvm/new_vg_name string sys_vg
d-i partman-auto/choose_recipe atomic
d-i partman-auto-lvm/guided_size string max
d-i partman-partitioning/confirm_write_new_label boolean true
d-i partman/choose_partition select finish
d-i partman/confirm boolean true
d-i partman/confirm_nooverwrite boolean true
d-i partman-auto/confirm boolean true
tasksel tasksel/first multiselect standard, ssh-server
d-i pkgsel/include string openssh-server build-essential gnupg2
popularity-contest popularity-contest/participate boolean false
d-i grub-installer/only_debian boolean true
d-i grub-installer/with_other_os boolean true
d-i grub-installer/bootdev string default
d-i finish-install/reboot_in_progress note
d-i debian-installer/exit/poweroff boolean true
After the Debian installation completes, you can install the clusterware-node package and the node configuration (see Booting Diskful Compute Nodes) using the preseed late_command script:
A Debian example:
d-i preseed/late_command string \
echo "deb https://<AUTH_TOKEN>:@updates.penguincomputing.com/clusterware/12/deb/ /" \
> /target/etc/apt/sources.list.d/clusterware.list; \
in-target apt-key adv --fetch-keys \
https://updates.penguincomputing.com/DEB-GPG-KEY-scyld-clusterware; \
in-target apt-get update; \
in-target apt-get install -y clusterware-node; \
echo "base_url=http://<HEADNODE_IP>/api/v1" \
> /target/opt/scyld/clusterware-node/etc/node.sh; \
echo "iface=ens3" >> /target/opt/scyld/clusterware-node/etc/node.sh
Note: Replace <HEADNODE_IP> from the above examples with the appropriate head node's IP address, and replace <AUTH_TOKEN> with the appropriate customer authentication token.
Host preseed on a web server.
The ClusterWare head node can be used for this purpose.
Then simply copy the preseed file to /var/www/html/netboot/preseed
.
5. Create a boot configuration using the downloaded kernel and initramfs, and assign boot configuration to the compute node. For example, for node n10:
scyld-bootctl create name=NetBoot initramfs=@initrd.gz kernel=@linux image=None
scyld-bootctl -i NetBoot up \
cmdline="enforcing=0 \
url=http://<HEADNODE_IP>/netboot/preseed debian-installer/locale=en_US \
console-setup/ask_detect=false console-setup/layoutcode=us \
keyboard-configuration/xkb-keymap=us \
netcfg/get_hostname=unassigned-hostname netcfg/get_domain=unassigned-domain"
scyld-nodectl -i n10 set _boot_config=NetBoot
Again, replace <HEADNODE_IP> from the above example with the appropriate head node's IP address.
Note: Some configuration options are set by the scyld-bootctl
cmdline
option because they must be configured before the preseed file is loaded
by the Debian installer.
6. Set the compute node to network boot, then power on the compute node. The preseed file should be able to automate all installation, and then shutdown the compute node. Then change the compute node to hard drive boot and power on the compute node again.
If you have not installed clusterware-node and created
/opt/scyld/clusterware-node/etc/nodes.sh
in the preseed late_command script,
you may do so manually now, then reboot compute node again.
These "diskful" nodes can be managed by the same scyld-nodectl
command
as the PXEboot nodes.
See Booting Diskful Compute Nodes for details.