mongodb on azure - tips, tricks and examples
DESCRIPTION
TRANSCRIPT
MongoDB on Azure - Tips, Tricks and Examples
MongoDB world 2014
David Makogon, Enterprise Architect, Azure
Brian Benz, Sr. Technical Evangelist, Microsoft Open Technologies, Inc.
Agenda
• Azure
• MongoDB Options - NoSQL on Azure IaaS, PaaS, SaaS
• MongoDB on Azure
• Q&A
Azure
Flexible
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
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
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
Azure Virtual Machines – OS Options
Windows Server
OpenSUSE and SUSE Enterprise
CentOS
Ubuntu
Oracle Linux
vmdepot.msopentech.com
Docs - azure.microsoft.com/documentation/
SDKs - azure.microsoft.com/downloads
CLIs - azure.microsoft.com/downloads
OSS DevOps - msopentech.com/projects
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.
Support and Alerts
Custom Admin Tools
Backup and Recover
Performance Analysis – Slow Query Analyzer
Monitoring and Support
MongoDB
Replica set hosted
on Azurevirtual machines
Replica Set
Primary
Secondary
Secondary
DriverYour Application
Replica Sets: High Availability
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)
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
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
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
Demo
Azure, Virtual Machines, MongoDB, WCF Data Services , PowerBI
MongoDB as a Document Store:
OData service from MongoDB
Demo
Azure, Virtual Machines, MongoDB, Mobile Services
MongoDB with Mobile Services
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
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
Q&A