Post on 14-Aug-2015
MMS Automation in Action
MMS: MongoDB Management Service
MMS Automation
● Create MongoDB systems of 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.
MMS ProvisioningIntegration with Amazon AWS that 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, Azure, Digital Ocean, etc.
MMS Automation : Why?● Ease of operation
○ Some operations are easier to script than others...
MMS Automation : Why?● Ease of operation● Expect the unexpected
MMS Automation : Why?● Ease of operation● Expect the unexpected● Reliability
MMS Automation : Why?● Ease of operation● Expect the unexpected● Reliability● Mongo expertise
How Does It Work?
Automation
Server 1 Server 3Server 2
MMS
Automation
Server 1 Server 3Server 2
MMS
AUTO AUTOAUTO
Automation
Server 1 Server 3Server 2
MMS
AUTO AUTOAUTO
Automation
Server 1 Server 3Server 2
MMS
AUTO AUTOAUTO
mongod mongodmongod
Automation
Server 1 Server 3Server 2
MMS
AUTO AUTOAUTO
mongod mongodmongod
Automation
Server 1 Server 3Server 2
MMS
AUTO AUTOAUTO
mongod mongodmongod
Automation
Server 1 Server 3Server 2
MMS
AUTO AUTOAUTO
mongod mongodmongod
New Features
Import Existing
● Start managing a pre-existing repl set or cluster with automation.
Demo
Authentication and Authorization● Automation supports adding, editing, and removing
users and custom roles.● Works with standalone instances, replica sets, and
sharded clusters.● Works with all versions of MongoDB that Automation
supports: 2.4, 2.6 and 3.0● Delayed auth schema upgrades are supported
Storage Engine Conversion
● Pluggable storage engines are a new feature in MongoDB 3.0
● Automation supports converting between MMAPv1 and WiredTiger storage engines.
Storage Engine Conversion for Replica Sets
P
S2S1
P
S2S1
Stop mongod
P
S2S1
Delete db files
P
S2S1
Start mongod with newstorage engine
P
S2S1
Wait for initial sync
P
S2S1
P
S2S1
P
S2S1
P
S2S1
PS1
PS1
S2
PS1
S2
PS1
Storage Engine Conversion(standalone instances)
1. Stop mongod2. Start mongod on a different port3. Run mongodump4. Stop mongod5. Remove files under the dbpath6. Start mongod with new storage engine setting (still on
the different port)7. Run mongorestore8. Restart mongod on its original port
Repair Config Server
Automation will automatically detect if a config server gets out of sync, and repair it
Repair Config Server
1. Detect that config server is out of sync by comparing dbhash against other dbhashes
Repair Config Server
2. Figure out which dbhash is correct
● Ignore if data size < 90% max data size
● If two agree, assume they are correct
● If none agree, choose “the first”
Repair Config Server
3. Repair config server : ● shut down● mongodump from a good server● start up on ephemeral port ● mongorestore● verify dbhash correct● restart on normal port
CS2 CS3
27000 CLIENT
CS1
Repair Config Server
CS1 CS2 CS3
27000 CLIENT
Repair Config Server
CS1 CS2 CS3
27000 CLIENT
Repair Config Server
CS1 CS2 CS3
27000 CLIENT
27001
CS1
Repair Config Server
CS1 CS2 CS3
27000 CLIENT
27001
CS1
CS1 CS2 CS3
27000 CLIENT
27001
CS1
CS2 CS3
27000 CLIENT
CS1
Demo
Automation API
● Can GET/PUT a Group’s AutomationConfig● Can GET the AutomationStatus of a Group
Automation API
● Can GET/PUT a Group’s AutomationConfig● Can GET the AutomationStatus of a Group
○ Bypass the UI, automate automation
Automation API - Demo
● Follow along○ https://bit.ly/mmsautoapi
Automation API - Demo
● Follow along○ https://bit.ly/mmsautoapi
● Read more○ https://docs.mms.mongodb.com/reference/api/
Coming Soon● Resync● Rolling Indexes● Restore Backups● Microsoft Azure Support
Advanced Enterprise Features
● SSL● LDAP Authentication● X.509 Authentication● Kerberos Authentication
Questions?