发布于 2015-09-14 15:25:44 | 195 次阅读 | 评论: 0 | 来源: 网络整理
The MongoDB Installer for Windows Azure is a tool that can be used to provision a MongoDB replica set cluster into Window Azure VM instances.
The following are the steps to deploy a replica set using the MongoDB Installer for Windows Azure:
If you have not done so already, download the MongoDB Installer for Windows Azure.
Double click msi and accept the license agreement to complete the installation.
The publish settings file is an xml file containing information about your subscription. This information is used by the actual script to create the VM instances in your account. To download the publish settings file, use the downloader start menu item:
Start -> All Programs -> MongoDB Installer for Windows Azure -> DownloadPublicSettings
Sign in with your Windows Live ID credentials when prompted. Remember the path to where the file was downloaded.
The MongoDB Installer for Azure is a PowerShell script. To install and configure your replica, launch the installer as an Administrator by right-clicking the following Start menu option and selecting Run as administrator:
Start -> All Programs -> MongoDB Installer for Windows Azure -> MongoDB Installer for Windows Azure
In the PowerShell window, run the script to configure MongoDB on Azure:
.deploy-mongo.ps1 <node-count> <dns-prefix> <image-name> <password> <location> <pub-settings-file-path> [replica-set-name]
node-count: The number of instances required in the replica set. Setting this to 1 results in a stand-alone instance being deployed and not a replica set
dns-prefix: The DNS prefix that used in the FQDN of an instance. For example, if you specify a DNS prefix of myreplicaset, the URL is http://myreplicaset.cloudapp.net.
image-name: The name of the VHD image in your Windows Azure storage account that will be used to create the virtual machines for the replica set. There are two possibilities:
password: The password to the Administrator account on the provisioned virtual machines. The same password is used for all virtual machines (nodes) in the replica set. The password must meet Windows password complexity requirements.
You use this password when you connect to the virtual machines via Remote Desktop Protocol (RDP) to perform system management and troubleshooting activities. RDP is enabled on all virtual machines provisioned by the MongoDB Installer for Windows Azure.
location: The Windows Azure data center location where your virtual machines will be provisioned. Data center locations are case-sensitive.
For example, you might use North Central US as a location. If you do not know which locations are available for your Windows Azure subscription, you can use either of these methods to see a list of available locations:
pub-settings-file-path: The path to the publish settings file you downloaded earlier.
replica-set-name: Specifies the name of your replica set. The default name is rs. This parameter is ignored if node-count is set to 1, as a single-node deployment is not a replica set.
Question: Error with unauthorized during deployment as seen below
error: The subscription is not authorized for this feature.
error: vm image create command failed
Answer: This usually indicates you do not have access to the VM preview program. Can you verify in the new preview portal that “Preview Features” shows account is active for Virtual machines and Virtual networks. If you have multiple accounts/subscriptions make sure you download the right pubsettings file
Question: I am seeing a timeout error from the installer
Error: connect ETIMEDOUT code: 'ETIMEDOUT', errno: 'ETIMEDOUT', syscall: 'connect'
Error: connect ETIMEDOUT
at errnoException (net.js:670:11)
at Object.afterConnect as oncomplete (net.js:661:19)
Answer: This occasionally occurs due to connectivity issues with the Azure service management server or your actual deployed instances. At this point the work around is to retry. Working on making this more robust
Question: In spite of meeting the strong password requirements the installer fails in the password setting
Answer: Ensure you do not have a $ in the password as powershell is parsing it out as a parameter