2
0
mirror of https://github.com/xcat2/confluent.git synced 2024-11-25 02:52:07 +00:00

Begin implementing aarch64 deploy support

This commit is contained in:
Jarrod Johnson 2023-01-27 08:00:38 -05:00
parent ce324e90f7
commit 648290ffbc
4 changed files with 25 additions and 2 deletions

View File

@ -2,6 +2,10 @@
sed -i 's/centos/CentOS/; s/rhel/Red Hat Enterprise Linux/; s/oraclelinux/Oracle Linux/; s/alma/AlmaLinux/' $2/profile.yaml
ln -s $1/images/pxeboot/vmlinuz $2/boot/kernel && \
ln -s $1/images/pxeboot/initrd.img $2/boot/initramfs/distribution
mkdir -p $2/boot/efi/boot && \
ln -s $1/EFI/BOOT/BOOTX64.EFI $1/EFI/BOOT/grubx64.efi $2/boot/efi/boot/
mkdir -p $2/boot/efi/boot
if [ -e $1/EFI/BOOT/BOOTAA64.EFI ]; then
ln -s $1/EFI/BOOT/BOOTAA64.EFI $1/EFI/BOOT/grubaa64.efi $2/boot/efi/boot/
else
ln -s $1/EFI/BOOT/BOOTX64.EFI $1/EFI/BOOT/grubx64.efi $2/boot/efi/boot/
fi

View File

@ -223,8 +223,17 @@ def install_tftp_content():
except OSError as e:
if e.errno != 17:
raise
armtftplocation = '{0}/confluent/aarch64'.format(tftplocation)
try:
os.makedirs(armtftplocation)
except OSError as e:
if e.errno != 17:
raise
shutil.copy('/opt/confluent/lib/ipxe/ipxe.efi', tftplocation)
shutil.copy('/opt/confluent/lib/ipxe/ipxe.kkpxe', tftplocation)
if os.path.exists('/opt/confluent/lib/ipxe/ipxe-aarch64.efi')
shutil.copy('/opt/confluent/lib/ipxe/ipxe-aarch64.efi', armtftplocation)
def initialize(cmdset):

View File

@ -365,6 +365,8 @@ def proxydhcp(handler, nodeguess):
bootfile = b'confluent/x86_64/ipxe.efi'
elif disco['arch'] == 'bios-x86':
bootfile = b'confluent/x86_64/ipxe.kkpxe'
elif disco['arch'] == 'uefi-aarch64':
bootfile = b'confluent/aarch64/ipxe.efi'
if len(bootfile) > 127:
log.log(
{'info': 'Boot offer cannot be made to {0} as the '

View File

@ -376,6 +376,14 @@ def check_ubuntu(isoinfo):
if not isinstance(arch, str):
arch = arch.decode('utf8')
major = '.'.join(ver.split('.', 2)[:2])
if 'efi/boot/bootaa64.efi' in isoinfo[0]:
exlist = ['casper/vmlinuz', 'casper/initrd',
'efi/boot/bootaa64.efi', 'efi/boot/grubaa64.efi'
]
else:
exlist = ['casper/vmlinuz', 'casper/initrd',
'efi/boot/bootx64.efi', 'efi/boot/grubx64.efi'
]
return {'name': 'ubuntu-{0}-{1}'.format(ver, arch),
'method': EXTRACT|COPY,
'extractlist': ['casper/vmlinuz', 'casper/initrd',