title | linkTitle | type | weight |
---|---|---|---|
Configuring Apache Polaris (Incubating) for Production |
Deploying In Production |
docs |
600 |
The default polaris-server.yml
configuration is intended for development and testing. When deploying Polaris in production, there are several best practices to keep in mind.
Notable configuration used to secure a Polaris deployment are outlined below.
Warning
Ensure that the tokenBroker
setting reflects the token broker specified in authenticator
below.
- Configure OAuth with this setting. Remove the
TestInlineBearerTokenPolarisAuthenticator
option and uncomment theDefaultPolarisAuthenticator
authenticator option beneath it. - Then, configure the token broker. You can configure the token broker to use either asymmetric or symmetric keys.
Warning
Ensure that the tokenBroker
setting reflects the token broker specified in oauth2
above.
- Use these configurations to specify a service that can resolve a realm from bearer tokens.
- The service(s) used here must implement the relevant interfaces (i.e. CallContextResolver and RealmContextResolver).
Important
The default in-memory
implementation for metastoreManager
is meant for testing and not suitable for production usage. Instead, consider an implementation such as eclipse-link
which allows you to store metadata in a remote database.
A Metastore Manger should be configured with an implementation that durably persists Polaris entities. Use the configuration metaStoreManager
to configure a MetastoreManager implementation where Polaris entities will be persisted.
Be sure to secure your metastore backend since it will be storing credentials and catalog metadata.
To use EclipseLink for metastore management, specify the configuration metaStoreManager.conf-file
to point to an EclipseLink persistence.xml
file. This file, local to the Polaris service, contains details of the database used for metastore management and the connection settings. For more information, refer to the [metastore documentation]({{% ref "metastores" %}}).
Important
EclipseLink requires
- Building the JAR for the EclipseLink extension
- Setting the
eclipseLink
gradle property totrue
.
This can be achieved by setting eclipseLink=true
in the gradle.properties
file, or by passing the property explicitly while building all JARs, e.g.: ./gradlew -PeclipseLink=true clean assemble
Before using Polaris when using a metastore manager other than in-memory
, you must bootstrap the metastore manager. This is a manual operation that must be performed only once in order to prepare the metastore manager to integrate with Polaris. When the metastore manager is bootstrapped, any existing Polaris entities in the metastore manager may be purged.
To bootstrap Polaris, run:
java -jar /path/to/jar/polaris-service-all.jar bootstrap polaris-server.yml
Afterward, Polaris can be launched normally:
java -jar /path/to/jar/polaris-service-all.jar server polaris-server.yml
When deploying Polaris in production, consider adjusting the following configurations:
- By default Polaris catalogs are allowed to be located in local filesystem with the
FILE
storage type. This should be disabled for production systems. - Use this configuration to additionally disable any other storage types that will not be in use.