Hi Yufei,

The idea of shipping one binary artifact for all admin operations
(bootstrapping, starting the server) is appealing, indeed. We still need to
consider pros and cons.

By comparison to Spark, having one binary archive with multiple jars and
multiple scripted entry points (separate CLI commands for admin and server)
sounds good to me.

However, single jar operation from the local build does not look very
convenient... At least in the current state of the PR. For example:

java -jar runtime/server/build/quarkus-app/quarkus-run.jar --help

[...]
2025-12-31 09:45:25,305 INFO  [org.apa.pol.ser.con.ServiceProducers] [,]
[,,,] (main) Realm 'POLARIS' automatically bootstrapped, credentials were
not present in root credentials set provided via the environment variable
POLARIS_BOOTSTRAP_CREDENTIALS or Java system property
polaris.bootstrap.credentials, see separate message printed to stdout.
[...]
2025-12-31 09:45:25,320 WARN
 [org.apa.pol.ser.con.ProductionReadinessChecks] [,] [,,,] (main) - ⚠️ A
public key file wasn't provided and will be generated. Offending
configuration option:
'polaris.authentication.token-broker.rsa-key-pair.public-key-file'.
[...]
Usage: polaris-admin-tool.jar [-hV] [COMMAND]
Polaris administration & maintenance tool
  -h, --help      Show this help message and exit.
  -V, --version   Print version information and exit.
Commands:
  help       Display help information about the specified command.
  bootstrap  Bootstraps realms and root principal credentials.
  purge      Purge realms and all associated entities.

* Auto-bootstrap is attempted, which is probably not appropriate unless the
server startup was explicitly requested.

* Key management warnings are not relevant either.

* There are other log messages from the server runtime.

Basically, the Admin tool is a CLI application where logging should
probably not go to the console, in favour of the tool's dedicated STDOUT
messages. In the Server case, it's the other way around.

To summarize, I think reducing jar overlap between the server and the admin
tool would be nice to have. However, achieving that while maintaining
current UX appears to require additional work. TBH, I do not know how hard
it could be to combine a CLI tool and a REST API server in the same Quarkus
application while keeping natural UX for both cases. I guess it can only be
figured out by experimenting.

Cheers,
Dmitri.


On Tue, Dec 30, 2025 at 6:12 PM Yufei Gu <[email protected]> wrote:

> Hi folks,
>
> I would like to start a discussion on simplifying modules polaris-admin
> into polaris-server. The separate admin module has been a recurring source
> of friction. It effectively doubles license checks, Docker image
> publishing, and binary publishing(almost double the size of the binary
> distribution due to most libs being shared), and it also forces additional
> shared modules like common, test-common, and distribution(there is no need
> to have a separate distribution module if there is only one quarkus-run
> jar). Over time this has increased build, release, and maintenance
> complexity with minor benefits.
>
> One alternative worth considering is moving toward a single runtime module
> that supports both server and administrative CLI operations. Many mature
> OSS projects follow this model successfully. For example, Apache Spark
> ships a single set of core artifacts, and multiple CLI tools such as spark
> submit, spark shell, and spark sql are essentially thin wrappers that point
> to the same underlying jars. This keeps the distribution simple while still
> allowing clear separation between interactive, batch, and administrative
> workflows.
>
> Here are the initial discussions,
> https://github.com/apache/polaris/pull/3281#discussion_r2652055703. Thanks
> Dmitri for the detailed explanation and discussion.
>
> Here is a POC(https://github.com/apache/polaris/pull/3340), which verified
> that both model works in a single jar:
> Server Mode:
>   java -jar runtime/server/build/quarkus-app/quarkus-run.jar
>
> CLI Mode:
>   java -jar runtime/server/build/quarkus-app/quarkus-run.jar --help
>   java -jar runtime/server/build/quarkus-app/quarkus-run.jar bootstrap
> --help
>
> Thanks,
> Yufei
>

Reply via email to