After you install MongoDB, you must create at least
one MongoDB
Ops Manager service instance in the
operands project. If you are a Cloud Pak for Data user, you can use the web client to create service instances. The web client guides you through
the process of creating service
instances.
- Who needs to complete this task?
- To create a service instance from the web client, you must have the Create service
instances permission in Cloud Pak for Data.
- When do you need to complete this task?
- Complete this task only if you want to create a service instance from the web client.
Alternative methods for creating a service instance
Before you begin
This task assumes that the following prerequisites are met:
Prerequisite |
Where to find more information |
MongoDB is installed. |
If this task is not complete, see Installing MongoDB. |
Procedure
To create a service instance:
-
From the Cloud Pak for Data services catalog, click
MongoDB Ops Manager.
-
From the MongoDB
Ops Manager page, click New
Instance.
-
On the New Instance page, enter a name for the Ops Manager instance, select the namespace where you want
to deploy the instance, and click Next.
-
On the Ops Manager configuration page,
specify the following options for Ops Manager on
the OpenShift® cluster:
- Number of replicas. A replica is a duplicate pod. Typically you use at
least two replicas so that if Ops Manager goes
down the interface is still available on the other replica.
- Cores per replica
- Memory (GiB) per replica
- Deploy on dedicated nodes. If you enable this option, you can dedicate
specific worker nodes to deploy Ops Manager. For
more information, see Setting up dedicated nodes for your MongoDB deployment.
- Remove pvcs and secrets upon deletion. If you enable this option, the
Persistent Volume Claims (PVCs) and secrets are automatically removed when you delete an instance.
Deletion is permanent.
-
Select from the storage classes that are available on the cluster, and then specify the size
and unit for the storage class. Click Next.
-
On the Metadata configuration page, specify the Number of
replicas, Cores per node, and Memory (Gib) per
node.
These options configure the back end database that Ops Manager uses to store metadata. The amounts that you
specify must match the number of databases that you intend to deploy.
-
Select from the storage classes that are available on the cluster, specify the size, and then
click Next.
-
On the credential page, specify a username and password for accessing Ops Manager.
Note:
Passwords must be at least 8 characters long and contain at least one letter, one digit, and one
special character.
-
Check over the review page and then click Create.
It might take up to five minutes for the instance to be ready. You can run the following command
to get the status:
oc describe cpdmongodbopsmanager <opsManagerInstanceName> -n ${PROJECT_CPD_INST_OPERANDS}
where the namespace is the OpenShift
operands project where Cloud Pak for Data is installed.
The status results look similar to the following example:
Status:
Conditions:
Last Transition Time: 2021-06-14T17:41:38Z
Message: Running reconciliation
Reason: Running
Status: True
Type: Running
Mongodb Status: InProgress
When the Mongodb Status
changes to Completed
, you are ready to
use the instance.
-
You can access Ops Manager by using the
following methods:
- Using a route:
- Look up the route to the Ops Manager
instance. The route is based on the name of your
instance.
oc get routes -n ${PROJECT_CPD_INST_OPERANDS}
- Using a link:
- Get the status of your Ops Manager instance
and look for the
opsmanagerURL
field that contains the link to your
instance.oc describe cpdmongodbopsmanager <opsManagerInstanceName> -n ${PROJECT_CPD_INST_OPERANDS}
What to do next
After you provision the MongoDB
Ops Manager, you can deploy one or more MongoDB database instances. For more information, see Creating a service instance for MongoDB from the web client.