- Install On Prem MMS >
- Install On Prem MMS for Development and Testing
Install On Prem MMS for Development and Testing¶
On this page
Warning
This setup is not suitable for a production deployment.
Overview¶
MMS On Prem is a package that lets you run the MongoDB Management Service (MMS) on site. MMS monitors and backs up your MongoDB infrastructure.
On Prem MMS uses the components described in On Prem MMS Components. In a test deployment, you can run an entire On Prem MMS deployment on a single system as in the Minimal Deployment diagram. You will deploy a replica set for testing on a separate system.
The minimal deployment is for testing and development purposes only. Running on a single server is not* suitable for production deployments.
Procedures¶
Set up the On Prem Service¶
Set up a server and firewall.¶
Prepare the server that will run
- the MMS On Prem components,
- the Application Database, and
- the Backup Blockstore Database.
Use a RHEL 6+ or Amazon Linux Server with at least:
- 15 GB of memory
- 50 GB of disk space for the root partition
For example, you can meet the size requirements by using an AWS EC2
m3.xlarge
instance and changing the size of the root partition from
8 GB to 50 GB. When you log into the instance, execute “df -h
” to
verify the root partition has 50 GB of space.
Set up a firewall or EC2 Security Group that:
- Allows administrators to SSH into the server.
- Allows MMS users to connect from browsers to ports
8080
and8081
through the server’s public IP address.
Configure ulimits
.¶
Remove the default ulimit
settings that come with the operating
system:
Edit the /etc/security/limits.conf
file to configure the
following settings:
Install MongoDB 2.6.¶
Install MongoDB following the procedure in the MongoDB manual.
Download the MMS Application Package.¶
Download the latest version of the MMS Application Package from the MMS downloads page. The MMS Application Package is listed as “Monitoring and Core” on the downloads page.
Download the On Prem MMS Package by issuing
the following command. Substitute the MMS version for <version>
:
For example, for version 1.5.0.130
issue:
Install the MMS Application Package.¶
Install the package using the following command, where <version>
is the MMS version:
For example, for version 1.5.0.130
issue:
Download the Backup Daemon Package.¶
Alternately, you can download the package by issuing the following
command, where <version>
is the MMS version:
For example, for version 1.5.0.130
issue:
Install the Backup Daemon Package.¶
Install the package using the following command, where <version>
is the MMS version:
For example, for version 1.5.0.130
, you would issue the following:
Set up the two backing databases.¶
Create a data directory for each backing database and set
mongod.mongod
as each data directory’s owner. The backing
databases are the MMS
Application Database and MMS Backup Blockstore Database.
The following command creates two data directories, one for each backing database. You can use different directory names:
The following command sets mongod.mongod
as owner of the new
directories:
Start the MongoDB instances for the two backing databases.¶
Start each MongoDB instance using the mongod daemon and
specifying mongod
as the user. Start each instance on its own
dedicated port number and with the data directory you created in the
last step.
The following two commands start separate instances for the MMS Application Database and for the Backup Blockstore Database:
Configure the MMS Application Service.¶
Edit
/opt/mongodb/mms/conf/conf-mms.properties
. Set values for the
following properties, substituting your install’s values for
<public_ip> and mms-admin@example.net:
Start the MMS Application Service.¶
Issue the following command:
Open the MMS On Prem home page.¶
Enter the following URL in a browser, where <public_ip>
is the
public IP address of the server:
Configure the MMS Backup Daemon.¶
Edit
/opt/mongodb/mms-backup-daemon/conf/conf-daemon.properties
to
configure the the following settings:
Start the MMS Backup Daemon.¶
Issue the following command:
Begin Monitoring and Backing Up a Replica Set¶
The following procedure creates a three-member replica set, populates it with data, and then uses the On Prem Service to monitor and backup the replica set.
Set up the server that will run the MongoDB replica set.¶
Use a RHEL 6+ or Amazon Linux Server with at least:
- 3 GB of memory.
- 50 GB of disk space for the root partition.
For example, you can meet the size requirements by using an AWS EC2
m3.medium
instance and changing the size of the root partition from
8 to 50 gigabytes. When you log into the instance, use “df -h
” to
verify the root partition has 50 gigabytes of space.
Configure ulimits
.¶
Remove the default ulimit
settings that come with the operating
system:
Edit the /etc/security/limits.conf
file to configure the
following settings:
Install MongoDB.¶
Use the following series of commands to install MongoDB.
Set up a repository definition by issuing the following command:
Install MongoDB by issuing the following two commands:
Create the data directories for the replica set.¶
Create a data directory for each replica set member and set
mongod.mongod
as each data directory’s owner.
The following command creates the directory /data
and then
creates a data directory for each member of the replica set. You can
use different directory names:
The following command sets mongod.mongod
as owner of the new
directories:
Start a separate MongoDB instance for each replica set member.¶
Start each mongod instance on its own
dedicated port number and with the data directory you created in the
last step. For each instance, specify mongod
as the user. Start each
instance with the replSet command-line option specifying the name of the replica set.
The following three commands start separate instances for each member
of a new replica set named example
:
Initiate the replica set.¶
Connect to one of the members and initiate the replica set using the
rs.initiate() method. Add the
other members using the rs.add()
method. The rs.add() method
requires the hostame of the server: if necessary, first execute the
hostname
command to determine the name.
Use the following sequence of commands to initiate the replica set and
add members. Replace <hostname>
with the hostname of your server.
The commands use the mongod running on port 27017
to
initiate the set and add the other members.
Connect to the replica set and verify the replica set configuration.¶
To connect to the replica set, issue the mongo command:
To verify the configuration, issue the rs.status() method:
Verify that the members
array lists the three members. For a full description of the output, see the explanation in replSetGetStatus.
Add data to the replica set.¶
While still connected to the replica set, issue the following for
loop to create a collection titled testData
and populate it with
25,000 documents, each with an _id
field and a field x
set to
a random string.
Register the first user.¶
Click the Register link and enter the user’s information. When you finish, you will be logged into the MMS application.
# The registration email will be sent to the address you specified in
# conf-mms.properties
.
For more information on creating and managing users, see Manage Users.
Set up the Monitoring Service for the replica set.¶
On the Welcome
page, click the Get Started button for
Monitoring. If the Welcome
page is not visible, click the
Settings tab to refresh MMS and then click the
Setup tab to display the Welcome
page.
After you click Get Started, follow the instructions, which will take you through steps to download, configure, and run the Monitoring Agent.
When the agent is running, the instructions prompt you to add a host. On
the Add a Host page, enter the hostname and port of the
replica set member running on port 27017
. For example, enter
<hostname>:27017
, replacing <hostname>
with the hostname of the
server running the replica set.
When you finish the instructions, the Monitoring Agent is running and monitoring the replica set.
Set up the Backup Service for the replica set.¶
On the Welcome
page, click the Get Started button for
Backup. If the Welcome
page is not visible, click the
Settings tab to refresh MMS and then click the
Setup tab to display the Welcome
page.
After you click Get Started, follow the instructions to set
up the Backup Service. When you reach the Enable Backup
page, select the example
replica set, which is the set you created
when initializing the replica set members. If you chose a different name
when initializing the members, choose that name here instead.
When you finish the instructions, the Backup Agent is running and backing up the replica set. It may take up to 30 minutes for the first snapshot to complete, even for a very small replica set.
While you are waiting, this is a good time to take a tour of your MMS Backup environment.