Created
June 3, 2023 04:13
-
-
Save sjjf/5dfa794b7eb8d8712620c86d2c881518 to your computer and use it in GitHub Desktop.
Sample xCAT Subiquity template
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#cloud-config | |
autoinstall: | |
version: 1 | |
apt: | |
primary: | |
- arches: | |
- amd64 | |
uri: http://au.archive.ubuntu.com/ubuntu/ | |
locale: en_US | |
network: | |
ethernets: | |
'#TABLE:noderes:$NODE:primarynic#': | |
dhcp4: true | |
version: 2 | |
storage: | |
config: | |
- id: sda | |
type: disk | |
ptable: gpt | |
path: /dev/sda | |
wipe: superblock | |
preserve: false | |
grub_device: true | |
- id: efi-part | |
type: partition | |
size: 512MB | |
device: sda | |
flag: boot | |
grub_device: true | |
preserve: false | |
- id: swap-part | |
type: partition | |
device: sda | |
size: 8GB | |
flag: swap | |
preserve: false | |
- id: root-part | |
type: partition | |
device: sda | |
size: -1 | |
preserve: false | |
- id: efi-part-fs | |
type: format | |
fstype: fat | |
label: efi | |
volume: efi-part | |
- id: swap-part-fs | |
type: format | |
fstype: swap | |
volume: swap-part | |
- id: root-part-fs | |
type: format | |
fstype: ext4 | |
label: root | |
volume: root-part | |
- id: efi-part-mount | |
type: mount | |
path: /boot/efi | |
device: efi-part-fs | |
- id: swap-part-mount | |
path: none | |
type: mount | |
device: swap-part-fs | |
- id: root-part-fs-mount | |
type: mount | |
path: / | |
device: root-part-fs | |
early-commands: | |
- echo "Running early_command Installation script..." >>/tmp/pre-install.log | |
- wget http://#TABLE:noderes:$NODE:xcatmaster#/install/autoinst/#HOSTNAME#.pre | |
- chmod u+x #HOSTNAME#.pre | |
- ./#HOSTNAME#.pre || true >>/tmp/pre-install.log | |
- '{ | |
rm -f /etc/resolv.conf; | |
echo "nameserver #TABLE:noderes:$NODE:xcatmaster#" > /etc/resolv.conf; | |
echo "domain #TABLE:site:key=domain:value#" >> /etc/resolv.conf; | |
}' | |
late-commands: | |
- mkdir -p /target/var/log/xcat/ | |
- cat /tmp/pre-install.log || echo "No early command log" | |
- echo "Updating kernel command line..." | |
- echo 'GRUB_CMDLINE_LINUX="vga=normal nomodeset systemd.unified_cgroup_hierarchy=1"' >> /target/etc/default/grub | |
- curtin in-target --target /target update-grub2 | |
- echo "Running late_command Installation script..." | |
- wget http://#TABLE:noderes:$NODE:xcatmaster#/install/autoinst/#HOSTNAME#.post | |
- chmod u+x #HOSTNAME#.post | |
- cp ./#HOSTNAME#.post /target/root/post.script | |
- echo "Running postscript" | |
- curtin in-target --target /target /root/post.script ||true | |
error-commands: | |
- tar -c --transform='s/^/#HOSTNAME#-logs\//' /var/crash /var/log |nc -l 8080 | |
keyboard: | |
layout: "us" | |
packages: | |
- openssh-server | |
- update-motd | |
- ipmitool | |
- vim | |
- lnav | |
ssh: | |
allow-pw: no | |
install-server: true | |
user-data: | |
hostname: #HOSTNAME# | |
timezone: Australia/Canberra | |
disable_root: false | |
chpasswd: | |
list: | |
- root:<pwhash> | |
package_update: true | |
package_upgrade: true |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment