Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.
MongoDB Management Service Engineering Team, MongoDB
Cailin Nelson, Cadran Cowansage, Louisa Berger, Bard Bloom, Tim
Olsen...
MMS: MongoDB Management
Service
MMS Automation: What Does It Do?
● Create MongoDB systemsof any size, and any configuration
● Manage MongoDB systems, such...
MMS Automation…. And MMS Provisioning Too
For extra fun, we’ve also added anAmazonAWS integration
which allows you to prov...
MMS Automation: Why?
● Ease of operation
● Expect the unexpected
About This Talk...
● Series of demos
● Questions at the end
MMS Provisioning on AWS
… from 0 to Sharded Cluster in 8 minutes
or less
Raising Your Cluster Right
… MongoDB management the easy
way
Upgrading a Cluster Manually
1. Rundb.upgradeCheckAllDBs()tocheckdatasetforcompatibility
2. Resolveanyincompatibilitesinyo...
Now, using Automation
How does it work?
Automation ≈ Self-Driving Car
● Tell it where you want to go.
o It goes there
● If you steer manually?
o It reroutes and g...
Architecture Introduction
● One agent per machine
● Agent talks to:
o MMS
 instructions
o Mongo
 sense
 control
● No ag...
Automation Cycle
Get Instructions
Inspect Cluster
Adjust Cluster
Sleep 30 sec
Desired State?
You tellAutomation what you want.
Automation makes that happen.
Desired State ≈ Self-driving car’s destinat...
What Automation Knows
1. What you want
a. from MMS
2. What’s actually on the cluster
a. from inspecting the cluster
3. How...
Planning
● Look at what you want vs. what you have
● If they’re the same, yay!
o Check again in 30 seconds
● Else, make a ...
Executing Plans
● Follow the plan, one move at a time.
● Each move has a bunch of actions
● Check expected vs. reality for...
Automation
● Instructions from you
● Information from your cluster
● Expertise about how to run Mongo
● Patience to get al...
Advanced Operations
Oplog Resizing
What is an oplog?
● A capped collection that stores an ordered
history of logical writes to a MongoDB database
● Enables r...
Why resize the oplog?
1. You may want to increase its size to
accommodate a high write rate and/or high
replication lags t...
Resizing the Oplog with
Automation
How to resize an oplog
1. Shutdown a replica set member
2. Start the member in standalone mode, listening on a different p...
Or just have Automation do it
Automating MMS
MongoDB Management Service Engineering Team, MongoDB
Cailin Nelson, Cadran Cowansage, Louisa Berger, Bard Bloom, Tim
Olsen...
Upcoming SlideShare
Loading in …5
×

Automate MongoDB with MongoDB Management Service

3,066 views

Published on

MongoDB Management Service makes operations effortless, reducing complicated tasks to a single click. You can now provision machines, configure replica sets and sharded clusters, and upgrade your MongoDB deployment all through the MMS interface. This session will introduce you to the engineering team at MongoDB building the automation functionality in MMS. We'll walk through demos of all the new MMS features, including provisioning, expanding and contracting a cluster, resizing the oplog, and managing users.

Published in: Technology
  • Be the first to comment

Automate MongoDB with MongoDB Management Service

  1. 1. MongoDB Management Service Engineering Team, MongoDB Cailin Nelson, Cadran Cowansage, Louisa Berger, Bard Bloom, Tim Olsen #MongoDBWorld Automate MongoDB with MMS
  2. 2. MMS: MongoDB Management Service
  3. 3. MMS Automation: What Does It Do? ● Create MongoDB systemsof any size, and any configuration ● Manage MongoDB systems, such as adding capacity or resizing the oplog, with no application downtime ● Upgrade a deployment, with no application downtime … all from the comfort of your web browser.
  4. 4. MMS Automation…. And MMS Provisioning Too For extra fun, we’ve also added anAmazonAWS integration which allows you to provision the servers on which your MongoDB processes will run, directly from MMS. ● Optional component- you can provision your base servers any way you like, doing it via MMS Provisioning is just one way ● Future plans to integrate OpenStack,VMWare, etc.
  5. 5. MMS Automation: Why? ● Ease of operation ● Expect the unexpected
  6. 6. About This Talk... ● Series of demos ● Questions at the end
  7. 7. MMS Provisioning on AWS … from 0 to Sharded Cluster in 8 minutes or less
  8. 8. Raising Your Cluster Right … MongoDB management the easy way
  9. 9. Upgrading a Cluster Manually 1. Rundb.upgradeCheckAllDBs()tocheckdatasetforcompatibility 2. Resolveanyincompatibilitesinyourdeployment 3. Upgradeauthenticationmodel 4. DownloadmongoDBbinariesfor2.6 5. Disablethebalancer 6. Upgradethecluster’smetadata 7. Waitforeachmongostoexitoncompletion 8. Upgradeeachmongosprocess,oneatatime 9. Upgradeeachconfigserver,oneatatime,withthefirstoneupgradedlast. 10. Upgradeeachshard,oneatatime: a. Upgradesecondaries,oneatatime: i. Shut down the mongod ii. Replace the 2.4 binary with the 2.6 binary iii. Restart mongod iv. Wait for member to recover to SECONDARY state b. Stepdowntheprimary c. WaitforanothermembertobeelectedtoPRIMARY d. Upgradepreviousprimary 11. turnbackonthebalancer
  10. 10. Now, using Automation
  11. 11. How does it work?
  12. 12. Automation ≈ Self-Driving Car ● Tell it where you want to go. o It goes there ● If you steer manually? o It reroutes and goes toward your destination ● Bridge out? o It reroutes and goes toward your destination ● Want to go somewhere else? o It reroutes and goes toward your new destination
  13. 13. Architecture Introduction ● One agent per machine ● Agent talks to: o MMS  instructions o Mongo  sense  control ● No agent-agent ● Single executable MMS MongoD MongoS Config Server Auto. Agent MongoD MongoS Config Server Auto. Agent
  14. 14. Automation Cycle Get Instructions Inspect Cluster Adjust Cluster Sleep 30 sec
  15. 15. Desired State? You tellAutomation what you want. Automation makes that happen. Desired State ≈ Self-driving car’s destination.
  16. 16. What Automation Knows 1. What you want a. from MMS 2. What’s actually on the cluster a. from inspecting the cluster 3. How to do various things a. Like “start Mongod” or “init replica set” b. from MongoDB documentation c. preconditions: what has to be true before. d. postconditions: what should be true after.
  17. 17. Planning ● Look at what you want vs. what you have ● If they’re the same, yay! o Check again in 30 seconds ● Else, make a plan to fix what you have o Basic robotics-style planning problem o precondition/postcondition make this work.
  18. 18. Executing Plans ● Follow the plan, one move at a time. ● Each move has a bunch of actions ● Check expected vs. reality for each action o Check preconditions before doing an action o Check postconditions afterwards o If they’re different, go make a new plan! ● How could they be different? o machine crash o killing/modifying a mongo instance by hand
  19. 19. Automation ● Instructions from you ● Information from your cluster ● Expertise about how to run Mongo ● Patience to get all the details right
  20. 20. Advanced Operations Oplog Resizing
  21. 21. What is an oplog? ● A capped collection that stores an ordered history of logical writes to a MongoDB database ● Enables replication
  22. 22. Why resize the oplog? 1. You may want to increase its size to accommodate a high write rate and/or high replication lags to secondaries. 2. You may want to decrease its size to save on disk space.
  23. 23. Resizing the Oplog with Automation
  24. 24. How to resize an oplog 1. Shutdown a replica set member 2. Start the member in standalone mode, listening on a different port than it usually does 3. Back up the last oplog entry 4. Drop the oplog 5. Recreate the oplog with its new size 6. Insert the saved oplog entry 7. Stop the member 8. Start the member with normal options 9. Repeat Steps 1 - 8 for each of the remaining replica set members
  25. 25. Or just have Automation do it
  26. 26. Automating MMS
  27. 27. MongoDB Management Service Engineering Team, MongoDB Cailin Nelson, Cadran Cowansage, Louisa Berger, Bard Bloom, Tim Olsen #MongoDBWorld Questions

×