-
Notifications
You must be signed in to change notification settings - Fork 19
docs: add MongoDB managed service documentation #393
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
Open
lexfrei
wants to merge
1
commit into
cozystack:main
Choose a base branch
from
lexfrei:docs/mongodb-application
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| --- | ||
| title: "Managed MongoDB Service" | ||
| linkTitle: "MongoDB" | ||
| weight: 65 | ||
| aliases: | ||
| - /docs/reference/applications/mongodb | ||
| --- | ||
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,126 @@ | ||
| --- | ||
| title: "Managed MongoDB Service" | ||
| linkTitle: "MongoDB" | ||
| weight: 65 | ||
| aliases: | ||
| - /docs/reference/applications/mongodb | ||
| --- | ||
|
|
||
| <!-- | ||
| Autogenerated content. Don't edit this file directly; edit sources instead. | ||
| metadata: https://github.com/cozystack/website/blob/main/content/en/docs/applications/_include/mongodb.md | ||
| source: https://github.com/cozystack/cozystack/blob/main/packages/apps/mongodb/README.md | ||
| --> | ||
|
|
||
|
|
||
| MongoDB is a popular document-oriented NoSQL database known for its flexibility and scalability. | ||
| The Managed MongoDB Service provides a self-healing replicated cluster managed by the Percona Operator for MongoDB. | ||
|
|
||
| ## Deployment Details | ||
|
|
||
| This managed service is controlled by the Percona Operator for MongoDB, ensuring efficient management and seamless operation. | ||
|
|
||
| - Docs: <https://docs.percona.com/percona-operator-for-mongodb/> | ||
| - Github: <https://github.com/percona/percona-server-mongodb-operator> | ||
|
|
||
| ## Deployment Modes | ||
|
|
||
| ### Replica Set Mode (default) | ||
|
|
||
| By default, MongoDB deploys as a replica set with the specified number of replicas. | ||
| This mode is suitable for most use cases requiring high availability. | ||
|
|
||
| ### Sharded Cluster Mode | ||
|
|
||
| Enable `sharding: true` for horizontal scaling across multiple shards. | ||
| Each shard is a replica set, and mongos routers handle query routing. | ||
|
|
||
| ## Notes | ||
|
|
||
| ### External Access | ||
|
|
||
| When `external: true` is enabled: | ||
| - **Replica Set mode**: Traffic is load-balanced across all replica set members. This works well for read operations, but write operations require connecting to the primary. MongoDB drivers handle primary discovery automatically using the replica set connection string. | ||
| - **Sharded mode**: Traffic is routed through mongos routers, which handle both reads and writes correctly. | ||
|
|
||
| ### Credentials | ||
|
|
||
| On first install, the credentials secret will be empty until the Percona operator initializes the cluster. | ||
| Run `helm upgrade` after MongoDB is ready to populate the credentials secret with the actual password. | ||
|
|
||
| ## Parameters | ||
|
|
||
| ### Common parameters | ||
|
|
||
| | Name | Description | Type | Value | | ||
| | ------------------ | --------------------------------------------------------------------------------------------------------------------------------- | ---------- | ------- | | ||
| | `replicas` | Number of MongoDB replicas in replica set. | `int` | `3` | | ||
| | `resources` | Explicit CPU and memory configuration for each MongoDB replica. When omitted, the preset defined in `resourcesPreset` is applied. | `object` | `{}` | | ||
| | `resources.cpu` | CPU available to each replica. | `quantity` | `""` | | ||
| | `resources.memory` | Memory (RAM) available to each replica. | `quantity` | `""` | | ||
| | `resourcesPreset` | Default sizing preset used when `resources` is omitted. | `string` | `small` | | ||
| | `size` | Persistent Volume Claim size available for application data. | `quantity` | `10Gi` | | ||
| | `storageClass` | StorageClass used to store the data. | `string` | `""` | | ||
| | `external` | Enable external access from outside the cluster. | `bool` | `false` | | ||
| | `version` | MongoDB major version to deploy. | `string` | `v8` | | ||
|
|
||
|
|
||
| ### Image configuration | ||
|
|
||
| | Name | Description | Type | Value | | ||
| | --------------- | -------------------------------------- | -------- | --------------------------------------- | | ||
| | `images` | Container images used by the operator. | `object` | `{}` | | ||
| | `images.pmm` | PMM client image for monitoring. | `string` | `percona/pmm-client:2.44.1` | | ||
| | `images.backup` | Percona Backup for MongoDB image. | `string` | `percona/percona-backup-mongodb:2.11.0` | | ||
|
|
||
|
|
||
| ### Sharding configuration | ||
|
|
||
| | Name | Description | Type | Value | | ||
| | ----------------------------------- | ------------------------------------------------------------------ | ---------- | ------- | | ||
| | `sharding` | Enable sharded cluster mode. When disabled, deploys a replica set. | `bool` | `false` | | ||
| | `shardingConfig` | Configuration for sharded cluster mode. | `object` | `{}` | | ||
| | `shardingConfig.configServers` | Number of config server replicas. | `int` | `3` | | ||
| | `shardingConfig.configServerSize` | PVC size for config servers. | `quantity` | `3Gi` | | ||
| | `shardingConfig.mongos` | Number of mongos router replicas. | `int` | `2` | | ||
| | `shardingConfig.shards` | List of shard configurations. | `[]object` | `[...]` | | ||
| | `shardingConfig.shards[i].name` | Shard name. | `string` | `""` | | ||
| | `shardingConfig.shards[i].replicas` | Number of replicas in this shard. | `int` | `0` | | ||
| | `shardingConfig.shards[i].size` | PVC size for this shard. | `quantity` | `""` | | ||
|
|
||
|
|
||
| ### Users configuration | ||
|
|
||
| | Name | Description | Type | Value | | ||
| | --------------------------- | --------------------------------------------------- | ------------------- | ----- | | ||
| | `users` | Custom MongoDB users configuration map. | `map[string]object` | `{}` | | ||
| | `users[name].password` | Password for the user (auto-generated if omitted). | `string` | `""` | | ||
| | `users[name].db` | Database to authenticate against. | `string` | `""` | | ||
| | `users[name].roles` | List of MongoDB roles with database scope. | `[]object` | `[]` | | ||
| | `users[name].roles[i].name` | Role name (e.g., readWrite, dbAdmin, clusterAdmin). | `string` | `""` | | ||
| | `users[name].roles[i].db` | Database the role applies to. | `string` | `""` | | ||
|
|
||
|
|
||
| ### Backup parameters | ||
|
|
||
| | Name | Description | Type | Value | | ||
| | ------------------------ | ------------------------------------------------------ | -------- | ----------------------------------- | | ||
| | `backup` | Backup configuration. | `object` | `{}` | | ||
| | `backup.enabled` | Enable regular backups. | `bool` | `false` | | ||
| | `backup.schedule` | Cron schedule for automated backups. | `string` | `0 2 * * *` | | ||
| | `backup.retentionPolicy` | Retention policy (e.g. "30d"). | `string` | `30d` | | ||
| | `backup.destinationPath` | Destination path for backups (e.g. s3://bucket/path/). | `string` | `s3://bucket/path/to/folder/` | | ||
| | `backup.endpointURL` | S3 endpoint URL for uploads. | `string` | `http://minio-gateway-service:9000` | | ||
| | `backup.s3AccessKey` | Access key for S3 authentication. | `string` | `""` | | ||
| | `backup.s3SecretKey` | Secret key for S3 authentication. | `string` | `""` | | ||
lexfrei marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
|
|
||
| ### Bootstrap (recovery) parameters | ||
|
|
||
| | Name | Description | Type | Value | | ||
| | ------------------------ | --------------------------------------------------------- | -------- | ------- | | ||
| | `bootstrap` | Bootstrap configuration. | `object` | `{}` | | ||
| | `bootstrap.enabled` | Whether to restore from a backup. | `bool` | `false` | | ||
| | `bootstrap.recoveryTime` | Timestamp for point-in-time recovery; empty means latest. | `string` | `""` | | ||
| | `bootstrap.backupName` | Name of backup to restore from. | `string` | `""` | | ||
|
|
||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.