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
NOTE: We might want to incorporate changes to address https://github.com/stackabletech/issues/issues/681, maybe as V2?
19
19
20
+
NOTE: Parts of this document might be out of date. The source of truth is in https://github.com/stackabletech/operator-rs/tree/main/crates/stackable-operator/src/database_connections[the finished implementation in operator-rs]
21
+
20
22
== Context and Problem Statement
21
23
22
24
Many products supported by the Stackable Data Platform require databases to store metadata. Currently there is no uniform, consistent way to define database connections. In addition, some Stackable operators define database credentials to be provided inline and in plain text in the cluster definitions.
@@ -179,16 +181,14 @@ NOTE: This proposal was rejected because for the same reason as the first propos
179
181
180
182
=== (accepted) Product supported and a generic DB specifications.
181
183
182
-
It seems that an unique, platform wide mechanism to describe database connections that also fulfills all acceptance criteria is not feasable. Database drivers and product configurations are too diverse and cannot be forced into a type safe specification.
184
+
It seems that an unique, platform wide mechanism to describe database connections that also fulfills all acceptance criteria is not feasible. Database drivers and product configurations are too diverse and cannot be forced into a type safe specification.
183
185
184
186
Thus the single, global connection manifest needs to split into two different categories, each covering a subset of the acceptance criteria:
185
187
186
188
1. A database specific mechanism. This allows to catch misconfigurations early, it promotes good documentation and uniformity inside the platform.
187
189
2. An operator specific mechanism. This is a wildcard that can be used to configure database connections that are not officially supported by the products but that can still be partially validated early.
188
190
189
-
The first mechanism requires the operator framwork to provide predefined structures and supporting functions for widely available database systems such as: PostgreSQL, MySQL, MariaDB, Oracle, SQLite, Derby, Redis and so on. This doesn't mean that all products can be configured with all DB implementations. The product definitions will only allow the subset that is officially supported by the products.
190
-
191
-
The second mechanism is operator/product specific and it contains mostly a pass-through list of relevant **product properties**. There is at least one exception, and that is the handling of user credentials which still need to be provisioned in a secure way (as long as the product supports it).
191
+
The first mechanism requires the operator framework to provide predefined structures and supporting functions for widely available database systems such as: PostgreSQL, MySQL, MariaDB, Oracle, SQLite, Derby, Redis and so on. This doesn't mean that all products can be configured with all DB implementations. The product definitions will only allow the subset that is officially supported by the products. For that, every product operator defines a complex enum of exactly the databases it supports.
192
192
193
193
==== Database specific manifests
194
194
@@ -198,189 +198,45 @@ Support for the following database systems is planned. Additional systems may be
MySQL supports multiple authentication mechanisms as described https://dev.mysql.com/doc/refman/8.0/en/socket-pluggable-authentication.html[here].
224
224
225
-
3.) Derby
226
-
227
-
Derby is used often as an embedded database for testing and prototyping ideas and implementations. It's not recommended for production use-cases.
228
-
229
-
[source,yaml]
230
-
derby:
231
-
location: /tmp/my-database/ # optional, defaults to /tmp/derby-<some-suffix>/derby.db
232
-
233
-
234
-
==== Product specific manifests
235
-
236
-
1.) Apache Druid
237
-
238
-
Apache Druid clusters can be configured any of the DB specific manifests from above. In addition, a DB generic configuration can pe specified:
239
-
240
-
The following example shows how to configure the metadata storage for a Druid cluster using either one of the supported back-ends or a generic system. In a production setting only the PostgreSQL or MySQL manifests should be used.
NOTE: Superset supports a very wide range of database systems as described https://superset.apache.org/user-docs/databases/#installing-database-drivers[here]. Not all of them are suitable for metadata storage.
259
-
260
-
Connections to Apache Hive, Apache Druid and Trino clusters deployed as part of the SDP platform can be automated by using discovery configuration maps. In this case, the only attribute to configure is the name of the discovery config map of the appropriate system.
261
-
262
-
In addition, a generic way to configure a database connection looks as follows:
227
+
We need Redis e.g. for celery brokers or result databases.
263
228
264
229
[source,yaml]
265
-
generic:
266
-
secret: superset-metadata-secret # mandatory. A secret naming with one entry called "key". Used to encrypt metadata and session cookies.
The template attribute allows to specify the full connection string as required by Superset (and the underlying SQLAlchemy framework). Variables in the template are specified within `{{` and `}}` markers and their contents is replaced with the corresponding field in the `templateSecret` object.
273
-
274
-
3.) Apache Hive
275
-
276
-
For production environments, we recommend PostgreSQL back-end and for development, Derby.
277
-
278
-
A generic connection can be configured as follows:
0 commit comments