зеркало из
1
0
Форкнуть 0
azure-quickstart-templates/mongodb-high-availability
Val M 047d0af05a Reverted OSTCExtensions version back to 1.2 2015-04-26 21:18:07 -07:00
..
README.md Updated readme to include a remark about deployment 2015-04-25 18:39:14 -07:00
arbiter-resources.json Reverted OSTCExtensions version back to 1.2 2015-04-26 21:18:07 -07:00
azuredeploy-parameters.json Added MongoHA template 2015-04-24 07:17:32 -07:00
azuredeploy.json Updated script URLs 2015-04-24 16:02:22 -07:00
empty-resources.json Added MongoHA template 2015-04-24 07:17:32 -07:00
jumpbox-resources.json Updated to the latest schema 2015-04-24 16:01:03 -07:00
member-resources-D1.json Reverted OSTCExtensions version back to 1.2 2015-04-26 21:18:07 -07:00
member-resources-D2.json Reverted OSTCExtensions version back to 1.2 2015-04-26 21:18:07 -07:00
member-resources-D3.json Reverted OSTCExtensions version back to 1.2 2015-04-26 21:18:07 -07:00
member-resources-D4.json Reverted OSTCExtensions version back to 1.2 2015-04-26 21:18:07 -07:00
member-resources-D11.json Reverted OSTCExtensions version back to 1.2 2015-04-26 21:18:07 -07:00
member-resources-D12.json Reverted OSTCExtensions version back to 1.2 2015-04-26 21:18:07 -07:00
member-resources-D13.json Reverted OSTCExtensions version back to 1.2 2015-04-26 21:18:07 -07:00
member-resources-D14.json Reverted OSTCExtensions version back to 1.2 2015-04-26 21:18:07 -07:00
metadata.json Updates to itemDisplayName 2015-04-24 16:17:57 -07:00
mongodb-ubuntu-install.sh Added a delay after stopping the daemon to avoid running into unclean shutdown issues 2015-04-25 12:24:58 -07:00
shared-resources.json Updated to the latest schema 2015-04-24 16:01:03 -07:00

README.md

Deploy a highly available MongoDB installation on Ubuntu and CentOS virtual machines

This template creates a multi-server MongoDB deployment on Ubuntu and CentOS virtual machines, and configures the MongoDB installation for high availability using a replica set. The template also provisions storage accounts, virtual network, availability set, network interfaces, VMs, disks and other infrastructure and runtime resources required by the installation. In addition, and when explicitly enabled, the template can create one publicly accessible "jumpbox" VM allowing to ssh into the MongoDB nodes for diagnostics or troubleshooting purposes.

The template expects the following parameters:

Name Description Default Value
adminUsername Administrator user name used when provisioning virtual machines (which also becomes a system administrator in MongoDB)
adminPassword Administrator password used when provisioning virtual machines (which is also a password for the system administrator in MongoDB)
storageAccountName Unique namespace for the Storage Account where the Virtual Machine's disks will be placed (this name will be used as a prefix to create one or more storage accounts as per t-shirt size)
region Location where resources will be provisioned
virtualNetworkName The arbitrary name of the virtual network provisioned for the MongoDB deployment mongodbVnet
subnetName Subnet name for the virtual network that resources will be provisioned in to mongodbSubnet
addressPrefix The network address space for the virtual network 10.0.0.0/16
subnetPrefix The network address space for the virtual subnet 10.0.0.0/24
nodeAddressPrefix The IP address prefix that will be used for constructing a static private IP address for each node in the cluster 10.0.0.1
jumpbox The flag allowing to enable or disable provisioning of the jumpbox VM that can be used to access the MongoDB environment Disabled
tshirtSize The t-shirt size of the MongoDB deployment (XSmall, Small, Medium, Large, XLarge, XXLarge) XSmall
osFamily The target OS for the virtual machines running MongoDB (Ubuntu or CentOS) Ubuntu
mongodbVersion The version of the MongoDB packages to be deployed 3.0.2
replicaSetName The name of the MongoDB replica set rs0
replicaSetKey The shared secret key for the MongoDB replica set (6-1024 characters)

Topology

The deployment topology is comprised of a predefined number (as per t-shirt sizing) MongoDB member nodes configured as a replica set, along with the optional arbiter node. Replica sets are the preferred replication mechanism in MongoDB in small-to-medium installations. However, in a large deployment with more than 50 nodes, a master/slave replication is required.

The following table outlines the deployment topology characteristics for each supported t-shirt size:

T-Shirt Size Member Node VM Size CPU Cores Memory Data Disks Arbiter Node VM Size # of Members Arbiter # of Storage Accounts
XSmall Standard_D1 1 3.5 GB 2x100 GB Standard_A1 2 Yes 1
Small Standard_D1 1 3.5 GB 2x100 GB Standard_A1 3 No 1
Medium Standard_D2 2 7 GB 4x250 GB Standard_A1 4 Yes 2
Large Standard_D2 2 7 GB 4x250 GB Standard_A1 8 Yes 4
XLarge Standard_D3 4 14 GB 8x500 GB Standard_A1 8 Yes 4
XXLarge Standard_D3 4 14 GB 8x500 GB Standard_A1 16 No 8

An optional single arbiter node is provisioned in addition to the number of members stated above, thus increasing the total number of nodes by 1. The size of the arbiter node is standardized as Standard_A1. Arbiters do not store the data, they vote in elections for primary and require just a bare minimum machine specification to perform their duties.

Each member node in the deployment will have a MongoDB daemon installed and correctly configured to participate in a replica set. All member nodes except the last one will be provisioned in parallel. During provisioning of the last node, a replica set will be initiated. The optional arbiter joins the replica set after it is initiated. To ensure a successful deployment, this template has to serialize the provisioning of all member nodes and the arbiter node as follows:

(1) MEMBER NODES (except last) >>> (2) LAST MEMBER NODE >>> (3) ARBITER (optional)

In the above deployment sequence, steps #1 and #2 will have to complete first before the next step kicks off. As a result, you may be seeing longer-than-desirable deployment times as member node provisioning is not fully parallelized.

##Notes, Known Issues & Limitations

  • To access the individual MongoDB nodes, you need to use the publicly accessible jumpbox VM and ssh from it into the individual MongoDB instances
  • The minimum architecture of a replica set is comprised of 3 members. A typical 3-member replica set can have either 3 members that hold data, or 2 members that hold data and an arbiter
  • The deployment script is not yet idempotent and cannot handle updates (although it currently works for initial provisioning only)
  • SSH key is not yet implemented and the template currently takes a password for the admin user
  • MongoDB version 3.0.0 and above is recommended in order to take advantage of high-scale replica sets offered by this template
  • The current version of the MongoDB template is shipped with Ubuntu support only (adding support for CentOS is just a matter of creating an additional installation .sh script)