Skip to content

Commit 3be2084

Browse files
authored
Docs: Adapt main README.md to Quarkus (#836)
1 parent 21ed54b commit 3be2084

File tree

1 file changed

+63
-27
lines changed

1 file changed

+63
-27
lines changed

README.md

Lines changed: 63 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -39,15 +39,35 @@ for contribution guidelines.
3939
## Building and Running
4040

4141
Apache Polaris is organized into the following modules:
42+
4243
- `polaris-core` - The main Polaris entity definitions and core business logic
43-
- `polaris-server` - The Polaris REST API server
44-
- `polaris-eclipselink` - The Eclipselink implementation of the MetaStoreManager interface
44+
- API modules (implementing the Iceberg REST API and Polaris management API):
45+
- `polaris-api-management-model` - The Polaris management model
46+
- `polaris-api-management-service` - The Polaris management service
47+
- `polaris-api-iceberg-service` - The Iceberg REST service
48+
- Service modules:
49+
- `polaris-service-common` - The main components of the Polaris server
50+
- Quarkus runtime modules:
51+
- `polaris-quarkus-service` - The Quarkus-specific components of the Polaris server
52+
- `polaris-quarkus-defaults` - The Quarkus-specific configuration defaults
53+
- `polaris-quarkus-server` - The Polaris server runtime
54+
- `polaris-quarkus-admin-tool` - The Polaris admin & maintenance tool
55+
- Persistence modules:
56+
- `polaris-jpa-model` - The JPA entity definitions
57+
- `polaris-eclipselink` - The Eclipselink implementation of the MetaStoreManager interface
4558

4659
Apache Polaris is built using Gradle with Java 21+ and Docker 27+.
60+
4761
- `./gradlew build` - To build and run tests. Make sure Docker is running, as the integration tests depend on it.
4862
- `./gradlew assemble` - To skip tests.
4963
- `./gradlew test` - To run unit tests and integration tests.
50-
- `./gradlew runApp` - To run the Polaris server locally on localhost:8181.
64+
- `./gradlew polarisServerRun` - To run the Polaris server locally, with profile `prod`; the server
65+
is reachable at localhost:8181.
66+
- `java -Dquarkus.profile=test -jar quarkus/server/build/quarkus-app/quarkus-run.jar` - To run the
67+
Polaris server locally, with profile `test`. With this profile, Polaris uses the `test`
68+
Authenticator and `test` TokenBroker; this configuration is suitable for running regressions
69+
tests, or for connecting with Spark.
70+
5171
- `./regtests/run_spark_sql.sh` - To connect from Spark SQL. Here are some example commands to run in the Spark SQL shell:
5272
```sql
5373
create database db1;
@@ -57,36 +77,52 @@ insert into db1.table1 values (1, 'a');
5777
select * from db1.table1;
5878
```
5979

60-
Apache Polaris supports the following optional build options:
61-
- `-PeclipseLink=true` – Enables the EclipseLink extension.
62-
- `-PeclipseLinkDeps=[groupId]:[artifactId]:[version],...` – Specifies one or more additional dependencies for EclipseLink (e.g., JDBC drivers) separated by commas.
63-
6480
### More build and run options
65-
Running in Docker
66-
- `docker build -t localhost:5001/polaris:latest .` - To build the image.
67-
- Optional build options:
68-
- `docker build -t localhost:5001/polaris:latest --build-arg ECLIPSELINK=true .` - Enables the EclipseLink extension.
69-
- `docker build -t localhost:5001/polaris:latest --build-arg ECLIPSELINK=true --build-arg ECLIPSELINK_DEPS=[groupId]:[artifactId]:[version],... .` – Enables the EclipseLink extension with one or more additional dependencies for EclipseLink (e.g. JDBC drivers) separated by commas.
70-
- `docker run -p 8181:8181 localhost:5001/polaris:latest` - To run the image in standalone mode.
71-
72-
Running in Kubernetes
73-
- `./run.sh` - To run Polaris as a mini-deployment locally. This will create one pod that bind itself to ports `8181` and `8182`.
74-
- Optional run options:
75-
- `./run.sh -b "ECLIPSELINK=true"` - Enables the EclipseLink extension.
76-
- `./run.sh -b "ECLIPSELINK=true;ECLIPSELINK_DEPS=[groupId]:[artifactId]:[version],..."` – Enables the EclipseLink extension with one or more additional dependencies for EclipseLink (e.g. JDBC drivers) separated by commas.
77-
- `kubectl port-forward svc/polaris-service -n polaris 8181:8181 8182:8182` - To create secure connections between a local machine and a pod within the cluster for both service and metrics endpoints.
78-
- Currently supported metrics endpoints:
79-
- localhost:8182/metrics
80-
- localhost:8182/healthcheck
81+
82+
#### Running in Docker
83+
84+
- `./gradlew clean :polaris-quarkus-server:assemble -Dquarkus.container-image.build=true` - To
85+
build the image locally.
86+
- `docker run -p 8181:8181 -p 8182:8182 apache/polaris:latest` - To run the image.
87+
88+
#### Running in Kubernetes
89+
90+
- `./run.sh` - To run Polaris as a mini-deployment locally. This will create a Kind cluster,
91+
then deploy one pod and one service. The service is available on ports `8181` and `8182`.
92+
- `kubectl port-forward svc/polaris-service -n polaris 8181:8181 8182:8182` - To create secure
93+
connections between a local machine and a pod within the cluster for both service and
94+
health/metrics endpoints:
95+
- http://localhost:8182/q/metrics
96+
- http://localhost:8182/q/health
8197
- `kubectl get pods -n polaris` - To check the status of the pods.
8298
- `kubectl get deployment -n polaris` - To check the status of the deployment.
8399
- `kubectl describe deployment polaris-deployment -n polaris` - To troubleshoot if things aren't working as expected.
84100

85-
Running regression tests
86-
- `./regtests/run.sh` - To run regression tests in another terminal.
87-
- `docker compose up --build --exit-code-from regtest` - To run regression tests in a Docker environment.
101+
#### Running regression tests
102+
103+
Regression tests can be run in a local environment or in a Docker environment.
104+
105+
To run regression tests locally, you need to have a Polaris server running locally, with the
106+
`test` Authenticator enabled. You can do this by running Polaris as below:
107+
108+
```shell
109+
java -Dquarkus.profile=test -jar quarkus/server/build/quarkus-app/quarkus-run.jar
110+
```
111+
112+
Then, you can run the regression tests using the following command:
113+
114+
```shell
115+
env POLARIS_HOST=localhost ./regtests/run.sh
116+
```
117+
118+
To run regression tests in a Docker environment, you can use the following command:
119+
120+
```shell
121+
docker compose -f regtests/docker-compose.yml up --build --exit-code-from regtest
122+
```
123+
124+
#### Building docs
88125

89-
Building docs
90126
- Docs are generated using [Hugo](https://gohugo.io/) using the [Docsy](https://www.docsy.dev/docs/) theme.
91127
- To view the site locally, run
92128
```bash

0 commit comments

Comments
 (0)