Skip to content

Commit 618e5fc

Browse files
GuanzhouSongCopilot
andcommitted
Add an offline / air-gapped install section to the packages guide
A host with no route to the DocumentDB repository also has no route to PGDG, and the extension depends on PostgreSQL itself plus pg_cron, pgvector and PostGIS, which are PGDG packages. Downloading the release assets alone is therefore not enough, and the guide had nothing to say about that case. Document staging the full dependency closure on a connected machine and serving it to the target as a local repository, for both DEB and RPM. Because the target then has a real repository index, the air-gapped install stays a single `apt install documentdb-18` / `dnf install documentdb-18` with full dependency resolution rather than an ordered list of files. Smaller cases are covered too: the extension alone from one file, and the full stack from the six release assets. Call out the trap that makes a bundle look complete and fail on arrival: `apt-get install --download-only` and a bare `dnf download --resolve` skip anything already installed on the staging machine, so a clean target dies with errors like "Depends: adduser but it is not installable". Use `apt-cache depends --recurse` and `dnf download --alldeps`, which ignore local install state. Verified on v0.116-0 with every command run verbatim, staging on a connected container and installing into one started with --network none: * DEB: closure 205 packages / 203 MB staged on ubuntu:24.04, then `apt install documentdb-18` on an offline ubuntu:24.04 -> exit 0. * RPM: closure 271 packages / 172 MB staged on rockylinux:9, then `dnf install documentdb-18` on an offline rockylinux:9 -> exit 0. * Single file: `apt install ./postgresql-18-documentdb_0.116-0_amd64.deb` on an offline host with the PGDG prerequisites present -> exit 0. The first attempt used --download-only and produced exactly the failure now documented (133 packages staged instead of 205), which is why it is called out rather than left as a footnote. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: f18515db-c52f-4197-aa50-d81359c7c763 Signed-off-by: Guanzhou Song <guanzhou.song@gmail.com>
1 parent 825c60f commit 618e5fc

1 file changed

Lines changed: 63 additions & 0 deletions

File tree

‎app/services/articleService.ts‎

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -197,6 +197,69 @@ For PostgreSQL 17, install \`documentdb-17\`. The \`documentdb\` meta package is
197197
198198
> **Why the \`crb\` line matters.** DocumentDB's extension depends on PostGIS, which pulls in \`gdal*-libs\`, which needs \`libqhull_r.so.7\` — and that library ships only in **CRB** (CodeReady Builder; \`powertools\` on EL8). If CRB is not enabled, \`dnf install\` fails with dozens of lines like \`nothing provides libqhull_r.so.7()(64bit) needed by gdal313-libs\`, naming GDAL but never the missing repository. Do not drop that line.
199199
200+
## Offline / air-gapped install
201+
202+
A host with no route to this repository also has no route to PGDG — and DocumentDB depends on PostgreSQL itself plus \`pg_cron\`, \`pgvector\` and PostGIS, which are PGDG packages. Downloading the DocumentDB release assets alone is not enough. Stage the whole dependency closure on a connected machine and carry it across.
203+
204+
Run the staging step on a machine with the **same distribution, release and architecture** as the target; the closure is specific to all three.
205+
206+
### Stage the bundle (connected machine)
207+
208+
Configure the repositories exactly as in the examples above, then download the closure and index it:
209+
210+
\`\`\`bash
211+
# Debian / Ubuntu
212+
mapfile -t PKGS < <(apt-cache depends --recurse --no-recommends --no-suggests \\
213+
--no-conflicts --no-breaks --no-replaces --no-enhances documentdb-18 \\
214+
| grep '^[a-zA-Z0-9]' | sort -u)
215+
mkdir -p bundle && cd bundle
216+
apt-get download "\${PKGS[@]}"
217+
dpkg-scanpackages . /dev/null > Packages && gzip -k Packages
218+
\`\`\`
219+
220+
\`\`\`bash
221+
# RHEL-compatible
222+
sudo dnf install -y dnf-plugins-core createrepo_c
223+
mkdir -p bundle
224+
sudo dnf download --resolve --alldeps --destdir bundle documentdb-18
225+
createrepo_c bundle
226+
\`\`\`
227+
228+
> **Use the full-closure flags, not \`--download-only\`.** \`apt-get install --download-only\` and a bare \`dnf download --resolve\` skip anything already installed on the staging machine. The bundle looks complete and then fails on a clean target with errors like \`Depends: adduser but it is not installable\`. \`apt-cache depends --recurse\` and \`dnf download --alldeps\` ignore local install state, which is what you want here.
229+
230+
Expect roughly 200 packages / 200 MB for the DEB closure and 270 packages / 170 MB for the RPM closure — mostly PostGIS and its GDAL dependencies. Two warnings from the DEB step are harmless: \`Download is performed unsandboxed as root\`, and a long \`dpkg-scanpackages: warning: Packages in archive but missing from override file\` list, which is just an artifact of passing \`/dev/null\` as the override file.
231+
232+
### Install from the bundle (air-gapped target)
233+
234+
Copy \`bundle/\` across and point the package manager at it. Because the target now has a real repository index, this is a single command with full dependency resolution — no ordered list of files:
235+
236+
\`\`\`bash
237+
# Debian / Ubuntu
238+
echo "deb [trusted=yes] file:/path/to/bundle ./" \\
239+
| sudo tee /etc/apt/sources.list.d/documentdb-offline.list
240+
sudo apt-get update
241+
sudo apt install documentdb-18
242+
\`\`\`
243+
244+
\`\`\`bash
245+
# RHEL-compatible
246+
printf '%s\\n' '[documentdb-offline]' 'name=DocumentDB offline bundle' \\
247+
'baseurl=file:///path/to/bundle' 'enabled=1' 'gpgcheck=0' \\
248+
| sudo tee /etc/yum.repos.d/documentdb-offline.repo
249+
sudo dnf install documentdb-18
250+
\`\`\`
251+
252+
\`[trusted=yes]\` and \`gpgcheck=0\` tell the package manager to accept a local directory that has no repository signature of its own. The upstream signatures were verified when the bundle was staged; if it crosses an untrusted boundary, check the transfer with \`sha256sum\`.
253+
254+
Then continue with **Set up and connect** below — \`documentdb-setup\` needs no network.
255+
256+
### Smaller offline cases
257+
258+
If the target already has PostgreSQL and the PGDG extension dependencies (\`postgresql-N-cron\`, \`-pgvector\`, \`-postgis-3\`), you do not need a bundle:
259+
260+
- **Extension only, one file** — \`sudo apt install ./ubuntu24.04-postgresql-18-documentdb_0.116-0_amd64.deb\`. No gateway and no \`documentdb-setup\`.
261+
- **Full stack from the release assets** — pass all six files for your platform to a single \`apt install\` / \`dnf install\`. They must go in one command: \`apt\` and \`dnf\` resolve dependencies only from repository indexes, so a dependency on a bare local file is unresolvable and the meta package on its own fails with \`Depends: documentdb-18 ... but it is not installable\`. That is not a defect in the packages — it happens to any local \`.deb\` or \`.rpm\` whose dependencies are not in an enabled repository.
262+
200263
## Set up and connect
201264
202265
Installing the packages puts files on disk; it does not create a database or start the endpoint. The setup wizard does that:

0 commit comments

Comments
 (0)