This is one stop global knowledge base where you can learn about all the products, solutions and support features.
On this page
This tutorial manipulates the Cloud Manager Administration API’s automation configuration to deploy a sharded cluster that is owned by another user. The tutorial first creates a new project, then a new user as owner of the project, and then a sharded cluster owned by the new user. You can create a script to automate these procedures for use in routine operations.
To perform these steps, you must have sufficient access to Cloud Manager. A
user with the
Project
Owner
role has sufficient access.
The procedures install a cluster with two
shards
. Each
shard comprises a three-member
replica set
. The tutorial
installs one
mongos
and three
config servers
.
Each component of the cluster resides on its own server, requiring a
total of 10 hosts.
The tutorial installs the MongoDB Agent on each host.
Provision ten hosts to serve the components of the sharded cluster . For host requirements, see the Production Notes in the MongoDB manual.
Each host must provide its
MongoDB Agent
with full
networking access to the hostnames and ports of the MongoDB Agents on
all the other hosts. Each agent runs the command
hostname
-f
to self-identify its hostname and port and report them to Cloud Manager.
Tip
To ensure agents can reach each other, provision the hosts using Automation . This installs the MongoDB Agents with correct network access. Use this tutorial to reinstall the Automations on those machines.
As you work with the API , you can view examples on the GitHub example page.
The API resources use one or more of these variables. Replace these variables with your desired values before calling these API resources.
Name | Type | Description |
---|---|---|
PUBLIC-KEY
|
string | Your public API Key for your API credentials. |
PRIVATE-KEY
|
string | Your private API Key for your API credentials. |
cloud.mongodb.com
|
string | URL of your Cloud Manager instance. |
GROUP-ID
|
string | Unique identifier of your project from your Project Settings . |
Use the Cloud Manager Administration API to send a projects document to create the new project.
curl --user "{PUBLIC-KEY}:{PRIVATE-KEY}" --digest \
--header "Content-Type: application/json" \
--request POST "https://cloud.mongodb.com/api/public/v1.0/groups?pretty=true" \
--data '
{
"name": "{GROUP-NAME}"
}'
The
API
returns a document that includes the project’s
agentApiKey
and
id
.
agentApiKey
and
id
in the returned document.¶
Record these values for use in this procedure and in other procedures in this tutorial.
Use the
/users
endpoint to add a user to the new project.
The body of the request should contain a users JSON document with the user’s information.
Set the user’s
roles.roleName
to
GROUP_OWNER
and the user’s
roles.groupId
set to the new group’s‘
id
.
curl --user "{PUBLIC-KEY}:{PRIVATE-KEY}" --digest \
--header 'Accept: application/json' \
--header "Content-Type: application/json" \
--request POST "https://cloud.mongodb.com/api/public/v1.0/users?pretty=true" \
--data '
{
"username": "<new_user@example.com>",
"emailAddress": "<new_user@example.com>",
"firstName": "<First>",
"lastName": "<Last>",
"password": "<password>",
"roles": [{
"groupId": "{PROJECT-ID}",
"roleName": "GROUP_OWNER"
}]
}'
To learn how to install the MongoDB Agent, follow the procedure for the appropriate platform .
When the MongoDB Agent first runs, it downloads the
mms-cluster-config-backup.json
file, which describes the desired
state of the
automation configuration
.
On one of the hosts, navigate to
/var/lib/mongodb-mms-automation/
and open
mms-cluster-config-backup.json
. Confirm that the file’s
version
field is set to
1
. Cloud Manager automatically increments
this field as changes occur.
To add or update a deployment, retrieve the configuration , make changes as needed, and send the updated configuration though the API to Cloud Manager.
The following procedure deploys an updated automation configuration through the API :
Use the automationConfig resource to retrieve the configuration. Issue the following command, replacing the placeholders with the Variables for Cluster Creation API Resources.
curl --user "{PUBLIC-KEY}:{PRIVATE-KEY}" --digest \
--request GET "https://cloud.mongodb.com/api/public/v1.0/groups/{PROJECT-ID}/automationConfig?pretty=true" \
--output currentAutomationConfig.json
Validate the downloaded Automation Configuration file.
Compare the
version
field of the
currentAutomationConfig.json
with that of the Automation
Configuration backup file,
mms-cluster-config-backup.json
. The
version
value is the last element in both
JSON
documents.
You can find this file on any host running the MongoDB Agent at:
/var/lib/mongodb-mms-automation/mms-cluster-config-backup.json
%SystemDrive%\MMSAutomation\versions\mms-cluster-config-backup.json
If the
version
values match, you are working with the current
version of the Automation Configuration file.
Create a document with the following fields. As you build the configuration document, refer the description of an automation configuration for detailed explanations of the settings. For examples, see the MongoDB Labs page.
1 2 3 4 5 6 7 8 9 10 11 |
{
"options": {
"downloadBase": "/var/lib/mongodb-mms-automation",
},
"mongoDbVersions": [],
"monitoringVersions": [],
"backupVersions": [],
"processes": [],
"replicaSets": [],
"sharding": []
}
|
In the
monitoringVersions.hostname
field, enter the hostname of
the server where Cloud Manager should install the Monitoring. Use the fully
qualified domain name that running
hostname
-f
on the server
returns, as in the following:
1 2 3 4 5 6 7 8 9 10 |
"monitoringVersions": [
{
"hostname": "<server_x.example.com>",
"logPath": "/var/log/mongodb-mms-automation/monitoring-agent.log",
"logRotate": {
"sizeThresholdMB": 1000,
"timeThresholdHrs": 24
}
}
]
|
This configuration example also includes the
logPath
field, which
specifies the log location, and
logRotate
, which specifies the
log thresholds.
This sharded cluster has 10 MongoDB instances, as described in the
Deploy a Cluster through the API
, each running on its own
server. Thus, the automation configuration’s
processes
array will
have 10 documents, one for each MongoDB instance.
The following example adds the first document to the
processes
array. Replace
<process_name_1>
with any name you choose, and
replace
<server1.example.com>
with the
FQDN
of the host.
Add 9 documents: one for each MongoDB instance in your sharded cluster.
Specify the
args2_6
syntax for the
processes.<args>
field.
See
MongoDB Settings that Automation Supports
for more
information.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 |
"processes": [
{
"version": "4.0.6",
"name": "<process_name_1>",
"hostname": "<server1.example.com>",
"logRotate": {
"sizeThresholdMB": 1000,
"timeThresholdHrs": 24
},
"authSchemaVersion": 5,
"featureCompatibilityVersion": "4.0",
"processType": "mongod",
"args2_6": {
"net": {
"port": 27017
},
"storage": {
"dbPath": "/data/"
},
"systemLog": {
"path": "/data/mongodb.log",
"destination": "file"
},
"replication": {
"replSetName": "rs1"
}
}
},
]
|
Add two replica set documents to the
replicaSets
array. Add
three members to each document.
Example
This section adds one replica set member to the first replica set document:
Important
You must include
"protocolVersion":
1
in the root document
for each replica set.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
"replicaSets": [
{
"_id": "rs1",
"members": [
{
"_id": 0,
"host": "<process_name_1>",
"priority": 1,
"votes": 1,
"slaveDelay": 0,
"hidden": false,
"arbiterOnly": false
}
],
"protocolVersion": 1
}
]
|
In the
sharding
array, add the replica sets to the shards, and
add the config server replica set name, as in the following:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
"sharding": [
{
"shards": [
{
"tags": [],
"_id": "shard1",
"rs": "rs1"
},
{
"tags": [],
"_id": "shard2",
"rs": "rs2"
}
],
"name": "sharded_cluster_via_api",
"configServerReplica": "rs-config",
"collections": []
}
]
|
Use the automationConfig resource to send the updated automation configuration.
Issue the following command with path to the updated configuration document and replace the placeholders with the Variables for Cluster Creation API Resources.
curl --user "{PUBLIC-KEY}:{PRIVATE-KEY}" --digest \
--header "Content-Type: application/json"
--request PUT "https://cloud.mongodb.com/api/public/v1.0/groups/{PROJECT-ID}/automationConfig?pretty=true" \
--data @currentAutomationConfig.json
Upon successful update of the configuration, the API returns the HTTP
200
OK
status code to indicate the request has succeeded.
Retrieve the automation configuration from Cloud Manager and confirm it contains the changes. To retrieve the configuration, issue the following command, replacing the placeholders with the Variables for Cluster Creation API Resources.
curl --user "{PUBLIC-KEY}:{PRIVATE-KEY}" --digest \
--request GET "https://cloud.mongodb.com/api/public/v1.0/groups/{PROJECT-ID}/automationConfig?pretty=true"
Use the automationStatus resource to verify the configuration update is fully deployed. Issue the following command, replacing the value placeholders given in Variables for Cluster Creation API Resources:
curl --user "{PUBLIC-KEY}:{PRIVATE-KEY}" --digest \
--request GET "https://cloud.mongodb.com/api/public/v1.0/groups/{PROJECT-ID}/automationStatus?pretty=true"
The
curl
command returns a
JSON
object containing the
processes
array and the
goalVersion
key and value. The
processes
array contains a document for each server that hosts a
MongoDB instance. The new configuration is successfully deployed when
all
lastGoalVersionAchieved
fields in the
processes
array
equal the value specified for
goalVersion
.
Example
In this response,
processes[2].lastGoalVersionAchieved
is
behind
goalVersion
. This indicates that the MongoDB instance
at
server3.example.com
is running one version behind the
goalVersion
. Wait several seconds and issue the
curl
command again.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
{
"goalVersion": 2,
"processes": [{
"hostname": "server1.example.com",
"lastGoalVersionAchieved": 2,
"name": "ReplSet_0",
"plan": []
}, {
"hostname": "server2.example.com",
"lastGoalVersionAchieved": 2,
"name": "ReplSet_1",
"plan": []
}, {
"hostname": "server3.example.com",
"lastGoalVersionAchieved": 1,
"name": "ReplSet_2",
"plan":[]
}]
}
|
To view the new configuration in the Cloud Manager console, click Deployment .
To make an additional version of MongoDB available in the cluster, see Update the MongoDB Version of a Deployment .
On this page
At time
T
, the last write operation applied on the specified
secondary
of replica set
ABC
was behind the most recent
operation applied on the
primary
.
You can configure alert conditions in the project-level alert settings page to trigger alerts.
To learn more about the alert condition, see Replication Lag is .
To learn more, see Troubleshoot Replica Sets in the MongoDB manual.
View the following charts to monitor your progress:
Network
Monitor network metrics to track network performance.
Replication Headroom
Monitor replication headroom to determine whether the secondary might fall off the oplog.
Replication Lag
Monitor replication lag to determine whether the secondary might fall off the oplog.
To learn more, see View Deployment Metrics .
On this page
If your MongoDB deployment enforces access control, the MongoDB Agent must authenticate to MongoDB as a user with the proper access. If you use Automation , Cloud Manager takes care of this for you.
MongoDB Enterprise supports simple and SASL binding to
LDAP
servers
via
saslauthd
and operating system libraries:
saslauthd
or via operating system libraries.
MongoDB Agent support authenticating to MongoDB instances using LDAP .
Note
With Automation, Cloud Manager manages MongoDB Agent authentication for you. To learn more about authentication, see Enable LDAP Authentication for your Cloud Manager Project .
The MongoDB Agent interacts with the MongoDB databases in your deployment as a MongoDB user would. As a result, you must configure your MongoDB deployment and the MongoDB Agent to support authentication.
You can specify the deployment’s authentication mechanisms when adding the deployment, or you can edit the settings for an existing deployment. At minimum, the deployment must enable the authentication mechanism you want the MongoDB Agent to use. The MongoDB Agent can use any supported authentication mechanism .
On the MongoDB Agent hosts, you must set the
TLS_REQCERT
environment variable to
demand
.
Example
In a Red Hat Enterprise Linux host, open the
/etc/openldap/ldap.conf
file and add the following setting and
value:
TLS_REQCERT demand
You can use your application to set this environment variable.
If Automation does not manage your deployment, you must configure LDAP authentication separately for each function.
To configure LDAP authentication , add a host or edit an existing host’s configuration.
To automate MongoDB instances that use
LDAP
authentication, add
a MongoDB user that possesses the required roles and privileges
to the
$external
database in MongoDB. The
$external
database allows
mongod
to consult an external source, such as
an
LDAP
server, to authenticate.
Use the following commands to create the users from
mongosh
:
1 2 3 4 5 6 7 8 9 10 11 12 13 |
db.getSiblingDB("$external").createUser(
{
user : "<username>",
roles : [
{ role : "clusterAdmin", db : "admin" },
{ role : "readWriteAnyDatabase", db : "admin" },
{ role : "userAdminAnyDatabase", db : "admin" },
{ role : "dbAdminAnyDatabase", db : "admin" },
{ role : "backup", db : "admin" },
{ role : "restore", db : "admin" }
]
}
)
|
To learn more about the required access, see Required Access for MongoDB Agent .
To back up MongoDB 4.0 or later instances that use
LDAP
authentication, add a user that possess the required roles
to the
$external
database in MongoDB. The
$external
database stores credentials for external authentication and
authorization details.
Use the following
mongosh
command to create the user:
db.getSiblingDB("$external").createUser(
{
user : "<username>",
roles: [ {
role: "clusterAdmin", db: "admin"
} ]
}
)
db.getSiblingDB("$external").createUser(
{
user: "<username>",
roles: [ {
role: "backup", db: "admin"
} ]
}
)
To learn more about the required access, see Required Access for MongoDB Agent Backup
To monitor MongoDB 4.0 or later instances that use
LDAP
authentication, add a user to the
$external
database in
MongoDB. The
$external
database stores credentials for
external authentication and authorization details. Assign
this user the roles provided in the following example.
Use the following
mongosh
command to create the user:
db.getSiblingDB("$external").createUser(
{
user : "<username>",
roles: [ { role: "clusterMonitor", db: "admin" } ]
}
)
To learn what roles this function requires, see Monitoring settings .
What’s New
Welcome to the documentation for MongoDB Cloud Manager. Engineered by the team who develops MongoDB, Cloud Manager provides a complete package for managing MongoDB deployments.
On this page
Removing a process from monitoring means Cloud Manager no longer displays its status or tracks its metrics. You must terminate the deployment’s backups before you can remove a monitored deployment.
Follow this procedure to remove one monitored process from Cloud Manager.
For replica sets, select
Remove from Replica Set
.
For
mongod
processes in a sharded replica set, select
Remove From Shard
. For
mongos
processes,
select
Remove from Cluster
.
For replica sets, select
Remove from Replica Set
.
For
mongod
processes in a sharded replica set, select
Remove From Shard
. For
mongos
processes,
select
Remove from Cluster
.
The process that you removed earlier now appears as a standalone
process. However,
mongos
processes are automatically removed
from the cluster and do not appear.
You have a project and want to install the MongoDB Agent to manage your MongoDB deployments. You can also monitor and back up your MongoDB deployments following this workflow.
Review the Prerequisites First
Please review the MongoDB Agent Prerequisites before installing the MongoDB Agent.
Use this procedure to install the MongoDB Agent on x86_64 architecture running Microsoft Windows:
Your project has no deployments and you see a prompt to get started.
From the Build New Deployment menu, select the type of deployment you wish to add:
If, on the Create New <Deployment> page, Cloud Manager cannot detect any hosts with the MongoDB Agent installed, you see a banner displayed at the top of the Create New <Deployment> page.
Click the see instructions link.
From the Select Your Server’s Operating System menu, click Windows - MSI .
Click Next .
The MongoDB Agent Installation Instructions box displays the following information:
Project ID (Required for binding to a project)
API Key
If you do not have an API Key, click plus icon Generate Key .
Some or all of these values are required in a later step. Copy these values then store them where you can access them later.
After the
MSI
downloads, double-click:
mongodb-mms-automation-agent-<VERSION>.windows_x86_64.msi
If a security warning appears, click Run .
At the Configuration/Log Folder step
Provide the directory into which these files are saved.
At the Key Type step, select Agent API Key to bind to a specific project .
Enter the appropriate agent keys.
Note
These keys are provided in the MongoDB Agent Installation Instructions modal described in the previous step.
At the MongoDB Paths step, specify the Log and Backup directories
At the Windows Firewall Configuration step, click your preferred firewall configuration.
If you click Configure firewall rules allowing access from only the specified |ipaddr| addresses. , type the necessary IPv4 addresses into the provided box.
(Conditional) Windows enables Stealth Mode for the Windows Firewall by default. If you have not disabled it on the MongoDB host on which you are installing the MongoDB Agent, you are asked to disable it. Stealth Mode significantly degrades the performance and capability of the MongoDB Agent. Click Disable Stealth Mode .
(Conditional) Windows does not enable Disk Performance Counters by default. If you have not enabled Disk Performance Counters for the MongoDB host, click Enable Disk Performance Counters . The MongoDB Agent uses these counters for some of its hardware monitoring activities.
Click Install .
Click Finish once setup is complete.
After the
MSI
downloads, you can run an unattended
install. You run an unattended install from the command line
in either the command interpreter or PowerShell. To learn
more about unattended installs, see Microsoft’s
documentation on Standard Installer Command-Line Options
To run the
MSI
installer unattended from the command
line, you invoke
msiexec.exe
with the
/q
and
/i
flags and a combination of required and optional
parameters:
Parameter | Necessity | Value |
---|---|---|
MMSAPIKEY
|
Required | Agent API key of your Cloud Manager project. |
MMSGROUPID
|
Required | Unique Identifier of your Cloud Manager project. |
CONFIGLOGDIR
|
Optional | Absolute file path to which Cloud Manager should write the MongoDB Agent configuration file. |
LOGFILE
|
Optional | Absolute file path to which Cloud Manager should write the MongoDB Agent log |
MMSCONFIGBACKUP
|
Optional | Absolute file path to the Cloud Manager automation configuration backup JSON file. |
Example
To install the MongoDB Agent unattended, you would
invoke
msiexec.exe
with the following options:
msiexec.exe /q /i "C:\PATH\TO\mongodb-mms-automation-agent-<VERSION>.windows_x86_64.msi" MMSGROUPID=<GROUP.ID> MMSAPIKEY=<AGENT.API.ID> MMSBASEURL="<http://opsmanager.example.com:8080>" LOGFILE="C:\MMSData\Server\Log\automation-agent.log" MMSCONFIGBACKUP="C:\MMSData\MongoDB\mms-cluster-config-backup.json"
In the Install Agent Instructions modal:
By default, the MongoDB binaries and Cloud Manager configuration backup
file are located in
%SystemDrive%\MMSMongoDB\versions
.
Note
Windows sets the
%SystemDrive%
environment variable to the
drive on which you installed Windows. By default, you would be
directed to install Windows on the
C:
drive. To find your
%SystemDrive%
, issue with following command from PowerShell:
get-childitem env:SystemDrive
If you want to store these files in a different directory, follow these procedures:
To change the location of the MongoDB Agent Binaries
Click Deployment , then Agents , and then Downloads & Settings .
Below the Download Directory heading, click edit icon to the right of the path shown in Download Directory (Windows) .
Change the path to the new path you want.
Click Save .
Create the new directory you specified on each host that runs an MongoDB Agent. Use Windows Explorer to move the file or issue the following command from a Command Prompt or PowerShell:
md \<newPath>
Important
Make sure the system user that runs the MongoDB Agent can write
to this new directory. This is usually the
SYSTEM
user,
which requires no additional configuration unless you changed
the user.
To change the location of the MongoDB Agent configuration backup
Open the MongoDB Agent configuration file in your preferred text editor.
Change the
mmsConfigBackup
setting to the new path
for the configuration backup file. Replace
X
with the drive
letter on which your backup is stored.
mmsConfigBackup=X:\<newPath>\mms-cluster-config-backup.json
Save the MongoDB Agent configuration file.
Move the configuration backup file to the new directory. Use Windows Explorer to move the file or issue the following command from a Command Prompt or PowerShell:
move %SystemDrive%\MMSMongoDB\versions\mms-cluster-config-backup.json \<newPath>
Use this procedure to install the MongoDB Agent:
Important
Starting with
version 10.24.0.6714-1
, when you install the MongoDB Agent
using
deb
or
rpm
packages, the package doesn’t add
MongoDB binaries to the
PATH
environment variable.
If your deployment depends on the presence of MongoDB binaries in
the
PATH
, you must manually add the paths to MongoDB
binaries to the
PATH
. To learn how to update environment
variables, refer to your operating system’s documentation.
On x86_64 architecture running Debian 8/9/10/11 or Ubuntu 18.04/20.04:
Your project has no deployments and you see a prompt to get started.
From the Build New Deployment menu, select the type of deployment you wish to add:
If, on the Create New <Deployment> page, Cloud Manager cannot detect any hosts with the MongoDB Agent installed, you see a banner displayed at the top of the Create New <Deployment> page.
Click the see instructions link.
From the Select Your Server’s Operating System menu, click Debian 8/9/10/11, Ubuntu 16.X/18.X/20.x - DEB .
Click Next .
Note
Starting with this step, follow the MongoDB Agent installation modal and copy the provided commands into the Linux shell.
From a system shell on the host that will run the MongoDB Agent,
issue the following
curl
command to download the installer for
Ubuntu 18.04/20.04 or Debian 8/9/10/11 for 64-bit x86:
curl -OL https://cloud.mongodb.com/download/agent/automation/mongodb-mms-automation-agent-manager_latest_amd64.ubuntu1604.deb
In the directory where you installed the MongoDB Agent, open the
automation-agent.config
file in your preferred text editor.
sudo vi /etc/mongodb-mms/automation-agent.config
Update the following configuration options:
Key | Value |
---|---|
mmsGroupId
|
ProjectID
of your project.
|
mmsApiKey
|
Agent API key of your project. |
To configure the MongoDB Agent to connect to Cloud Manager via a proxy
server, you must specify the server in the
httpProxy
environment variable.
In the directory where you installed the MongoDB Agent, open the
automation-agent.config
file in your preferred text editor.
sudo vi /etc/mongodb-mms/automation-agent.config
Add the following configuration key:
Key | Value |
---|---|
httpProxy
|
URL (hostname and port) of to your proxy server. |
The data directory stores MongoDB data. For an existing MongoDB
deployment, ensure that the directory is owned by the
mongodb
user. If no MongoDB deployment exists, create the directory and set
the owner.
To create a data directory and set the owner as the
mongodb
user:
sudo mkdir -p /data; sudo chown mongodb:mongodb /data
Issue the following command:
sudo systemctl start mongodb-mms-automation-agent.service
In the Install Agent Instructions modal:
Use this procedure to install the MongoDB Agent:
On x86_64 architecture:
Important
Starting with
version 10.24.0.6714-1
, when you install the MongoDB Agent
using
deb
or
rpm
packages, the package doesn’t add
MongoDB binaries to the
PATH
environment variable.
If your deployment depends on the presence of MongoDB binaries in
the
PATH
, you must manually add the paths to MongoDB
binaries to the
PATH
. To learn how to update environment
variables, refer to your operating system’s documentation.
Running Amazon Linux using an
rpm
package:
Your project has no deployments and you see a prompt to get started.
From the Build New Deployment menu, select the type of deployment you wish to add:
If, on the Create New <Deployment> page, Cloud Manager cannot detect any hosts with the MongoDB Agent installed, you see a banner displayed at the top of the Create New <Deployment> page.
Click the see instructions link.
From the Select Your Server’s Operating System menu, click Amazon Linux - RPM .
Click Next .
Note
Starting with this step, follow the MongoDB Agent installation modal and copy the provided commands into the Linux shell.
From a system shell on the host that will run the MongoDB Agent,
issue the following
curl
command to download the installer for
64-bit x86:
curl -OL https://cloud.mongodb.com/download/agent/automation/mongodb-mms-automation-agent-manager-latest.x86_64.rpm
In the directory where you installed the MongoDB Agent, open the
automation-agent.config
file in your preferred text editor.
sudo vi /etc/mongodb-mms/automation-agent.config
Update the following configuration options:
Key | Value |
---|---|
mmsGroupId
|
ProjectID
of your project.
|
mmsApiKey
|
Agent API key of your project. |
To configure the MongoDB Agent to connect to Cloud Manager via a proxy
server, you must specify the server in the
httpProxy
environment variable.
In the directory where you installed the MongoDB Agent, open the
automation-agent.config
file in your preferred text editor.
sudo vi /etc/mongodb-mms/automation-agent.config
Add the following configuration key:
Key | Value |
---|---|
httpProxy
|
URL (hostname and port) of to your proxy server. |
The data directory stores MongoDB data and must be owned by the
mongod
user. For an existing MongoDB deployment, ensure the
directory has the
mongod
user as owner. If no MongoDB deployment
exists, create the directory and set the owner.
The following commands create a data directory and set the owner as
the
mongod
user:
sudo mkdir /data; sudo chown mongod:mongod /data
Issue the following command:
sudo service mongodb-mms-automation-agent start
In the Install Agent Instructions modal:
Running RHEL / CentOS 7.x, SUSE12, SUSE15, or Amazon Linux 2:
Important
Starting with
version 10.24.0.6714-1
, when you install the MongoDB Agent
using
deb
or
rpm
packages, the package doesn’t add
MongoDB binaries to the
PATH
environment variable.
If your deployment depends on the presence of MongoDB binaries in
the
PATH
, you must manually add the paths to MongoDB
binaries to the
PATH
. To learn how to update environment
variables, refer to your operating system’s documentation.
Using an
rpm
package:
Your project has no deployments and you see a prompt to get started.
From the Build New Deployment menu, select the type of deployment you wish to add:
If, on the Create New <Deployment> page, Cloud Manager cannot detect any hosts with the MongoDB Agent installed, you see a banner displayed at the top of the Create New <Deployment> page.
Click the see instructions link.
From the Select Your Server’s Operating System menu, click RHEL/CentOS (7.X/8.X), SUSE12, SUSE15, Amazon Linux2 - RPM .
Click Next .
Note
Starting with this step, follow the MongoDB Agent installation modal and copy the provided commands into the Linux shell.
From a system shell on the host that will run the MongoDB Agent,
issue the following
curl
command to download the installer for
RHEL 7 for 64-bit x86:
curl -OL https://cloud.mongodb.com/download/agent/automation/mongodb-mms-automation-agent-manager-latest.x86_64.rhel7.rpm
In the directory where you installed the MongoDB Agent, open the
automation-agent.config
file in your preferred text editor.
sudo vi /etc/mongodb-mms/automation-agent.config
Update the following configuration options:
Key | Value |
---|---|
mmsGroupId
|
ProjectID
of your project.
|
mmsApiKey
|
Agent API key of your project. |
To configure the MongoDB Agent to connect to Cloud Manager via a proxy
server, you must specify the server in the
httpProxy
environment variable.
In the directory where you installed the MongoDB Agent, open the
automation-agent.config
file in your preferred text editor.
sudo vi /etc/mongodb-mms/automation-agent.config
Add the following configuration key:
Key | Value |
---|---|
httpProxy
|
URL (hostname and port) of to your proxy server. |
The data directory stores MongoDB data and must be owned by the
mongod
user. For an existing MongoDB deployment, ensure the
directory has the
mongod
user as owner. If no MongoDB deployment
exists, create the directory and set the owner.
The following commands create a data directory and set the owner as
the
mongod
user:
sudo mkdir /data; sudo chown mongod:mongod /data
Issue the following command:
sudo service mongodb-mms-automation-agent start
In the Install Agent Instructions modal:
Using a
tar
archive:
Your project has no deployments and you see a prompt to get started.
From the Build New Deployment menu, select the type of deployment you wish to add:
If, on the Create New <Deployment> page, Cloud Manager cannot detect any hosts with the MongoDB Agent installed, you see a banner displayed at the top of the Create New <Deployment> page.
Click the see instructions link.
From the Select Your Server’s Operating System menu, click RHEL/CentOS (7.X/8.X), SUSE12, SUSE15, Amazon Linux 2 - TAR .
Click Next .
Note
Starting with this step, follow the MongoDB Agent installation modal and copy the provided commands into the Linux shell.
From a system shell on the host that will run the MongoDB Agent,
issue the following
curl
command to download the installer for
RHEL for 64-bit x86:
curl -OL https://cloud.mongodb.com/download/agent/automation/mongodb-mms-automation-agent-latest.rhel7_x86_64.tar.gz
You can install the MongoDB Agent in any directory. If you want to move the archive to another directory before extracting, you may do so.
To install the MongoDB Agent, extract the archive:
tar -xvzf mongodb-mms-automation-agent-<VERSION>.rhel7_x86_64.tar.gz
Change into the directory that was created after extracting the MongoDB Agent binary:
cd mongodb-mms-automation-agent-<VERSION>.rhel7_x86_64
In the directory where you installed the MongoDB Agent, open the
local.config
file in your preferred text editor.
vi <install-path>/local.config
Update the following configuration options:
Key | Value |
---|---|
mmsGroupId
|
ProjectID
of your project.
|
mmsApiKey
|
Agent API key of your project. |
To configure the MongoDB Agent to connect to Cloud Manager via a proxy
server, you must specify the server in the
httpProxy
environment variable.
In the directory where you installed the MongoDB Agent, open the
local.config
file in your preferred text editor.
vi <install-path>/local.config
Add the following configuration key:
Key | Value |
---|---|
httpProxy
|
URL (hostname and port) of to your proxy server. |
Create the following directories to store files that the MongoDB Agent needs.
Note
The use of
mongodb-mms-automation
in the file path is a
legacy artifact and does not mean that the MongoDB Agent is being
installed with Automation configured.
Component | Default Directory | Description |
---|---|---|
Binaries |
/var/lib/mongodb-mms-automation
|
These are the binaries that the MongoDB Agent manages. They include the MongoDB Agent, BI Connector, and MongoDB binaries. |
MongoDB Agent logs |
/var/log/mongodb-mms-automation
|
These are the log files that the MongoDB Agent creates. |
MongoDB databases |
/data
|
These are the databases that the MongoDB Agent creates and manages. |
Run the following commands to create the directories:
sudo mkdir -m 755 -p /var/lib/mongodb-mms-automation
sudo mkdir -m 755 -p /var/log/mongodb-mms-automation
sudo mkdir -m 755 -p /data
Using a Different Path than
/var/lib
By default, the Agent binaries and Cloud Manager
configuration backup file are located in
/var/lib/mongodb-mms-automation
.
If you want to store these files in a different
directory, follow these procedures:
To change the location of the Agent Binaries:
Click Deployment , then Agents , and then Downloads & Settings .
Below the Download Directory heading, click the pencil icon to the right of the path shown in Download Directory (Linux) .
Change the path to the new path you want.
Click Save .
Create the new directory you specified on each host that runs an Agent.
sudo mkdir -m 755 -p /<newPath>
To change the location of the Agent configuration backup:
Open the Agent configuration file in your preferred text editor.
Change the
mmsConfigBackup
setting to the new path for
the configuration backup file.
mmsConfigBackup=/<newPath>/mms-cluster-config-backup.json
Save the Agent configuration file.
Move the configuration backup file to the new directory.
sudo mv /var/lib/mongodb-mms-automation/mms-cluster-config-backup.json /<newPath>
Run the following commands:
# Create mongod user and group if they do not exist
if ! sudo /usr/bin/id -g mongod &>/dev/null; then
sudo /usr/sbin/groupadd -r mongod
fi
# Create mongod user if they do not exist and assign
# them to the mongod group
if ! sudo /usr/bin/id mongod &>/dev/null; then
sudo /usr/sbin/useradd -M -r -g mongod \
-d /var/lib/mongo -s /bin/false \
-c mongod mongod > /dev/null 2>&1
fi
# Grant the mongod:mongod user and group permissions
# to manage deployments.
sudo chown mongod:mongod /var/lib/mongod-mms-automation
sudo chown mongod:mongod /var/log/mongod-mms-automation
sudo chown mongod:mongod /data
From the directory in which you installed the MongoDB Agent and as the system user you created in the last step, issue the following command:
nohup ./mongodb-mms-automation-agent \
--config=local.config \
>> /var/log/mongodb-mms-automation/automation-agent-fatal.log 2>&1 &
In the Install Agent Instructions modal:
On RHEL / CentOS (7.x) on PowerPC architecture (managing MongoDB 3.4 or later deployments):
Important
Starting with
version 10.24.0.6714-1
, when you install the MongoDB Agent
using
deb
or
rpm
packages, the package doesn’t add
MongoDB binaries to the
PATH
environment variable.
If your deployment depends on the presence of MongoDB binaries in
the
PATH
, you must manually add the paths to MongoDB
binaries to the
PATH
. To learn how to update environment
variables, refer to your operating system’s documentation.
Using an
rpm
package:
Your project has no deployments and you see a prompt to get started.
From the Build New Deployment menu, select the type of deployment you wish to add:
If, on the Create New <Deployment> page, Cloud Manager cannot detect any hosts with the MongoDB Agent installed, you see a banner displayed at the top of the Create New <Deployment> page.
Click the see instructions link.
From the Select Your Server’s Operating System menu, click RHEL/CentOS (7.X) Power (ppc64le) - RPM .
Click Next .
Note
Starting with this step, follow the MongoDB Agent installation modal and copy the provided commands into the Linux shell.
From a system shell on the host that will run the MongoDB Agent,
issue the following
curl
command to download the installer for
RHEL 7 for PowerPC:
curl -OL https://cloud.mongodb.com/download/agent/automation/mongodb-mms-automation-agent-manager-latest.ppc64le.rhel7.rpm
In the directory where you installed the MongoDB Agent, open the
automation-agent.config
file in your preferred text editor.
sudo vi /etc/mongodb-mms/automation-agent.config
Update the following configuration options:
Key | Value |
---|---|
mmsGroupId
|
ProjectID
of your project.
|
mmsApiKey
|
Agent API key of your project. |
To configure the MongoDB Agent to connect to Cloud Manager via a proxy
server, you must specify the server in the
httpProxy
environment variable.
In the directory where you installed the MongoDB Agent, open the
automation-agent.config
file in your preferred text editor.
sudo vi /etc/mongodb-mms/automation-agent.config
Add the following configuration key:
Key | Value |
---|---|
httpProxy
|
URL (hostname and port) of to your proxy server. |
The data directory stores MongoDB data and must be owned by the
mongod
user. For an existing MongoDB deployment, ensure the
directory has the
mongod
user as owner. If no MongoDB deployment
exists, create the directory and set the owner.
The following commands create a data directory and set the owner as
the
mongod
user:
sudo mkdir /data; sudo chown mongod:mongod /data
Issue the following command:
sudo service mongodb-mms-automation-agent start
In the Install Agent Instructions modal:
Using a
tar
archive:
Your project has no deployments and you see a prompt to get started.
From the Build New Deployment menu, select the type of deployment you wish to add:
If, on the Create New <Deployment> page, Cloud Manager cannot detect any hosts with the MongoDB Agent installed, you see a banner displayed at the top of the Create New <Deployment> page.
Click the see instructions link.
From the Select Your Server’s Operating System menu, click RHEL/CentOS (7.X) Power (ppc64le) - TAR .
Click Next .
Note
Starting with this step, follow the MongoDB Agent installation modal and copy the provided commands into the Linux shell.
From a system shell on the host that will run the MongoDB Agent,
issue the following
curl
command to download the installer for
RHEL 7 for PowerPC:
curl -OL https://cloud.mongodb.com/download/agent/automation/mongodb-mms-automation-agent-latest.rhel7_ppc64le.tar.gz
You can install the MongoDB Agent in any directory. If you want to move the archive to another directory before extracting, you may do so.
To install the MongoDB Agent, extract the archive:
tar -xvzf mongodb-mms-automation-agent-<VERSION>.rhel7_ppc64le.tar.gz
Change into the directory that was created after extracting the MongoDB Agent binary:
cd mongodb-mms-automation-agent-<VERSION>.rhel7_ppc64le
In the directory where you installed the MongoDB Agent, open the
local.config
file in your preferred text editor.
vi <install-path>/local.config
Update the following configuration options:
Key | Value |
---|---|
mmsGroupId
|
ProjectID
of your project.
|
mmsApiKey
|
Agent API key of your project. |
To configure the MongoDB Agent to connect to Cloud Manager via a proxy
server, you must specify the server in the
httpProxy
environment variable.
In the directory where you installed the MongoDB Agent, open the
local.config
file in your preferred text editor.
vi <install-path>/local.config
Add the following configuration key:
Key | Value |
---|---|
httpProxy
|
URL (hostname and port) of to your proxy server. |
Create the following directories to store files that the MongoDB Agent needs.
Note
The use of
mongodb-mms-automation
in the file path is a
legacy artifact and does not mean that the MongoDB Agent is being
installed with Automation configured.
Component | Default Directory | Description |
---|---|---|
Binaries |
/var/lib/mongodb-mms-automation
|
These are the binaries that the MongoDB Agent manages. They include the MongoDB Agent, BI Connector, and MongoDB binaries. |
MongoDB Agent logs |
/var/log/mongodb-mms-automation
|
These are the log files that the MongoDB Agent creates. |
MongoDB databases |
/data
|
These are the databases that the MongoDB Agent creates and manages. |
Run the following commands to create the directories:
sudo mkdir -m 755 -p /var/lib/mongodb-mms-automation
sudo mkdir -m 755 -p /var/log/mongodb-mms-automation
sudo mkdir -m 755 -p /data
Using a Different Path than
/var/lib
By default, the Agent binaries and Cloud Manager
configuration backup file are located in
/var/lib/mongodb-mms-automation
.
If you want to store these files in a different
directory, follow these procedures:
To change the location of the Agent Binaries:
Click Deployment , then Agents , and then Downloads & Settings .
Below the Download Directory heading, click the pencil icon to the right of the path shown in Download Directory (Linux) .
Change the path to the new path you want.
Click Save .
Create the new directory you specified on each host that runs an Agent.
sudo mkdir -m 755 -p /<newPath>
To change the location of the Agent configuration backup:
Open the Agent configuration file in your preferred text editor.
Change the
mmsConfigBackup
setting to the new path for
the configuration backup file.
mmsConfigBackup=/<newPath>/mms-cluster-config-backup.json
Save the Agent configuration file.
Move the configuration backup file to the new directory.
sudo mv /var/lib/mongodb-mms-automation/mms-cluster-config-backup.json /<newPath>
Run the following commands:
# Create mongod user and group if they do not exist
if ! sudo /usr/bin/id -g mongod &>/dev/null; then
sudo /usr/sbin/groupadd -r mongod
fi
# Create mongod user if they do not exist and assign
# them to the mongod group
if ! sudo /usr/bin/id mongod &>/dev/null; then
sudo /usr/sbin/useradd -M -r -g mongod \
-d /var/lib/mongo -s /bin/false \
-c mongod mongod > /dev/null 2>&1
fi
# Grant the mongod:mongod user and group permissions
# to manage deployments.
sudo chown mongod:mongod /var/lib/mongod-mms-automation
sudo chown mongod:mongod /var/log/mongod-mms-automation
sudo chown mongod:mongod /data
From the directory in which you installed the MongoDB Agent and as the system user you created in the last step, issue the following command:
nohup ./mongodb-mms-automation-agent \
--config=local.config \
>> /var/log/mongodb-mms-automation/automation-agent-fatal.log 2>&1 &
In the Install Agent Instructions modal:
On zSeries architecture (managing MongoDB 4.0 or later deployments):
Running RHEL / CentOS 7.x/8x:
Running RHEL / CentOS 7.x/8.x using the
rpm
package
manager:
Your project has no deployments and you see a prompt to get started.
From the Build New Deployment menu, select the type of deployment you wish to add:
If, on the Create New <Deployment> page, Cloud Manager cannot detect any hosts with the MongoDB Agent installed, you see a banner displayed at the top of the Create New <Deployment> page.
Click the see instructions link.
From the Select Your Server’s Operating System menu, click RHEL 7.X/8.X Z-Series (s390x) - RPM .
Click Next .
Note
Starting with this step, follow the MongoDB Agent installation modal and copy the provided commands into the Linux shell.
From a system shell on the host that will run the MongoDB Agent,
issue the following
curl
command to download the installer for
RHEL 7.X/8.X for IBM zSeries:
curl -OL https://cloud.mongodb.com/download/agent/automation/mongodb-mms-automation-agent-manager-latest.s390x.rhel7.rpm
In the directory where you installed the MongoDB Agent, open the
automation-agent.config
file in your preferred text editor.
sudo vi /etc/mongodb-mms/automation-agent.config
Update the following configuration options:
Key | Value |
---|---|
mmsGroupId
|
ProjectID
of your project.
|
mmsApiKey
|
Agent API key of your project. |
To configure the MongoDB Agent to connect to Cloud Manager via a proxy
server, you must specify the server in the
httpProxy
environment variable.
In the directory where you installed the MongoDB Agent, open the
automation-agent.config
file in your preferred text editor.
sudo vi /etc/mongodb-mms/automation-agent.config
Add the following configuration key:
Key | Value |
---|---|
httpProxy
|
URL (hostname and port) of to your proxy server. |
The data directory stores MongoDB data and must be owned by the
mongod
user. For an existing MongoDB deployment, ensure the
directory has the
mongod
user as owner. If no MongoDB deployment
exists, create the directory and set the owner.
The following commands create a data directory and set the owner as
the
mongod
user:
sudo mkdir /data; sudo chown mongod:mongod /data
Issue the following command:
sudo service mongodb-mms-automation-agent start
In the Install Agent Instructions modal:
On ARM64 architecture running RHEL 8.x or Amazon Linux 2 (managing MongoDB 4.4 or later deployments):
Important
Starting with
version 10.24.0.6714-1
, when you install the MongoDB Agent
using
deb
or
rpm
packages, the package doesn’t add
MongoDB binaries to the
PATH
environment variable.
If your deployment depends on the presence of MongoDB binaries in
the
PATH
, you must manually add the paths to MongoDB
binaries to the
PATH
. To learn how to update environment
variables, refer to your operating system’s documentation.
Running RHEL 8.x or Amazon Linux 2 using the rpm package manager (managing MongoDB 4.4 or later deployments):
Your project has no deployments and you see a prompt to get started.
From the Build New Deployment menu, select the type of deployment you wish to add:
If, on the Create New <Deployment> page, Cloud Manager cannot detect any hosts with the MongoDB Agent installed, you see a banner displayed at the top of the Create New <Deployment> page.
Click the see instructions link.
From the Select Your Server’s Operating System menu, click RHEL 8.X, Amazon Linux 2 - RPM .
Click Next .
Note
Starting with this step, follow the MongoDB Agent installation modal and copy the provided commands into the Linux shell.
From a system shell on the host that will run the MongoDB Agent,
issue the following
curl
command to download the installer for
RHEL 8 or Amazon Linux 2 for ARM64:
curl -OL https://cloud.mongodb.com/download/agent/automation/mongodb-mms-automation-agent-manager-latest.aarch64.amzn2.rpm
In the directory where you installed the MongoDB Agent, open the
automation-agent.config
file in your preferred text editor.
sudo vi /etc/mongodb-mms/automation-agent.config
Update the following configuration options:
Key | Value |
---|---|
mmsGroupId
|
ProjectID
of your project.
|
mmsApiKey
|
Agent API key of your project. |
To configure the MongoDB Agent to connect to Cloud Manager via a proxy
server, you must specify the server in the
httpProxy
environment variable.
In the directory where you installed the MongoDB Agent, open the
automation-agent.config
file in your preferred text editor.
sudo vi /etc/mongodb-mms/automation-agent.config
Add the following configuration key:
Key | Value |
---|---|
httpProxy
|
URL (hostname and port) of to your proxy server. |
The data directory stores MongoDB data and must be owned by the
mongod
user. For an existing MongoDB deployment, ensure the
directory has the
mongod
user as owner. If no MongoDB deployment
exists, create the directory and set the owner.
The following commands create a data directory and set the owner as
the
mongod
user:
sudo mkdir /data; sudo chown mongod:mongod /data
Issue the following command:
sudo service mongodb-mms-automation-agent start
In the Install Agent Instructions modal:
Using a
tar
archive:
Your project has no deployments and you see a prompt to get started.
From the Build New Deployment menu, select the type of deployment you wish to add:
If, on the Create New <Deployment> page, Cloud Manager cannot detect any hosts with the MongoDB Agent installed, you see a banner displayed at the top of the Create New <Deployment> page.
Click the see instructions link.
From the Select Your Server’s Operating System menu, click RHEL 8.X, Amazon Linux 2 - TAR .
Click Next .
Note
Starting with this step, follow the MongoDB Agent installation modal and copy the provided commands into the Linux shell.
From a system shell on the host that will run the MongoDB Agent,
issue the following
curl
command to download the installer for
RHEL 8.x or Amazon Linux 2 for ARM64:
curl -OL https://cloud.mongodb.com/download/agent/automation/mongodb-mms-automation-agent-latest.amzn2_aarch64.tar.gz
You can install the MongoDB Agent in any directory. If you want to move the archive to another directory before extracting, you may do so.
To install the MongoDB Agent, extract the archive:
tar -xvzf mongodb-mms-automation-agent-<VERSION>.amzn2_aarch64.tar.gz
Change into the directory that was created after extracting the MongoDB Agent binary:
cd mongodb-mms-automation-agent-<VERSION>.amzn2_aarch64
In the directory where you installed the MongoDB Agent, open the
local.config
file in your preferred text editor.
vi <install-path>/local.config
Update the following configuration options:
Key | Value |
---|---|
mmsGroupId
|
ProjectID
of your project.
|
mmsApiKey
|
Agent API key of your project. |
To configure the MongoDB Agent to connect to Cloud Manager via a proxy
server, you must specify the server in the
httpProxy
environment variable.
In the directory where you installed the MongoDB Agent, open the
local.config
file in your preferred text editor.
vi <install-path>/local.config
Add the following configuration key:
Key | Value |
---|---|
httpProxy
|
URL (hostname and port) of to your proxy server. |
Create the following directories to store files that the MongoDB Agent needs.
Note
The use of
mongodb-mms-automation
in the file path is a
legacy artifact and does not mean that the MongoDB Agent is being
installed with Automation configured.
Component | Default Directory | Description |
---|---|---|
Binaries |
/var/lib/mongodb-mms-automation
|
These are the binaries that the MongoDB Agent manages. They include the MongoDB Agent, BI Connector, and MongoDB binaries. |
MongoDB Agent logs |
/var/log/mongodb-mms-automation
|
These are the log files that the MongoDB Agent creates. |
MongoDB databases |
/data
|
These are the databases that the MongoDB Agent creates and manages. |
Run the following commands to create the directories:
sudo mkdir -m 755 -p /var/lib/mongodb-mms-automation
sudo mkdir -m 755 -p /var/log/mongodb-mms-automation
sudo mkdir -m 755 -p /data
Using a Different Path than
/var/lib
By default, the Agent binaries and Cloud Manager
configuration backup file are located in
/var/lib/mongodb-mms-automation
.
If you want to store these files in a different
directory, follow these procedures:
To change the location of the Agent Binaries:
Click Deployment , then Agents , and then Downloads & Settings .
Below the Download Directory heading, click the pencil icon to the right of the path shown in Download Directory (Linux) .
Change the path to the new path you want.
Click Save .
Create the new directory you specified on each host that runs an Agent.
sudo mkdir -m 755 -p /<newPath>
To change the location of the Agent configuration backup:
Open the Agent configuration file in your preferred text editor.
Change the
mmsConfigBackup
setting to the new path for
the configuration backup file.
mmsConfigBackup=/<newPath>/mms-cluster-config-backup.json
Save the Agent configuration file.
Move the configuration backup file to the new directory.
sudo mv /var/lib/mongodb-mms-automation/mms-cluster-config-backup.json /<newPath>
Run the following commands:
# Create mongod user and group if they do not exist
if ! sudo /usr/bin/id -g mongod &>/dev/null; then
sudo /usr/sbin/groupadd -r mongod
fi
# Create mongod user if they do not exist and assign
# them to the mongod group
if ! sudo /usr/bin/id mongod &>/dev/null; then
sudo /usr/sbin/useradd -M -r -g mongod \
-d /var/lib/mongo -s /bin/false \
-c mongod mongod > /dev/null 2>&1
fi
# Grant the mongod:mongod user and group permissions
# to manage deployments.
sudo chown mongod:mongod /var/lib/mongod-mms-automation
sudo chown mongod:mongod /var/log/mongod-mms-automation
sudo chown mongod:mongod /data
From the directory in which you installed the MongoDB Agent and as the system user you created in the last step, issue the following command:
nohup ./mongodb-mms-automation-agent \
--config=local.config \
>> /var/log/mongodb-mms-automation/automation-agent-fatal.log 2>&1 &
In the Install Agent Instructions modal:
Use this procedure to install Linux systems that do not use
deb
or
rpm
packages.
Your project has no deployments and you see a prompt to get started.
From the Build New Deployment menu, select the type of deployment you wish to add:
If, on the Create New <Deployment> page, Cloud Manager cannot detect any hosts with the MongoDB Agent installed, you see a banner displayed at the top of the Create New <Deployment> page.
Click the see instructions link.
From the Select Your Server’s Operating System menu, click Other Linux - TAR .
Click Next .
Note
Starting with this step, follow the MongoDB Agent installation modal and copy the provided commands into the Linux shell.
From a system shell on the host that will run the MongoDB Agent,
issue the following
curl
command to download the installer for
Generic 64-bit Linux:
curl -OL https://cloud.mongodb.com/download/agent/automation/mongodb-mms-automation-agent-latest.linux_x86_64.tar.gz
You can install the MongoDB Agent in any directory. If you want to move the archive to another directory before extracting, you may do so.
To install the MongoDB Agent, extract the archive:
tar -xvzf mongodb-mms-automation-agent-<VERSION>.linux_x86_64.tar.gz
Change into the directory that was created after extracting the MongoDB Agent binary:
cd mongodb-mms-automation-agent-<VERSION>.linux_x86_64
In the directory where you installed the MongoDB Agent, open the
local.config
file in your preferred text editor.
vi <install-path>/local.config
Update the following configuration options:
Key | Value |
---|---|
mmsGroupId
|
ProjectID
of your project.
|
mmsApiKey
|
Agent API key of your project. |
To configure the MongoDB Agent to connect to Cloud Manager via a proxy
server, you must specify the server in the
httpProxy
environment variable.
In the directory where you installed the MongoDB Agent, open the
local.config
file in your preferred text editor.
vi <install-path>/local.config
Add the following configuration key:
Key | Value |
---|---|
httpProxy
|
URL (hostname and port) of to your proxy server. |
Create the following directories to store files that the MongoDB Agent needs.
Note
The use of
mongodb-mms-automation
in the file path is a
legacy artifact and does not mean that the MongoDB Agent is being
installed with Automation configured.
Component | Default Directory | Description |
---|---|---|
Binaries |
/var/lib/mongodb-mms-automation
|
These are the binaries that the MongoDB Agent manages. They include the MongoDB Agent, BI Connector, and MongoDB binaries. |
MongoDB Agent logs |
/var/log/mongodb-mms-automation
|
These are the log files that the MongoDB Agent creates. |
MongoDB databases |
/data
|
These are the databases that the MongoDB Agent creates and manages. |
Run the following commands to create the directories:
sudo mkdir -m 755 -p /var/lib/mongodb-mms-automation
sudo mkdir -m 755 -p /var/log/mongodb-mms-automation
sudo mkdir -m 755 -p /data
Using a Different Path than
/var/lib
By default, the Agent binaries and Cloud Manager
configuration backup file are located in
/var/lib/mongodb-mms-automation
.
If you want to store these files in a different
directory, follow these procedures:
To change the location of the Agent Binaries:
Click Deployment , then Agents , and then Downloads & Settings .
Below the Download Directory heading, click the pencil icon to the right of the path shown in Download Directory (Linux) .
Change the path to the new path you want.
Click Save .
Create the new directory you specified on each host that runs an Agent.
sudo mkdir -m 755 -p /<newPath>
To change the location of the Agent configuration backup:
Open the Agent configuration file in your preferred text editor.
Change the
mmsConfigBackup
setting to the new path for
the configuration backup file.
mmsConfigBackup=/<newPath>/mms-cluster-config-backup.json
Save the Agent configuration file.
Move the configuration backup file to the new directory.
sudo mv /var/lib/mongodb-mms-automation/mms-cluster-config-backup.json /<newPath>
Run the following commands:
# Create mongodb user and group if they do not exist
if ! sudo /usr/bin/id -g mongodb &>/dev/null; then
sudo /usr/sbin/groupadd -r mongodb
fi
# Create mongodb user if they do not exist and assign
# them to the mongodb group
if ! sudo /usr/bin/id mongodb &>/dev/null; then
sudo /usr/sbin/useradd -M -r -g mongodb \
-d /var/lib/mongo -s /bin/false \
-c mongodb mongodb > /dev/null 2>&1
fi
# Grant the mongodb:mongodb user and group permissions
# to manage deployments.
sudo chown mongodb:mongodb /var/lib/mongodb-mms-automation
sudo chown mongodb:mongodb /var/log/mongodb-mms-automation
sudo chown mongodb:mongodb /data
From the directory in which you installed the MongoDB Agent and as the system user you created in the last step, issue the following command:
nohup ./mongodb-mms-automation-agent \
--config=local.config \
>> /var/log/mongodb-mms-automation/automation-agent-fatal.log 2>&1 &
In the Install Agent Instructions modal:
Use this procedure to install the MongoDB Agent on x86_64 architecture running Microsoft Windows:
Your project has no deployments and you see a prompt to get started.
From the Build New Deployment menu, select the type of deployment you wish to add:
If, on the Create New <Deployment> page, Cloud Manager cannot detect any hosts with the MongoDB Agent installed, you see a banner displayed at the top of the Create New <Deployment> page.
Click the see instructions link.
From the Select Your Server’s Operating System menu, click Windows - MSI .
Click Next .
The MongoDB Agent Installation Instructions box displays the following information:
Project ID (Required for binding to a project)
API Key
If you do not have an API Key, click plus icon Generate Key .
Some or all of these values are required in a later step. Copy these values then store them where you can access them later.
After the
MSI
downloads, double-click:
mongodb-mms-automation-agent-<VERSION>.windows_x86_64.msi
If a security warning appears, click Run .
At the Configuration/Log Folder step
Provide the directory into which these files are saved.
At the Key Type step, select Agent API Key to bind to a specific project .
Enter the appropriate agent keys.
Note
These keys are provided in the MongoDB Agent Installation Instructions modal described in the previous step.
At the MongoDB Paths step, specify the Log and Backup directories
At the Windows Firewall Configuration step, click your preferred firewall configuration.
If you click Configure firewall rules allowing access from only the specified |ipaddr| addresses. , type the necessary IPv4 addresses into the provided box.
(Conditional) Windows enables Stealth Mode for the Windows Firewall by default. If you have not disabled it on the MongoDB host on which you are installing the MongoDB Agent, you are asked to disable it. Stealth Mode significantly degrades the performance and capability of the MongoDB Agent. Click Disable Stealth Mode .
(Conditional) Windows does not enable Disk Performance Counters by default. If you have not enabled Disk Performance Counters for the MongoDB host, click Enable Disk Performance Counters . The MongoDB Agent uses these counters for some of its hardware monitoring activities.
Click Install .
Click Finish once setup is complete.
After the
MSI
downloads, you can run an unattended
install. You run an unattended install from the command line
in either the command interpreter or PowerShell. To learn
more about unattended installs, see Microsoft’s
documentation on Standard Installer Command-Line Options
To run the
MSI
installer unattended from the command
line, you invoke
msiexec.exe
with the
/q
and
/i
flags and a combination of required and optional
parameters:
Parameter | Necessity | Value |
---|---|---|
MMSAPIKEY
|
Required | Agent API key of your Cloud Manager project. |
MMSGROUPID
|
Required | Unique Identifier of your Cloud Manager project. |
CONFIGLOGDIR
|
Optional | Absolute file path to which Cloud Manager should write the MongoDB Agent configuration file. |
LOGFILE
|
Optional | Absolute file path to which Cloud Manager should write the MongoDB Agent log |
MMSCONFIGBACKUP
|
Optional | Absolute file path to the Cloud Manager automation configuration backup JSON file. |
Example
To install the MongoDB Agent unattended, you would
invoke
msiexec.exe
with the following options:
msiexec.exe /q /i "C:\PATH\TO\mongodb-mms-automation-agent-<VERSION>.windows_x86_64.msi" MMSGROUPID=<GROUP.ID> MMSAPIKEY=<AGENT.API.ID> MMSBASEURL="<http://opsmanager.example.com:8080>" LOGFILE="C:\MMSData\Server\Log\automation-agent.log" MMSCONFIGBACKUP="C:\MMSData\MongoDB\mms-cluster-config-backup.json"
In the Install Agent Instructions modal:
By default, the MongoDB binaries and Cloud Manager configuration backup
file are located in
%SystemDrive%\MMSMongoDB\versions
.
Note
Windows sets the
%SystemDrive%
environment variable to the
drive on which you installed Windows. By default, you would be
directed to install Windows on the
C:
drive. To find your
%SystemDrive%
, issue with following command from PowerShell:
get-childitem env:SystemDrive
If you want to store these files in a different directory, follow these procedures:
To change the location of the MongoDB Agent Binaries
Click Deployment , then Agents , and then Downloads & Settings .
Below the Download Directory heading, click edit icon to the right of the path shown in Download Directory (Windows) .
Change the path to the new path you want.
Click Save .
Create the new directory you specified on each host that runs an MongoDB Agent. Use Windows Explorer to move the file or issue the following command from a Command Prompt or PowerShell:
md \<newPath>
Important
Make sure the system user that runs the MongoDB Agent can write
to this new directory. This is usually the
SYSTEM
user,
which requires no additional configuration unless you changed
the user.
To change the location of the MongoDB Agent configuration backup
Open the MongoDB Agent configuration file in your preferred text editor.
Change the
mmsConfigBackup
setting to the new path
for the configuration backup file. Replace
X
with the drive
letter on which your backup is stored.
mmsConfigBackup=X:\<newPath>\mms-cluster-config-backup.json
Save the MongoDB Agent configuration file.
Move the configuration backup file to the new directory. Use Windows Explorer to move the file or issue the following command from a Command Prompt or PowerShell:
move %SystemDrive%\MMSMongoDB\versions\mms-cluster-config-backup.json \<newPath>
Use this procedure to install the MongoDB Agent:
Important
Starting with
version 10.24.0.6714-1
, when you install the MongoDB Agent
using
deb
or
rpm
packages, the package doesn’t add
MongoDB binaries to the
PATH
environment variable.
If your deployment depends on the presence of MongoDB binaries in
the
PATH
, you must manually add the paths to MongoDB
binaries to the
PATH
. To learn how to update environment
variables, refer to your operating system’s documentation.
On x86_64 architecture running Debian 8/9/10/11 or Ubuntu 18.04/20.04:
Your project has no deployments and you see a prompt to get started.
From the Build New Deployment menu, select the type of deployment you wish to add:
If, on the Create New <Deployment> page, Cloud Manager cannot detect any hosts with the MongoDB Agent installed, you see a banner displayed at the top of the Create New <Deployment> page.
Click the see instructions link.
From the Select Your Server’s Operating System menu, click Debian 8/9/10/11, Ubuntu 16.X/18.X/20.x - DEB .
Click Next .
Note
Starting with this step, follow the MongoDB Agent installation modal and copy the provided commands into the Linux shell.
From a system shell on the host that will run the MongoDB Agent,
issue the following
curl
command to download the installer for
Ubuntu 18.04/20.04 or Debian 8/9/10/11 for 64-bit x86:
curl -OL https://cloud.mongodb.com/download/agent/automation/mongodb-mms-automation-agent-manager_latest_amd64.ubuntu1604.deb
In the directory where you installed the MongoDB Agent, open the
automation-agent.config
file in your preferred text editor.
sudo vi /etc/mongodb-mms/automation-agent.config
Update the following configuration options:
Key | Value |
---|---|
mmsGroupId
|
ProjectID
of your project.
|
mmsApiKey
|
Agent API key of your project. |
To configure the MongoDB Agent to connect to Cloud Manager via a proxy
server, you must specify the server in the
httpProxy
environment variable.
In the directory where you installed the MongoDB Agent, open the
automation-agent.config
file in your preferred text editor.
sudo vi /etc/mongodb-mms/automation-agent.config
Add the following configuration key:
Key | Value |
---|---|
httpProxy
|
URL (hostname and port) of to your proxy server. |
The data directory stores MongoDB data. For an existing MongoDB
deployment, ensure that the directory is owned by the
mongodb
user. If no MongoDB deployment exists, create the directory and set
the owner.
To create a data directory and set the owner as the
mongodb
user:
sudo mkdir -p /data; sudo chown mongodb:mongodb /data
Issue the following command:
sudo systemctl start mongodb-mms-automation-agent.service
In the Install Agent Instructions modal:
Use this procedure to install the MongoDB Agent:
On x86_64 architecture:
Important
Starting with
version 10.24.0.6714-1
, when you install the MongoDB Agent
using
deb
or
rpm
packages, the package doesn’t add
MongoDB binaries to the
PATH
environment variable.
If your deployment depends on the presence of MongoDB binaries in
the
PATH
, you must manually add the paths to MongoDB
binaries to the
PATH
. To learn how to update environment
variables, refer to your operating system’s documentation.
Running Amazon Linux using an
rpm
package:
Your project has no deployments and you see a prompt to get started.
From the Build New Deployment menu, select the type of deployment you wish to add:
If, on the Create New <Deployment> page, Cloud Manager cannot detect any hosts with the MongoDB Agent installed, you see a banner displayed at the top of the Create New <Deployment> page.
Click the see instructions link.
From the Select Your Server’s Operating System menu, click Amazon Linux - RPM .
Click Next .
Note
Starting with this step, follow the MongoDB Agent installation modal and copy the provided commands into the Linux shell.
From a system shell on the host that will run the MongoDB Agent,
issue the following
curl
command to download the installer for
64-bit x86:
curl -OL https://cloud.mongodb.com/download/agent/automation/mongodb-mms-automation-agent-manager-latest.x86_64.rpm
In the directory where you installed the MongoDB Agent, open the
automation-agent.config
file in your preferred text editor.
sudo vi /etc/mongodb-mms/automation-agent.config
Update the following configuration options:
Key | Value |
---|---|
mmsGroupId
|
ProjectID
of your project.
|
mmsApiKey
|
Agent API key of your project. |
To configure the MongoDB Agent to connect to Cloud Manager via a proxy
server, you must specify the server in the
httpProxy
environment variable.
In the directory where you installed the MongoDB Agent, open the
automation-agent.config
file in your preferred text editor.
sudo vi /etc/mongodb-mms/automation-agent.config
Add the following configuration key:
Key | Value |
---|---|
httpProxy
|
URL (hostname and port) of to your proxy server. |
The data directory stores MongoDB data and must be owned by the
mongod
user. For an existing MongoDB deployment, ensure the
directory has the
mongod
user as owner. If no MongoDB deployment
exists, create the directory and set the owner.
The following commands create a data directory and set the owner as
the
mongod
user:
sudo mkdir /data; sudo chown mongod:mongod /data
Issue the following command:
sudo service mongodb-mms-automation-agent start
In the Install Agent Instructions modal:
Running RHEL / CentOS 7.x, SUSE12, SUSE15, or Amazon Linux 2:
Important
Starting with
version 10.24.0.6714-1
, when you install the MongoDB Agent
using
deb
or
rpm
packages, the package doesn’t add
MongoDB binaries to the
PATH
environment variable.
If your deployment depends on the presence of MongoDB binaries in
the
PATH
, you must manually add the paths to MongoDB
binaries to the
PATH
. To learn how to update environment
variables, refer to your operating system’s documentation.
Using an
rpm
package:
Your project has no deployments and you see a prompt to get started.
From the Build New Deployment menu, select the type of deployment you wish to add:
If, on the Create New <Deployment> page, Cloud Manager cannot detect any hosts with the MongoDB Agent installed, you see a banner displayed at the top of the Create New <Deployment> page.
Click the see instructions link.
From the Select Your Server’s Operating System menu, click RHEL/CentOS (7.X/8.X), SUSE12, SUSE15, Amazon Linux2 - RPM .
Click Next .
Note
Starting with this step, follow the MongoDB Agent installation modal and copy the provided commands into the Linux shell.
From a system shell on the host that will run the MongoDB Agent,
issue the following
curl
command to download the installer for
RHEL 7 for 64-bit x86:
curl -OL https://cloud.mongodb.com/download/agent/automation/mongodb-mms-automation-agent-manager-latest.x86_64.rhel7.rpm
In the directory where you installed the MongoDB Agent, open the
automation-agent.config
file in your preferred text editor.
sudo vi /etc/mongodb-mms/automation-agent.config
Update the following configuration options:
Key | Value |
---|---|
mmsGroupId
|
ProjectID
of your project.
|
mmsApiKey
|
Agent API key of your project. |
To configure the MongoDB Agent to connect to Cloud Manager via a proxy
server, you must specify the server in the
httpProxy
environment variable.
In the directory where you installed the MongoDB Agent, open the
automation-agent.config
file in your preferred text editor.
sudo vi /etc/mongodb-mms/automation-agent.config
Add the following configuration key:
Key | Value |
---|---|
httpProxy
|
URL (hostname and port) of to your proxy server. |
The data directory stores MongoDB data and must be owned by the
mongod
user. For an existing MongoDB deployment, ensure the
directory has the
mongod
user as owner. If no MongoDB deployment
exists, create the directory and set the owner.
The following commands create a data directory and set the owner as
the
mongod
user:
sudo mkdir /data; sudo chown mongod:mongod /data
Issue the following command:
sudo service mongodb-mms-automation-agent start
In the Install Agent Instructions modal:
Using a
tar
archive:
Your project has no deployments and you see a prompt to get started.
From the Build New Deployment menu, select the type of deployment you wish to add:
If, on the Create New <Deployment> page, Cloud Manager cannot detect any hosts with the MongoDB Agent installed, you see a banner displayed at the top of the Create New <Deployment> page.
Click the see instructions link.
From the Select Your Server’s Operating System menu, click RHEL/CentOS (7.X/8.X), SUSE12, SUSE15, Amazon Linux 2 - TAR .
Click Next .
Note
Starting with this step, follow the MongoDB Agent installation modal and copy the provided commands into the Linux shell.
From a system shell on the host that will run the MongoDB Agent,
issue the following
curl
command to download the installer for
RHEL for 64-bit x86:
curl -OL https://cloud.mongodb.com/download/agent/automation/mongodb-mms-automation-agent-latest.rhel7_x86_64.tar.gz
You can install the MongoDB Agent in any directory. If you want to move the archive to another directory before extracting, you may do so.
To install the MongoDB Agent, extract the archive:
tar -xvzf mongodb-mms-automation-agent-<VERSION>.rhel7_x86_64.tar.gz
Change into the directory that was created after extracting the MongoDB Agent binary:
cd mongodb-mms-automation-agent-<VERSION>.rhel7_x86_64
In the directory where you installed the MongoDB Agent, open the
local.config
file in your preferred text editor.
vi <install-path>/local.config
Update the following configuration options:
Key | Value |
---|---|
mmsGroupId
|
ProjectID
of your project.
|
mmsApiKey
|
Agent API key of your project. |
To configure the MongoDB Agent to connect to Cloud Manager via a proxy
server, you must specify the server in the
httpProxy
environment variable.
In the directory where you installed the MongoDB Agent, open the
local.config
file in your preferred text editor.
vi <install-path>/local.config
Add the following configuration key:
Key | Value |
---|---|
httpProxy
|
URL (hostname and port) of to your proxy server. |
Create the following directories to store files that the MongoDB Agent needs.
Note
The use of
mongodb-mms-automation
in the file path is a
legacy artifact and does not mean that the MongoDB Agent is being
installed with Automation configured.
Component | Default Directory | Description |
---|---|---|
Binaries |
/var/lib/mongodb-mms-automation
|
These are the binaries that the MongoDB Agent manages. They include the MongoDB Agent, BI Connector, and MongoDB binaries. |
MongoDB Agent logs |
/var/log/mongodb-mms-automation
|
These are the log files that the MongoDB Agent creates. |
MongoDB databases |
/data
|
These are the databases that the MongoDB Agent creates and manages. |
Run the following commands to create the directories:
sudo mkdir -m 755 -p /var/lib/mongodb-mms-automation
sudo mkdir -m 755 -p /var/log/mongodb-mms-automation
sudo mkdir -m 755 -p /data
Using a Different Path than
/var/lib
By default, the Agent binaries and Cloud Manager
configuration backup file are located in
/var/lib/mongodb-mms-automation
.
If you want to store these files in a different
directory, follow these procedures:
To change the location of the Agent Binaries:
Click Deployment , then Agents , and then Downloads & Settings .
Below the Download Directory heading, click the pencil icon to the right of the path shown in Download Directory (Linux) .
Change the path to the new path you want.
Click Save .
Create the new directory you specified on each host that runs an Agent.
sudo mkdir -m 755 -p /<newPath>
To change the location of the Agent configuration backup:
Open the Agent configuration file in your preferred text editor.
Change the
mmsConfigBackup
setting to the new path for
the configuration backup file.
mmsConfigBackup=/<newPath>/mms-cluster-config-backup.json
Save the Agent configuration file.
Move the configuration backup file to the new directory.
sudo mv /var/lib/mongodb-mms-automation/mms-cluster-config-backup.json /<newPath>
Run the following commands:
# Create mongod user and group if they do not exist
if ! sudo /usr/bin/id -g mongod &>/dev/null; then
sudo /usr/sbin/groupadd -r mongod
fi
# Create mongod user if they do not exist and assign
# them to the mongod group
if ! sudo /usr/bin/id mongod &>/dev/null; then
sudo /usr/sbin/useradd -M -r -g mongod \
-d /var/lib/mongo -s /bin/false \
-c mongod mongod > /dev/null 2>&1
fi
# Grant the mongod:mongod user and group permissions
# to manage deployments.
sudo chown mongod:mongod /var/lib/mongod-mms-automation
sudo chown mongod:mongod /var/log/mongod-mms-automation
sudo chown mongod:mongod /data
From the directory in which you installed the MongoDB Agent and as the system user you created in the last step, issue the following command:
nohup ./mongodb-mms-automation-agent \
--config=local.config \
>> /var/log/mongodb-mms-automation/automation-agent-fatal.log 2>&1 &
In the Install Agent Instructions modal:
On RHEL / CentOS (7.x) on PowerPC architecture (managing MongoDB 3.4 or later deployments):
Important
Starting with
version 10.24.0.6714-1
, when you install the MongoDB Agent
using
deb
or
rpm
packages, the package doesn’t add
MongoDB binaries to the
PATH
environment variable.
If your deployment depends on the presence of MongoDB binaries in
the
PATH
, you must manually add the paths to MongoDB
binaries to the
PATH
. To learn how to update environment
variables, refer to your operating system’s documentation.
Using an
rpm
package:
Your project has no deployments and you see a prompt to get started.
From the Build New Deployment menu, select the type of deployment you wish to add:
If, on the Create New <Deployment> page, Cloud Manager cannot detect any hosts with the MongoDB Agent installed, you see a banner displayed at the top of the Create New <Deployment> page.
Click the see instructions link.
From the Select Your Server’s Operating System menu, click RHEL/CentOS (7.X) Power (ppc64le) - RPM .
Click Next .
Note
Starting with this step, follow the MongoDB Agent installation modal and copy the provided commands into the Linux shell.
From a system shell on the host that will run the MongoDB Agent,
issue the following
curl
command to download the installer for
RHEL 7 for PowerPC:
curl -OL https://cloud.mongodb.com/download/agent/automation/mongodb-mms-automation-agent-manager-latest.ppc64le.rhel7.rpm
In the directory where you installed the MongoDB Agent, open the
automation-agent.config
file in your preferred text editor.
sudo vi /etc/mongodb-mms/automation-agent.config
Update the following configuration options:
Key | Value |
---|---|
mmsGroupId
|
ProjectID
of your project.
|
mmsApiKey
|
Agent API key of your project. |
To configure the MongoDB Agent to connect to Cloud Manager via a proxy
server, you must specify the server in the
httpProxy
environment variable.
In the directory where you installed the MongoDB Agent, open the
automation-agent.config
file in your preferred text editor.
sudo vi /etc/mongodb-mms/automation-agent.config
Add the following configuration key:
Key | Value |
---|---|
httpProxy
|
URL (hostname and port) of to your proxy server. |
The data directory stores MongoDB data and must be owned by the
mongod
user. For an existing MongoDB deployment, ensure the
directory has the
mongod
user as owner. If no MongoDB deployment
exists, create the directory and set the owner.
The following commands create a data directory and set the owner as
the
mongod
user:
sudo mkdir /data; sudo chown mongod:mongod /data
Issue the following command:
sudo service mongodb-mms-automation-agent start
In the Install Agent Instructions modal:
Using a
tar
archive:
Your project has no deployments and you see a prompt to get started.
From the Build New Deployment menu, select the type of deployment you wish to add:
If, on the Create New <Deployment> page, Cloud Manager cannot detect any hosts with the MongoDB Agent installed, you see a banner displayed at the top of the Create New <Deployment> page.
Click the see instructions link.
From the Select Your Server’s Operating System menu, click RHEL/CentOS (7.X) Power (ppc64le) - TAR .
Click Next .
Note
Starting with this step, follow the MongoDB Agent installation modal and copy the provided commands into the Linux shell.
From a system shell on the host that will run the MongoDB Agent,
issue the following
curl
command to download the installer for
RHEL 7 for PowerPC:
curl -OL https://cloud.mongodb.com/download/agent/automation/mongodb-mms-automation-agent-latest.rhel7_ppc64le.tar.gz
You can install the MongoDB Agent in any directory. If you want to move the archive to another directory before extracting, you may do so.
To install the MongoDB Agent, extract the archive:
tar -xvzf mongodb-mms-automation-agent-<VERSION>.rhel7_ppc64le.tar.gz
Change into the directory that was created after extracting the MongoDB Agent binary:
cd mongodb-mms-automation-agent-<VERSION>.rhel7_ppc64le
In the directory where you installed the MongoDB Agent, open the
local.config
file in your preferred text editor.
vi <install-path>/local.config
Update the following configuration options:
Key | Value |
---|---|
mmsGroupId
|
ProjectID
of your project.
|
mmsApiKey
|
Agent API key of your project. |
To configure the MongoDB Agent to connect to Cloud Manager via a proxy
server, you must specify the server in the
httpProxy
environment variable.
In the directory where you installed the MongoDB Agent, open the
local.config
file in your preferred text editor.
vi <install-path>/local.config
Add the following configuration key:
Key | Value |
---|---|
httpProxy
|
URL (hostname and port) of to your proxy server. |
Create the following directories to store files that the MongoDB Agent needs.
Note
The use of
mongodb-mms-automation
in the file path is a
legacy artifact and does not mean that the MongoDB Agent is being
installed with Automation configured.
Component | Default Directory | Description |
---|---|---|
Binaries |
/var/lib/mongodb-mms-automation
|
These are the binaries that the MongoDB Agent manages. They include the MongoDB Agent, BI Connector, and MongoDB binaries. |
MongoDB Agent logs |
/var/log/mongodb-mms-automation
|
These are the log files that the MongoDB Agent creates. |
MongoDB databases |
/data
|
These are the databases that the MongoDB Agent creates and manages. |
Run the following commands to create the directories:
sudo mkdir -m 755 -p /var/lib/mongodb-mms-automation
sudo mkdir -m 755 -p /var/log/mongodb-mms-automation
sudo mkdir -m 755 -p /data
Using a Different Path than
/var/lib
By default, the Agent binaries and Cloud Manager
configuration backup file are located in
/var/lib/mongodb-mms-automation
.
If you want to store these files in a different
directory, follow these procedures:
To change the location of the Agent Binaries:
Click Deployment , then Agents , and then Downloads & Settings .
Below the Download Directory heading, click the pencil icon to the right of the path shown in Download Directory (Linux) .
Change the path to the new path you want.
Click Save .
Create the new directory you specified on each host that runs an Agent.
sudo mkdir -m 755 -p /<newPath>
To change the location of the Agent configuration backup:
Open the Agent configuration file in your preferred text editor.
Change the
mmsConfigBackup
setting to the new path for
the configuration backup file.
mmsConfigBackup=/<newPath>/mms-cluster-config-backup.json
Save the Agent configuration file.
Move the configuration backup file to the new directory.
sudo mv /var/lib/mongodb-mms-automation/mms-cluster-config-backup.json /<newPath>
Run the following commands:
# Create mongod user and group if they do not exist
if ! sudo /usr/bin/id -g mongod &>/dev/null; then
sudo /usr/sbin/groupadd -r mongod
fi
# Create mongod user if they do not exist and assign
# them to the mongod group
if ! sudo /usr/bin/id mongod &>/dev/null; then
sudo /usr/sbin/useradd -M -r -g mongod \
-d /var/lib/mongo -s /bin/false \
-c mongod mongod > /dev/null 2>&1
fi
# Grant the mongod:mongod user and group permissions
# to manage deployments.
sudo chown mongod:mongod /var/lib/mongod-mms-automation
sudo chown mongod:mongod /var/log/mongod-mms-automation
sudo chown mongod:mongod /data
From the directory in which you installed the MongoDB Agent and as the system user you created in the last step, issue the following command:
nohup ./mongodb-mms-automation-agent \
--config=local.config \
>> /var/log/mongodb-mms-automation/automation-agent-fatal.log 2>&1 &
In the Install Agent Instructions modal:
On zSeries architecture (managing MongoDB 4.0 or later deployments):
Running RHEL / CentOS 7.x/8x:
Running RHEL / CentOS 7.x/8.x using the
rpm
package
manager:
Your project has no deployments and you see a prompt to get started.
From the Build New Deployment menu, select the type of deployment you wish to add:
If, on the Create New <Deployment> page, Cloud Manager cannot detect any hosts with the MongoDB Agent installed, you see a banner displayed at the top of the Create New <Deployment> page.
Click the see instructions link.
From the Select Your Server’s Operating System menu, click RHEL 7.X/8.X Z-Series (s390x) - RPM .
Click Next .
Note
Starting with this step, follow the MongoDB Agent installation modal and copy the provided commands into the Linux shell.
From a system shell on the host that will run the MongoDB Agent,
issue the following
curl
command to download the installer for
RHEL 7.X/8.X for IBM zSeries:
curl -OL https://cloud.mongodb.com/download/agent/automation/mongodb-mms-automation-agent-manager-latest.s390x.rhel7.rpm
In the directory where you installed the MongoDB Agent, open the
automation-agent.config
file in your preferred text editor.
sudo vi /etc/mongodb-mms/automation-agent.config
Update the following configuration options:
Key | Value |
---|---|
mmsGroupId
|
ProjectID
of your project.
|
mmsApiKey
|
Agent API key of your project. |
To configure the MongoDB Agent to connect to Cloud Manager via a proxy
server, you must specify the server in the
httpProxy
environment variable.
In the directory where you installed the MongoDB Agent, open the
automation-agent.config
file in your preferred text editor.
sudo vi /etc/mongodb-mms/automation-agent.config
Add the following configuration key:
Key | Value |
---|---|
httpProxy
|
URL (hostname and port) of to your proxy server. |
The data directory stores MongoDB data and must be owned by the
mongod
user. For an existing MongoDB deployment, ensure the
directory has the
mongod
user as owner. If no MongoDB deployment
exists, create the directory and set the owner.
The following commands create a data directory and set the owner as
the
mongod
user:
sudo mkdir /data; sudo chown mongod:mongod /data
Issue the following command:
sudo service mongodb-mms-automation-agent start
In the Install Agent Instructions modal:
On ARM64 architecture running RHEL 8.x or Amazon Linux 2 (managing MongoDB 4.4 or later deployments):
Important
Starting with
version 10.24.0.6714-1
, when you install the MongoDB Agent
using
deb
or
rpm
packages, the package doesn’t add
MongoDB binaries to the
PATH
environment variable.
If your deployment depends on the presence of MongoDB binaries in
the
PATH
, you must manually add the paths to MongoDB
binaries to the
PATH
. To learn how to update environment
variables, refer to your operating system’s documentation.
Running RHEL 8.x or Amazon Linux 2 using the rpm package manager (managing MongoDB 4.4 or later deployments):
Your project has no deployments and you see a prompt to get started.
From the Build New Deployment menu, select the type of deployment you wish to add:
If, on the Create New <Deployment> page, Cloud Manager cannot detect any hosts with the MongoDB Agent installed, you see a banner displayed at the top of the Create New <Deployment> page.
Click the see instructions link.
From the Select Your Server’s Operating System menu, click RHEL 8.X, Amazon Linux 2 - RPM .
Click Next .
Note
Starting with this step, follow the MongoDB Agent installation modal and copy the provided commands into the Linux shell.
From a system shell on the host that will run the MongoDB Agent,
issue the following
curl
command to download the installer for
RHEL 8 or Amazon Linux 2 for ARM64:
curl -OL https://cloud.mongodb.com/download/agent/automation/mongodb-mms-automation-agent-manager-latest.aarch64.amzn2.rpm
In the directory where you installed the MongoDB Agent, open the
automation-agent.config
file in your preferred text editor.
sudo vi /etc/mongodb-mms/automation-agent.config
Update the following configuration options:
Key | Value |
---|---|
mmsGroupId
|
ProjectID
of your project.
|
mmsApiKey
|
Agent API key of your project. |
To configure the MongoDB Agent to connect to Cloud Manager via a proxy
server, you must specify the server in the
httpProxy
environment variable.
In the directory where you installed the MongoDB Agent, open the
automation-agent.config
file in your preferred text editor.
sudo vi /etc/mongodb-mms/automation-agent.config
Add the following configuration key:
Key | Value |
---|---|
httpProxy
|
URL (hostname and port) of to your proxy server. |
The data directory stores MongoDB data and must be owned by the
mongod
user. For an existing MongoDB deployment, ensure the
directory has the
mongod
user as owner. If no MongoDB deployment
exists, create the directory and set the owner.
The following commands create a data directory and set the owner as
the
mongod
user:
sudo mkdir /data; sudo chown mongod:mongod /data
Issue the following command:
sudo service mongodb-mms-automation-agent start
In the Install Agent Instructions modal:
Using a
tar
archive:
Your project has no deployments and you see a prompt to get started.
From the Build New Deployment menu, select the type of deployment you wish to add:
If, on the Create New <Deployment> page, Cloud Manager cannot detect any hosts with the MongoDB Agent installed, you see a banner displayed at the top of the Create New <Deployment> page.
Click the see instructions link.
From the Select Your Server’s Operating System menu, click RHEL 8.X, Amazon Linux 2 - TAR .
Click Next .
Note
Starting with this step, follow the MongoDB Agent installation modal and copy the provided commands into the Linux shell.
From a system shell on the host that will run the MongoDB Agent,
issue the following
curl
command to download the installer for
RHEL 8.x or Amazon Linux 2 for ARM64:
curl -OL https://cloud.mongodb.com/download/agent/automation/mongodb-mms-automation-agent-latest.amzn2_aarch64.tar.gz
You can install the MongoDB Agent in any directory. If you want to move the archive to another directory before extracting, you may do so.
To install the MongoDB Agent, extract the archive:
tar -xvzf mongodb-mms-automation-agent-<VERSION>.amzn2_aarch64.tar.gz
Change into the directory that was created after extracting the MongoDB Agent binary:
cd mongodb-mms-automation-agent-<VERSION>.amzn2_aarch64
In the directory where you installed the MongoDB Agent, open the
local.config
file in your preferred text editor.
vi <install-path>/local.config
Update the following configuration options:
Key | Value |
---|---|
mmsGroupId
|
ProjectID
of your project.
|
mmsApiKey
|
Agent API key of your project. |
To configure the MongoDB Agent to connect to Cloud Manager via a proxy
server, you must specify the server in the
httpProxy
environment variable.
In the directory where you installed the MongoDB Agent, open the
local.config
file in your preferred text editor.
vi <install-path>/local.config
Add the following configuration key:
Key | Value |
---|---|
httpProxy
|
URL (hostname and port) of to your proxy server. |
Create the following directories to store files that the MongoDB Agent needs.
Note
The use of
mongodb-mms-automation
in the file path is a
legacy artifact and does not mean that the MongoDB Agent is being
installed with Automation configured.
Component | Default Directory | Description |
---|---|---|
Binaries |
/var/lib/mongodb-mms-automation
|
These are the binaries that the MongoDB Agent manages. They include the MongoDB Agent, BI Connector, and MongoDB binaries. |
MongoDB Agent logs |
/var/log/mongodb-mms-automation
|
These are the log files that the MongoDB Agent creates. |
MongoDB databases |
/data
|
These are the databases that the MongoDB Agent creates and manages. |
Run the following commands to create the directories:
sudo mkdir -m 755 -p /var/lib/mongodb-mms-automation
sudo mkdir -m 755 -p /var/log/mongodb-mms-automation
sudo mkdir -m 755 -p /data
Using a Different Path than
/var/lib
By default, the Agent binaries and Cloud Manager
configuration backup file are located in
/var/lib/mongodb-mms-automation
.
If you want to store these files in a different
directory, follow these procedures:
To change the location of the Agent Binaries:
Click Deployment , then Agents , and then Downloads & Settings .
Below the Download Directory heading, click the pencil icon to the right of the path shown in Download Directory (Linux) .
Change the path to the new path you want.
Click Save .
Create the new directory you specified on each host that runs an Agent.
sudo mkdir -m 755 -p /<newPath>
To change the location of the Agent configuration backup:
Open the Agent configuration file in your preferred text editor.
Change the
mmsConfigBackup
setting to the new path for
the configuration backup file.
mmsConfigBackup=/<newPath>/mms-cluster-config-backup.json
Save the Agent configuration file.
Move the configuration backup file to the new directory.
sudo mv /var/lib/mongodb-mms-automation/mms-cluster-config-backup.json /<newPath>
Run the following commands:
# Create mongod user and group if they do not exist
if ! sudo /usr/bin/id -g mongod &>/dev/null; then
sudo /usr/sbin/groupadd -r mongod
fi
# Create mongod user if they do not exist and assign
# them to the mongod group
if ! sudo /usr/bin/id mongod &>/dev/null; then
sudo /usr/sbin/useradd -M -r -g mongod \
-d /var/lib/mongo -s /bin/false \
-c mongod mongod > /dev/null 2>&1
fi
# Grant the mongod:mongod user and group permissions
# to manage deployments.
sudo chown mongod:mongod /var/lib/mongod-mms-automation
sudo chown mongod:mongod /var/log/mongod-mms-automation
sudo chown mongod:mongod /data
From the directory in which you installed the MongoDB Agent and as the system user you created in the last step, issue the following command:
nohup ./mongodb-mms-automation-agent \
--config=local.config \
>> /var/log/mongodb-mms-automation/automation-agent-fatal.log 2>&1 &
In the Install Agent Instructions modal:
Use this procedure to install Linux systems that do not use
deb
or
rpm
packages.
Your project has no deployments and you see a prompt to get started.
From the Build New Deployment menu, select the type of deployment you wish to add:
If, on the Create New <Deployment> page, Cloud Manager cannot detect any hosts with the MongoDB Agent installed, you see a banner displayed at the top of the Create New <Deployment> page.
Click the see instructions link.
From the Select Your Server’s Operating System menu, click Other Linux - TAR .
Click Next .
Note
Starting with this step, follow the MongoDB Agent installation modal and copy the provided commands into the Linux shell.
From a system shell on the host that will run the MongoDB Agent,
issue the following
curl
command to download the installer for
Generic 64-bit Linux:
curl -OL https://cloud.mongodb.com/download/agent/automation/mongodb-mms-automation-agent-latest.linux_x86_64.tar.gz
You can install the MongoDB Agent in any directory. If you want to move the archive to another directory before extracting, you may do so.
To install the MongoDB Agent, extract the archive:
tar -xvzf mongodb-mms-automation-agent-<VERSION>.linux_x86_64.tar.gz
Change into the directory that was created after extracting the MongoDB Agent binary:
cd mongodb-mms-automation-agent-<VERSION>.linux_x86_64
In the directory where you installed the MongoDB Agent, open the
local.config
file in your preferred text editor.
vi <install-path>/local.config
Update the following configuration options:
Key | Value |
---|---|
mmsGroupId
|
ProjectID
of your project.
|
mmsApiKey
|
Agent API key of your project. |
To configure the MongoDB Agent to connect to Cloud Manager via a proxy
server, you must specify the server in the
httpProxy
environment variable.
In the directory where you installed the MongoDB Agent, open the
local.config
file in your preferred text editor.
vi <install-path>/local.config
Add the following configuration key:
Key | Value |
---|---|
httpProxy
|
URL (hostname and port) of to your proxy server. |
Create the following directories to store files that the MongoDB Agent needs.
Note
The use of
mongodb-mms-automation
in the file path is a
legacy artifact and does not mean that the MongoDB Agent is being
installed with Automation configured.
Component | Default Directory | Description |
---|---|---|
Binaries |
/var/lib/mongodb-mms-automation
|
These are the binaries that the MongoDB Agent manages. They include the MongoDB Agent, BI Connector, and MongoDB binaries. |
MongoDB Agent logs |
/var/log/mongodb-mms-automation
|
These are the log files that the MongoDB Agent creates. |
MongoDB databases |
/data
|
These are the databases that the MongoDB Agent creates and manages. |
Run the following commands to create the directories:
sudo mkdir -m 755 -p /var/lib/mongodb-mms-automation
sudo mkdir -m 755 -p /var/log/mongodb-mms-automation
sudo mkdir -m 755 -p /data
Using a Different Path than
/var/lib
By default, the Agent binaries and Cloud Manager
configuration backup file are located in
/var/lib/mongodb-mms-automation
.
If you want to store these files in a different
directory, follow these procedures:
To change the location of the Agent Binaries:
Click Deployment , then Agents , and then Downloads & Settings .
Below the Download Directory heading, click the pencil icon to the right of the path shown in Download Directory (Linux) .
Change the path to the new path you want.
Click Save .
Create the new directory you specified on each host that runs an Agent.
sudo mkdir -m 755 -p /<newPath>
To change the location of the Agent configuration backup:
Open the Agent configuration file in your preferred text editor.
Change the
mmsConfigBackup
setting to the new path for
the configuration backup file.
mmsConfigBackup=/<newPath>/mms-cluster-config-backup.json
Save the Agent configuration file.
Move the configuration backup file to the new directory.
sudo mv /var/lib/mongodb-mms-automation/mms-cluster-config-backup.json /<newPath>
Run the following commands:
# Create mongodb user and group if they do not exist
if ! sudo /usr/bin/id -g mongodb &>/dev/null; then
sudo /usr/sbin/groupadd -r mongodb
fi
# Create mongodb user if they do not exist and assign
# them to the mongodb group
if ! sudo /usr/bin/id mongodb &>/dev/null; then
sudo /usr/sbin/useradd -M -r -g mongodb \
-d /var/lib/mongo -s /bin/false \
-c mongodb mongodb > /dev/null 2>&1
fi
# Grant the mongodb:mongodb user and group permissions
# to manage deployments.
sudo chown mongodb:mongodb /var/lib/mongodb-mms-automation
sudo chown mongodb:mongodb /var/log/mongodb-mms-automation
sudo chown mongodb:mongodb /data
From the directory in which you installed the MongoDB Agent and as the system user you created in the last step, issue the following command:
nohup ./mongodb-mms-automation-agent \
--config=local.config \
>> /var/log/mongodb-mms-automation/automation-agent-fatal.log 2>&1 &
In the Install Agent Instructions modal: