Prior to this patch, `make rpm` would produce rpms that have the latest tag as their versions. This was confusing, because one could never know which contents are in a locally built rpm. Change this so that the is version always based on the commit hash of HEAD. This is easy: the golang macros read a `%commit` macro when it exists and do this for us. To simplify more, only define `%_topdir` to ./rpmbuild and use rpmbuild's known directory structure (SPEC, SOURCES, RPMS, ...) otherwise, to make it easier to find build results. Build the specfile, tarball, source rpms, and rpms with `make rpm`, without separate sub-targets. We can reintroduce them if they're needed somewhere. Also remove the `check-working-directory` target. It should be clear from the output that only the currently-committed files are included, because the resulting tarball and rpms contain the commit hash. Without the check, one can work on the Makefile without having to commit all the time, for example ;) |
||
|---|---|---|
| .github/workflows | ||
| cmd | ||
| distribution | ||
| docs | ||
| internal | ||
| osbuild@bd6e6bde56 | ||
| repositories | ||
| test | ||
| tools | ||
| vendor | ||
| .gitignore | ||
| .gitmodules | ||
| .golangci.yml | ||
| .packit.yaml | ||
| .travis.yml | ||
| dnf-json | ||
| go.mod | ||
| go.sum | ||
| golang-github-osbuild-composer.spec | ||
| LICENSE | ||
| Makefile | ||
| README.md | ||
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
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
- The resulting image has a type: https://github.com/osbuild/osbuild-composer/blob/master/internal/distro/fedora30/distro.go#L19
- Running build in osbuild-composer is referred to as a "job" (internal terminology, not related to end-user experience)
Job
- What composer submits to a worker
- Is a unit of work performed by
osbuild(internally it is a single execution ofosbuild) - 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