Skip to content

Ship scripts and sample-data in gateway packages (DEB + RPM) #563

Closed

Description

@guanzhousongmicrosoft

Parent Issue

Part of #561 (Make DocumentDB usable from package install)

Problem

The gateway package currently ships only the binary, config, and systemd unit. The documentdb-setup CLI (#562) and the Docker emulator entrypoint both depend on helper scripts (utils.sh, start_oss_server.sh, emulator_entrypoint.sh, etc.) and sample data files. Without these, neither the setup CLI nor the Docker image can function from package-installed paths.

Solution

Include the following in gateway packages at standardized paths:

Scripts (/usr/share/documentdb/scripts/)

  • documentdb-setup.sh -> installed as /usr/bin/documentdb-setup (755)
  • utils.sh
  • start_oss_server.sh
  • build_and_start_gateway.sh
  • emulator_entrypoint.sh
  • init_documentdb_data.sh
  • setup_psqlrc.sh

Sample Data (/usr/share/documentdb/sample-data/)

  • 01-users.js
  • 02-products.js
  • 03-orders.js
  • 04-analytics.js
  • README.md

Changes

DEB (pg_documentdb_gw/documentdb_gateway/Cargo.toml):

  • Add 13 asset entries under [package.metadata.deb]
  • Add depends = ["jq"] (required by documentdb-setup)
  • Update maintainer-scripts/postinst with quick-start hint

RPM (packaging/rpm/spec/documentdb_gateway.spec):

  • Add Requires: jq
  • Add %install commands to copy scripts + sample-data
  • Add %files entries for the new paths

Runtime Dependency

jq is required by documentdb-setup for safe JSON construction (SQL injection prevention via jq -n --arg). Added as a package dependency so dpkg -i / rpm -i will flag it.

Activity

  1. added
    enhancement
    gateway
    on Apr 7, 2026
  2. added this to the 0.111-0 milestone on Apr 7, 2026
  3. documentdb-triage-tool commented on Jun 2, 2026

    @documentdb-triage-tool

    👋 @guanzhousongmicrosoft — this issue has been assigned for 14 days with no activity. Is it still in progress? If you've made progress, please leave a quick update. Otherwise it'll be flagged for re-assignment at the next triage meeting.

  4. documentdb-triage-tool commented on Jun 16, 2026

    @documentdb-triage-tool

    👋 @guanzhousongmicrosoft — this issue has been assigned for 14 days with no activity. Is it still in progress? If you've made progress, please leave a quick update. Otherwise it'll be flagged for re-assignment at the next triage meeting.

  5. documentdb-triage-tool commented on Jul 1, 2026

    @documentdb-triage-tool

    👋 @guanzhousongmicrosoft — this issue has been assigned for 14 days with no activity. Is it still in progress? If you've made progress, please leave a quick update. Otherwise it'll be flagged for re-assignment at the next triage meeting.

  6. documentdb-triage-tool commented on Jul 16, 2026

    @documentdb-triage-tool

    👋 @guanzhousongmicrosoft — this issue has been assigned for 14 days with no activity. Is it still in progress? If you've made progress, please leave a quick update. Otherwise it'll be flagged for re-assignment at the next triage meeting.

  7. removed this from the 0.111-0 milestone on Jul 24, 2026
  8. added this to the 0.116-0 milestone on Jul 24, 2026
  9. documentdb-triage-tool commented on Aug 15, 2026

    @documentdb-triage-tool

    👋 @guanzhousongmicrosoft — this issue has been assigned for 14 days with no activity. Is it still in progress? If you've made progress, please leave a quick update. Otherwise it'll be flagged for re-assignment at the next triage meeting.

  10. documentdb-triage-tool commented on Aug 29, 2026

    @documentdb-triage-tool

    👋 @guanzhousongmicrosoft — this issue has been assigned for 14 days with no activity. Is it still in progress? If you've made progress, please leave a quick update. Otherwise it'll be flagged for re-assignment at the next triage meeting.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

enhancementgatewaymergedpackaging

Type

No type

Projects

Relationships

None yet

Development

No branches or pull requests

Issue actions