Offline Install
Pigsty install from Internet upstream by default, while some environments are isolated from the Internet. To address this issue, Pigsty supports offline installation from offline packages.
Step 1
Download the pigsty offline package, put it to `/tmp/pkg.tgz`
Step 2
Download the pigsty source package, extract it (assume `~/pigsty`)
Step 3
`cd ~/pigsty; ./bootstrap`, it will extract the pkg and use the local repo
Step 4
`vi ~/pigsty.yml`, overwrite [`node_repo_modules`](/docs/node/param#node_repo_modules) to `local` to use the local repo
Step 5
Run `./install.yml` as usual. it will install everything from the local repo.
What is offline package?
Offline package packs all the required RPM/DEB packages and their dependencies; it is essentially a snapshot tarball of local APT / YUM repo, taken after a normal installation.
You can find these packages from the GitHub release page, for example:
We usually release offline packages for the following linux distro, with the latest OS minor version.
| EL Distribution | Code | Arch | OS Code | Package |
|---|---|---|---|---|
| RockyLinux 9.6 | EL9 | x86_64 | el9.x86_64 |
pigsty-pkg-v3.7.0.el9.x86_64.tgz |
| Ubuntu 24.04.2 | U24 | x86_64 | u24.x86_64 |
pigsty-pkg-v3.7.0.u24.x86_64.tgz |
| Debian 12.11 | D12 | x86_64 | d12.x86_64 |
pigsty-pkg-v3.7.0.d12.x86_64.tgz |
| RockyLinux 9.6 | EL9 | x86_64 | el9.aarch64 |
pigsty-pkg-v3.7.0.el9.aarch64.tgz |
| Ubuntu 24.04.2 | U24 | x86_64 | u24.aarch64 |
pigsty-pkg-v3.7.0.u24.aarch64.tgz |
| Debian 12.11 | D12 | x86_64 | d12.aarch64 |
pigsty-pkg-v3.7.0.d12.aarch64.tgz |
https://github.com/pgsty/pigsty/releases/download/v3.7.0/pigsty-pkg-v3.7.0.el9.x86_64.tgz
Using offline package on lower minor version may have a chance of success, but it is not guaranteed.
Using Offline Package
Place the offline package at /tmp/pkg.tgz, navigate to the ~/pigsty directory and execute ./bootstrap to extract and use the offline package.
Pigsty will extract it to /www/pigsty, configure the system repository list to enable this repository, and install ansible from it.
Since Pigsty v3.6, most configuration templates no longer build local software repositories by default, but install packages directly from Internet upstream.
A few configuration templates such as rich and full still retain the old behavior — building local repositories first before using them.
If you want to use the extracted and configured offline package in your own configuration, please modify the following settings:
repo_enabled: Set this totrueto build local software repo (explicitly disabled in most templates)node_repo_modules: Set this tolocalto install from local software repo for all nodes in the env- In most templates, this parameter is now explicitly configured as:
node,infra,pgsql, which installs software packages directly from upstream repos. - Setting it to
localwill use the local repo alone, which is fastest and more reliable if applicable. - If you want to use both local and upstream repositories, you can set it to
local,node,infra,pgsql
- In most templates, this parameter is now explicitly configured as:
Pros and Cons
If you are using the exact same OS minor version above, using offline packages is advised.
- Official offline packages are tested.
- The easiest way to deliver on Internet isolated environment.
- Speed up the installation process by pre-download all packages in one-pass.
- The snapshot is ensured working without worrying about upstream dependency breakage.
- If OS minor version not match, OS rpm/deb packages may break
- It may not contain the latest updates and OS security patches.
Bootstrap
The bootstrap script will automatically detect /tmp/pkg.tgz and extract it to /www/pigsty by default.
It will also set up the os package manager repo file and install ansible and other utils.
Bootstrap will wipe-out existing repo by default to ensure only the required repos are installed.
You can find them in /etc/yum.repos.d/backup (EL) or /etc/apt/backup (debian / ubuntu)
You can use the -k|--keep parameter to keep the existing repo files intact:
Make offline package
If your OS choice is not in the default offline package offering list,
you can make your own offline package with the built-in cache.yml playbook.
Step 1
Find a node running exact same OS version with the Internet access
Step 2
Run standard [online installation procedure](/docs/install) (use the `rich` template: `configure -c rich`)
Step 3
`cd ~/pigsty; ./cache.yml`: make and fetch the offline package to `dist/${version}/`
Step 4
Copy the offline package to the environment without Internet access (ftp, scp, usb,...)
Since Pigsty v3.6, most configuration templates install packages directly from Internet upstream, rather than downloading to the admin node first to build a local repository and then installing from it. You can restore the previous default behavior by adjusting parameters, which is useful if you need to build your own offline packages:
repo_enabled: set totrueto build local software reponode_repo_modules: set tolocalto install from local repo
Some configuration templates, such as rich and full, still retain the old behavior — building local repositories first before using them, so no adjustment is needed.
We offer paid service to make offline packages for precise Linux major.minor versions. ($30)
Hybrid Approach
There’s a hybrid approach to using the offline package and do online install upon it. This could be useful if your OS repo is a local Intranet repo.
Let’s say you are using RockyLinux 9.5, but the official offline package is made for RockyLinux 9.6.
You can use the el9 offline packages, and run the make repo-build before the ./install.yml,
to force Pigsty to perform a repo build task (infra.repo).
If you want to use the latest version or resolve any dependency conflict, you can remove these rpm/deb and run make repo-build,
pigsty will re-download them from the upstream repo.