Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for building images from ostree containers and the Fedora CoreOS qcow2 image type #243

Closed
wants to merge 20 commits into from

Commits on Nov 20, 2023

  1. Configuration menu
    Copy the full SHA
    6046a59 View commit details
    Browse the repository at this point in the history
  2. osbuild: add ostree.deploy.container stage

    Creates an org.osbuild.ostree.deploy.container stage.
    Validates the options with a regular expression that matches the schema.
    Takes a container as input.  Validates the length of the input
    references to be exactly 1.
    
    See osbuild/osbuild#1402
    achilleas-k committed Nov 20, 2023
    Configuration menu
    Copy the full SHA
    ec636aa View commit details
    Browse the repository at this point in the history
  3. manifest: only set one ostree commit in OSTreeDeployment

    The pipeline either way only supported one ostree commit, enforced when
    adding the resolved commits to the pipeline during serializeStart() and
    by checking the array length during serialize().  To simplify the
    requirement and avoid potential confusion when reading the struct
    itself, replace the array on the pipeline struct definition with a
    single commit spec (pointer) and keep the len == 1 check in the
    serializeStart() function that, by its interface, must accept an array.
    
    Also document the commit fields for OSTreeDeployment.  These are
    private, so they wont show up in public API docs, but it's still useful
    to have them documented in the code.
    achilleas-k committed Nov 20, 2023
    Configuration menu
    Copy the full SHA
    8900ce6 View commit details
    Browse the repository at this point in the history
  4. manifest: add a container source to OSTreeDeployment

    Support a container source for OSTreeDeployment as an alternative to the
    ostree commit source.
    Currently, if a container is defined, it fails with an error.
    
    The commit source and the container source are now both pointers since
    they can be unset, but (will) we need to make sure at least one is set
    when serializing.
    achilleas-k committed Nov 20, 2023
    Configuration menu
    Copy the full SHA
    f77f860 View commit details
    Browse the repository at this point in the history
  5. manifest: run ostree pull right before ostree deploy

    Move the ostree pull stage to be right before the ostree deploy stage.
    This should have no functional impact on the build and will make it
    easier to replace the two stages together.
    
    Old vs new stage order:
      org.osbuild.ostree.init-fs  |  org.osbuild.ostree.init-fs
      org.osbuild.ostree.pull     |  org.osbuild.ostree.os-init
      org.osbuild.ostree.os-init  |  org.osbuild.mkdir
      org.osbuild.mkdir           |  org.osbuild.ostree.pull
      org.osbuild.ostree.deploy   |  org.osbuild.ostree.deploy
    achilleas-k committed Nov 20, 2023
    Configuration menu
    Copy the full SHA
    70faccf View commit details
    Browse the repository at this point in the history
  6. manifest: add ostree deploy stages conditionally

    When creating the ostree deployment pipeline, add the appropriate stages
    only when the ostree commit is specified.
    The stages are:
      org.osbuild.pull
      org.osbuild.ostree.deploy
      org.osbuild.ostree.remote
      org.osbuild.ostree.fillvar
    achilleas-k committed Nov 20, 2023
    Configuration menu
    Copy the full SHA
    2f90dd1 View commit details
    Browse the repository at this point in the history
  7. manifest: add a second constructor for ostree container deployment

    Rename the NewOSTreeDeployment() constructor to
    NewOSTreeCommitDeployment() and add a second one called
    NewOSTreeContainerDeployment().
    Each takes a different kind of source spec (ostree commit or container).
    The container constructor also requires the ref to be specified since
    it's not part of the container spec.
    achilleas-k committed Nov 20, 2023
    Configuration menu
    Copy the full SHA
    b0362f9 View commit details
    Browse the repository at this point in the history
  8. manifest: add ostree.deploy.container stage to ostree deployment

    Add the org.osbuild.ostree.deploy.container stage when the content
    source for the deployment is a container.
    achilleas-k committed Nov 20, 2023
    Configuration menu
    Copy the full SHA
    09216f6 View commit details
    Browse the repository at this point in the history
  9. image: support both commit and container sources for OSTreeDiskImage

    Support both content source types on the OSTreeDiskImage ImageKind.
    A second constructor is defined, just like with the deployment pipeline
    of the image.
    The original constructor is renamed to NewOSTreeDiskImageFromCommit to
    differentiate and have a more informative name.
    achilleas-k committed Nov 20, 2023
    Configuration menu
    Copy the full SHA
    ab9dbbc View commit details
    Browse the repository at this point in the history
  10. manifest: remove ignition options from OSTreeDeployment constructor

    Only required properties should be specified through the constructor to
    make sure they are not accidentally left empty or nil.  Optional
    properties are added via public fields of the pipeline object.
    
    Since the ignition platform is optional, change it to a public field.
    Also, to simplify the interaction between the two ignition properties,
    remove the boolean that signifies if ignition should be enabled and use
    the IgnitionPlatform string instead.  Treat the empty string as the
    disabled value.
    achilleas-k committed Nov 20, 2023
    Configuration menu
    Copy the full SHA
    ac25081 View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    74df68a View commit details
    Browse the repository at this point in the history
  12. distro/fedora: add coreosImage function

    A new image functions called coreosImage() that requires a container
    source and creates a qcow2 image from a CoreOS ostree container.
    Based on the example manifest added in osbuild/osbuild#1402
    achilleas-k committed Nov 20, 2023
    Configuration menu
    Copy the full SHA
    e163c4b View commit details
    Browse the repository at this point in the history
  13. distro/fedora: add new image type "coreos-qcow2"

    Define the new image type using the new coreosImage() function and
    container deployment pipeline and add it to the x86_64 and aarc64
    registries for Fedora.
    achilleas-k committed Nov 20, 2023
    Configuration menu
    Copy the full SHA
    49a0786 View commit details
    Browse the repository at this point in the history
  14. cmd: use internal types for config and repositories

    We always aliased these types so that internal changes wouldn't always
    require changing our tooling interfaces but it's actually more annoying
    needing to change them every time something is added or changed in the
    internal types.  These are development and testing tools.  It's fine to
    use the internal types directly and keep them simple.
    achilleas-k committed Nov 20, 2023
    Configuration menu
    Copy the full SHA
    1ab6c74 View commit details
    Browse the repository at this point in the history
  15. Configuration menu
    Copy the full SHA
    160b82b View commit details
    Browse the repository at this point in the history
  16. test: update repository format

    Use gpgkeys instead of concatenating multiple keys under gpgkey.
    The singular gpgkey was a leftover from an old format and now we use an
    array from the internal rpmmd.RepoConfig instead.
    achilleas-k committed Nov 20, 2023
    Configuration menu
    Copy the full SHA
    f80416f View commit details
    Browse the repository at this point in the history
  17. manifest: disable root user locking when deploying containers

    Modifying the root user fails when trying to modify a container
    deployment.  Let's disable it for now until we figure out if it's
    possible.
    achilleas-k committed Nov 20, 2023
    Configuration menu
    Copy the full SHA
    bbf87f2 View commit details
    Browse the repository at this point in the history
  18. Configuration menu
    Copy the full SHA
    6fc7e74 View commit details
    Browse the repository at this point in the history
  19. Schutzfile: unpin osbuild commit sha

    Use the latest version from the Fedora 38 repo snapshots.
    achilleas-k committed Nov 20, 2023
    Configuration menu
    Copy the full SHA
    02a5d0b View commit details
    Browse the repository at this point in the history
  20. Configuration menu
    Copy the full SHA
    d3e1734 View commit details
    Browse the repository at this point in the history