|
| 1 | +# Run Copr infra with podman kube play |
| 2 | + |
| 3 | +Run the complete COPR infrastructure locally using `podman kube play` with Kubernetes-style manifests. |
| 4 | + |
| 5 | +## Overview |
| 6 | + |
| 7 | +This directory contains everything needed to run COPR in containers using Podman's Kubernetes compatibility layer. It supports three deployment modes: |
| 8 | + |
| 9 | +| Mode | Description | Use Case | |
| 10 | +| --------- | ------------------------------------ | ----------------------------------- | |
| 11 | +| `release` | Uses packages from Fedora repos only | Testing with released versions | |
| 12 | +| `dev` | Uses packages from `@copr/copr-dev` | Testing main branch / pre-release | |
| 13 | +| `local` | Same as dev, for local development | Development with local code changes | |
| 14 | + |
| 15 | +## Quick Start |
| 16 | + |
| 17 | +```bash |
| 18 | +# Start COPR with development packages (default) |
| 19 | +./copr-podman-kube up |
| 20 | + |
| 21 | +# Start COPR with released packages |
| 22 | +./copr-podman-kube -m release up |
| 23 | + |
| 24 | +# Stop COPR |
| 25 | +./copr-podman-kube down |
| 26 | +``` |
| 27 | + |
| 28 | +## Usage |
| 29 | + |
| 30 | +### See the man page of the script: |
| 31 | + |
| 32 | +```bash |
| 33 | +./copr-podman-kube --help |
| 34 | +``` |
| 35 | + |
| 36 | +## Access Points |
| 37 | + |
| 38 | +After starting, the following services are available: |
| 39 | + |
| 40 | +| Service | URL | |
| 41 | +| --------------- | --------------------- | |
| 42 | +| Frontend | http://localhost:5000 | |
| 43 | +| DistGit | http://localhost:5001 | |
| 44 | +| Backend Results | http://localhost:5002 | |
| 45 | +| Resalloc WebUI | http://localhost:5005 | |
| 46 | +| Database | localhost:5009 | |
| 47 | + |
| 48 | +### Setup Host Entries (Recommended) |
| 49 | + |
| 50 | +To make all URLs in the web interface work directly in your browser, add this entries to `/etc/hosts` so your browser can resolve internal hostnames like `backend-httpd` to `127.0.0.1`: |
| 51 | + |
| 52 | +```bash |
| 53 | +sudo tee -a /etc/hosts << 'EOF' |
| 54 | +# COPR local development |
| 55 | +127.0.0.1 frontend |
| 56 | +127.0.0.1 backend-httpd |
| 57 | +127.0.0.1 distgit |
| 58 | +127.0.0.1 keygen |
| 59 | +127.0.0.1 resalloc |
| 60 | +EOF |
| 61 | +``` |
| 62 | + |
| 63 | +After this, URLs like `http://backend-httpd:5002/results/...` will work directly in your browser! |
| 64 | + |
| 65 | +## Deployment Modes |
| 66 | + |
| 67 | +### Release Mode (`-m release`) |
| 68 | + |
| 69 | +Uses only packages from Fedora repositories. This is useful for testing with the latest released COPR version. |
| 70 | + |
| 71 | +```bash |
| 72 | +./copr-podman-kube -m release up |
| 73 | +``` |
| 74 | + |
| 75 | +### Dev Mode (`-m dev`) - Default |
| 76 | + |
| 77 | +Uses packages from the `@copr/copr-dev` COPR repository, which contains packages built from the main branch. |
| 78 | + |
| 79 | +```bash |
| 80 | +./copr-podman-kube up |
| 81 | +# or explicitly: |
| 82 | +./copr-podman-kube -m dev up |
| 83 | +``` |
| 84 | + |
| 85 | +### Local Mode (`-m local`) |
| 86 | + |
| 87 | +Same as dev mode but intended for local development. Mounts the local source code into containers for live development. |
| 88 | + |
| 89 | +```bash |
| 90 | +./copr-podman-kube -m local up |
| 91 | +``` |
| 92 | + |
| 93 | +## Future Improvements |
| 94 | + |
| 95 | +- [ ] Live source code mounting in local mode |
| 96 | +- [ ] Kustomize support for environment overlays |
| 97 | +- [ ] Health checks and readiness probes |
| 98 | +- [ ] Resource limits tuning |
| 99 | +- [ ] Ready with openshift |
0 commit comments