Commit graph

10 commits

Author SHA1 Message Date
Tom Gundersen
d3cd3197c0 container: make liveness probe independent of webserver
Currently liveness and readiness was treated the same. However, their
behaviour at shutdown is meant to be different. When a service is not read
no new connections are made to it, and when a service is not live it can be
cleaned up.

By considering our service live if and only if it listens to HTTP requests we
don't have the opportunity to clean up after we stop listening to new requests.

Leave readiness probes as they are, and instead use a file in the filesystem to
indicate when the service is live. It is created before composer is spawned and
deleted once composer exits.
2022-03-22 14:17:37 +01:00
Christian Kellner
898a0f176a entrypoint.py: ensure parent directories exist
Create the parent directores for the socket if they don't exist.
2022-02-27 20:55:03 +00:00
sanne
fe00e1efd3 containers/osbuild-composer: Allow dnf-json to accept http connections
Revert 83e16afda4: With dnf-json running
in a container it's easy to run it standalone.
2022-02-02 11:15:46 +01:00
sanne
83e16afda4 dnf-json: Can be started without systemd
Instead of starting the socket in the entrypoint, make dnf-json able to
bind on the unixsocket by itself.
2021-12-15 09:41:32 +01:00
Gianluca Zuccarelli
44017890ca containers: mock oauth container
Add a mock oauth container to simulate
the openshift SSO offline_token
2021-11-12 14:07:13 +01:00
Gianluca Zuccarelli
7bf6dc4cd4 containers: update composer log level flag
The osbuild-composer log level flag was changed from
`-v` to `-verbose`. This change updates the container
entrypoint to reflect this.
2021-09-23 13:28:27 +01:00
Sanne Raymaekers
946a0b425a containers: Specify port for the composer-api as argument 2020-12-23 17:31:29 +01:00
Tom Gundersen
c3185466ae containers: simplify Dockerfile and container build
This changes the following:
 - Only produce one container. There is no particular benefit to
   supporting several different base containers, so unify on ubi
   as that is what we need ourselves.
 - Build directly from git. Now that the RPM we include in our
   container does not have any dependencies and only contains a
   couple of executables, the indirection via RPM has less value.
   Eventually the value will be reduced even further as we merge
   the entrypoint into the main binary and move dnf-json into the
   worker, leaving us with only a go binary. The only potential
   benefit might be that the build environment of RPMs is more
   clearly defined, but there is no real reason to believe that
   our mockbuild is any better than using the UBI golang build
   container.

This simplifies the container builds, and brings us more in line
with what is done in image-builder, and what is needed to deploy
to openshift.
2020-12-22 15:27:39 +01:00
Tom Gundersen
21beab0617 dockerfile: install osbuild-composer-core
This no longer pulls in systemd/worker, saving space and makes it
suitable for use in a UBI container, where qemu-img is not available.

This drops support for --inbuilt-worker from entrypoint.py. The script
could be simplified further in a future commit, or folded into the
main binary.
2020-12-18 22:53:07 +01:00
David Rheinsberg
21c7b7463c containers: add containerized osbuild-composer
Add a Dockerfile that creates a container based on Fedora with
osbuild-composer deployed. Create a suitable entrypoint that runs
osbuild-composer in the container and creates the required sockets
without systemd.

To test this, build the container via:

    docker build ./containers/osbuild-composer

Then create your certificates in /etc/osbuild-composer/. Then run
composer with something like:

    docker run --rm -v /etc/osbuild-composer:/etc/osbuild-composer <id>

(Where <id> is the container ID returned by `docker build`.)
2020-12-17 12:46:59 +01:00