mongodb on azure - tips, tricks and examples
DESCRIPTION
TRANSCRIPT
![Page 1: MongoDB on Azure - Tips, Tricks and Examples](https://reader034.vdocuments.us/reader034/viewer/2022051314/54c62ea84a7959d71f8b4584/html5/thumbnails/1.jpg)
MongoDB on Azure - Tips, Tricks and Examples
MongoDB world 2014
David Makogon, Enterprise Architect, Azure
Brian Benz, Sr. Technical Evangelist, Microsoft Open Technologies, Inc.
![Page 2: MongoDB on Azure - Tips, Tricks and Examples](https://reader034.vdocuments.us/reader034/viewer/2022051314/54c62ea84a7959d71f8b4584/html5/thumbnails/2.jpg)
Agenda
• Azure
• MongoDB Options - NoSQL on Azure IaaS, PaaS, SaaS
• MongoDB on Azure
• Q&A
![Page 3: MongoDB on Azure - Tips, Tricks and Examples](https://reader034.vdocuments.us/reader034/viewer/2022051314/54c62ea84a7959d71f8b4584/html5/thumbnails/3.jpg)
Azure
Flexible
![Page 4: MongoDB on Azure - Tips, Tricks and Examples](https://reader034.vdocuments.us/reader034/viewer/2022051314/54c62ea84a7959d71f8b4584/html5/thumbnails/4.jpg)
Your Datacent
er
Virtualization
O/S
Hardware
Network
Data
Applications
Firewall
Web Sites
Applications
Data
Cloud Service
sApplication
s
Firewall Rules
Data
Virtual Network
Virtual Machin
es
Virtual Network
Data
Applications
Firewall Rules
O/S
Focus on the Application
Microsoft Azure
![Page 5: MongoDB on Azure - Tips, Tricks and Examples](https://reader034.vdocuments.us/reader034/viewer/2022051314/54c62ea84a7959d71f8b4584/html5/thumbnails/5.jpg)
Web SitesCloud
ServicesVirtual
Machines
Linux / Windows
VNETs / VPN
Stateful OS
RDP / SSH
External ACL
Hyper-V compatible
Larger Attached Storage
Multiple TCP / UDP ports
Startup Scripts
VNETs / VPN
Stateless OS
RDP
External ACL
Staging / Prod
Larger instances
Multiple TCP / UDP ports
Managed OS
Framework gallery
Git integration
Shared Disks
Instant Deploy
Staging / Prod
Free tier
Web Jobs
Site Backups
Managed OS
![Page 6: MongoDB on Azure - Tips, Tricks and Examples](https://reader034.vdocuments.us/reader034/viewer/2022051314/54c62ea84a7959d71f8b4584/html5/thumbnails/6.jpg)
Which deployment model to use?
Linux Required?
Yes
No
Use VMs
Hybrid Infrastructure
Yes
No
VMs or Cloud Services
Additional components? Remote Desktop?
Yes
VMs or Cloud Services
Consider Web Sites
No
Yes
No Yes
No
![Page 7: MongoDB on Azure - Tips, Tricks and Examples](https://reader034.vdocuments.us/reader034/viewer/2022051314/54c62ea84a7959d71f8b4584/html5/thumbnails/7.jpg)
Azure Virtual Machines – OS Options
Windows Server
OpenSUSE and SUSE Enterprise
CentOS
Ubuntu
Oracle Linux
![Page 8: MongoDB on Azure - Tips, Tricks and Examples](https://reader034.vdocuments.us/reader034/viewer/2022051314/54c62ea84a7959d71f8b4584/html5/thumbnails/8.jpg)
vmdepot.msopentech.com
![Page 9: MongoDB on Azure - Tips, Tricks and Examples](https://reader034.vdocuments.us/reader034/viewer/2022051314/54c62ea84a7959d71f8b4584/html5/thumbnails/9.jpg)
Docs - azure.microsoft.com/documentation/
![Page 10: MongoDB on Azure - Tips, Tricks and Examples](https://reader034.vdocuments.us/reader034/viewer/2022051314/54c62ea84a7959d71f8b4584/html5/thumbnails/10.jpg)
SDKs - azure.microsoft.com/downloads
![Page 11: MongoDB on Azure - Tips, Tricks and Examples](https://reader034.vdocuments.us/reader034/viewer/2022051314/54c62ea84a7959d71f8b4584/html5/thumbnails/11.jpg)
CLIs - azure.microsoft.com/downloads
![Page 12: MongoDB on Azure - Tips, Tricks and Examples](https://reader034.vdocuments.us/reader034/viewer/2022051314/54c62ea84a7959d71f8b4584/html5/thumbnails/12.jpg)
OSS DevOps - msopentech.com/projects
![Page 13: MongoDB on Azure - Tips, Tricks and Examples](https://reader034.vdocuments.us/reader034/viewer/2022051314/54c62ea84a7959d71f8b4584/html5/thumbnails/13.jpg)
The Landscape – MongoDB on Azure
MongoDB is easily installable on Linux or Windows
VMs up to 112GB + 16TB attached storage
Easy to ACL input traffic or just place in VNet
Hosted MongoDB too -–MongoLab–MongoDB Inc.
![Page 14: MongoDB on Azure - Tips, Tricks and Examples](https://reader034.vdocuments.us/reader034/viewer/2022051314/54c62ea84a7959d71f8b4584/html5/thumbnails/14.jpg)
Support and Alerts
Custom Admin Tools
Backup and Recover
Performance Analysis – Slow Query Analyzer
Monitoring and Support
![Page 15: MongoDB on Azure - Tips, Tricks and Examples](https://reader034.vdocuments.us/reader034/viewer/2022051314/54c62ea84a7959d71f8b4584/html5/thumbnails/15.jpg)
MongoDB
![Page 16: MongoDB on Azure - Tips, Tricks and Examples](https://reader034.vdocuments.us/reader034/viewer/2022051314/54c62ea84a7959d71f8b4584/html5/thumbnails/16.jpg)
Replica set hosted
on Azurevirtual machines
Replica Set
Primary
Secondary
Secondary
DriverYour Application
Replica Sets: High Availability
![Page 17: MongoDB on Azure - Tips, Tricks and Examples](https://reader034.vdocuments.us/reader034/viewer/2022051314/54c62ea84a7959d71f8b4584/html5/thumbnails/17.jpg)
Shards, config servers and mongos (router) hosted on Azure virtual machines
Key range A-D
Primary
Secondary
Secondary
Sharding: Scalability
Key range E-G
Primary
Secondary
Secondary
Key range G-Z
Primary
Secondary
Secondary
Your Application
Mongos (router)
![Page 18: MongoDB on Azure - Tips, Tricks and Examples](https://reader034.vdocuments.us/reader034/viewer/2022051314/54c62ea84a7959d71f8b4584/html5/thumbnails/18.jpg)
Example: Provisioning a Replica Set
azure vm create mongocluster –o "vmdepot-40398-1-1.vhd" username password -l "West US" -e 22
azure vm create mongocluster -o "vmdepot-40398-1-1.vhd" username password -l "West US" -e 23 -c
azure vm create mongocluster –o "vmdepot-40398-1-1.vhd" username password -l "West US" -e 24 -c
azure vm endpoint create mongoc9 27017 27017azure vm endpoint create mongoc9-2 27018 27018azure vm endpoint create mongoc9-3 27019 27019
…start mongod, initialize replica set
![Page 19: MongoDB on Azure - Tips, Tricks and Examples](https://reader034.vdocuments.us/reader034/viewer/2022051314/54c62ea84a7959d71f8b4584/html5/thumbnails/19.jpg)
azure topic verb options
Command Line Syntax Overviewprompt>
accountaccount locationaccount affinity-groupvmvm diskvm endpointvm imageserviceservice certsiteconfig
downloadimportlistshowdeletestartrestartshutdowncapturecreateattachdetachbrowseset
usernamepassworddns-prefixvm-namelb-porttarget-image-namesource-pathdisk-image-namesize-in-gbthumbprintvalue-v-vv
![Page 20: MongoDB on Azure - Tips, Tricks and Examples](https://reader034.vdocuments.us/reader034/viewer/2022051314/54c62ea84a7959d71f8b4584/html5/thumbnails/20.jpg)
Scripting Capabilities
Automation Support• Azure PowerShell Cmdlets
• Cross Platform Scripting Built on node.js
Capabilities• Provisioning, Removal• Reboot, Start• Import and Export VM settings• Support for Windows and Linux VMs• Domain Join at Provision for Windows• Fully Customize VM with Data Disks and
Endpoint Configuration• Automate Virtual Network Settings
![Page 21: MongoDB on Azure - Tips, Tricks and Examples](https://reader034.vdocuments.us/reader034/viewer/2022051314/54c62ea84a7959d71f8b4584/html5/thumbnails/21.jpg)
Demo
Azure, Virtual Machines, MongoDB, WCF Data Services , PowerBI
MongoDB as a Document Store:
OData service from MongoDB
![Page 22: MongoDB on Azure - Tips, Tricks and Examples](https://reader034.vdocuments.us/reader034/viewer/2022051314/54c62ea84a7959d71f8b4584/html5/thumbnails/22.jpg)
Demo
Azure, Virtual Machines, MongoDB, Mobile Services
MongoDB with Mobile Services
![Page 23: MongoDB on Azure - Tips, Tricks and Examples](https://reader034.vdocuments.us/reader034/viewer/2022051314/54c62ea84a7959d71f8b4584/html5/thumbnails/23.jpg)
Where to learn more
Tutorial: Building a multi-tier cloud application on Azure using MongoLab, node.js, and Socket.IOhttp://aka.ms/C72pp8
Tutorial: Using MongoDB, Windows Communication Foundation, OData, and PowerBI to build a Business Intelligence solution on Azurehttp://aka.ms/Di7d4r
MongoDB on Azure VM - http://aka.ms/Nnjwgu
Install MongoDB on a virtual machine running Windows Server in Azure:http://aka.ms/Py8c6b
Node.js Web Application with Storage on MongoDB (Virtual Machine):Create an Azure web site that connects to MongoDB running on a virtual machine in Azure:http://aka.ms/Xyzxgd
![Page 24: MongoDB on Azure - Tips, Tricks and Examples](https://reader034.vdocuments.us/reader034/viewer/2022051314/54c62ea84a7959d71f8b4584/html5/thumbnails/24.jpg)
Other ResourcesMicrosoft Open Technologies Blog:http://msopentech.com/blog/
VM Depot:http://vmdepot.msopentech.com
Azure development:http://azure.microsoft.com
SDKs and Command Line Tools:http://azure.microsoft.com/en-us/downloads/
Azure Training Kit:http://aka.ms/Mjqnk6
Microsoft Web Platform Installer:http://www.microsoft.com/web/downloads/platform.aspx
Web Matrixhttp://www.microsoft.com/web/webmatrix/
Project Kuduhttps://github.com/projectkudu/kudu
![Page 25: MongoDB on Azure - Tips, Tricks and Examples](https://reader034.vdocuments.us/reader034/viewer/2022051314/54c62ea84a7959d71f8b4584/html5/thumbnails/25.jpg)
Q&A