Navigation
This version of the documentation is archived and no longer supported. To learn how to upgrade your version of MongoDB Ops Manager, refer to the upgrade documentation.
You were redirected from a different version of the documentation. Click here to go back.

Install the Automation Agent from an Archive

Overview

Ops Manager Automation relies on an Automation Agent, which must be installed on every server that runs a monitored MongoDB deployment. The Automation Agents periodically poll Ops Manager to determine the goal configuration, deploy changes as needed, and report deployment status back to Ops Manager.

This procedure installs the Automation Agent on a Linux server using an tar.gz archive file.

Automation Agents can run only on 64-bit architectures.

Prerequisites

Server Networking Access

The servers that host the MongoDB processes must have full networking access to each other through their fully qualified domain names (FQDNs). You can view a server’s FQDN by issuing hostname -f in a shell connected to the server. Each server must be able to reach every other server through the FQDN.

Ensure that your network configuration allows each Automation Agent to connect to every MongoDB process listed on the Deployment tab. Ensure that the network and security systems, including all interfaces and firewalls, allow these connections.

Installing to a Server that Already Runs MongoDB

If you install the Automation Agent to a server that is already running a MongoDB process, the agent must have:

  • Permission to stop the MongoDB process. The Automation Agent will restart the process using the agent’s own set of MongoDB binaries. If you had installed MongoDB with a package manager, use the same package manager to install the Automation Agent. This gives the agent the same owner as MongoDB.
  • Read and Write permissions on the MongoDB data directory and log directory.
  • Permission to stop, start, and update any existing Monitoring and Backup Agents.

Installing to a Server Before Installing MongoDB

If you deploy the Automation Agent to a server that does not have MongoDB installed, ensure the user that owns the Automation Agent has Read and Write permissions on the MongoDB data and log directories you plan to use.

Install the Automation Agent from an Archive

1

Download the latest version of the Automation Agent archive.

On a system shell, issue a command that resembles the following. Replace linux_x86_64 with your platform, as needed:

curl -OL <OpsManagerCentralURL>/download/agent/automation/mongodb-mms-automation-agent-latest.linux_x86_64.tar.gz
2

Install the Automation Agent.

To install the agent, extract the archive using a command that resembles the following. Replace linux_x86_64 with your platform, as needed:

tar -xf mongodb-mms-automation-agent-latest.linux_x86_64.tar.gz

The Automation Agent is installed.

3

Edit the local.config file to include your Group ID and agent API key.

In the directory where you installed the Automation Agent, edit the local.config file.

  • For mmsGroupId, enter your GroupID as the value.
  • For mmsApiKey, enter the group’s agent API key.
  • For mmsBaseUrl, enter the URL of the Ops Manager Application. Include the port number.
mmsGroupId=<Group ID>
mmsApiKey=<agent API key>
mmsBaseUrl=<application URL>
4

Optional: Configure the Automation Agent to use a proxy server.

To configure the agent to connect to Ops Manager via a proxy server, you must specify the server in the httpProxy environment variable. In the <install-directory>/local.config file, set the httpProxy value to the URL of to your proxy server:

httpProxy="http://proxy.example.com:9000"
5

Create the automation and data directories.

Create the directories for the Automation Agent:

Component Default Directory
Automation Agent binaries /var/lib/mongodb-mms-automation
Automation Agent logs /var/log/mongodb-mms-automation
MongoDB databases created by the Automation Agent /data

The system user that runs the Automation Agent should own these 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 Automation Agent binaries and Ops 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 Automation Agent Binaries:

  1. Click Settings, then Agents.

  2. Click the pencil icon to the right of the path shown in Download Directory (Linux/MacOS).

  3. Change the path to the new path you want.

  4. Click Save.

  5. Create the new directory you specified on each host that runs an Automation Agent.

    sudo mkdir -m 755 -p /<newPath>
    

    Important

    Make sure the system user that runs the Automation Agent can write to this new directory.

To change the location of the Automation Agent configuration backup:

  1. Open the Automation Agent configuration file in your favorite text editor.

  2. Change the mmsConfigBackup setting to the new path for the configuration backup file.

  3. Save the Automation Agent configuration file.

  4. Move the configuration backup file to the new directory.

    sudo mv /var/lib/mongodb-mms-automation/mms-cluster-config-backup.json /<newPath>
    
6

Start the Automation Agent.

From the directory in which you installed the Automation Agent, issue the following command:

nohup ./mongodb-mms-automation-agent >> automation-agent.log 2>&1 &

Update the Automation Agent from an Archive

Important

The preferred way to update the Automation Agent is through the Ops Manager UI. If an Automation Agent is out of date, Ops Manager displays a warning on the Deployment page and provides a link to perform the update automatically.

1

Stop any currently running Automation Agents.

Issue the following command:

pkill -f mongodb-mms-automation-agent
2

Download the latest version of the Automation Agent archive.

On a system shell, issue a command that resembles the following. Replace linux_x86_64 with your platform, as needed:

curl -OL <OpsManagerCentralURL>/download/agent/automation/mongodb-mms-automation-agent-latest.linux_x86_64.tar.gz
3

Install the Automation Agent.

To install the agent, extract the archive using a command that resembles the following. Replace linux_x86_64 with your platform, as needed:

tar -xf mongodb-mms-automation-agent-latest.linux_x86_64.tar.gz

The Automation Agent is installed.

4

Edit the local.config file to include your Group ID and agent API key.

In the directory where you installed the Automation Agent, edit the local.config file.

  • For mmsGroupId, enter your GroupID as the value.
  • For mmsApiKey, enter the group’s agent API key.
  • For mmsBaseUrl, enter the URL of the Ops Manager Application. Include the port number.
mmsGroupId=<Group ID>
mmsApiKey=<agent API key>
mmsBaseUrl=<application URL>
5

Optional: Configure the Automation Agent to use a proxy server.

To configure the agent to connect to Ops Manager via a proxy server, you must specify the server in the httpProxy environment variable. In the <install-directory>/local.config file, set the httpProxy value to the URL of to your proxy server:

httpProxy="http://proxy.example.com:9000"
6

Create the automation and data directories.

Create the directories for the Automation Agent:

Component Default Directory
Automation Agent binaries /var/lib/mongodb-mms-automation
Automation Agent logs /var/log/mongodb-mms-automation
MongoDB databases created by the Automation Agent /data

The system user that runs the Automation Agent should own these 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 Automation Agent binaries and Ops 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 Automation Agent Binaries:

  1. Click Settings, then Agents.

  2. Click the pencil icon to the right of the path shown in Download Directory (Linux/MacOS).

  3. Change the path to the new path you want.

  4. Click Save.

  5. Create the new directory you specified on each host that runs an Automation Agent.

    sudo mkdir -m 755 -p /<newPath>
    

    Important

    Make sure the system user that runs the Automation Agent can write to this new directory.

To change the location of the Automation Agent configuration backup:

  1. Open the Automation Agent configuration file in your favorite text editor.

  2. Change the mmsConfigBackup setting to the new path for the configuration backup file.

  3. Save the Automation Agent configuration file.

  4. Move the configuration backup file to the new directory.

    sudo mv /var/lib/mongodb-mms-automation/mms-cluster-config-backup.json /<newPath>
    
7

Start the Automation Agent.

From the directory in which you installed the Automation Agent, issue the following command:

nohup ./mongodb-mms-automation-agent >> automation-agent.log 2>&1 &