No description
Find a file
Tom Gundersen 4c40faebe6 distro: move from dnf-based to rpm-based pipelines for all distros
Conceptually, we used to insert the high-level packages and package
groups into the pipeline together with the expected repository
metadata checksum.

osbuild, using the dnf stage, would then fetch the metadata, verify
that its checksum is correct, compute the dependencies, and install
the packages.

Among the problems this has is that it made it impossible to cache
and share the resolved metadata as well as the rpms. Moreover,
as the checksum was at the repository-level, rather than at the
package level, it meant that we would refuse to build a pipeline
as soon as there were any changes at all to the repository, as we
could no longer guarantee the installed packages would be the same.

As of this patch, all repository and metadata handling is done by
composer, rather than osbuild. This means that the resolved metadata
can be cached between runs, which and it means that we can now
pin individual packages, rather than the entire repository. Meaning,
that as long as the rpms are still available, we are able to build
a pipeline.

The downloading of rpms is now done by a source helper in osbuild,
which means that they can be cached and shared between runs too.

One consequence of this change is that we resolve the location of
each rpm in composer, and pass that to the worker. As the worker
may not be in the same location, we do not want to use metalinks
in composer for this, as it would pin the repository closest to
composer, rather than the runner. Instead, we now manually select
a baseurl for each repository, which should be generally the
most useful one. Fedora helpfully provides such baseurls, so
this should work ok.

The most important thing to verify when checking this commit, is
that the image info in our test-cases remains unchanged.

Signed-off-by: Tom Gundersen <teg@jklm.no>
2020-03-15 19:38:59 +01:00
.github/workflows ci/source-check: check also the unstaged files 2020-03-13 16:00:29 +01:00
cmd tests/image: add booting tests 2020-03-13 18:06:56 +01:00
distribution distribution: set CACHE_DIRECTORY in the .service file 2020-03-03 14:25:26 +01:00
docs README: Define terminology as a base for internal refactoring 2020-01-30 14:42:25 +01:00
internal distro: move from dnf-based to rpm-based pipelines for all distros 2020-03-15 19:38:59 +01:00
osbuild@c8465ce06f submodule: update to current master 2020-03-15 19:38:59 +01:00
repositories distro: move from dnf-based to rpm-based pipelines for all distros 2020-03-15 19:38:59 +01:00
test distro: move from dnf-based to rpm-based pipelines for all distros 2020-03-15 19:38:59 +01:00
tools test/cases: include the full rpmmd structs 2020-03-15 19:38:59 +01:00
vendor vendor: add missing directory 2020-03-15 19:38:59 +01:00
.gitignore Ignore osbuild-weldr-tests binary 2020-03-10 20:29:19 +01:00
.gitmodules image-info: add test 2019-10-05 14:47:35 +02:00
.golangci.yml ci/lint: disable govet/composites 2020-03-02 14:28:55 +01:00
.packit.yaml add packit 2019-11-29 12:16:27 +01:00
.travis.yml travis: streamline test definitions 2020-03-15 19:38:59 +01:00
dnf-json dnf-json: avoid randomizing package order 2020-03-02 17:44:36 +01:00
go.mod tests/image: add booting tests 2020-03-13 18:06:56 +01:00
go.sum Use semver to enforce blueprint version numbers 2020-02-25 09:00:35 +01:00
golang-github-osbuild-composer.spec tests/image: add booting tests 2020-03-13 18:06:56 +01:00
LICENSE Revert "Fill in the license template" 2019-11-15 15:26:51 +01:00
Makefile tests: use go's test framework in osbuild-dnf-json-tests 2020-03-10 20:29:19 +01:00
README.md Add quick README about testing 2020-02-19 23:41:58 +01:00

osbuild-composer

An HTTP service for building bootable OS images. It provides the same API as lorax-composer but in the background it uses osbuild to create the images.

You can control it in Cockpit or using the composer-cli. To get started on Fedora, run:

# dnf install cockpit-composer golang-github-osbuild-composer composer-cli
# systemctl enable --now cockpit.socket
# systemctl enable --now osbuild-composer.socket

Now you can access the service using composer-cli, for example:

composer-cli status show

or using a browser: http://localhost:9090

API documentation

Please refer to the lorax-composer's documenation as osbuild-composer is a drop-in replacement.

High-level overview

overview

Frontends

osbuild-composer is meant to be used with 2 different front-ends. The primary one, which is meant for general use, is cockpit-composer. It is part of the Cockpit project and unless you have a strong reason not to use it, you should use it. composer-cli is a command line tool that can be used with osbuild-composer.

Compose

  • Compose is what the user submits over one of the frontends
  • It contains of one or more image builds
  • It contains zero or more upload actions

Image build

Job

  • What composer submits to a worker
  • Is a unit of work performed by osbuild (internally it is a single execution of osbuild)
  • Consists of one image build and zero or more Upload actions

Image type

  • In the cockpit-composer, for examples these are image types:
    • Openstack
    • Azure
    • AWS
  • As of now, we name them internally by their file format: vhd, ami, etc.
  • You can see a list of types by executing: composer-cli compose types

Upload action

  • Each image can be, but does not have to be, uploaded to a remote location
  • One image can be uploaded to multiple locations

Testing

See test/README.md