Share via


Deploying Microsoft Dynamics NAV on One Virtual Machine Using Example-1VM Script

This topic describes the Example-1VM.ps1 script of the Microsoft Dynamics NAV Provisioning Tools for Microsoft Azure. The script is located in the \WindowsPowerShellScripts\Cloud\HowTo folder on the Microsoft Dynamics NAV installation media (DVD). The Example-1VM.ps1 script deploys Microsoft Dynamics NAV on a single Microsoft Azure virtual machine. 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.

For information about how to use the script, see How to: Deploy Microsoft Dynamics NAV on Microsoft Azure by Using the Example Scripts or Walkthrough: Deploying Microsoft Dynamics NAV on a Microsoft Azure Virtual Machine for a step-by-step example.

Deployment Overview

The Example-1VM.ps1 script creates a virtual machine on Azure, which is based on an image that you specify, and then installs and configures Microsoft Dynamics NAV Web Server components, Microsoft Dynamics NAV Server, and Microsoft Dynamics NAV database components for SQL Server.

Network topology for Example-1VM script

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 Azure for Microsoft Dynamics NAV client services and management services and opens the communication ports in Windows Firewall.

When the script is finished, you will have functional Microsoft Dynamics NAV environment that has the following characteristics:

  • A website on Internet Information Services (IIS) with a web server instance for the Microsoft Dynamics NAV Web client. The website runs on TCP port 443 and uses https protocol. Users can access Microsoft Dynamics NAV data by using the Microsoft Dynamics NAV Web client from a web browser.

  • A Microsoft Dynamics NAV Server instance that connects to the Microsoft Dynamics NAV database.

  • OData and SOAP Web services are enabled and configured to use 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.

  • Uses NavUserPassword credential type as the user authentication method.

  • Microsoft Dynamics NAV Windows client available by using ClickOnce website.

Deployment Process

The Example-1VM.ps1 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 Azure virtual machine.

NAV powershell remoting with Azure

Deployment Phases

The following flow chart illustrates the process that is executed by the Example-1VM.ps1 script to deploy Microsoft Dynamics NAV. The dashed boxes illustrate the manual alternatives in the flow.

Process flow for Example-1VM script

The following table provides a description of each phase in the process and the Windows PowerShell script that is executed.

Note

The scripts are located in the Cloud\NAVRemoteAdministrationSamples folder of the Microsoft Dynamics NAV Provisioning Tools for Microsoft Azure. For more information, see How to: Install the Microsoft Dynamics NAV Provisioning Tools for Microsoft Azure.

Phase Script Description

Import cmdlets and scripts

Set-PowerShellEnvironment.ps1

Imports NavAzureRemoteAdminToolsSamples.psm1 with all the HowTo-prefixed scripts. Other PowerShell modules are automatically imported as needed.

Import the publishsettings file

Set-PowerShellEnvironment.ps1

Imports the PublishSettingsFile that was downloaded when Azure PowerShell was installed.

Selects the Azure storage account and imports the Azure subscription ID and certificates.

For more information about these items, see Preparing for Deploying Microsoft Dynamics NAV on Windows Azure.

Create new VM

HowTo-CreateAzureVM

PowerShell session established.

Creates a new virtual machine based on a selected image from the Microsoft Azure Marketplace.

NavAdministration module is transferred to new virtual machine.

Upload files to VM

HowTo-UploadFilesToVM

Creates a .VHD file and uploads the Microsoft Dynamics NAV installation files to Azure storage.

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.

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:

  • Installs a Microsoft Dynamics NAV Server instance.

  • Installs a Microsoft Dynamics NAV web server instance on IIS for Microsoft Dynamics NAV Web client.

  • Creates a ClickOnce website for Microsoft Dynamics NAV Windows client deployment.

  • Restores the Microsoft Dynamics NAV database from the .bak file.

  • Adds Microsoft Dynamics NAV user.

  • Imports the license.

  • Adds Azure endpoints.

  • Configures Windows Firewall.

See Also

Tasks

How to: Deploy Microsoft Dynamics NAV on Microsoft Azure by Using the Example Scripts
Walkthrough: Deploying Microsoft Dynamics NAV on a Microsoft Azure Virtual Machine

Concepts

Deploying and Managing Microsoft Dynamics NAV on Microsoft Azure
Planning and Preparing
Deploying Microsoft Dynamics NAV on Two Virtual Machines Using Example-2VM Script

Other Resources

Network Topologies for Microsoft Dynamics NAV on Azure