Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document decision for MongoDB #111

Merged
merged 7 commits into from
Aug 9, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 39 additions & 0 deletions docs/modules/ROOT/pages/explanations/decisions/mongodb.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
= MongoDB

== Problem

We want to Provide MongoDB via AppCat.
But their licensing might be an issue.
Kidswiss marked this conversation as resolved.
Show resolved Hide resolved
This decision looks closely at the licensing and alternative products that can be used as drop-in replacements for MongoDB.

== Proposals

Proposal 1: Use MongoDB Community Edition::
MongoDB community edition is licensed under the https://github.com/mongodb/mongo/blob/master/LICENSE-Community.txt[SSPL].
The SSPL dictates that the source code for the tooling that provides the services, needs to be available to the public as well.
Kidswiss marked this conversation as resolved.
Show resolved Hide resolved
However, it would also need to be licensed under the SSPL.

Proposal 2: Use MongoDB Enterprise Operator::
MongoDB Enterprise Operator can be used to manage MongoDB instances on Kubernetes.
There have already been preliminary contact with MongoDB about the licensing for our use with AppCat.
Kidswiss marked this conversation as resolved.
Show resolved Hide resolved
However, these documents are at the time of writing internally.
Kidswiss marked this conversation as resolved.
Show resolved Hide resolved
There's a https://github.com/mongodb/helm-charts/tree/main/charts/enterprise-operator[helm chart] to deploy it.
It does need an https://www.mongodb.com/pricing[enterprise license] though.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How does this work? Is this enforced somehow? Do we need to distribute MongoDB license information to all customer clusters?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes the operator needs a license key. Not sure if the operator needs to have an outbound connection to a licensing server though.

Also, as far as I know the first business case we have for MongoDB is for Exoscale only, so it would only be deployed for Exoscale in the beginning.

Which will require a license key to be present on the K8s clusters.

Proposal 3: Use FerreDB with PostgreSQL::
https://www.ferretdb.com/[FerretDB] is a Drop-In replacement.
FerretDB is an adaptor for PostgreSQL which exposes a MongoDB compatible API.
It uses PostgreSQL as the backend to store data.
FerretDB itself is stateless and can be deployed as deployments alongside a PostgreSQL instance.
However, it does not implement everything that https://docs.ferretdb.io/diff/[MondoDB supports].
So a MongoDB AppCat service based on FerretDB might not be fully compatible with all workloads, which can result in bad UX for the customers.

== Decision
Use MongoDB Enterprise Operator.

This is the only viable option to run a MongoDB SaaS on K8s.
There's no helm based deployment for MongoDB Enterprise Edition.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

how would we need to implement it?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've added a bit more context.


== Rationale
Either licensing or compatibility prevent us from using any of the other mentioned solutions.
1 change: 1 addition & 0 deletions docs/modules/ROOT/partials/nav.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@
** xref:app-catalog:ROOT:explanations/decisions/user-management.adoc[]
** xref:app-catalog:ROOT:explanations/decisions/comp-function-error-handling.adoc[]
** xref:app-catalog:ROOT:explanations/decisions/release_process.adoc[]
** xref:app-catalog:ROOT:explanations/decisions/mongodb.adoc[]
** Archive
*** xref:app-catalog:ROOT:explanations/decisions/archive/converged-service-impl.adoc[Converged Service Provisioning Implementation]

Expand Down