- Manage Deployments >
- Edit a Deployment’s Configuration
Edit a Deployment’s Configuration¶
On this page
You can modify a deployment’s configuration and topology, including its MongoDB versions, storage engines, and numbers of hosts or shards. You can make modifications at all levels of a deployment’s topology from a top-level sharded cluster or replica set to lower levels, such as a replica set within a sharded cluster, or an individual process within a replica set. You can also modify standalone processes.
- User Interface
- Kubernetes
Considerations¶
Apply Changes to Cluster or Member¶
If you make configuration changes to an individual MongoDB process within a cluster, any future changes to the cluster no longer apply to the child process.
Example
If you turn off journaling for a replica set member and then later change the journal commit interval for the replica set, the change does not apply to the member.
MongoDB Version¶
To choose which versions of MongoDB are available to Ops Manager, see Add a Custom MongoDB Build.
- Check the following documents for any considerations or
compatibility issues before changing a deployment’s MongoDB version:
- The MongoDB Release Notes
- The documentation for your driver.
- MongoDB Compatibility Matrix
- Plan the version change during a predefined maintenance window.
- Change the MongoDB version on a staging environment before changing a production environment. Your staging environment should mirror your production environment. This can help avoid compatibility issues that may result in downtime for your production deployment.
- Follow the MongoDB release notes when performing manual upgrades of replica sets and sharded clusters.
Downgrading Limitations
You cannot downgrade a MongoDB deployment:
- From version 3.6 to any version before 3.4.0
- From version 3.4 to any version before 3.2.8
Backup Considerations for MongoDB Versions¶
To learn more about backup considerations, see Backup Considerations.
Storage Engine¶
Important
MongoDB removed support for the MMAPv1 storage engine in MongoDB 4.2. If you edit your deployment’s configuration to change your storage engine to WiredTiger Storage Engine, Ops Manager restarts the MongoDB processes.
If you run or upgrade to MongoDB 3.0 or later and modify the MongoDB storage engine, Ops Manager shuts down and restarts the MongoDB process. For a multi-member replica set, Ops Manager performs a rolling initial sync of each member.
Ops Manager creates backup directories during the migration from one storage engine to the other if the host has adequate disk space. If disk space is insufficient, no backups are taken. Ops Manager does not delete the backup directories once the migration is complete. You can keep or delete the previous backup directories. The backup directories are located in the mongod’s data directory.
Example
If the data directory was /data/process
, the backup would be
/data/process.bak.UNIQUENAME
. The UNIQUENAME
is a random
string that Ops Manager generates.
Before you can change the storage engine for a standalone instance or replica set, you must give the Automation write access to the MongoDB data directory’s parent directory. The agent creates a temporary backup of the data in the parent directory when updating the storage engine. Storage engine changes on standalone instances also require adequate disk space to perform a full /mongodump and /mongorestore. This disk space is then restored to the instance after the storage engine configuration change. Ops Manager does not delete the backup directories.
You cannot change the storage engine on a config server. For more information on storage engines and the available options, see Storage in the MongoDB manual.
Fixed Properties¶
You cannot modify the following settings after a deployment has been created:
database path
- The hostname,
bind_ip
orport
to which a MongoDB process is assigned
You can modify the following deployment settings:
log path
at the process level- advanced options
Deployment Topology¶
You can make modifications at all levels of a deployment’s topology, including child processes.
To modify the topology or processes, use this tutorial or one of the more specific tutorials:
Project-Level Modifications¶
Some modifications that affect a deployment occur at the project level. The following changes affect every MongoDB process in the project. For these changes, use the specified tutorials:
- To enable TLS for the deployment, see Enable TLS for a Deployment.
- To enable authentication for the deployment, see Enable Authentication for an Ops Manager Project.
- To add or modify MongoDB users and roles for the deployment, see Manage MongoDB Users.
Multiple Modifications¶
You can combine multiple modifications into one deployment.
Example
You could make all the following modifications before clicking the Review Changes button:
- Add the latest stable version of MongoDB to the Add a Custom Build.
- Enable TLS for the deployment’s MongoDB processes.
- Add a new sharded cluster running the latest stable version of MongoDB from above.
When you click Review Changes, the review displays all the changes on one screen for you to confirm before deploying.
Force Reconfigure¶
For Replica Sets and Sharded Clusters Only
The MongoDB Agent can force a replica set to accept a new configuration
when you set the Force Reconfigure Replication Setting to
Yes
. Only force a reconfiguration to recover a replica set from a
state in which a minority of its members are available.
Warning
Forcing a replica set reconfiguration might lead to a rollback of majority-committed writes.
Proceed with caution. Contact MongoDB Support if you have questions about the potential impacts of this operation.
See also
Reconfigure a Replica Set with Unavailable Members in the MongoDB Manual.
Removing a Shard¶
For Sharded Clusters Only
When you remove a shard, any unsharded databases in that shard are moved to a remaining shard using the movePrimary command.
All sharded collections remain online and available during the shard
removal process. However, read and write operations sent to unsharded
collections during the movePrimary
operation can result in
unexpected behavior, including failure of the migration or loss of
data.
We recommend moving the primary shard for any databases containing unsharded collections before removing the shard.
To learn more about removing shards, see Remove Shards from an Existing Sharded Cluster.
Removing Multiple Replica Set Members¶
You can remove or migrate multiple replica set members at once, but a majority of the voting members must remain. If you need to remove more voting members, remove them one at a time.
Example
Example 1
You have a four-node replica set. All nodes are voting members. You can remove only one node, which preserves the majority of three out of four voting nodes. You can remove another node from the remaining three-node replica set afterward. This preserves the majority of the remaining voting nodes.
Example
Example 2
You have a four-node replica set. Three nodes are voting members and one node is a non-voting member. You can remove one voting member and one non-voting member at the same time. This preserves the majority of two out of three voting nodes.
To learn more about voting, see Replica Set High Availability and Replica Set Elections.
All Changes are Clusterwide
Changes cannot be made to individual members of a replica set or sharded cluster, only to the whole set or cluster.
Kubernetes Operator Overrides Some Ops Manager Settings
Some settings that you configure using Kubernetes Operator cannot be overridden in the Ops Manager Application. If you change one of these settings, the Kubernetes Operator reverts the settings each time you apply the resource specification. Settings that the Kubernetes Operator does not manage are accepted.
The following list of settings are exclusive to Kubernetes. This list may change at a later date.
These settings can be found on the Automation Configuration page.
processes.args2_6.net.port
processes.args2_6.replication.replSetName
processes.args2_6.storage.dbPath
processes.args2_6.systemLog.path
processes.authSchemaVersion
processes.cluster
(mongos processes)processes.featureCompatibilityVersion
processes.hostname
processes.name
processes.version
replicaSets._id
replicaSets.members._id
replicaSets.members.host
replicaSets.members
replicaSets.version
sharding.clusterRole
(config server)sharding.configServerReplica
sharding.name
sharding.shards._id
sharding.shards.rs
Example
- Kubernetes Operator creates a replica set of 3 members.
- You changed
storage.wiredTiger.engineConfig.cacheSizeGB
to40
. - You then scale the replica set to 5 members.
- The
storage.wiredTiger.engineConfig.cacheSizeGB
on the new members should be40
.
Changes not available in Kubernetes
If a setting is not available for a MongoDB Kubernetes resource, then the change must be made in the Ops Manager Application.
Prerequisites¶
Your deployment must be running a version of the Automation that is compatible with Ops Manager. If your deployment is not running a compatible version of the agent, Ops Manager displays a banner prompting you to update your agents.
You must have enough disk space in the parent directory to perform backups before making storage engine changes on standalone processes. We recommend using replica sets instead of standalone processes, which apply changes in a rolling fashion.
Procedure¶
Select the type of deployment you want to edit:
- Standalone
- Replica Set
- Sharded Cluster
On the line listing the deployment item, click Modify.¶
Modify the Standalone Settings.¶
The Standalone Settings section contains the following configuration settings:
Setting | Description |
---|---|
Hostname | Hostname to which Ops Manager deploys the mongod . This hostname
can be a hostname, an FQDN, an IPv4 address, or an IPv6
address. You can only deploy to hosts under Ops Manager automation.
For complete documentation on adding servers to Ops Manager
automation, see Provision Servers for Automation. |
Port | Specify the IANA port
number for the The |
Version | Select the MongoDB server version of the Available Versions Ops Manager lists only the MongoDB versions that are available for your deployment. To disable this filtering, see
|
Auth Schema Version | Select the schema for storing the user for storing the user data for your deployment. If you are upgrading from a MongoDB version older than 3.0, MongoDB 3.0+ uses a different schema for user data than previous versions. For compatibility information, see the Security Changes in the MongoDB 3.0 release notes. |
Feature Compatibility Version | Select the Feature Compatibility Version of the deployment. Ops Manager displays this field if your deployment runs MongoDB version 3.4 or later. |
Log File | Specify the full path to the Example Specifying The |
Modify Advanced Configuration Options.¶
The Advanced Configuration Options section allows you to set MongoDB runtime options for each MongoDB process in your deployment.
To add an option:
- Click Add Option.
- Click Select a Startup Option and select the configuration option.
- Ops Manager displays a context-sensitive input for configuring an acceptable value for the selected option.
- Click Add to add the selected option and its corresponding value to the process.
For descriptions of the available Advanced Configuration Options, see Advanced Options for MongoDB Deployments.
Click Save.¶
Ops Manager redirects you to the Deployment page, where you must review your changes before deploying the updated configuration.
Click Review & Deploy to review your changes.¶
Click Confirm & Deploy to deploy your changes.¶
Otherwise, click Cancel and you can make additional changes.