feat: ability to use postgres as store for starter distro

The starter distribution now comes with all the required packages to
support persistent stores—like the agent store, metadata, and
inference—using PostgreSQL.  We’ve added a new run YAML file,
run-with-postgres-store.yaml, to make this setup easy. The file is
included in the container image, so users can simply override the
entrypoint to use the Postgres-specific config.  The documentation has
been updated with instructions on how to do that.

Closes: #2619
Signed-off-by: Sébastien Han <seb@redhat.com>
This commit is contained in:
Sébastien Han 2025-07-22 11:31:30 +02:00
parent cd8715d327
commit f8eede0f06
No known key found for this signature in database
11 changed files with 603 additions and 287 deletions

View file

@ -309,6 +309,7 @@ def get_distribution_template() -> DistributionTemplate:
available_safety_models = get_safety_models_for_providers(remote_inference_providers)
shields = get_shield_registry(available_safety_models, ids_conflict_in_models)
postgres_config = PostgresSqlStoreConfig.sample_run_config()
return DistributionTemplate(
name=name,
distro_type="self_hosted",
@ -331,6 +332,22 @@ def get_distribution_template() -> DistributionTemplate:
# TODO: add a way to enable/disable shields on the fly
default_shields=shields,
),
"run-with-postgres-store.yaml": RunConfigSettings(
provider_overrides={
"agents": [
Provider(
provider_id="meta-reference",
provider_type="inline::meta-reference",
config=dict(
persistence_store=postgres_config,
responses_store=postgres_config,
),
)
],
},
inference_store=postgres_config,
metadata_store=postgres_config,
),
},
run_config_env_vars={
"LLAMA_STACK_PORT": (