pig v1.8.0
Pig v1.8.0 makes Pigsty controller setup native. The two core setup commands,
pig sty boot and pig sty conf, are now failure-aware Go workflows instead of
wrappers around the legacy bootstrap and configure shell scripts. The release
keeps the public catalog total at 575 packaged PostgreSQL extensions and embeds
Pigsty 4.5.0.
Native pig sty boot
pig sty boot is now one native, failure-aware controller bootstrap transaction. It does not
execute <PIGSTY_HOME>/bootstrap, and its HTTP download and archive extraction paths do not
depend on curl, wget, tar, or gzip.
Privilege and readiness
- The command can be launched as an ordinary user. Pig resolves and downloads an explicit source
before a single sudo re-exec;
PIG_NO_SUDO=1disables elevation andPIG_NON_INTERACTIVE=1requests non-interactive sudo. - On Debian 12/13, locale preparation is attempted before and, when useful, after controller package installation.
- Readiness is proven by executing
ansible-playbook, discovering its Python interpreter, and checkingyaml,jmespath, and eithercryptographyorOpenSSL. A present but unusable Ansible binary no longer produces a false success.
Repository sources and transactions
- Source selection covers a local archive, an HTTP(S) URL, a permission-checked automatic
/tmp/pkg.tgz, an already committed/www/pigstyrepository, and regional online repositories. A bad explicit source is a hard error and never silently becomes an online boot. - A completed
/www/pigstyrepository wins over a selected package. Pig can create the expected/www -> /data/nginxlayout itself, uses restricted extraction for offline content, and enables only the strictpigsty-localrepository in offline mode. Online setup installs the embedded Pigsty key and keeps repository signature checks enabled. - The default overwrite policy backs up repository definitions and restores them when repository
or package setup fails.
--keepselects an additive policy and can retry a failed online refresh against existing definitions. - The reported mode is explicit:
ready,offline,online, orexisting. An explicit, automatically discovered, or committed offline source is prepared even when Ansible is already usable.
Finishing checks and automation
- Pig probes controller helpers, repairs key-based SSH to
127.0.0.1for the invoking admin user, and initializes a missing~/pigstyfrom online or local content when possible. - Locale, helper, localhost-SSH, and Pigsty-tree finishing failures are warnings. Invalid explicit input, repository/package failures, unsupported installation paths, and unusable post-install Ansible remain hard failures.
- JSON and YAML use the
pig.sty.boot/v2result contract, including the selected mode and package manager, repository policy and rollback state, source paths, locale, SSH and initialization status, changes, warnings, and the nextconf,inventory, anddeploycommands.
Native pig sty conf
pig sty conf is now a complete native Inventory compiler. It does not execute ./configure or
fall back to raw Shell behavior: Pig resolves one template, performs bounded structural changes,
validates the full candidate, and only then commits the output.
Safe configuration pipeline
- The default template is
conf/meta.yml; a safe slash-separated relative mode may be supplied positionally or with--conf. Absolute paths, traversal, path escape, and source/output aliasing through direct paths, symlinks, symlinked parents, or hard links are rejected. - Source parsing and IP-collision checks happen before external preflight. Parse, mutation, preflight, or validation failure leaves the destination unchanged.
- Pig performs native Inventory validation and, when available, a bounded
ansible-inventoryparse. Successful output is atomically written with mode0600.
Structural Inventory changes
- Up to ten distinct
--ipvalues map simultaneously to slots10.10.10.10through10.10.10.19; unrelated VIPs remain intact. Without--ip, interface selection is explicit and deterministic in interactive, non-interactive, and closed-input execution. --domainreplaces only the exacti.pigstytoken. Controllers with fewer than four CPUs are automatically switched from theoltpnode and PostgreSQL tuning profiles totiny.- Region changes update
all.vars.region;chinaactivates Docker and pip mirrors already supplied by the template.--proxymaterializes available proxy environment variables underall.vars.proxy_env. - Generic templates support PostgreSQL 14-18 and explicit 19 beta, including matching locale and
beta repository selection. Version-pinned
mssql,polar, andpgNNmodes keep their effective template version and emit a warning. --generateassigns one random 24-character value to each known credential identifier and updates active values and documented placeholders consistently. Result output lists generated identifiers but never secret values.
Preflight and result contract
- Unless
--skipis selected, preflight covers the platform, package manager, controller resources, sudo/admin access, localhost SSH, and Ansible availability. Build templates underconf/build/intentionally bypass IP mapping and admin preflight. - JSON and YAML use
pig.sty.configure/v1and report the template and output, selected and discarded addresses, requested and effective PostgreSQL versions, applied options, generated secret identifiers, and warnings.
Other Updates
- EL8 and newer package operations consistently prefer DNF, local RPM requirements are resolved
by provider capability, fresh repository bootstraps restore the expected
/wwwlayout, and self-update tolerates whitespace in the latest marker. - The extension catalog, package versions, metadata, and availability matrices receive their routine refresh while the published PostgreSQL-extension count remains 575.
- CI and release builds use Go
1.26.6, pinned analysis tools and GoReleaser, dependency verification, workflow linting, vulnerability scanning, and a full release snapshot.
Compatibility Notes
pig sty bootno longer executes<PIGSTY_HOME>/bootstrap. Automation that relied on shell-script side effects should consume the native command and its structured result.pig sty conf --rawhas been removed. Use the native workflow;--conf MODEremains available, withpig sty conf MODEas the equivalent positional form.pig sty conf --ipaccepts up to ten comma-separated IPv4 addresses;--skipand--ipremain mutually exclusive. Uppercase-Ochooses the Inventory file, while global lowercase-ochooses the command output format.- EL8 and newer use DNF. The limited EL7 compatibility catalog retains its separate legacy YUM path.
Checksums
Artifacts: GitHub Release · checksums.txt