Navigation

Deploy a Standalone MongoDB Instance

On this page

You can deploy a standalone MongoDB instance for Ops Manager to manage. Use standalone instances for testing and development. Do not use these deployments for production systems as they lack replication and high availability. For all production deployments use replica sets. To learn about replica sets, see Deploy a Replica Set.

Prerequisites

You must provision a server to which to deploy. For testing purposes, you can use your localhost.

Added in Ops Manager 4.0

You can use Kubernetes to deploy MongoDB instances with Ops Manager version 4.0 or later.

To deploy a standalone using a Kubernetes object, you need to meet the prerequisites for, and complete the procedures on, the Install Kubernetes Operator page.

Procedure

1

Click Deployment, then the Processes tab.

2

Choose New Standalone.

  1. Click the Add New dropdown menu.
  2. Select New Standalone.
3

Configure the standalone MongoDB instance.

In the Process Configuration section, complete the following fields.

Name Type the name for your standalone MongoDB deployment.
Version

Select the MongoDB version for your standalone MongoDB deployment.

Note

If the dropdown menu does not include the MongoDB version you want for your deployment, you must enable it in the Version Manager.

Auth Schema Version Select the schema for storing the user data for your deployment. 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 (Optional) Select the feature compatibility set. This field appears if your deployment MongoDB version is 3.4 or later.
Hostname Type the FQDN for the server hosting your MongoDB deployment.
Port Type the IANA port number for your MongoDB deployment. The default for MongoDB deployments is 27017.
Number of Cores Type the number of CPU cores to bind to this deployment. If you set this value to 0, no action is taken and CPU core management is delegated to the operating system.
DB Directory Path Type the system path to the database directory for this deployment. The default is /data/myProcess.
Log File Path Type the system path to the log file setting for this deployment. The default is /data/myProcess/mongodb.log.
4

Set any Advanced Configuration options for the standalone MongoDB instance.

In the Advanced Options section, add any additional runtime options you want to set for your MongoDB deployment.

To add an option:

  1. Click Add Option.
  2. Select a Startup Option.
  3. Set an acceptable value for that Startup Option.

For descriptions of Advanced Options, see Advanced Options for MongoDB Deployments.

4

Click Apply.

5

Click Review & Deploy to review your changes.

6

Click Confirm & Deploy to deploy your changes.

Otherwise, click Cancel and you can make additional changes.

1

Copy the following example standalone Kubernetes object.

---
apiVersion: mongodb.com/v1
kind: MongoDbStandalone
metadata:
  name: my-standalone
  namespace: mongodb
spec:
  version: 3.6.3
  persistent: false
  project: my-project
  credentials: my-credentials

You will need to change the highlighted settings to match your desired Standalone deployment.

2

Open your preferred text editor and paste the object specification into a new text file.

3

Configure the settings highlighted in the preceeding step as follows.

Key Type Description Example
metadata.name string

Label for this Kubernetes standalone object.

See also

Kubernetes documentation on names.

my-project
metadata.namespace string

Scope of object names. Kubernetes namespace where this MongoDB Kubernetes resource and other objects are created.

This namespace must be the same one used for the ConfigMap but may be different than the one you used for your Kubernetes Operator. Using two different namespaces allows you to delete your standalone or all of the resources in the namespace without affecting your Kubernetes Operator.

See also

Kubernetes documentation on namespaces.

mongodb
spec.project string

Label for the Kubernetes object.

Note

This value must match the value you provided for metadata.name in your Ops Manager project ConfigMap.

my-project
spec.credentials string Name of the Kubernetes secret you created as Ops Manager Application Programming Interface authentication credentials for the Kubernetes Operator to communicate with Ops Manager. my-credentials
spec.version string

Version of MongoDB that is installed on this standalone.

The format should be X.Y.Z for the Community edition and X.Y.Z-ent for the Enterprise edition.

To learn more about MongoDB versioning, see MongoDB Version Numbers in the MongoDB Manual.

3.6.5
4

Add any additional accepted settings for a Standalone deployment.

You can also add any of the following optional settings to the object specification file for a Standalone deployment:

5

Save this file with a .yaml file extension.

6

Start your Standalone deployment.

Invoke the following Kubernetes command to create your standalone:

kubectl apply -f <standalone-conf>.yaml