From 5014b29ac26f7236d6895410e3db42a95df37a6e Mon Sep 17 00:00:00 2001 From: Charlie Drage Date: Mon, 9 Sep 2024 10:42:18 -0400 Subject: [PATCH] chore: rename iso to anaconda-iso and add docs (#803) ### What does this PR do? * Changes the type from iso to anaconda-iso as ".iso" may be used in the future for something else, see: https://github.com/osbuild/bootc-image-builder/issues/433 ### Screenshot / video of UI N/A, backend code / use anaconda-iso option ### What issues does this PR fix or reference? Closes https://github.com/containers/podman-desktop-extension-bootc/issues/482 ### How to test this PR? 1. Test build .iso 2. See that is succesfully creates the .iso Signed-off-by: Charlie Drage --- README.md | 2 +- docs/vm_guide.md | 2 +- packages/backend/src/build-disk-image.spec.ts | 16 ++++++++-------- packages/backend/src/build-disk-image.ts | 2 +- packages/backend/src/history.spec.ts | 8 ++++---- packages/frontend/src/Build.spec.ts | 4 ++-- packages/frontend/src/Build.svelte | 6 +++--- packages/frontend/src/Homepage.spec.ts | 4 ++-- packages/frontend/src/lib/BootcActions.spec.ts | 2 +- .../frontend/src/lib/BootcColumnActions.spec.ts | 2 +- .../frontend/src/lib/BootcFolderColumn.spec.ts | 2 +- .../frontend/src/lib/BootcImageColumn.spec.ts | 2 +- packages/shared/src/models/bootc.ts | 2 +- 13 files changed, 27 insertions(+), 27 deletions(-) diff --git a/README.md b/README.md index 773d0a55..c9ce6727 100644 --- a/README.md +++ b/README.md @@ -109,7 +109,7 @@ Go from a [bootc](https://containers.github.io/bootc/) compatible derived contai * `qcow2`: QEMU Disk Images * `ami`: Amazon Machine Images * `raw`: RAW disk image an MBR or GPT partition table -* `iso`: Unattended installation method (USB sticks / install-on-boot) +* `anaconda-iso`: Unattended installation method (USB sticks / install-on-boot) * `vmdk`: Usable in vSphere The list above is what is supported by the underlying `bootc-image-builder` technology. The list can [be found here](https://github.com/osbuild/bootc-image-builder?tab=readme-ov-file#-image-types). diff --git a/docs/vm_guide.md b/docs/vm_guide.md index 64fa3522..92e83c0b 100644 --- a/docs/vm_guide.md +++ b/docs/vm_guide.md @@ -10,7 +10,7 @@ There are **many** solutions to deploy a virtual machine image and this document * `qcow`: QEMU is the primary software that utilizes both the QCOW and QCOW2 formats. These formats allow you to create, manage, and run virtual machines with features like better performance and snapshot capabilities. [QEMU](https://www.qemu.org/). * `raw`: The raw image format is widely supported across many virtualization tools and cloud server providers. Software like KVM, VMware, and cloud platforms including AWS and Azure can utilize raw images. Libvirt, often used with KVM, also supports raw images extensively. [Libvirt](https://libvirt.org/). -* `iso`: BalenaEtcher is recommended for writing ISO files to storage devices to create bootable media. It's user-friendly and cross-platform. [Download balenaEtcher](https://www.balena.io/etcher/). +* `anaconda-iso`: BalenaEtcher is recommended for writing unattended ISO installer files to storage devices to create bootable media. It's user-friendly and cross-platform. [Download balenaEtcher](https://www.balena.io/etcher/). * `vmdk`: VMware Workstation and VMware ESXi are two prominent platforms that support the VMDK format. They provide comprehensive tools for running and managing virtual machines. [VMware Workstation](https://www.vmware.com/products/workstation-pro.html), [VMware ESXi](https://www.vmware.com/products/esxi-and-esx.html). * `ami`: Amazon EC2 uses the AMI format to launch new virtual servers. You can manage AMIs using Amazon's own tools like AWS Management Console. [Amazon EC2](https://aws.amazon.com/ec2/). diff --git a/packages/backend/src/build-disk-image.spec.ts b/packages/backend/src/build-disk-image.spec.ts index c3c2932c..8e32a2da 100644 --- a/packages/backend/src/build-disk-image.spec.ts +++ b/packages/backend/src/build-disk-image.spec.ts @@ -133,10 +133,10 @@ test('check image builder does not include target arch', async () => { expect(options.Cmd).not.toContain('--target-arch'); }); -test('check image builder includes target arch for iso', async () => { +test('check image builder includes target arch for anaconda-iso', async () => { const build = { image: 'test-image', - type: ['iso'], + type: ['anaconda-iso'], arch: 'amd', } as BootcBuildInfo; const options = createBuilderImageOptions('my-image', build); @@ -244,20 +244,20 @@ test('check build exists', async () => { let exists = await buildExists(folder, ['vmdk']); expect(exists).toEqual(true); - // iso does not - exists = await buildExists(folder, ['iso']); + // anaconda-iso does not + exists = await buildExists(folder, ['anaconda-iso']); expect(exists).toEqual(false); // qcow2 exists exists = await buildExists(folder, ['qcow2']); expect(exists).toEqual(true); - // vmdk and iso exists (because of vdmk) - exists = await buildExists(folder, ['vmdk', 'iso']); + // vmdk and anaconda-iso exists (because of vdmk) + exists = await buildExists(folder, ['vmdk', 'anaconda-iso']); expect(exists).toEqual(true); - // iso and raw don't exist - exists = await buildExists(folder, ['iso', 'raw']); + // anaconda-iso and raw don't exist + exists = await buildExists(folder, ['anaconda-iso', 'raw']); expect(exists).toEqual(false); }); diff --git a/packages/backend/src/build-disk-image.ts b/packages/backend/src/build-disk-image.ts index adfd8551..fb9f7d8b 100644 --- a/packages/backend/src/build-disk-image.ts +++ b/packages/backend/src/build-disk-image.ts @@ -41,7 +41,7 @@ export async function buildExists(folder: string, types: BuildType[]) { imageName = 'image/disk.raw'; } else if (type === 'vmdk') { imageName = 'vmdk/disk.vmdk'; - } else if (type === 'iso') { + } else if (type === 'anaconda-iso') { imageName = 'bootiso/disk.iso'; } diff --git a/packages/backend/src/history.spec.ts b/packages/backend/src/history.spec.ts index 422187f8..c997a228 100644 --- a/packages/backend/src/history.spec.ts +++ b/packages/backend/src/history.spec.ts @@ -46,7 +46,7 @@ describe('History class tests', () => { imageId: 'exampleImageId', tag: 'exampleTag', engineId: 'exampleEngineId', - type: ['iso'], + type: ['anaconda-iso'], folder: 'exampleFolder', arch: 'exampleArch', status: 'success', // Use appropriate status from BootcBuildStatus @@ -75,7 +75,7 @@ describe('History class tests', () => { imageId: 'exampleImageId0', tag: 'exampleTag0', engineId: 'exampleEngineId0', - type: ['iso'], + type: ['anaconda-iso'], folder: 'exampleFolder0', arch: 'exampleArch0', status: 'success', @@ -87,7 +87,7 @@ describe('History class tests', () => { imageId: 'exampleImageId1', tag: 'exampleTag1', engineId: 'exampleEngineId1', - type: ['iso'], + type: ['anaconda-iso'], folder: 'exampleFolder1', arch: 'exampleArch1', status: 'success', @@ -99,7 +99,7 @@ describe('History class tests', () => { imageId: 'exampleImageId2', tag: 'exampleTag2', engineId: 'exampleEngineId2', - type: ['iso'], + type: ['anaconda-iso'], folder: 'exampleFolder2', arch: 'exampleArch2', status: 'success', diff --git a/packages/frontend/src/Build.spec.ts b/packages/frontend/src/Build.spec.ts index d305b6d0..e55207c5 100644 --- a/packages/frontend/src/Build.spec.ts +++ b/packages/frontend/src/Build.spec.ts @@ -30,7 +30,7 @@ const mockHistoryInfo: BootcBuildInfo[] = [ image: 'image1', engineId: 'engine1', tag: 'latest', - type: ['iso'], + type: ['anaconda-iso'], folder: '/tmp/image1', arch: 'x86_64', }, @@ -40,7 +40,7 @@ const mockHistoryInfo: BootcBuildInfo[] = [ imageId: 'sha256:image', engineId: 'engine2', tag: 'latest', - type: ['iso'], + type: ['anaconda-iso'], folder: '/tmp/image1', arch: 'x86_64', }, diff --git a/packages/frontend/src/Build.svelte b/packages/frontend/src/Build.svelte index 70b2e560..83e061a3 100644 --- a/packages/frontend/src/Build.svelte +++ b/packages/frontend/src/Build.svelte @@ -541,10 +541,10 @@ export function goToHomePage(): void { Virtualization Guest Image (*.qcow2) updateBuildType('iso', e.detail)}> - Unattended Baremetal Installer (*.iso) + on:click={e => updateBuildType('anaconda-iso', e.detail)}> + Unattended Anacoda ISO Installer (*.iso)