From cc90ef167e249e6cdfa254d47511cc5bb52f1e76 Mon Sep 17 00:00:00 2001 From: Guanzhou Song Date: Mon, 24 Aug 2026 19:40:44 -0400 Subject: [PATCH] Keep the "try it" step on the site The final acceptance run reached a working, queryable database following the site alone and reported that nothing had to be guessed -- but it deducted a point because completing the documented ""insert and read a document"" step required leaving documentdb.io for mongodb.com. The page said `mongosh` is not shipped and linked the official instructions, which is honest but leaves a hole in the one flow the page exists to demonstrate. Give the commands for the two paved-road targets inline, and keep the link for everything else. Both were run in clean containers first: Ubuntu 24.04 and Rocky 9 each install mongosh 2.10.0. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 8df9084a-ccaf-432c-b015-2ccd8893a9d8 --- app/services/articleService.ts | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/app/services/articleService.ts b/app/services/articleService.ts index aa66c84..7a9e947 100644 --- a/app/services/articleService.ts +++ b/app/services/articleService.ts @@ -195,7 +195,22 @@ sudo documentdb-setup --admin-user admin It creates the PostgreSQL instance, installs the extensions, bootstraps the admin user, starts the gateway, and enables \`documentdb-local@.target\` so the stack survives reboot. It **prompts for the admin password**; for servers and CI pass \`--admin-password-file \` or \`--admin-password-stdin\` together with \`--yes\`. -\`mongosh\` is not shipped by these packages — install it from the [official instructions](https://www.mongodb.com/docs/mongodb-shell/install/), then: +\`mongosh\` is not shipped by these packages. Install it from MongoDB's own repository — these are the commands for the two paved-road targets, and the [official instructions](https://www.mongodb.com/docs/mongodb-shell/install/) cover every other platform: + +\`\`\`bash +# Ubuntu 24.04 +curl -fsSL https://www.mongodb.org/static/pgp/server-8.0.asc | sudo gpg --dearmor -o /usr/share/keyrings/mongodb-server-8.0.gpg +echo "deb [signed-by=/usr/share/keyrings/mongodb-server-8.0.gpg] https://repo.mongodb.org/apt/ubuntu noble/mongodb-org/8.0 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-8.0.list >/dev/null +sudo apt update && sudo apt install -y mongodb-mongosh + +# RHEL-compatible 9 +printf '%s\\n' '[mongodb-org-8.0]' 'name=MongoDB Repository' \\ + 'baseurl=https://repo.mongodb.org/yum/redhat/9/mongodb-org/8.0/x86_64/' \\ + 'gpgcheck=1' 'enabled=1' 'gpgkey=https://pgp.mongodb.com/server-8.0.asc' | sudo tee /etc/yum.repos.d/mongodb-org-8.0.repo >/dev/null +sudo dnf install -y mongodb-mongosh +\`\`\` + +Then connect: \`\`\`bash mongosh 'mongodb://admin:@127.0.0.1:10260/mydb?tls=true&tlsAllowInvalidCertificates=true' \\