Repository navigation
docs: one install page per path, first requests page, container upgrades - #523
LeeroyHannigan wants to merge 18 commits into
Conversation
ceb6a63 to
eb8e221
Compare
Closes #492 and #495. The Install section had six pages that each cloned, built, initialized and started a server from source, with the platform packages, the TLS steps and the AWS CLI setup repeated on each, and a 1,461-line walkthrough that carried the manage command reference, runtime settings, external test suites and performance tuning beside the install steps. Two development notes on Contributing covered PostgreSQL and MongoDB setup a third time. Install section now: - docs/install-from-source.md: prerequisites, installer scripts, database install per platform (Ubuntu and Debian, Fedora and RHEL, Amazon Linux 2023 and 2, macOS with Homebrew; MongoDB as a replica set; Cassandra with PasswordAuthenticator), build per backend, init per backend, verify, serve, smoke test, upgrade after git pull, tear down, Linux and macOS differences, troubleshooting. Every command was run against a container of each backend with a binary built from this tree; the quoted output is from those runs. Two steps the old pages had wrong: MongoDB init reads the connection string from a seed extenddb.toml and needs --overwrite, and Cassandra init fails under the image's default AllowAllAuthenticator. - docs/first-requests.md: the walkthrough's operations (tables, items, query and scan, batches, transactions, streams, health) behind a table giving the endpoint, certificate and credentials for each of the three ways of getting a server. - docs/getting-started.md: an eleven-line pointer, excluded from the site, kept so links into the repository still land. Removed: manuals/04-quickstart-setup-guide.md, 08-install-linux.md, 09-install-macos.md, local-postgres-setup.md, local-mongodb-setup.md. Reference material moved from the walkthrough to the guide that owns it, text kept, corrected where it disagreed with the binary: - Administration guide: a command index with every manage subcommand (including cache, which no page covered), the assume-role session flags, --endpoint, the console access and audit details, and the runtime settings that were missing (sqlx_log_level, index_propagation_delay_ms, throttling_enabled). ttl_deletion_target_seconds is not a setting the binary accepts and is no longer listed as one. control_plane_delay_seconds seeds at 0.25, not 5; throttling is off by default, not on. - Deployment guide: the connection pool formula with both out-of-pool sessions, the worked example, contention characteristics. - Developer and test guide: external suite registration, runners and options; local databases for the test suite (connection details, pg_hba, config mapping, MongoDB differences). Upgrade manual (#495): a container section measured on the published images. Docker Compose from extenddb-postgres 0.1.10 (catalog 0.0.2) to 0.1.14 (catalog 0.0.3): the bootstrap service runs migrate with the server stopped, the table and item written before the upgrade read back unchanged, and a downgrade leaves the catalog alone while the older server refuses to start and restarts under the Compose policy, with the refusal in the server log. The one-off form, the preview form and its exit status on the published image, the MongoDB Compose file, and the development image (no bootstrap, no migrate, container replaced on the same volume) are covered. The migration writing section moves to a new Contributing page, manuals/14-writing-migrations.md. Also updated: README, AGENTS.md, the Docker Hub overview source, the installer scripts' closing line, the PDF manifest, the sample config comment, the storage backends table, the in-repo skill references, and the doc-consistency script's file list. Site: sidebar for the three install paths and First requests, migrations page under Contributing, strict build clean at 67 pages. The doc version guard passes. The first-requests page was then run in page order against a server built from this tree, which found that its transaction example conditioned on an item the Items section had deleted, so TransactWriteItems was cancelled when followed as written. Batches now precede Query and scan, and the query, batch get, condition check and transactional read use the items the batch writes. The shard iterator example carried a literal shard id the CLI rejects before sending; it is a placeholder now. boto3 is named before the first Python block. The development image and home page start the container with --name extenddb so the Getting started teardown finds it, and the development image page points at First requests. The Getting started pages use one spelling convention, the one the rest of the repository uses. Found and filed separately: extenddb destroy has no Cassandra credential inputs, so it cannot tear down a password-authenticated Cassandra deployment.
eb8e221 to
34bea38
Compare
c911384 to
560b5bf
Compare
… design index The README quick start ran aws dynamodb list-tables without credentials, and the AWS CLI stopped with "Unable to locate credentials". The quick start now reads the default account's ID with extenddb manage list-accounts, creates an IAM user, attaches a policy that allows DynamoDB, creates an access key, and exports the key before the request. init prints the admin password but not the account ID. A key this server did not issue gets UnrecognizedClientException, so configured AWS credentials do not help. /metrics requires admin HTTP Basic auth and answers 401 without it. The metrics commands in the README, the admin guide and the event ticketing demo now pass the admin credentials, and the deployment guide's monitoring checklist says the poller needs them. The demo's metrics and console URLs had **18443** as the port, which curl refuses, so the asterisks are removed. The storage design status line said PostgreSQL is the only supported backend. It now names the four backends in crates/: PostgreSQL, SQLite, MongoDB and Cassandra. #412 made the same correction to the README crate list and the architecture guide overview. The design index linked version 2.0 of the auth design, which 05-component-auth-v3.md supersedes. The index row now links version 3 and names version 2.0 as superseded. The Linux and macOS install manuals and the MongoDB setup page also run list-tables before any access key exists. #523 removes those pages. Refs #663
docs/getting-started.md: feat/docs-site updated the verify output, the serve banner, the version output, the console dashboard line and the auth cache rows of the walkthrough for the migration ledger. This branch replaces the page with a pointer list. The merged page is the pointer list; the verify output, serve banner and version output move to docs/install-from-source.md, and the console and auth cache changes are already in docs/manuals/05-admin-guide.md on feat/docs-site. docs/manuals/04-quickstart-setup-guide.md, 08-install-linux.md, 09-install-macos.md: feat/docs-site updated their verify and version output and the catalog troubleshooting row for the migration ledger. This branch removes the three pages. The merge keeps the removals and carries each change into docs/install-from-source.md: the version line reads catalog migration 5, the verify output has the catalog migrations check, the serve banner names migration 5, the upgrade section and the troubleshooting row describe serve exiting 3 on pending migrations and run migrate without --pg-user, as the general upgrade procedure does. docs/manuals/07-upgrade-manual.md: feat/docs-site rewrote the manual for the migration ledger, moved migration writing to CONTRIBUTING.md and added a sentence on SQLite and MongoDB after step 6. This branch pointed at a new page, docs/manuals/14-writing-migrations.md, and added the container upgrade section after step 6. The merged manual keeps the Writing a New Migration section of feat/docs-site, the SQLite and MongoDB sentence, and then the container section. In that section the link to The Catalog Version now points at The Catalog Status, the pointer to the exit status table names that section, and the sentence on what is not yet in a published tag names migrations 1 to 5. The 14-writing-migrations.md page described the SQL file and CATALOG_VERSION mechanism that feat/docs-site replaced, so it is dropped with its sidebar entry and its docs/build-docs.py entry. docs/manuals/11-deployment-guide.md: feat/docs-site added the Cassandra Connection Pool section; this branch added Contention Characteristics and Auth/authz Caching at the same place. The merged guide has all three, this branch's two sections first. docs/troubleshooting.md: feat/docs-site rewrote the fix for an uninitialized catalog; this branch pointed its link at Install from source. The merged fix has the new wording with the new link.
docs/getting-started.md: the base updated the walkthrough for catalog migration 6, the console's metrics dashboard and the end of a session on a password change or a user deletion. This branch replaces the page with a pointer list. The merge keeps the pointer list. The migration number is carried into docs/install-from-source.md, in the version output, the catalog note, the verify output and the serve banner. The console changes are in the administration guide, where the base made the same edits. The connection footprint paragraph and its example are carried into the deployment guide, which holds that text on this branch: the footprint adds the max_concurrent_jobs term, the defaults need 64 of PostgreSQL's 100 connections and the example opens 154. docs/manuals/04-quickstart-setup-guide.md, docs/manuals/08-install-linux.md, docs/manuals/09-install-macos.md: the base changed the verify and version output to migration 6. This branch removes the three pages in favour of docs/install-from-source.md, which now shows migration 6. The deletions stand. docs/manuals/05-admin-guide.md: the base extended the console sessions sentence with the end of a session on a password change or a user deletion. This branch added the paragraph on what admin and IAM users may do in the console and changed the sentence to "end a session". The merge keeps the paragraph and the base's sentence with this branch's wording. docs/manuals/11-deployment-guide.md: the base rewrote the backup and restore admission paragraph around the max_concurrent_jobs setting. This branch replaced the one-line pool sizing note with the connection footprint paragraphs moved from the walkthrough. The merge keeps this branch's paragraphs, updated as above, and the base's admission paragraph.
… design index (ExtendDB#668) * docs: correct the quick start, monitoring commands, backend count and design index The README quick start ran aws dynamodb list-tables without credentials, and the AWS CLI stopped with "Unable to locate credentials". The quick start now reads the default account's ID with extenddb manage list-accounts, creates an IAM user, attaches a policy that allows DynamoDB, creates an access key, and exports the key before the request. init prints the admin password but not the account ID. A key this server did not issue gets UnrecognizedClientException, so configured AWS credentials do not help. /metrics requires admin HTTP Basic auth and answers 401 without it. The metrics commands in the README, the admin guide and the event ticketing demo now pass the admin credentials, and the deployment guide's monitoring checklist says the poller needs them. The demo's metrics and console URLs had **18443** as the port, which curl refuses, so the asterisks are removed. The storage design status line said PostgreSQL is the only supported backend. It now names the four backends in crates/: PostgreSQL, SQLite, MongoDB and Cassandra. ExtendDB#412 made the same correction to the README crate list and the architecture guide overview. The design index linked version 2.0 of the auth design, which 05-component-auth-v3.md supersedes. The index row now links version 3 and names version 2.0 as superseded. The Linux and macOS install manuals and the MongoDB setup page also run list-tables before any access key exists. ExtendDB#523 removes those pages. Refs ExtendDB#663 * docs: drop runtime backend selection, read the admin password from the environment The storage design said that a factory selects the backend at run time from the configuration. Each binary carries one backend. The build chooses it, and main installs it with set_backend, as the paragraph above says. So that sentence is gone. The README quick start passed the admin password to each manage command with --password. It now reads the password once into EXTENDDB_PASSWORD, which manage uses when --password is absent. It unsets the variable after the last manage command, so the password stays out of the shell history and the process list. * docs: name the server check a backend without table snapshots needs ExtendDB#700 binds CreateBackup to the in-catalog format for a backend that cannot pin a table snapshot. The match is `in_catalog_create_only` in crates/server/src/backup_store.rs. A new backend of that kind needs an entry there. The storage design no longer says that a new backend needs no change to the server crate. Signed-off-by: Lee Hannigan <29015211+LeeroyHannigan@users.noreply.github.com> --------- Signed-off-by: Lee Hannigan <29015211+LeeroyHannigan@users.noreply.github.com>
AGENTS.md keeps the Cassandra databases line from this branch, which holds the base's PostgreSQL and MongoDB text. It also keeps the base's maintainer sentence, credential import step, backup manual row and storage guide path. docs/dev-image.md keeps the base's sentence that the example key pair is seeded by default, with this branch's spelling of "recognized". docs/getting-started.md keeps this branch's pointer list. The base's changes to the walkthrough move to the pages that hold that text on this branch. The administration guide gets the warm throughput section and the default of false for credential import. It gets the password note that uses EXTENDDB_PASSWORD and read -rs, and what each delete takes with it. It gets the console text for IAM users and the 8 hour session limit. It gets the audit commands for macOS and Docker Compose, and the note that credential import is not audit-logged. Install from source shows catalog migration 12 in the verify output and the serve banner. docs/manuals/04-quickstart-setup-guide.md, docs/manuals/08-install-linux.md and docs/manuals/09-install-macos.md stay deleted. Their base changes move to Install from source. These are catalog migration 12, the test-hooks line of the version output and the corrected defaults of --data-db and --catalog-db. They also include the refusal to overwrite extenddb.toml and the --extenddb-pass row with EXTENDDB_APP_PASSWORD. docs/local-mongodb-setup.md and docs/local-postgres-setup.md stay deleted. The base changed only their license footer, and the new footer goes to Install from source and First requests. docs/manuals/05-admin-guide.md keeps the base's credential import row, delete comments, session limit and audit targets. It also keeps this branch's runtime setting rows, list commands, assume-role example, IAM user console text and audit secrets sentence. docs/manuals/11-deployment-guide.md keeps the base's backup admission paragraph with its SQLite pool sentence. It keeps this branch's deletion of the one-line max_connections note.
The base added a step to the TLS key entry that links to the "Generating a self-signed certificate manually" section of docs/getting-started.md. On this branch that page is a pointer list outside the site. The openssl steps are in the Options section of docs/install-from-source.md, so the site build stops on the link. The link now points at that section.
docs/getting-started.md keeps the pointer page of this branch. Main (#1107) changed two sample outputs on that page to release 1.0.0. docs/manuals/04-quickstart-setup-guide.md stays deleted. Main changed its sample output to 1.0.0 too. This branch moved that walkthrough to docs/install-from-source.md, so the two sample outputs there, extenddb version and the serve banner, now say 1.0.0.
Release 1.0.0 shipped, and its published images carry the release and catalog migration 12 that a source build of this tree prints. The sentence under the extenddb version sample said that a source build has a newer release and a newer catalog than the 0.1.14 images. That is no longer true, so the commit removes the sentence and its version-literal-ok marker. The sample output stays.
The container upgrade section said that the newest published tag was 0.1.14 and that no published tag carried the migration ledger. Releases 0.1.15 and 1.0.0 have shipped since, and both carry the ledger with migrations 1 to 12. On 19 November 2026, docker run --rm <image> version on the four 1.0.0 images printed catalog migration 12 with the name of each backend. The section now says so, and keeps the catalog versions of 0.1.14 and earlier tags. The measured upgrade below it, from 0.1.10 to 0.1.14, stays as it was.
demohan
left a comment
There was a problem hiding this comment.
Every block on the first requests page, and both samples, run in page order on source builds of SQLite, PostgreSQL, MongoDB and Cassandra, on Compose latest and on the dev image, and agree with the service on ResourceNotFoundException while a table is CREATING, warm throughput of 12000 and 4000 and the stream label format. The image versions at line 482 match the 11 published images. A source upgrade from 0.1.14 to this head on PostgreSQL, and Compose upgrades from 0.1.14 to 1.0.0 and from 1.0.0 to this head on PostgreSQL and MongoDB, kept their data. The strict build passes, the crawl found 5,509 links with none broken, and 64 renders at 390 and 1280 px, light and dark, show no overflow.
I will approve once the items below are done. The upgrade items carry the most weight: two of them lose or risk data.
docs/manuals/07-upgrade-manual.md:632
The dev image does migrate at start. extenddb-dev:1.0.0 on a 0.1.14 volume copied the database aside, applied migrations 1 to 12, and the item written under 0.1.14 read back, twice; the image built from this head does the same. The page says it does not and recommends a fresh volume, which deletes data the image keeps. Lines 81 and 233 of the same page say a dev serve applies a Behind catalog, and the section's commands still target 0.1.14.
docs/manuals/07-upgrade-manual.md:499
The Compose files now run the preview first and exit unless it returns 3 (docker-compose.yml:70-81). Tags up to 0.1.14 exit 1 on a pending preview, so with this head's Compose files the 0.1.10 to 0.1.14 walkthrough, the one-off form, MongoDB 0.1.13 to 0.1.14 and the downgrade all end at extenddb-bootstrap exit 1 with the server never started (RestartCount 0). The section says the bootstrap runs migrate --yes, and the quoted output predates the migration ledger. The preview step came from main after the branch started; the text is new here.
docs/differences-from-dynamodb.md:209
These rows (and 247) still say throttling_enabled defaults to true, against this PR's own correction and serve.rs:729.
Removed content
These facts from the deleted pages are now on no page: the WARN line a server logs when it applies a setting change; the list of management changes that are not audit-logged; lingering PostgreSQL backends blocking destroy; the Homebrew pg_ctl data directory; how to stop MongoDB.
Optional notes
first-requests.md:222-310hard-codeshttps://127.0.0.1:18443and~/.extenddb/tls/cert.pem, so a dev image reader gets "Could not connect to the endpoint URL".first-requests.md:34: the profile has nodynamodbstreamsendpoint; adding adynamodb_streamsendpoint works.install-from-source.md:16: the installer scripts needpsqland build only the PostgreSQL binary, and the page sends every reader to step 3.install-from-source.md:546: a wrong secret answers InvalidSignatureException; only an unknown key ID answers UnrecognizedClientException, on the service and here.install-from-source.md:519: on SQLite,destroyleavesbackups/and a lock file, and a laterinitwarns that the store is owned by another catalog.05-admin-guide.md:406: MongoDB reads no GSI propagation delay (storage-mongodb/src/operations.rs:111).crates/bin/README.md:66still describes the old getting-started page, which is now a pointer.- Seven removed site routes have no redirect; this matters if #491 publishes before this lands.
|
|
||
| The server is ready. [First requests](first-requests.md) walks through tables, items, batches, transactions and streams from here, and the [usage guide](manuals/03-usage-guide.md) has the SDK configuration for Java, Rust, JavaScript and Python. | ||
|
|
||
| ## Upgrading after a `git pull` |
There was a problem hiding this comment.
After git pull the page goes to migrate --yes without stopping the server. Run as written, the breaking migrations applied under a running 0.1.14 server, which then accepted a write. Stopping the server first, as 07-upgrade-manual.md says for breaking migrations, would cover it.
There was a problem hiding this comment.
Fixed in 5d64ab9. The block now stops the server first, then builds, previews and applies, then starts. The text says that migrate --yes waits up to 60 seconds for a server of 0.1.15 or later and exits 6. It also says that the command does not detect an earlier release's server. Measured on Ubuntu 24.04 with a deployment the 0.1.14 binary made: migrate --yes exited 0 in 648 ms with the server stopped. With the 1.0.0 server running, it waited for --lock-timeout and exited 6.
| === extenddb init complete === | ||
| ``` | ||
|
|
||
| Save the admin password and the account ID. The password is shown once and cannot be retrieved; the account ID is the one you create IAM users in. |
There was a problem hiding this comment.
The smoke test uses the account ID that init printed, and only the PostgreSQL bootstrapper prints one (storage-postgres/src/bootstrapper.rs:275). SQLite, MongoDB and Cassandra print none. manage list-accounts or settings get default_account_id gives it. The same text is at line 456.
There was a problem hiding this comment.
Fixed in 5d64ab9. The Options text says that the PostgreSQL init prints the account ID. The smoke test reads it from manage list-accounts, with the output quoted from the 1.0.0 binary. On MongoDB the account init creates is not listed and refuses its keys, because its document has no account_id field (#643). The page says to create an account with manage create-account there (af9567b).
| **Container** | ||
|
|
||
| ```bash | ||
| docker run -d --name extenddb-mongo -p 127.0.0.1:27017:27017 mongo:7 --replSet rs0 |
There was a problem hiding this comment.
With the page's MongoDB container, ?replicaSet=rs0 fails: init exits 1 with ReplicaSetNoPrimary, because the member is named after the container id. directConnection=true works. The same string is at line 263.
There was a problem hiding this comment.
Fixed in 5d64ab9. The container step initiates the set with the member named localhost:27017, and the page says why a bare rs.initiate() fails from the host. Measured with mongo:7 --replSet rs0: with the named member, a host client with ?replicaSet=rs0 alone reached a writable primary twice. The seed file's ?replicaSet=rs0 string (line 263 in your review, 276 now) then works as written.
| On a system PostgreSQL (Ubuntu, Debian, Fedora, RHEL, Amazon Linux 2023) the administrator is `postgres`: | ||
|
|
||
| ```bash | ||
| ./target/release/extenddb init --pg-user postgres |
There was a problem hiding this comment.
init --pg-user postgres fails on a stock system PostgreSQL: Ubuntu 24.04 answers password authentication failed and then Peer authentication failed over the socket, and Fedora answers Ident authentication failed and then Peer. The step before it does not set a password or a pg_hba.conf method.
There was a problem hiding this comment.
Fixed in 5d64ab9. The PostgreSQL step gives the postgres role a password, passes it in EXTENDDB_PG_PASSWORD, and on Fedora, RHEL and Amazon Linux 2023 switches the host lines from ident to scram-sha-256. Measured on Ubuntu 24.04 (password authentication failed, then Peer authentication failed over the socket) and Amazon Linux 2023 (Ident authentication failed). With the fix, init exited 0 on both. The troubleshooting rows name the three refusals, and the tear-down block passes the same --pg-user to destroy, which exits 1 without it.
| **Amazon Linux 2** has no PostgreSQL 14 package of its own; install PostgreSQL 15 from the PGDG repository and run it as your own user with a data directory under your home: | ||
|
|
||
| ```bash | ||
| sudo rpm -ivh --nodeps \ |
There was a problem hiding this comment.
The Amazon Linux 2 PGDG install fails: yum exits 1 on missing libzstd and libicu.
There was a problem hiding this comment.
Fixed in 5d64ab9. The block installs libzstd and libicu from the Amazon Linux 2 repositories first. Measured in amazonlinux:2: the page's command exited 1 on Requires: libzstd >= 1.4.0. After the two packages, it installed PostgreSQL 15.20.
|
|
||
| # Assume role with optional session tags, session policy and duration | ||
| # (--duration-seconds defaults to 3600) | ||
| ./target/release/extenddb manage --user admin --password <pw> \ |
There was a problem hiding this comment.
The --session-tags example answers 403 Caller is not authorized to assume this role against the guide's own data-reader trust policy, twice, and the same command without tags succeeds. Session tags also need sts:TagSession (assume_role.rs:523-529).
There was a problem hiding this comment.
Fixed in c47b7e9. The data-reader trust policy allows sts:TagSession beside sts:AssumeRole. The section below the example, What a trust-policy Deny matches, already said that session tags to a role without sts:TagSession are denied. It now names the 403 the call answers.
|
|
||
| ## Upgrading after a `git pull` | ||
|
|
||
| When the new binary carries catalog migrations the deployment has not applied, `serve` refuses to start and `verify` exits 3, each naming the pending migrations. Rebuild and migrate: |
There was a problem hiding this comment.
A daemon serve on a pending catalog exits 1 and says to check syslog (serve_helpers.rs:41). Exit 3 with the pending list comes with --foreground. The same text is at line 542.
There was a problem hiding this comment.
Fixed in 5d64ab9. The upgrade text and the troubleshooting row say that a daemon serve exits 1 with Server failed to start: daemon process <pid> exited during startup and writes the refusal to syslog. serve --foreground exits 3 with the list. Measured on Ubuntu 24.04 with the 1.0.0 binary on a 0.1.14 catalog: daemon exit 1 with that line, foreground exit 3, verify exit 3.
| curl --cacert ~/.extenddb/tls/cert.pem https://127.0.0.1:18443/health | ||
| ``` | ||
|
|
||
| ```json |
There was a problem hiding this comment.
/health answers with a components object (crates/server/src/lib.rs:305), and the page shows {"status":"healthy"}. The same sample is at first-requests.md:313. The init output at lines 318 to 346 and the serve banner at 406 are also older than this binary's.
There was a problem hiding this comment.
Fixed in 5d64ab9 and 717613c. Both /health samples show {"components":{},"status":"healthy"}, and First requests gives the development image's body with its backup store component. The init output and the serve banner are the ones the 1.0.0 PostgreSQL binary printed on 25 November, with the migration lines and the backup store line.
Conflicts and their resolution: - docs/getting-started.md: this branch's pointer page stands. The fixes feat/docs-site made on the long page already stand where this branch moved its text. Those are the MongoDB seed file for init, the 0.25 s control plane delay, both delete-table lines and the README anchor. - docs/local-mongodb-setup.md and docs/local-postgres-setup.md: deleted here, modified there. The deletions stand. The fixes move to the developer and test guide. The PostgreSQL table names the catalog database and its connection string. The MongoDB section exports the access key, the region and the CA bundle before list-tables. - docs/start.md: the Next list and line 11 link the Markdown files, as feat/docs-site does. They point at install-from-source.md instead of the two install pages this branch deletes. First requests stays in the list, and the license footer stands. - docs/storage-backends.md: the table holds this branch's install page anchors as Markdown links, with the Cassandra image and container link from feat/docs-site. The init block holds the seed file form from feat/docs-site and drops this branch's one-line variant. The developer note links the developer and test guide as a Markdown file, and the license footer stands.
…e page's own containers I ran the PostgreSQL changes with the 1.0.0 PostgreSQL binary on Ubuntu 24.04 and Amazon Linux 2023 system PostgreSQL installs. The package change ran on Amazon Linux 2, and the replica set change on the page's MongoDB container. The macOS lines were not run. - Amazon Linux 2: install libzstd and libicu before the PGDG packages. With the repositories disabled, yum exits 1 on them. - A system PostgreSQL lets `postgres` in only over the socket as the `postgres` user. The page now gives the role a password and passes it in EXTENDDB_PG_PASSWORD. On Fedora, RHEL and Amazon Linux 2023 it also switches the host lines from ident to scram-sha-256. The troubleshooting rows name the three refusals and the fix. `destroy` connects as the same administrator, so the tear-down block passes `--pg-user` and the start-over note names it. - The MongoDB container names its replica set member localhost:27017, so `?replicaSet=rs0` finds the primary from the host. - The init output, the serve banner and the /health body are the ones the binary prints. The PostgreSQL init prints the account ID. The smoke test reads it from `manage list-accounts`, with the admin password in EXTENDDB_PASSWORD. - Upgrading after a pull stops the server first. A daemon serve on a pending catalog exits 1 and points at syslog. `serve --foreground` and `verify` exit 3. `migrate --yes` waits for a 0.1.15 or later server and exits 6. - The installer scripts need psql and build the PostgreSQL binary only. - A wrong secret answers InvalidSignatureException. Only an unknown key ID answers UnrecognizedClientException. - On SQLite, `destroy` leaves the lock file and the default backups/ directory, which the next server then reports as owned by another catalog. - The smoke test exports both region variables, so an AWS_REGION already set in the shell does not break the signature. - The tear down names how to stop the database. The Homebrew data directory is back for a start without brew services. The troubleshooting table has the lingering-backends row again.
… the measured health body The Python samples and the dynamodbstreams commands read the endpoint from AWS_ENDPOINT_URL_DYNAMODB, the variable the page sets at the top. A reader on the development image is then not sent to the TLS endpoint and certificate of a source build. boto3 reads AWS_CA_BUNDLE from the environment, so the samples no longer set it. The profile has a dynamodb_streams endpoint, so the dynamodbstreams commands work with `--profile extenddb` too. The setup block exports both region variables, so an AWS_REGION already set in the shell does not break the signature. The /health sample is the body the server writes, with the development image's backup store component named.
…se files The Compose sections described the 0.1.10 to 0.1.14 upgrade and a bootstrap service that ran `migrate --yes` outright. The files now run the preview first and apply only when it exits 3, which a tag up to 0.1.14 never does. I ran every command and every quoted line again with the repository's files, from extenddb-postgres 0.1.14 to 1.0.0. That covers the `up -d` output, the bootstrap log with its preview and its apply, the server banner and the ledgers. It also covers an `up` on a current catalog, the one-off form, and the downgrade. The downgrade now ends at the bootstrap's exit 1 with the server never started. The MongoDB paragraph records the 0.1.14 to 1.0.0 run. The migrations applied and the server started. But the account `init` wrote has no account_id field, so the server refuses its access keys until a repair sets the field. The paragraph gives the command. The development image does run migrations at start. A 1.0.0 container on a 0.1.14 volume copied the database aside, applied migrations 1 to 12 and served the table written before. That held with `docker run` and with docker-compose.dev.yml. The preview runs against the volume with no config file. The section said the opposite and sent the reader to a fresh volume. I also ran the rollback, the copied file put back under the older tag.
…udit list and the throttling default - Administration: the `data-reader` trust policy allows sts:TagSession, which the session tags example needs. Without it the call answers 403, because assume_role.rs checks the action for every call with tags. The GSI propagation delay applies on PostgreSQL, SQLite and Cassandra. MongoDB maintains its indexes in the write and reads no delay. The runtime settings section says that a server logs each log_level, sqlx_log_level and throttling_enabled change it applies. - Security model: the list of management changes that are not audit-logged is complete again, as the removed walkthrough had it. It names admin users, group membership, permissions boundaries, passwords, credential import, accounts and groups. - Differences: `throttling_enabled` defaults to false (serve.rs), as the administration guide already says. - Developer and test guide: the Amazon Linux 2 setup runs `initdb --auth=trust`, so the pg_hba.conf description matches it. - crates/bin/README.md points at the install page instead of the getting-started pointer.
… reader an account that works On MongoDB the account `init` writes has no account_id field, so `manage list-accounts` does not list it and the 1.0.0 server refuses access keys made under it (#643). Install from source says so where it tells the reader how to find the account ID, and shows `manage create-account`, which writes a document the server reads. Measured on a fresh 1.0.0 MongoDB Compose stack: a key under the account from `init` answered UnrecognizedClientException twice. A key under an account from create-account wrote and read a table. The upgrade manual's MongoDB paragraph links the same issue.
|
Thanks for the measurements. Every item is in, as six commits on top of
The merge of |
The base branch now holds the fix rounds of #491 and #523, and main up to 9e457a3. Six files conflicted. Each keeps the base's text, with this branch's punctuation and status edits on the same lines. - docs/design/02-high-level-design.md: main's paragraph on the crate dependencies (#1009) and the read replica proposal (#584), with this branch's semicolons and colons in place of the dashes. - docs/design/03-component-core.md: main's sentence on the crypto module (#1009), with a colon for the dash. - docs/design/04-component-storage.md: main's IdempotentMismatch line (#526) in the list this branch writes with colons, and main's read replica paragraph (#584), which has no dash. - docs/design/13-storage-mongodb.md: main's AT_TIMESTAMP iterator line (#468), and colons after the two engine names. - docs/manuals/03-usage-guide.md: the section stays a pointer to the Feature Status table. The Global Tables cell that #491 fixed moves to that table on the differences page. - docs/storage-backends.md: the base's Markdown links, Cassandra image and container link, with this branch's experimental label and Cassandra version. The MongoDB bullet is the base's. The Cassandra bullet keeps the facts of both sides. The one-instance sentence names three backends, as on this branch, with the base's link.
#530's branch at 469669e carries #523's af9567b, #491's 49b856f and main up to 9e457a3. No file conflicted. Main's commits in this merge add no field to a struct that the sample documents, so the sample needs no new line. #1173 lower-cases the Cassandra keyspace_prefix that a config file gives, and its default, extenddb, is already lower case. The generator check passes: docs/configuration.md matches the sample. On the merged tree, the 13 sample tests of extenddb-config and the sample test of each of the four backend crates pass. The SQLite test also passes with the memory feature.
#523's branch adds a link from docs/install-from-source.md to manuals/05-admin-guide.md#backupstore, and the merge of #530's branch carries it here. This branch replaced the admin guide's key tables, [backup.store] among them, with the Configuration page, so that anchor is gone. The strict site build then fails with a broken anchor on /install-from-source/. The link now opens the admin guide's backup store section, whose store identity paragraph explains the "owned by another catalog" report. The links of 14-backup-and-restore.md and 07-upgrade-manual.md open the same section. With the change the strict site build passes.
demohan
left a comment
There was a problem hiding this comment.
The items from the earlier review are done at af9567b, measured on the published images and on SQLite and PostgreSQL builds of this head.
- The upgrade pages run as written. The development image copies the database aside and migrates from 0.1.14 to 1.0.0, three times, with the preview exiting 3 before and 0 after and the rollback working; the Compose preview and apply match the page step by step on PostgreSQL, and on MongoDB the 0.1.14 key works once the page's mongosh step runs. With the server stopped
migrate --yesapplies, and beside a running head server it exits 6 after 60 s. A daemonserveon a pending catalog exits 1, foreground andverifyexit 3. - The install pages run as written:
?replicaSet=rs0reaches the primary where a barers.initiate()fails withENOTFOUND,init --pg-user postgresexits 0 on Ubuntu 24.04, Fedora and AL2023 where it failed with password or ident errors, and the Amazon Linux 2 PGDG line installs 15.20 where it failed on libzstd and libicu. Boththrottling_enabledrows sayfalseas the code does, the account ID steps work on SQLite, PostgreSQL and MongoDB, thests:TagSessionexample returns credentials, the signature rows match us-east-1 twice each, andinitand the banner match line for line.
| ``` | ||
|
|
||
| ```json | ||
| {"components":{},"status":"healthy"} |
There was a problem hiding this comment.
Optional. This and docs/first-requests.md:318 are PostgreSQL's body. A SQLite source build has the default backup store beside its database and answers {"components":{"backup_store":{"kind":"filesystem","status":"healthy"}},"status":"healthy"}, twice.
| | `password authentication failed for user "postgres"` or `Peer authentication failed for user "postgres"` | Give the `postgres` role a password and pass it in `EXTENDDB_PG_PASSWORD` ([Initialize on PostgreSQL](#initialize-on-postgresql)) | | ||
| | `Ident authentication failed for user "postgres"` | The same, and switch the `host` lines of `pg_hba.conf` from `ident` to `scram-sha-256` as [Initialize on PostgreSQL](#initialize-on-postgresql) shows | | ||
| | `Database '<name>' already exists` from `init` | `./target/release/extenddb destroy --config extenddb.toml --yes`, with the same `--pg-user` as `init`, then `init` again | | ||
| | `destroy` hangs after a hard kill of the server | Stop the leftover `postgres` backends the killed server held (`ps -eo pid,command \| grep postgres`), then run `destroy` again | |
There was a problem hiding this comment.
Optional. After a SIGKILL of the server its PostgreSQL sessions ended at once and destroy exited 0, twice. With the server still running, destroy exited 1 after 5 s with database "extenddb" is being accessed by other users, which may be the case this row means.
| --disablerepo="*" --enablerepo="pgdg15" \ | ||
| postgresql15-server postgresql15 | ||
| /usr/pgsql-15/bin/initdb -D ~/pgdata --auth=trust --no-locale --encoding=UTF8 | ||
| /usr/pgsql-15/bin/pg_ctl -D ~/pgdata -l ~/pgdata/server.log start |
There was a problem hiding this comment.
Optional. Run as your own user on Amazon Linux 2, this pg_ctl stops on a Permission denied lock file in /run/postgresql; -o "-k /tmp" lets it start.
Changes since the last review
Six commits on top of
1ba9827a9answer the review of 24 November. Nothing before them changed.9af912670mergesfeat/docs-sitewith its own review fixes. The Merging section below lists the five conflicts.5d64ab9e1, Install from source. It adds the Amazon Linux 2 dependencies, a password forpostgreson a system PostgreSQL, and the MongoDB replica set member name. It shows the measuredinitoutput, banner and/healthbody, and reads the account ID frommanage list-accounts. The upgrade block stops the server beforemigrate --yesand names the daemon exit status. The installer script note, the two signature error rows, whatdestroyleaves on SQLite, the start-over note, the tear-down section and the troubleshooting rows change too.717613cb7, First requests. The samples read the endpoint from the environment. The profile has adynamodb_streamsendpoint. The setup block exports both region variables. The/healthbody is the measured one.355cf1be2, upgrade manual. I measured the Compose sections again on this release's files, from 0.1.14 to 1.0.0. The development image section now says that the image migrates at start.c47b7e9a3, manuals. It addssts:TagSessionto the trust policy example and names the backends that read the GSI delay. It adds the setting change log line and the full audit list. It fixes thethrottling_enableddefault on the differences page and thepg_hba.confnote, and pointscrates/bin/README.mdat the install page.af9567b6d: Install from source and the upgrade manual name storage-cassandra, storage-mongodb:initseeds an admin row and a default account that the management API can't read #643 where the MongoDB account frominitfails, and the install page showsmanage create-accountfor a MongoDB reader.What
This PR is based on #491 (the documentation site) and retargets to
mainwhen that merges.The Install section had six pages that each cloned, built, initialized and started a server from source. Each page repeated the platform packages, the TLS steps and the AWS CLI setup. A 1,550-line walkthrough carried the manage command reference, runtime settings and tuning beside the install steps. One page per path and one page of first requests replace them:
docs/install-from-source.md: prerequisites, database install per platform, build per backend, init per backend, verify, serve, smoke test, upgrade aftergit pull, tear down, troubleshooting. One step the old pages had wrong: Cassandrainitfails under the image's defaultAllowAllAuthenticator. The MongoDB seed file thatinitneeds is on the old pages already, from docs: add the documentation site #491.docs/first-requests.md: tables, items, batches, query and scan, transactions, streams and health from the AWS CLI. A table at the top gives the endpoint, certificate and credentials for each of the three ways of getting a server.docs/getting-started.mdbecomes an eleven-line pointer, off the site, so links into the repository still land.manuals/04-quickstart-setup-guide.md,08-install-linux.md,09-install-macos.md,local-postgres-setup.md,local-mongodb-setup.md.Reference material from the walkthrough moved to the guide that owns it, fixed where it disagreed with the binary. The administration guide gains a command index with every
managesubcommand, the assume-role flags,--endpoint, console access and audit, and three runtime settings that were missing.ttl_deletion_target_secondsis not a setting the binary accepts and is no longer listed. Throttling is off by default, not on, on the administration guide and on the differences page. The deployment guide gains the connection pool formula and worked example. The developer guide gains the external suite runners and the local database setup for the test suite.Upgrade manual (#495): a container section measured on the published images with this branch's Compose files. The bootstrap service runs the preview first and applies only when the preview exits 3. Docker Compose from
extenddb-postgres0.1.14 (catalog 0.0.3) to 1.0.0 (catalog migration 12) kept the table and item written before the upgrade. A downgrade to 0.1.14 ends at the bootstrap's exit 1, with the server never started. The section also has the one-off form, the preview form, the MongoDB Compose file and the development image. The development image applies pending migrations at start after it copies the database file aside. The earlier text said it did not.Also updated: README, AGENTS.md, the Docker Hub overview source, the installer scripts and the PDF manifest. Also the sample config comment, the storage backends table, the in-repo skill references, the doc-consistency script's file list,
crates/bin/README.mdand the site sidebar.Why
Closes #492, closes #495.
Six pages repeated the same install steps and disagreed with each other and with the binary. A reader had no page for the first requests against a running server, and the upgrade manual had no container section.
Merging
This branch merged
feat/docs-siteat49b856f58, the head with #491's review fixes, in9af912670. Five files conflicted:docs/getting-started.md: the pointer page stands. The fixes docs: add the documentation site #491 made on the long page already stand where this branch moved the text.docs/local-mongodb-setup.mdanddocs/local-postgres-setup.md: removed here. docs: add the documentation site #491's fixes moved to the developer and test guide. The PostgreSQL table names the catalog database. The MongoDB section exports the access key, the region and the CA bundle beforelist-tables.docs/start.md: Markdown links, as docs: add the documentation site #491 has them. They point at Install from source instead of the two removed install pages.docs/storage-backends.md: this branch's install page anchors as Markdown links, with docs: add the documentation site #491's Cassandra image and container link and its MongoDB seed file block.#530 sits on this branch, and #537 sits on #530's branch. Each merges its base forward after this push.
git merge-treeof either head with this head conflicts indocs/storage-backends.md,docs/manuals/03-usage-guide.mdand four design pages that main changed:docs/design/02-high-level-design.md,03-component-core.md,04-component-storage.mdand13-storage-mongodb.md.The seven routes this PR removes from the site have no redirect. The site is not published yet: the repository's Pages build is the legacy one from
main, so the routes have not been live. Merge this PR intofeat/docs-sitebefore #491 merges, and the routes never publish.Testing done
The quoted output of the PostgreSQL steps on Install from source comes from runs on 25 November. So do the
/healthbodies on First requests and the output blocks of the upgrade manual's container section. The runs used the published 1.0.0 images, built fromc2e9a32b0. This head also carries the later main commits from the merge offeat/docs-site. None of them changes a file that prints the output these pages quote. The from-source steps ran theextenddbbinary copied out ofextenddb/extenddb-postgres:1.0.0.init --pg-user postgresfails as the review found:password authentication failedandPeer authentication failedon Ubuntu,Ident authentication failedon Amazon Linux 2023. With a password on the role andEXTENDDB_PG_PASSWORDset, and on Amazon Linux 2023 thepg_hba.confchange,initexits 0. Thenverify, the daemonserve,statusand/healthtwice ran in page order on both hosts. On Ubuntu 24.04,manage list-accounts,create-user,put-user-policyandcreate-access-keywithEXTENDDB_PASSWORDran too, thenstopanddestroy --pg-user postgres.destroywithout--pg-userexits 1 on a system PostgreSQL.git pull, on Ubuntu 24.04: a deployment made by the 0.1.14 binary, then the 1.0.0 binary. A daemonserveon the pending catalog exits 1 withServer failed to start: daemon process <pid> exited during startup.serve --foregroundandverifyexit 3.migrateexits 3.migrate --yesexits 0 in 648 ms with the server stopped. With the server running it waits for--lock-timeoutand exits 6.libzstdandlibicu. Afteryum install -y libzstd libicu, it installs PostgreSQL 15.20.rs.initiate()the member is the container ID and?replicaSet=rs0fails from the host. With the member namedlocalhost:27017,?replicaSet=rs0reaches a writable primary, twice.docker-compose.yml, Docker Compose v2.40.3, 0.1.14 to 1.0.0. The run covers the bootstrap log, the ledgers, and the table and item read back with the same key. It also covers anupon a current catalog, the one-off preview and apply, and a one-off run beside the running server. The downgrade to 0.1.14 ends withextenddb-bootstrapat exit 1, the serverCreated, restart count 0 and the port closed. The return to 1.0.0 serves the data again.UnrecognizedClientException, andmanage list-accountslists no account. The account documentinitwrites has noaccount_idfield. Setting the field makes the key work again. The page says so and gives the command. storage-cassandra, storage-mongodb:initseeds an admin row and a default account that the management API can't read #643 tracks the defect. A fresh 1.0.0 MongoDB stack has the same account document.docker runanddocker-compose.dev.yml, 0.1.14 to 1.0.0. The new container copied the database aside, applied migrations 1 to 12 and read back the item written before. The preview exits 3 before and 0 after. The rollback of the copied file under 0.1.14 served the table.InvalidSignatureException, an unknown key IDUnrecognizedClientException, twice each.npm ci,npm run typecheckand the strictnpm run buildpass at the merge commit and at the head, with no warning.Two pages this change grows were already over the 600-line mark, and they stay whole. Against
feat/docs-siteat49b856f58, the administration guide grows from 1,329 to 1,612 lines, and the upgrade manual from 1,302 to 1,501.Filed separately
extenddb destroyhas no Cassandra credential inputs, so it cannot tear down a password-authenticated Cassandra deployment.control_plane_delay_seconds, duplicate headings in the admin and architecture guides, the usage guide's literal shard id and a backlog entry. Three of them are on pages this PR touches, on lines it does not change. fix(engine): refuse DeleteTable on a table that is still CREATING #1329 and docs: fix stale defaults and duplicate headings outside install pages #1443 each change thecontrol_plane_delay_secondsrow.manage create-userwarning.tests/cli/test-doc-consistency.shruns in no CI job and fails at every head. Itsgrep -rq "$flag"reads a--flagpattern as an option, and two other checks read names that are not settings or subcommands.initseeds an admin row and a default account that the management API can't read #643: the MongoDB account document frominithas noaccount_idfield, solist-accountsis empty. The 1.0.0 credential lookup also reads the field, so the server refuses the account's access keys. The measurement is in the Testing done section.Checklist
cargo test --workspace)cargo fmt --check)cargo clippy -- -W clippy::pedantic)Storagetrait, auth model, on-diskformat, or public CLI surface, an RFC has been accepted or is linked
below. Otherwise, an ADR captures the decision (link below).
ADR / RFC: n/a
By submitting this pull request, I confirm that my contribution is made under
the terms of the Apache License 2.0 and I agree to the Developer Certificate of
Origin (DCO). See CONTRIBUTING.md for details.