Skip to content

Testing MongoDB OpsManager using containers.

Notifications You must be signed in to change notification settings

maximmai/docker-opsmanager

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

docker-opsmanager

An attempt to use the MongoDB Ops Manager inside Docker.

About

Powered by the following tools:

  • Docker: a portable, lightweight runtime and packaging tool.

See: https://www.docker.com/

  • Docker-compose: a tool for defining and running complex applications with Docker.

See: https://docs.docker.com/compose/

  • 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.

See: https://github.com/tianon/rawdns

How-to

Build the MMS agent image

$ docker build -t "mms-agent" agent/

Start the stack

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

Deploy a sharded cluster

Connect to http://localhost:8080 and create an account.

Next click on the GET STARTED button in the Automation box.

Step1

Then, click on the BEGIN SETUP button.

Step1

Choose Other Remote.

Step1

Select a type of MongoDB deployment, we'll use a Sharded Cluster for the demo purpose.

Step1

Specify details about your deployment, here we'll create a MongoDB cluster with 2 shards and 3 nodes per shard.

Step1

Indicate your number of nodes, this will correspond to the number of mms-agent containers that we will need to start later.

Step1

Choose an agent type (any type is fine, the mms-agent image uses Ubuntu 14.04 anyway).

Step1

Retrieve the following parameters:

  • MMS_GROUP_ID
  • MMS_API_KEY
  • BASE_URL

Step1

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.

About

Testing MongoDB OpsManager using containers.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • ApacheConf 68.4%
  • Shell 31.6%