|
Mini-tutorial:
The goal of this tutorial is to see how Ops Manager can be used in 'local' (no internet) mode to successfully seed the necessary MongoDB binaries. This mode requires the appropriate versions of MongoDB be stored on the Ops Manager application server for download and use by the Automation agents. When using this mode, Ops Manager Automation should be used in the "Advanced Setup" (not the "Get Started" setup mode).
Before starting the Ops Manager application:
When editing the conf-mms.properties file
sudo vi /opt/mongodb/mms/conf/conf-mms.properties
Find the following section:
# The `automation.versions.source` property controls how Ops Manager learns about
|
# new MongoDB releases and from what host(s) the Automation Agents will download
|
# the binaries for those releases.
|
#
|
# mongodb - The manifest of available MongoDB versions will automatically be pulled
|
# from MongoDB, Inc. The automation agents will download MongoDB
|
# binaries from mongodb.org/mongodb.com.
|
# local - The manifest of available MongoDB versions must be supplied on the
|
# Version Manager screen of the Ops Manager UI. The automation agents
|
# will download MongoDB binaries from the Ops Manager Server. The
|
# tarballs containing the binaries must be placed in the directory
|
# specified by the `automation.versions.directory` property.
|
#
|
automation.versions.source=mongodb
|
automation.versions.directory=/opt/mongodb/mms/mongodb-releases/
|
Set automation.versions.source to "local" and choose the automation.versions.directory:
automation.versions.source=local
|
In our example we will use the default automation.versions.directory (/opt/mongodb/mms/mongodb-releases/) as below:
# The `automation.versions.source` property controls how Ops Manager learns about
|
# new MongoDB releases and from what host(s) the Automation Agents will download
|
# the binaries for those releases.
|
#
|
# mongodb - The manifest of available MongoDB versions will automatically be pulled
|
# from MongoDB, Inc. The automation agents will download MongoDB
|
# binaries from mongodb.org/mongodb.com.
|
# local - The manifest of available MongoDB versions must be supplied on the
|
# Version Manager screen of the Ops Manager UI. The automation agents
|
# will download MongoDB binaries from the Ops Manager Server. The
|
# tarballs containing the binaries must be placed in the directory
|
# specified by the `automation.versions.directory` property.
|
#
|
automation.versions.source=local
|
automation.versions.directory=/opt/mongodb/mms/mongodb-releases/
|
Now we can start the Ops Manager application:
sudo service mongodb-mms start
|
Now it's critical we populate the automation.versions.directory with:
1) Any community versions of MongoDB we want to deploy with or attach to (Even if our goal is to upgrade a pre-existing community edition deployment to MongoDB Enterprise).
2) Any platform-specific Enterprise versions of MongoDB we want to deploy with or attach to.
3) And ensure that these files are readable by the Ops Manager application user ("mongodb-mms" by default)
Notes for MongoDB 2.4 and 2.6 Community
- The MongoDB Community edition for 2.4 and 2.6 is not platform-specific, meaning the same binary could be run on all supported linux platforms.
Notes for MongoDB Community 3.0
- With the release of MongoDB 3.0 Community, platform-specific binaries were produced for the first time. The Automation agent does not use these, however.
- For the Automation agent to successfully utilize the MongoDB 3.0 binaries, community versions of MongoDB on 3.0 must be the "Linux 64-bit legacy" version available on mongodb.org/downloads. This "Linux 64-bit legacy" build is Linux platform agnostic (can be used for any Linux platform) like the community versions of 2.4 and 2.6 above.
Notes for MongoDB Enterprise
- We must populate automation.versions.directory with all platform-specific binaries for MongoDB Enterprise that we expect the Automation agent to use (whether when attaching to a pre-existing MongoDB deployment, or deploying something new).
- This means that if our replica set spans multiple Linux platforms, we should populate with both versions.
- Note that the Automation agent does not install the Enterprise dependencies on the servers it runs MongoDB Enterprise on. This means that in order for the Automation agent to successfully deploy to or upgrade to MongoDB Enterprise, we will need to install the Enterprise dependencies before deploying or upgrading, or else our deployment will fail.
Since we're going to upgrade from MongoDB 2.6 Community to MongoDB 3.0 Community and then to MongoDB 3.0 Enterprise, we need to populate the following binaries:
To do this we will go to the automation.versions.directory and download the binaries:
cd /opt/mongodb/mms/mongodb-releases/
|
# Note directory is initially blank
|
#
|
# Download MongoDB Community 2.6 - Linux-64 bit: www.mongodb.org/downloads#previous
|
sudo curl -OL https://fastdl.mongodb.org/linux/mongodb-linux-x86_64-2.6.9.tgz
|
# Download MongoDB Community 3.0 - Linux 64-bit Legacy: mongodb.org/downloads#production
|
sudo curl -OL https://fastdl.mongodb.org/linux/mongodb-linux-x86_64-3.0.1.tgz
|
# Download MongoDB Enterprise 3.0 - SUSE 11: mongodb.com/download
|
sudo curl -OL <URL for mongodb-linux-x86_64-enterprise-suse11-3.0.1.tgz>
|
# Download MongoDB Enterprise 3.0 - SUSE 11: mongodb.com/download
|
sudo curl -OL <URL for mongodb-linux-x86_64-enterprise-suse11-3.0.1.tgz>
|
# Download MongoDB Enterprise 3.0 - Amazon Linux: mongodb.com/download
|
sudo curl -OL <URL for mongodb-linux-x86_64-enterprise-amzn64-3.0.1.tgz>
|
## Now if we run 'ls -l', we have the following:
|
# Ensure the 'mongodb-mms' user owns these files:
|
sudo chown mongodb-mms:mongodb-mms ./*
|
Now we can inspect our automation.versions.directory:
Returns:
/opt/mongodb/mms/mongodb-releases
|
The contents of our directory:
Returns:
total 250928
|
-rw-r--r-- 1 mongodb-mms mongodb-mms 116513825 Mar 24 20:14 mongodb-linux-x86_64-2.6.9.tgz
|
-rw-r--r-- 1 mongodb-mms mongodb-mms 39554547 Mar 24 20:23 mongodb-linux-x86_64-3.0.1.tgz
|
-rw-r--r-- 1 mongodb-mms mongodb-mms 50516472 Mar 24 20:24 mongodb-linux-x86_64-enterprise-amzn64-3.0.1.tgz
|
-rw-r--r-- 1 mongodb-mms mongodb-mms 50356538 Mar 24 20:17 mongodb-linux-x86_64-enterprise-suse11-3.0.1.tgz
|
Now we can go to Ops Manager
1) Register the first user and group at http://<OpsManagerDNS>:8080/
2) Click 'Admin' in the top right corner
3) Click 'Version Manifest'
4) Click to 'Update the MongoDB Version Manifest' or follow instructions if your browser doesn't have internet access
5) Now leave the 'Admin' view and click 'Skip Setup' <-- We want to avoid the restrictiveness of the wizard which expects the newest Community version of MongoDB to be pre-checked (which we are not necessarily going to have here).
6) Navigate to the group's Deployment > Version Manager
7) Here you should be able to select only the versions for which a tar ball was populated above.
Select
- 2.6.9 Community (Left side of Version Manager view)
- 3.0.1 Community (Left side of Version Manager view)
- 3.0.1 Enterprise (Right side of Version Manager view) <-- (DO NOT select the wildcard "3.0.*" since as of Ops Manager 1.6.0 this is going to lead to an error)
8) Scroll up to the top of the Version Manager and click "Review and Deploy"
Now install Automation agents on the Servers you want to manage MongoDB processes on
1) In Ops Manager go to Administration > 'Agents'
2) Follow platform-specific installation steps for the Automation Agent. We'll install on
- 2 servers running SUSE 11 and
- 1 server running Amazon Linux
3) Ensure FQDN hostnames ($hostname -f) are set such that agents can access each other on these hostnames, and start Automation agents
Deploy a MongoDB 2.6 Community Replica Set across these 3 servers (or attach to one pre-existing).
- Remember to set the data directory to a directory that the Automation Agents have permissions to write to.
In the Automation agent logs, we'll see:
- "Starting to download and extract http://<OpsManagerDNS>:8080/automation/mongodb-releases/linux/mongodb-linux-x86_64-2.6.9.tgz into /var/lib/mongodb-mms-automation"
Now we can upgrade to MongoDB 3.0 Community!
In the Automation agent logs, we'll see:
- "Starting to download and extract http://<OpsManagerDNS>:8080/automation/mongodb-releases/linux/mongodb-linux-x86_64-3.0.1.tgz into /var/lib/mongodb-mms-automation" and then "Executing transformation 'ChangeVersion'"
Now we'll upgrade to MongoDB 3.0 Enterprise which requires us to first install the Enterprise Dependencies on the respective servers (platform-specific dependencies for SUSE and Amazon Linux as appropriate):
To install the MongoDB Dependencies on Amazon Linux, run:
sudo yum install openssl net-snmp net-snmp-libs net-snmp-utils cyrus-sasl cyrus-sasl-lib cyrus-sasl-devel cyrus-sasl-gssapi
|
To install the MongoDB Dependencies on SUSE 11, one thing we can do is simply install the MongoDB Enterprise package:
sudo zypper addrepo --no-gpgcheck http://repo.mongodb.com/zypper/suse/11/mongodb-enterprise/stable/x86_64/ mongodb
|
sudo zypper install mongodb-enterprise
|
Now upgrade the replica set to MongoDB 3.0 Enterprise in the UI!
We will see the Automation agent logs show
And we will be in goal state on MongoDB Enterprise 3.0!
|