Deploying Microsoft Dynamics NAV on Two Virtual Machines Using Example-2VM Script
This topic describes the Example-2VM.ps1 script of the Microsoft Dynamics NAV Provisioning Tools for Windows Azure. The script is located in the Cloud\HowTo folder on the Microsoft Dynamics NAV installation media (DVD). The Example-2VM.ps1 script deploys Microsoft Dynamics NAV on two Windows Azure virtual machines. After the script is run, you will have a fully functional environment that enables you to access Microsoft Dynamics NAV data from the Microsoft Dynamics NAV Windows client or Microsoft Dynamics NAV Web client.
Tip
For a step-by-step about how to use the Example-2VM.ps1 script, see Walkthrough: Deploying Microsoft Dynamics NAV on Two Windows Azure Virtual Machines.
Deployment Overview
The Example-2VM.ps1 script creates two virtual machines, which are created based on a Windows Azure image that you specify, and then installs Microsoft Dynamics NAV Web Server components and Microsoft Dynamics NAV Server on one machine and Microsoft Dynamics NAV database components for SQL Server on the other machine.
The script restores a Microsoft Dynamics NAV application database of your choice, along with a Microsoft Dynamics NAV license. You can choose to install the CRONUS International Ltd. demonstration database and license. The script also configures endpoints in Windows Azure for Microsoft Dynamics NAV client service and management services and opens the communication ports in Windows Firewall.
When the script is finished, you will have a functional Microsoft Dynamics NAV environment that has the following characteristics:
Two virtual machines on Windows Azure in a virtual network and affinity group that you specify.
A website on Internet Information Services (IIS) with a web application for the Microsoft Dynamics NAV Web client. The website runs on TCP port 443 and uses https protocol.
A Microsoft Dynamics NAV application database that is configured to have a Microsoft Dynamics NAV license file, company, and a single Microsoft Dynamics NAV user that has SUPER permissions.
NavUserPassword credential type is configured as the user authentication method.
Microsoft Dynamics NAV Windows client available by using ClickOnce.
Microsoft Dynamics NAV Web client available from a web browser.
Note
SOAP and OData web services are not configured on the Microsoft Dynamics NAV Server on Windows Azure. To configure SOAP and OData web services, you can modify the scripts before deployment or manually configure these web services after deployment. For more information about how to manually configure SOAP and OData web services, see How to: Configure SOAP and OData Web Services for Microsoft Dynamics NAV on Windows Azure.
Deployment Process
The Example-2VM.ps1 script is a combination of several of the provisioning tools scripts that are called at various points in the deployment process. Before running each script, a secure Windows PowerShell remote session using HTTPS is established between the provisioning computer and the Windows Azure virtual machine.
Deployment Phases
The following flow chart illustrates the process that is executed by the Example-2VM.ps1 script to deploy Microsoft Dynamics NAV. The dashed boxes illustrate the manual alternatives in the flow.
The following table provides a description of each phase and the Windows PowerShell script that is executed.
Phase | Script | Description |
---|---|---|
Import cmdlets and scripts |
Imports NavAzureRemoteAdminToolsSamples.psm1 with all the HowTo-prefixed scripts. Other PowerShell modules are automatically imported as needed. |
|
Import the publishsettings file |
Imports the PublishSettingsFile that was downloaded when Windows Azure PowerShell was installed. Selects the Windows Azure storage account and imports the Windows Azure subscription ID and certificates. For more information about these items, see Preparing for Deploying Microsoft Dynamics NAV on Windows Azure. |
|
Create SQL VM |
HowTo-CreateAzureVM |
PowerShell session established. Creates a new virtual machine to host SQL Server and the Microsoft Dynamics NAV database. The virtual machine is created based on a selected image from the Azure Image Gallery that you specify. NavAdministration module transferred to new virtual machine. |
Create NAV Server VM |
HowTo-CreateAzureVM |
PowerShell session established. Creates a new virtual machine to host Microsoft Dynamics NAV Server and Microsoft Dynamics NAV Web Server components. The virtual machine is created based on a selected image from the Azure Image Gallery that you specify. NavAdministration module is transferred to new virtual machine. |
Open Firewall for SQL |
HowTo-OpenFirewallPort |
Modifies the Windows Firewall settings on the virtual machine that is running SQL Server to enable communication on TCP port 1443 from the virtual machine that is running Microsoft Dynamics NAV Server. |
Upload DVD to NAV Server VM |
HowTo-UploadFilesToVM |
Creates .VHD in Windows Azure storage, uploads the Microsoft Dynamics NAV installation files to the VHD, and then copies the files from the VHD to the virtual machine running Microsoft Dynamics NAV Server. Creates a .VHD file on the provisioning computer. Alternatively, the Microsoft Dynamics NAV installation files can be copied directly from the provisioning computer to the virtual machine through an active PowerShell session. To specify whether to use a VHD, change the $NAV_UseAzureStorageForDvdTransfer variable in the script. Transfer of files by using either Azure Storage Account or through active PowerShell session. |
Upload DVD to SQL VM |
HowTo-UploadFilesToVM |
Creates a .VHD in Windows Azure storage, uploads the Microsoft Dynamics NAV database backup (.bak) file to the VHD, and then copies the .bak file from the VHD to the virtual machine running SQL Server. Alternatively, the .bak file can be copied directly from the provisioning computer to the virtual machine through an active PowerShell session. To specify whether to use a VHD, change the $NAV_UseAzureStorageForDvdTransfer variable in the script. |
Install NAV on VM |
HowTo-InstallNAVonVM |
NAVAdministration module cmdlets are executed through a PowerShell session. Installs Microsoft Dynamics NAV on the virtual machine. The Microsoft Dynamics NAV Server instance and Microsoft Dynamics NAV Web client instance are not installed in this phase. |
Add server instance |
HowTo-AddNAVInstance |
Establishes a PowerShell session, and then does the following:
|
See Also
Tasks
How to: Deploy Microsoft Dynamics NAV on Windows Azure by Using the Example Scripts
How to: Install the Microsoft Dynamics NAV Provisioning Tools for Windows Azure
Concepts
Deploying and Managing Microsoft Dynamics NAV on Windows Azure
Preparing for Deploying Microsoft Dynamics NAV on Windows Azure
Network Topologies for Microsoft Dynamics NAV on Windows Azure
Deploying Microsoft Dynamics NAV on One Virtual Machine Using Example-1VM Script