Skip to content

Make Postgres optional on substrate deployments#236

Open
wjjclaud wants to merge 2 commits into
mainfrom
optional-postgres
Open

Make Postgres optional on substrate deployments#236
wjjclaud wants to merge 2 commits into
mainfrom
optional-postgres

Conversation

@wjjclaud

@wjjclaud wjjclaud commented Jul 1, 2026

Copy link
Copy Markdown
Collaborator

Changes

Adds a --no-postgres flag to hack/install-ax.sh so a substrate deployment can
skip the Postgres StatefulSet and run with an ephemeral SQLite event log
instead. Fix #168.

  • manifests/ax-postgres.yaml (new): Moved out from ax-deployment.yaml. The Postgres Service + Secret +
    StatefulSet, applied only in the default (Postgres) mode.
  • hack/install-ax.sh:
    • New --no-postgres flag.
    • Default mode: applies ax-deployment.yaml + ax-postgres.yaml with
      AX_SERVER_REPLICAS=3, resolves/generates the Postgres password, and waits
      for the Postgres StatefulSet.
    • --no-postgres: applies only ax-deployment.yaml with
      AX_SERVER_REPLICAS=1, rewriting the ConfigMap's eventlog block to
      sqlite: filename: "/tmp/ax-eventlog/log.sqlite".

Tested

./hack/install-ax.sh --deploy-ax-server               # Postgres (default, unchanged)
./hack/install-ax.sh --deploy-ax-server --no-postgres # ephemeral SQLite

@wjjclaud wjjclaud requested a review from rakyll July 1, 2026 19:43
Comment thread hack/install-ax.sh Outdated
echo "Options:"
echo " --deploy-ax-server Build images and deploy AX server and components"
echo " --delete-ax-server Delete AX server and components, preserving the event-log database"
echo " --no-postgres With --deploy-ax-server: use an ephemeral SQLite event log instead of Postgres"

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If it's --no-postgres, it should look for credentials to connect to an existing Postgres deployment and should never rely on SQLite in Substrate deployments.

@wjjclaud wjjclaud Jul 1, 2026

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done. Updated the flag name as well.

@rakyll

rakyll commented Jul 1, 2026

Copy link
Copy Markdown
Member

What about making --no-progress the default. Progress deployment is only for people who are testing this on Substrate, no real production user will use the Postgres deployment we provide from the ax-install.sh and want to connect to their own existing deployment.

@wjjclaud

wjjclaud commented Jul 1, 2026

Copy link
Copy Markdown
Collaborator Author

What about making --no-progress the default. Progress deployment is only for people who are testing this on Substrate, no real production user will use the Postgres deployment we provide from the ax-install.sh and want to connect to their own existing deployment.

Make sense. I updated the PR with user-provided DSN by default, and --deploy-postgres for testing only.

@wjjclaud wjjclaud requested a review from rakyll July 1, 2026 21:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Make Postgres deployment optional

2 participants