Skip to content

Commit

Permalink
Rename iso -> anaconda-iso
Browse files Browse the repository at this point in the history
I would like to potentially introduce a generic "live iso" that
generates *exactly the input container* just as a Live ISO, very
similar to how Fedora CoreOS (and one of its parents, the original
Container Linux) do it.

This has several use cases, such as always running from a PXE
boot.  I also think this is the long term architecture for an ISO,
as opposed to the current Anaconda.

This "direct" Live ISO is also the same as how e.g. Fedora Workstation
does it, where the installer is just an app in the system.

For compatibility we continue to honor the `iso` as an alias.
  • Loading branch information
cgwalters committed Feb 7, 2024
1 parent fc873e2 commit 453d883
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ The following image types are currently available via the `--type` argument:
|-----------------------|---------------------------------------------------------------------------------------|
| `ami` | [Amazon Machine Image](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/AMIs.html) |
| `qcow2` **(default)** | [QEMU](https://www.qemu.org/) |
| `iso` | An unattended Anaconda installer that installs to the first disk found. |
| `anaconda-iso` | An unattended Anaconda installer that installs to the first disk found. |

## ☁️ Cloud uploaders

Expand Down
2 changes: 1 addition & 1 deletion bib/cmd/bootc-image-builder/image.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ func Manifest(c *ManifestConfig) (*manifest.Manifest, error) {
switch c.ImgType {
case "ami", "qcow2", "raw":
return manifestForDiskImage(c, rng)
case "iso":
case "anaconda-iso", "iso":
return manifestForISO(c, rng)
default:
return nil, fmt.Errorf("Manifest(): unsupported image type %q", c.ImgType)
Expand Down
4 changes: 2 additions & 2 deletions bib/cmd/bootc-image-builder/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -247,10 +247,10 @@ func cmdBuild(cmd *cobra.Command, args []string) error {
exports = []string{"qcow2"}
case "ami", "raw":
exports = []string{"image"}
case "iso":
case "anaconda-iso", "iso":
exports = []string{"bootiso"}
default:
return fmt.Errorf("valid types are 'qcow2', 'ami', 'raw', 'iso', not: '%s'", imgType)
return fmt.Errorf("valid types are 'qcow2', 'ami', 'raw', 'anaconda-iso', not: '%s'", imgType)
}

manifestPath := filepath.Join(outputDir, manifest_fname)
Expand Down
4 changes: 2 additions & 2 deletions test/test_build.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ def image_type_fixture(shared_tmpdir, build_container, request, force_aws_upload
"qcow2": pathlib.Path(output_path) / "qcow2/disk.qcow2",
"ami": pathlib.Path(output_path) / "image/disk.raw",
"raw": pathlib.Path(output_path) / "image/disk.raw",
"iso": pathlib.Path(output_path) / "bootiso/install.iso",
"anaconda-iso": pathlib.Path(output_path) / "bootiso/install.iso",
}
assert len(artifact) == len(set(t.split(",")[1] for t in gen_testcases("all"))), \
"please keep artifact mapping and supported images in sync"
Expand Down Expand Up @@ -234,7 +234,7 @@ def test_image_build_without_se_linux_denials(image_type):


@pytest.mark.skipif(platform.system() != "Linux", reason="boot test only runs on linux right now")
@pytest.mark.parametrize("image_type", gen_testcases("iso"), indirect=["image_type"])
@pytest.mark.parametrize("image_type", gen_testcases("anaconda-iso"), indirect=["image_type"])
def test_iso_installs(image_type):
installer_iso_path = image_type.img_path
test_disk_path = installer_iso_path.with_name("test-disk.img")
Expand Down
4 changes: 2 additions & 2 deletions test/testcases.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ def gen_testcases(what):
# supported images that can be directly booted
DIRECT_BOOT_IMAGE_TYPES = ("qcow2", "ami", "raw")
# supported images that require an install
INSTALLER_IMAGE_TYPES = ("iso",)
INSTALLER_IMAGE_TYPES = ("anaconda-iso",)

# bootc containers that are tested by default
CONTAINERS_TO_TEST = {
Expand All @@ -25,7 +25,7 @@ def gen_testcases(what):
return CONTAINERS_TO_TEST.values()
elif what == "ami-boot":
return [cnt + ",ami" for cnt in CONTAINERS_TO_TEST.values()]
elif what == "iso":
elif what == "anaconda-iso":
test_cases = []
# only fedora right now, centos iso installer is broken right now:
# https://github.com/osbuild/bootc-image-builder/issues/157
Expand Down

0 comments on commit 453d883

Please sign in to comment.