22
33Repository-backed installation commands for DocumentDB.
44
5- > The ` stable ` channel serves v1.0-0; see [ Release channels] ( #release-channels ) .
5+ > The ` latest ` channel serves v1.2-0 and ` stable ` serves v1.0-0; see [ Release channels] ( #release-channels ) .
66
77## Clean-host installer
88
@@ -13,26 +13,39 @@ curl -fsSLo documentdb-install.sh https://documentdb.io/install.sh &&
1313sudo sh documentdb-install.sh
1414```
1515
16- This installs v1.0-0 from this repository on PostgreSQL 18; add ` --pg-major 17 `
17- for 17. On a host where DocumentDB is already set up, it only reports that instance's status
18- and doesn't upgrade it; to move an existing install to 1.0, see
19- [ Upgrading an existing install] ( #upgrading-an-existing-install ) .
16+ This installs v1.2-0 from the ` latest ` channel on PostgreSQL 18; add ` --pg-major 17 ` for 17.
17+ The host keeps that channel, so ` apt upgrade ` and ` dnf upgrade ` follow ` latest ` to new releases.
18+ To choose another release, add one option:
19+
20+ - ` --stable ` : the ` stable ` channel (v1.0-0), with the same repository definition the 1.0
21+ installer wrote.
22+ - ` --version 1.0.0 ` : exactly that release (1.0.0 or later; ` 1.2 ` means ` 1.2.0 ` ), downloaded from
23+ its GitHub release and checked against its ` SHA256SUMS ` . No DocumentDB repository is
24+ configured, so the package manager never upgrades it.
25+
26+ The installer only sets up new installs: on a host where DocumentDB is already installed it
27+ changes no packages. To move an existing install to a newer release, see
28+ [ Upgrading an existing install] ( #upgrading-an-existing-install ) . A host whose DocumentDB
29+ repository file is the other channel's is refused, not rewritten: rerun with the matching option,
30+ or remove ` /etc/apt/sources.list.d/documentdb.list ` or ` /etc/yum.repos.d/documentdb.repo ` to
31+ switch.
2032
2133The site serves the ` install.sh ` attached to the release named in
2234` scripts/publish-installer.mjs ` , and the build fails if its SHA256 changes.
2335
2436## Release channels
2537
2638The repository publishes two channels, each signed with the same key and listing only its own
27- release's packages. The commands on this page use ` stable ` .
39+ release's packages. The commands on this page use ` latest ` .
2840
2941| Channel | Release | APT source | DNF ` baseurl ` |
3042| ---| ---| ---| ---|
43+ | ` latest ` | v1.2-0 | ` https://documentdb.io/deb latest ubuntu24 ` | ` https://documentdb.io/rpm/latest/rhel9 ` |
3144| ` stable ` | v1.0-0 | ` https://documentdb.io/deb stable ubuntu24 ` | ` https://documentdb.io/rpm/rhel9 ` |
32- | ` latest ` | the newest release | ` https://documentdb.io/deb latest ubuntu24 ` | ` https://documentdb.io/rpm/latest/rhel9 ` |
3345
34- Release metadata is at ` https://documentdb.io/packages/release-info.json ` for ` stable ` and
35- ` https://documentdb.io/packages/release-info-latest.json ` for ` latest ` .
46+ ` stable ` takes new releases later than ` latest ` . Release metadata is at
47+ ` https://documentdb.io/packages/release-info-latest.json ` for ` latest ` and
48+ ` https://documentdb.io/packages/release-info.json ` for ` stable ` .
3649
3750## What is published
3851
@@ -91,6 +104,9 @@ release tag. Those paths are not part of the current hosted support matrix.
91104This is the recommended path. It installs the whole stack and brings up a working
92105wire-protocol endpoint.
93106
107+ These commands use the ` latest ` channel. For ` stable ` (v1.0-0), write ` stable ` in place of
108+ ` latest ` in the DocumentDB APT line, or use ` baseurl=https://documentdb.io/rpm/rhel9 ` on EL9.
109+
94110> These commands assume a regular Linux host where you use ` sudo ` . In a clean container that
95111> already runs as ` root ` , omit ` sudo ` , and on Debian/Ubuntu also
96112> ` export DEBIAN_FRONTEND=noninteractive ` first, or ` tzdata ` will hang the install with an
@@ -104,7 +120,7 @@ sudo apt install -y curl ca-certificates gnupg && \
104120curl -fsSL https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo gpg --dearmor --yes -o /usr/share/keyrings/postgresql.gpg && \
105121echo " deb [signed-by=/usr/share/keyrings/postgresql.gpg] https://apt.postgresql.org/pub/repos/apt noble-pgdg main" | sudo tee /etc/apt/sources.list.d/pgdg.list > /dev/null && \
106122curl -fsSL https://documentdb.io/documentdb-archive-keyring.gpg | sudo gpg --dearmor --yes -o /usr/share/keyrings/documentdb-archive-keyring.gpg && \
107- echo " deb [arch=$( dpkg --print-architecture) signed-by=/usr/share/keyrings/documentdb-archive-keyring.gpg] https://documentdb.io/deb stable ubuntu24" | sudo tee /etc/apt/sources.list.d/documentdb.list > /dev/null && \
123+ echo " deb [arch=$( dpkg --print-architecture) signed-by=/usr/share/keyrings/documentdb-archive-keyring.gpg] https://documentdb.io/deb latest ubuntu24" | sudo tee /etc/apt/sources.list.d/documentdb.list > /dev/null && \
108124sudo apt update && \
109125sudo apt install -y documentdb
110126```
@@ -127,7 +143,7 @@ sudo rpm --import https://documentdb.io/documentdb-archive-keyring.gpg && \
127143printf ' %s\n' \
128144 ' [documentdb]' \
129145 ' name=DocumentDB Repository' \
130- ' baseurl=https://documentdb.io/rpm/rhel9' \
146+ ' baseurl=https://documentdb.io/rpm/latest/ rhel9' \
131147 ' enabled=1' \
132148 ' gpgcheck=1' \
133149 ' gpgkey=https://documentdb.io/documentdb-archive-keyring.gpg' | sudo tee /etc/yum.repos.d/documentdb.repo > /dev/null && \
@@ -148,7 +164,7 @@ sudo rpm --import https://documentdb.io/documentdb-archive-keyring.gpg && \
148164printf ' %s\n' \
149165 ' [documentdb]' \
150166 ' name=DocumentDB Repository' \
151- ' baseurl=https://documentdb.io/rpm/rhel9' \
167+ ' baseurl=https://documentdb.io/rpm/latest/ rhel9' \
152168 ' enabled=1' \
153169 ' gpgcheck=1' \
154170 ' gpgkey=https://documentdb.io/documentdb-archive-keyring.gpg' | sudo tee /etc/yum.repos.d/documentdb.repo > /dev/null && \
@@ -238,7 +254,7 @@ Before using this anywhere but a private machine:
238254
239255``` bash
240256sudo documentdb-setup --status # gateway listener, service states, resolved paths
241- documentdb-gateway --version # DocumentDB version (1.0.0 )
257+ documentdb-gateway --version # DocumentDB version (1.2.0 on latest )
242258dpkg -l | grep documentdb # or: rpm -qa | grep documentdb
243259```
244260
@@ -381,7 +397,8 @@ The current release publishes PostgreSQL 17 and 18. Install `documentdb-17` or
381397
382398## Upgrading an existing install
383399
384- Package installs from v0.116 or v0.117 upgrade in place to 1.0. Move the entire stack
400+ Package installs from v0.116 or v0.117 upgrade in place to 1.0 from the ` stable ` channel; to
401+ take a 1.0.0 install to 1.2, [ switch it to ` latest ` ] ( #switch-from-stable-to-latest ) . Move the entire stack
385402together; upgrading only ` postgresql-N-documentdb ` does not update the gateway, tools, common
386403payload, or ` documentdb-N ` . These steps use systemd; upgrading a host without it isn't covered here.
387404On a package-managed private PostgreSQL 18 instance:
@@ -465,8 +482,40 @@ Confirm afterwards with:
465482SELECT extname, extversion FROM pg_extension WHERE extname LIKE ' documentdb%' ;
466483```
467484
485+ ## Switch from ` stable ` to ` latest `
486+
487+ ` stable ` still serves 1.0.0 and takes new releases later than ` latest ` , which serves 1.2. To move a
488+ 1.0.0 install to 1.2 now, point its one repository file at ` latest ` and upgrade the packages.
489+ This is one-way: 1.0 does not run correctly on data that 1.2 has updated, so back up the data
490+ directory first.
491+
492+ ``` bash
493+ # Debian / Ubuntu
494+ sudo sed -i ' s/ stable ubuntu24$/ latest ubuntu24/' /etc/apt/sources.list.d/documentdb.list &&
495+ sudo apt update &&
496+ sudo apt upgrade
497+
498+ # EL9: use this instead of the apt commands above
499+ sudo sed -i ' s|/rpm/rhel9$|/rpm/latest/rhel9|' /etc/yum.repos.d/documentdb.repo &&
500+ sudo dnf upgrade
501+ ```
502+
503+ Then re-run setup with the PostgreSQL major, plus any ` --data-dir ` or ` --pg-port ` you installed
504+ with. It restarts PostgreSQL once to load the new libraries, updates the extensions, and starts the
505+ gateway; without ` --admin-user ` it keeps every admin user and password:
506+
507+ ``` bash
508+ sudo documentdb-setup --pg-version 18 --yes
509+ ```
510+
511+ For an adopted PostgreSQL instance, run ` sudo documentdb-setup --target-postgres-instance 18/main --yes `
512+ (with your cluster name) instead, then the restart and setup commands it prints.
513+
468514## Version pinning
469515
516+ Each channel lists only its own release. To install one exact release that the package manager
517+ never upgrades, use the installer's ` --version ` option instead.
518+
470519Run the repository setup for your distro first, then:
471520
472521### APT
@@ -492,17 +541,17 @@ published in the documentdb.io package repositories. Community builds are welcom
492541For example, after checking out the matching release tag, build an extension package with:
493542
494543``` bash
495- ./packaging/build_packages.sh --os deb12 --pg 16 --version 1.0 .0
544+ ./packaging/build_packages.sh --os deb12 --pg 16 --version 1.2 .0
496545```
497546
498- ` v1.0-0 ` and ` v1.0-RC2 ` are on the same commit, so pass ` --version ` ; without it the scripts can build RC-versioned packages . That command builds only ` postgresql-N-documentdb ` . A custom full-stack package set uses
547+ Without ` --version ` , the script takes the version from the checked-out release tag, or else from the control file; at ` v1.2-0 ` both give 1.2.0 . That command builds only ` postgresql-N-documentdb ` . A custom full-stack package set uses
499548three entry points:
500549
501550- ` packaging/build_packages.sh ` — PostgreSQL extension
502551- ` packaging/gateway/build_gateway_packages.sh ` — wire-protocol gateway
503552- ` packaging/build_extra_packages.sh ` — tools, common payload, ` documentdb-N ` , and meta package
504553
505- The [ v1.0 packaging guide] ( https://github.com/documentdb/documentdb/blob/v1.0 -0/packaging/README.md )
554+ The [ v1.2 packaging guide] ( https://github.com/documentdb/documentdb/blob/v1.2 -0/packaging/README.md )
506555documents their required arguments, version formats, prerequisites, and accepted targets.
507556PostgreSQL 15 remains extension-only for package-managed installs because the setup tools
508557require PostgreSQL 16 or newer.
@@ -517,9 +566,9 @@ they do not retain packages from older releases.
517566Examples:
518567
519568``` text
520- ubuntu24.04-documentdb_1.0 .0_all.deb
521- ubuntu24.04-postgresql-18-documentdb_1.0 -0_amd64.deb
522- rhel9-postgresql18-documentdb-1.0 .0-1.el9.x86_64.rpm
569+ ubuntu24.04-documentdb_1.2 .0_all.deb
570+ ubuntu24.04-postgresql-18-documentdb_1.2 -0_amd64.deb
571+ rhel9-postgresql18-documentdb-1.2 .0-1.el9.x86_64.rpm
523572```
524573
525574For a full stack, pass the five packages for the selected PostgreSQL major to one command:
@@ -531,10 +580,12 @@ dependencies are not included still fails. Alternatively, use the repository-bac
531580above.
532581
533582- GitHub Releases: https://github.com/documentdb/documentdb/releases
534- - Release metadata: https://documentdb.io/packages/release-info.json
583+ - Release metadata: https://documentdb.io/packages/release-info-latest.json (` latest ` ),
584+ https://documentdb.io/packages/release-info.json (` stable ` )
535585
536586## Notes
537587
538- - The current release publishes the ` ubuntu24 ` APT component and the ` rpm/rhel9 ` repository.
588+ - Each channel publishes the ` ubuntu24 ` APT component and an ` rhel9 ` RPM repository
589+ (` rpm/latest/rhel9 ` and ` rpm/rhel9 ` ).
539590- The RPM flow depends on EPEL plus PostgreSQL's upstream RPM repository because DocumentDB depends on PostgreSQL, ` pg_cron ` , ` pgvector ` , PostGIS, and ` rum ` for PostgreSQL 17.
540591- On Debian/Ubuntu, the distro-packaged ` cargo ` can be older than the current gateway workspace lockfile. ` rustup ` avoids that mismatch.
0 commit comments