cloud/databricks/README.md: what the platform guarantees (ephemeral container, Python 3.11 default → uv pin 3.12, app.yaml command/env with valueFrom, injected service-principal credentials, user authorization via X-Forwarded-Access-Token and opt-in scopes, Medium/Large compute, 15 s SIGTERM, 10 MB per source file, restricted egress policies), the permission split for a user who cannot create or manage catalogs (admin provisions catalog/schema/volume/warehouse/secrets once; attaching a uc_securable grants USE CATALOG/USE SCHEMA automatically; only CREATE TABLE/MODIFY/SELECT on the schema need a schema manager), the compose → Databricks mapping (store on a UC volume via fsspec, Delta tables through the SQL warehouse, no DuckDB file, no second port), the eight small code changes the port needs, optimisation notes (app as control plane, size per phase, cache statics, one connection per session, never pull a table into the app, sync only what the app imports), a runbook, phases 1–4 and the open questions to verify in the target workspace. Sources listed. cloud/databricks/bcda-app/: a bundle of its own (the main bundle creates schemas and a volume, which needs catalog rights) with the app resource, its warehouse/secret/volume resources and permissions, app.yaml, .python-version and a requirements stub. refs #1139
28 lines
1.0 KiB
YAML
28 lines
1.0 KiB
YAML
# Runtime manifest for the BCDA manager on Databricks Apps.
|
|
# The platform sets STREAMLIT_SERVER_PORT/ADDRESS/HEADLESS for Streamlit, so
|
|
# `python -m bcda.ui` needs no port argument; it passes the fhirworx theme
|
|
# file as --theme.base itself. Commands are not run through a shell.
|
|
command: ["python", "-m", "bcda.ui"]
|
|
env:
|
|
# Store root on the Unity Catalog volume (fsspec-databricks: dbfs:/Volumes/…).
|
|
# valueFrom: bcda_store would give the bare /Volumes path; see README §4.1.
|
|
- name: BCDA_STORE_URI
|
|
value: "dbfs:/Volumes/aco_dev/bcda/bcda_store"
|
|
- name: BCDA_CLIENT_ID
|
|
valueFrom: bcda_client_id
|
|
- name: BCDA_CLIENT_SECRET
|
|
valueFrom: bcda_client_secret
|
|
- name: BCDA_BASE_URL
|
|
value: "https://sandbox.bcda.cms.gov"
|
|
- name: DATABRICKS_WAREHOUSE_ID
|
|
valueFrom: sql_warehouse
|
|
- name: BCDA_TARGET_CATALOG
|
|
value: "aco_dev"
|
|
- name: BCDA_TARGET_SCHEMA
|
|
value: "bcda"
|
|
# No second port on Apps; metrics go to app telemetry (OTLP) when enabled.
|
|
- name: STACK_TELEMETRY
|
|
value: "false"
|
|
- name: BCDA_METRICS_PORT
|
|
value: "0"
|