WSO2's API Vision: Unifying Control, Empowering Developers
MongoDB on Azure - Tips, Tricks and Examples
1. MongoDB on Azure - Tips,
Tricks and Examples
MongoDB world 2014
DavidMakogon,EnterpriseArchitect,Azure
BrianBenz,Sr.TechnicalEvangelist,MicrosoftOpen
Technologies,Inc.
13. 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.
16. Replica set hosted
on Azure
virtual machines
Replica Set
DriverYour
Application
Replica Sets: High Availability
17. Shards, config servers and mongos (router) hosted
on Azure virtual machines
Key range A-D
Sharding: Scalability
Key range E-G Key range G-Z
Your
Application
Mongos
(router)
18. 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 27017
azure vm endpoint create mongoc9-2 27018 27018
azure vm endpoint create mongoc9-3 27019 27019
…start mongod, initialize replica set
19. azure topic verb options
Command Line Syntax Overview
prompt>
account
account location
account affinity-group
vm
vm disk
vm endpoint
vm image
service
service cert
site
config
download
import
list
show
delete
start
restart
shutdown
capture
create
attach
detach
browse
set
username
password
dns-prefix
vm-name
lb-port
target-image-name
source-path
disk-image-name
size-in-gb
thumbprint
value
-v
-vv
23. Where to learn more
Tutorial:Building a multi-tier cloud application onAzure using MongoLab, node.js, and
Socket.IO
http://aka.ms/C72pp8
Tutorial:Using MongoDB, Windows Communication Foundation, OData, and PowerBI
to build a Business Intelligence solution onAzure
http://aka.ms/Di7d4r
MongoDB onAzure VM -
http://aka.ms/Nnjwgu
Install MongoDB on a virtual machine running Windows Server inAzure:
http://aka.ms/Py8c6b
Node.js WebApplication with Storage on MongoDB (Virtual Machine):
Create anAzure web site that connects to MongoDB running on a virtual machine in
Azure:
http://aka.ms/Xyzxgd
24. Other Resources
Microsoft OpenTechnologies 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/
AzureTraining Kit:
http://aka.ms/Mjqnk6
Microsoft Web Platform Installer:
http://www.microsoft.com/web/downloads/platform.aspx
Web Matrix
http://www.microsoft.com/web/webmatrix/
Project Kudu
https://github.com/projectkudu/kudu