Software Repository
Pigsty’s REPO role downloads required packages and creates a local YUM/APT repository under /www/pigsty. Nginx can serve this repository.
The current package candidate is SOW 0.3.0. SOW generates metadata for both repository types. The source no longer calls createrepo_c, modifyrepo_c, or dpkg-scanpackages separately.
Quick Start
Add packages to repo_packages or repo_extra_packages, then run:
If /www/pigsty/repo_complete already exists, the default repo_build skips the build. To force a rebuild, override it explicitly:
To rebuild metadata for packages already present without downloading new ones:
SOW Prerequisites
Both repo_create and cache_create require sow on the target node. A fresh online build automatically adds infra to the effective repo_modules list. It installs SOW from the Pigsty INFRA upstream repository.
Offline bundles and local repositories created before this change may not contain SOW. Before you rebuild from old media, refresh the bundle or local repository. Alternatively, install the current SOW 0.3.0 candidate from Pigsty INFRA. Do not assume that older environments can still fall back to createrepo_c.
On a fresh installation, the role checks whether /www exists. If absent, it creates /data/nginx and points /www to it. It preserves existing directories and symlinks.
Build Flow
| Task | Purpose |
|---|---|
repo_check | Check repo_complete to determine whether the local repository is complete |
repo_prepare | Configure and use an existing repository |
repo_dir | Create /www/pigsty and ACME directories |
repo_upstream | Back up and add upstream YUM or APT definitions |
repo_url_pkg | Download packages from direct URLs |
repo_cache | Run yum makecache or apt update |
repo_boot_pkg | Install sow and the RPM platform’s dnf-utils / yum-utils |
repo_pkg | Download packages and dependencies |
repo_create | Run SOW to clean and atomically publish repository metadata |
repo_use | Write the local Pigsty repository definition on the current host |
repo_nginx | Start a temporary Nginx when no service is already running |
The command executed by repo_create is:
--pigsty removes unneeded packages and packages likely to cause conflicts. It atomically publishes the result only after all metadata is complete. A typical layout is:
repo_complete contains SHA-256 checksums. Do not treat it as an empty marker. Its presence means SOW completed publication of local repository metadata. It does not prove that remote mirrors, signed repositories, or offline bundles have been synchronized.
DNF Module Streams
Pigsty no longer fabricates modules.yaml / ModuleMD metadata for the aggregated local repository. System upstream repositories retain native DNF module filtering. Only an upstream repository that truly needs to replace an EL module stream should set meta explicitly:
The aggregated local repository uses module_hotfixes=1. This prevents system module streams from hiding local PostgreSQL packages. It does not generate artificial ModuleMD metadata.
Package Aliases
The default repo_packages uses these alias groups:
node-bootstrap includes Ansible, Python dependencies, SOW, and SSH tools. infra-package includes Nginx, etcd, HAProxy, Victoria exporters, Redis/Valkey, Silo, mcli, SOW, and Pig. Exact names vary by operating-system mapping. Use roles/node_id/vars/<os>.<arch>.yml as the authoritative source.
Common Commands
Was this page helpful?
Thanks—your feedback helps us improve this page.
What got in the way? (optional)