#5497 [WIP] Containerfiles and manifests to build images and run pagure on k8s
Closed by ryanlerch. Opened by wombelix.
wombelix/pagure feat_containers_and_kubernetes  into  master

Download 5497.patch

Work in progress / under development

container

Currently there are no pre-build pagure container images.
When the work on this PR is completed, the next step is to regularly build images and publish them under the pagure org on quay.io.

Why new container files? The current files are located under dev/ and tailored to the requirements to run local unit / integration tests.

pagure-base

FROM quay.io/almalinuxorg/9-base
- At this moment pagure works best with pyton 3.9

pip based venv
- Gives us the most control about the module versions, necessary at this point, the goal is to switch to rpm at a later point

dev tools and caches
- installed dev tools (e.g.) are removed at the end of the RUN step. The dnf and pip cache is cleaned as well to reduce image size.

pagure.cfg and alembic.ini
- The base container ships a default version which is supposed to be replaced with a customized version during deployment. On k8s for example by mounting a ConfigMap.

pagure-server

The entrypoint script contains logic to trigger either a createdb or upgrade action via alembic. Gunicorn is then used to start a pagure application instance.

pagure-worker

The entrypoint script activates the python venv and executes runworker.py. Default values to work as task handler for standard pagure tasks. Parameters can be customized to run another work instance for logcom

pagure-docs

Behavior similar to pagure-server, gunicorn starts and instance of the pagure.docs_server application instead.

pagure-ev

Entrypoint activates the venv and then executes pagure-ev/pagure_stream_server.py.

kubernetes

The first iteration is a deployment manifest that spins up a working pagure instance on a k8s cluster.
In future this should then probably become a more majure Helm Chart that's available via quay.io next to pagure container images.

This looks pretty good so far. :100:

This project has moved to https://forge.fedoraproject.org/apps/pagure. As part of the migration, all open pull requests on pagure.io have been closed. If you'd like to continue working on this, please fork the repository on the new forge and re-submit your PR there.

Pull-Request has been closed by ryanlerch

Metadata