mongocli ops-manager cluster create
The cluster create
command creates a cluster in the specified
MongoDB Ops Manager project. You can also create a cluster through
the Ops Manager
UI or
Automation Configuration API.
Syntax
mongocli ops-manager|om cluster create --file|-f <om-settings-file> [ --output|-o <output-format> ] [ --profile|-P <profile-name> ] [ --projectId <project-ID> ]
Note
Use -h
or --help
to view the command-line help for
this command.
Options
Option | Type | Description | Required? |
---|---|---|---|
--file , -f | string | Path to the file that contains the settings for
creating the cluster. To learn more about the
configuration properties to specify in the file, see
Cluster Configuration File. | yes |
--output , -o | string | Command output format. Valid values are:
If omitted, the command returns output in the default format. | no |
--profile , -P | string | Name of the profile where the public and private
keys for the project are saved. If omitted, uses the
default profile. To learn more about creating a
profile, see Configure the MongoDB CLI. | no |
--projectId | string | Unique identifier of the project. If omitted, uses the project ID in the profile or environment variable. | no |
Output
The command prints output similar to the following to the terminal if the command succeeds. If the command returns errors, see Troubleshooting for recommended solutions.
Changes are being applied, please check http://<hostname>:<port>/v2/<projectId>#deployment/topology for status
where:
<hostname>:<port>
is theOps Manager
base URLprojectId
is the unique identifier of the project
Examples
The following examples show several ways to run the command.
The following mongocli ops-manager cluster create
command
creates a cluster named myCluster
in the specified project using:
A file named
om-cluster.yaml
, which contains the settings in the sample file in.yaml
formatThe default profile
mongocli ops-manager cluster create --file om-cluster.yaml --projectId 5e2dec2131cd7c007880b05e
The following mongocli om cluster create
command creates a
cluster named myCluster
in the specified project using:
A file named
om-cluster.json
, which contains the settings in the sample file in.json
formatA profile named
OMprofile
mongocli om cluster create --file om-cluster.json --projectId 5e2dec2131cd7c007880b05e --profile OMprofile
The following mongocli om cluster create
command creates a
sharded cluster named myShardedCluster
in the specified project using:
A file named
om-sharded-cluster.json
, which contains the settings in the sharded cluster sample file in.json
formatA profile named
OMprofile
mongocli om cluster create -f om-sharded-cluster.json --projectId 5e2dec2131cd7c007880b05e --profile OMprofile
Output
The command prints the following to the terminal:
Changes are being applied, please check http://localhost:30700/v2/5e2dec2131cd7c007880b05e#deployment/topology for status