You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
refactor: Switch Polaris to in-memory store for Minio example
This commit refactors the `getting-started/minio` example to configure the main Apache Polaris server to use an in-memory metastore. This simplifies the setup by removing the dependency on PostgreSQL for Polaris's own metadata, making it lighter for a getting-started experience and to isolate previous database connection issues.
Key changes include:
1. **Docker Compose (`docker-compose.yml`):**
* Removed the `postgres-minio` and `polaris-bootstrap-minio` services.
* Updated the `polaris` service:
* Removed `depends_on: postgres-minio`.
* Environment variables are now configured to set `POLARIS_PERSISTENCE_TYPE` to `in-memory`.
* Added `POLARIS_BOOTSTRAP_CREDENTIALS` to allow the in-memory Polaris instance to initialize with known `root` credentials.
* Removed PostgreSQL-specific `QUARKUS_DATASOURCE_*` variables from its environment block, relying on values from the `.env` file for other settings.
* Updated health check timings and port references.
* Adjusted `depends_on` for `polaris-setup-catalog-minio` and `polaris-setup-governance` to depend directly on the `polaris` service.
* Updated image tags for `minio/mc` and `minio/minio` to `latest`.
* Removed `version: '3.8'` as it's obsolete.
2. **Environment File (`.env`):**
* Set `POLARIS_PERSISTENCE_TYPE=in-memory`.
* Added `POLARIS_BOOTSTRAP_CREDENTIALS="POLARIS_MINIO_REALM,root,s3cr3t"`.
* Commented out/removed PostgreSQL specific `QUARKUS_DATASOURCE_*` variables (as they are not needed for the in-memory `polaris` service).
* Ensured other necessary variables (ports, client IDs/secrets for setup scripts) are present.
3. **Minio Setup Script (`minio-config/setup-minio.sh`):**
* Removed the `curl`-based health check loop, relying on Docker Compose's `depends_on: minio: condition: service_healthy`.
4. **Polaris Governance Script (`polaris-config/setup-polaris-governance.sh`):**
* Added conceptual API calls to create `spark_app_client` and `trino_app_client` principals and their credentials using the `root` token, as these are no longer created by a dedicated bootstrap service. (Note: These API calls are illustrative and depend on actual Polaris API structure).
These changes aim to provide a working "getting started" example using an in-memory Polaris server, which simplifies deployment and focuses on Polaris's interaction with Minio and its governance features for Spark and Trino. The removal of the PostgreSQL dependency for the Polaris server itself should resolve previous H2 fallback issues.
Sources and related content
0 commit comments