An attempt to use the MongoDB Ops Manager inside Docker.
Powered by the following tools:
- Docker: a portable, lightweight runtime and packaging tool.
- Docker-compose: a tool for defining and running complex applications with Docker.
- MongoDB Ops Manager: a service for managing, monitoring and backing up a MongoDB infrastructure.
See: https://docs.opsmanager.mongodb.com/current/application/
- RawDNS: a direct, raw DNS interface to the Docker API.
$ docker build -t "mms-agent" agent/
First, you'll need to update the file ops-manager/config/conf-mms.properties and change the ROUTABLE_IP with your IP address.
Then start the stack:
$ docker-compose build && docker-compose up
Connect to http://localhost:8080 and create an account.
Next click on the GET STARTED button in the Automation box.
Then, click on the BEGIN SETUP button.
Choose Other Remote.
Select a type of MongoDB deployment, we'll use a Sharded Cluster for the demo purpose.
Specify details about your deployment, here we'll create a MongoDB cluster with 2 shards and 3 nodes per shard.
Indicate your number of nodes, this will correspond to the number of mms-agent containers that we will need to start later.
Choose an agent type (any type is fine, the mms-agent image uses Ubuntu 14.04 anyway).
Retrieve the following parameters:
- MMS_GROUP_ID
- MMS_API_KEY
- BASE_URL
We'll need these parameters to start the mms-agent containers.
Now is the time to start these containers (replace the BASE_URL, MMS_GROUP_ID and MMS_API_KEY parameters with the values you retrieved previously):
$ docker run --rm \
--dns $(docker inspect -f '{{.NetworkSettings.IPAddress}}' dockeropsmanager_dns_1) \
--dns-search docker \
mms-agent \
/opt/mongodb-mms-automation/bin/mongodb-mms-automation-agent -mmsBaseUrl=BASE_URL -mmsGroupId=MMS_GROUP_ID -mmsApiKey=MMS_API_KEY
Once you have started the appropriate number of containers, return to the Ops Manager and click on the VERIFY AGENT button.
If everything is ok you'll be able to continue your deployment.