Architectural components

Microsoft Dynamics NAV can be installed on-premise, as well as on cloud. It is the most flexible and robust product of the Microsoft Dynamics family. Microsoft Developers have worked a lot on installation and configuration, which allows the product to have multidimensional installation options. It can be easily deployed to a multitenant environment. It supports PowerShell, which is like a magician, and provides added power when it comes to administering and installing the system. Installation of Microsoft Dynamics NAV 2016 on Azure is one of the key points to look for. We will be more focused around these points in this book.

I have tried to show the easiest and most efficient ways to accomplish the installation process in this chapter. There might be other ways, but I have tried to stick with the simplest one.

We should always install three core components of Microsoft Dynamics NAV 2016, which are the three tiers that comprise the core of NAV Architecture.

Three-tiered architecture

Like previous RTC versions, the Microsoft Dynamics NAV 2016 architecture is a three-tiered architecture, which uses three core components as follows:

Here in the following diagram, you can clearly understand the different tiers in the Microsoft Dynamics system:

Three-tiered architecture

NAV Application Server

NAV Application Server, or NAS, is a middle-tier server component, which can be utilized without a user interface for task scheduling, client offloading, and specialized integration scenarios. Since, it executes business logic without any user interaction, they are managed completely from the Microsoft Dynamics NAV server administration tools in the NAS Services tab:

NAV Application Server

It is always better to create a Microsoft Dynamics NAV server instance for each NAS services application. The following are the two main reasons:

  • Convenience
  • Performance

Whenever you use NAS services for Microsoft Office Outlook integration, managing job queues, create a separate Microsoft Dynamics NAV server instance for each NAS service application, then modifying the setting for one of these services will not affect other services. On the other hand, configuring NAS services applications to use separate server instances makes better use of the server resources. This lets you run more applications with less degradation.

Multiple configurations

We can implement multiple configurations for the three-tier architecture in Microsoft Dynamics NAV.

The core components that comprises the tiers must be installed. We can choose a single machine for all the three tiers, or a separate machine for each tier.

Multitenant environment

There are various architectures that can be implemented for the Microsoft Dynamics NAV installation process. It all depends on the requirements. If there is a need of a single database system for a single group of users, then multi-tenancy has not much significance. But when we are trying to implement Dynamics NAV as a SaaS, keeping the system constant for multiple clients, then the significance of multi-tenancy comes into play.

Note

Multi-tenancy is a software architecture where a single instance of the software runs on a server and supports multiple customers or tenants.

In a multi-Tenant environment, we keep the business data of each tenant (client) in different databases while keeping all the SQL Server application objects in a different database.

Because of the level of separation between the three layers, now we can use the same shared NAV objects with more databases.

Each tenant can hold one or more companies, as depicted in the following diagram:

Multitenant environment

Azure (cloud service)

Microsoft Azure is an infrastructure and cloud-computing platform, which helps us solve problems such as building, deploying, and managing different applications. They are implemented by huge datacenters managed by Microsoft Corporation. It initially started with the IaaS service, but later also started providing PaaS.

Differences between on-premise and cloud

This quick public cloud adoption can be explained by several factors such as the following:

  • Minimal up-front investments or commitments are required
  • You pay for what you use
  • Users can test any of the services prior to purchase
  • Less human resources are required for infrastructure maintenance
  • Service offerings are easy to compare
  • Software upgrades can be automated

The latest member of the Dynamics Family, Dynamics 365, is not hosted on Azure, since Azure does not provide SaaS.

The difference between on-premise and the different cloud services can be better understood by the following diagram. As you can see, in on-premise setup you have different levels of control whereas in the cloud services the controls and access are limited:

Differences between on-premise and cloud

Microsoft Azure - relevant services

There are a number of relevant services that play an important role during the deployment process. They are as follows:

  • Virtual machines (Dynamics NAV SQL Server)

    Virtual machines services are similar to the on-premise environment and the installation is also pretty much the same.

  • Cloud services (Ports load balancer scale fail over)

    A cloud service has one public IP-address. It is located in a region or affinity group. It is possible to link to the owned domain. It can contain multiple VMs with local IP addresses.

    All the VMs can be accessed via endpoints on the cloud service. Endpoints can be loaded-balanced or port-forwarding.

  • Storage (Hard disks backups)

    Storage in Azure contains hard disk space where we can put backup, PowerShell commands, and other files.

  • Network VPN (VM network)

    Network VPN helps extend the private network space in the public domain where you can define other virtual machines, or VM. Each VM has a unique IP address in the same subnet so that they can see each other and communicate as per the command.

  • Active Directory (User directory synchronized from AD Office 365 users)

    Azure Active Directory provides identity and access monument. It can be integrated with the on-premise Active Directory. It can also be used to Integrate with Dynamics NAV.

Microsoft Azure Management Portal

Use the link, https://manage.windowsazure.com/, in order to access the management portal of Windows Azure. It manages all Azure Services. Also, PowerShell is available for more options (this topic is covered in detail in a later part of this chapter).

Note

To access the link https://manage.windowsazure.com/, make sure you have a subscription for Windows Azure.

Three-service model

Cloud computing offers its services in three different models: Infrastructure as a Service (IaaS), Platform as a Service (PaaS), and Software as a Service (SaaS). These models offer increasing abstraction. The following diagram shows how services provided using the same channel have been categorized so as to keep it easy to understand:

Three-service model

Infrastructure as a Service

Infrastructure as a Service helps companies to move their physical infrastructure to the cloud with a level of control similar to what they would have in a traditional on-premise data center. Core data center infrastructure components are storage, servers (computing units), the network itself, and management tools for infrastructure maintenance and monitoring. These are depicted in the following diagram:

Infrastructure as a Service

Infrastructure as a Service taxonomy

Note

IaaS includes virtual machines, servers, storage, network gear, and any other hardware/OS.

Platform as a Service

Platform as a Service provides the user with a configurable application platform including a preinstalled software stack. PaaS can be understood as another abstraction layer above the hardware, OS, and virtualization stack:

Platform as a Service

Platform as a Service taxonomy

Software as a Service

PaaS provides execution runtimes service without direct access to the OS (databases, development platforms, and application servers).

Software as a Service is a cloud services delivery model, which offers an on-demand online software subscription.

The latest SaaS release of Microsoft is Dynamics 365 (previously known as Project Madeira). The following diagram illustrates the SaaS taxonomy. Here you can clearly understand different services such as Sales force, NetSuite, and QuickBooks which are distributed as SaaS:

Software as a Service

Software as a Service taxonomy

Note

SaaS includes software services such as Microsoft Office 365, Microsoft Dynamics 365, and so on.

Difference between on-premise, SaaS, PaaS, and IaaS services

In an on-premise architecture, one needs to take care of all the services and layers of the software system starting from the network layer up to the application layer (client). Here, the cost of maintenance is high, and it is a redundant service.

In IaaS, Microsoft provides a virtual abstraction of the operating system, which can be used as any on-premise operating system, and hence it lowers the cost of maintaining low-level systems.

In PaaS, a specific platform is exposed to the user so as to make the service even more precise and the user is concerned only up to the platform he/she is using; all the layers below it are managed by Microsoft.

SaaS is the latest of all services, where specific software can be isolated from all those complex layers. The user just needs to worry about the software layer, and everything beyond that is handled by the cloud factory. It is the easiest and most efficient model in cloud technology.

Introduction to the NAV Universal application

Nav Universal is an application designed for phones and tablets to run Microsoft Dynamics NAV. It is the client-side part, which offers portability and flexibility of usage. It is basically targeted at small- and medium-sized businesses which want to access data from a hand-held device, on the go.

In general day-to-day use, these apps are used for functions such as the following:

  • Approving invoices
  • Getting an overview of business
  • Viewing the progress report
  • Lightweight data entry
  • Checking the status of documents

The following diagram illustrates the architecture of the NAV Universal application in details:

Introduction to the NAV Universal application

The Microsoft Dynamics NAV Tablet client and Microsoft Dynamics NAV Phone client support the same credential types as the Microsoft Dynamics NAV Windows client and Microsoft Dynamics NAV Web client.

Out-of-the-box tools in the Installation DVD

We do not always need to search for treasure in the ocean, sometimes we can find it in our backyard pond as well. The Microsoft Dynamics NAV Installation DVD is no less than a treasure for an NAV professional. It includes almost all of the installation tools, upgrade tools, PowerShell scripts, Test tools, and much more. Most of the times, this resource remains unnoticed, which is why I would like to go into detail for some of these important tools:

Out-of-the-box tools in the Installation DVD

Folder with numbers such as 1029-4105

There are almost 15 folders in this category. These are folders that contain agreement terms in different languages. They also contain the developers' help file, which is an extremely valuable asset for NAV Developers and consultants. Let us understand its components in brief.

License.rtf

This license agreement (Agreement) is an agreement between Microsoft corporation (or one of its affiliates based on where you are) and the user of the system. The main intention of this multilingual license agreement is to inform all non-English speaking users about the terms and conditions in their local language.

setupres.dll

These files are the dynamic-link library (DLL) files, which represent implementations for the shared library concept in the Microsoft world, and are generally used by the operating system and various other programs.

devitpro.chm

Microsoft has compiled a documentation file, which contains the Help section in the .chm format; which consists of a collection of navigational HTML pages. The files are compressed and deployed in a binary format for the compiled HTML. This is a very important file for consultants and developers as well as for administrators and implementers. The contents of this file are considered as treasure for most developers, since this contains all the syntax of all the functions that can be used in the C/AL code. It also gives a detailed walkthrough for system deployment. In addition, this file contains the business logic flow, which can be extremely valuable for consultants.

ADCS

ADCS stands for Automated Data Capture System. The pattern implemented by ADCS helps Microsoft Dynamics NAV to communicate with different handheld devices through web services.

For example, if we want to test any handheld device that transmits a radio frequency, then we can use a radio receiver to capture those radio frequencies, and then a VT100 plug-in can be used to test that connection. The plugin helps Microsoft Dynamics NAV to receive the data transmitted from the device. The data is fetched in the form of an XML file, and can be used for further processing.

ClickOnce Installer tools

This folder contains the tools used for the ClickOnce installation process. The details of the ClickOnce process is explained in a later part of this chapter.

CRM customization

This folder contains a zip folder called DynamicsNAVIntegrationSolution.ZIP, which contains customization settings, content type, solution code, and other web-related resource files. It also contains a JavaScript file, which contains functions such as ConnectToNavClient, which is used by the NAV system to connect to the CRM and vice versa. It can be used by developers to make changes in the connection.

Outlook

It contains the .msi file, which can be used to install the outlook add-ins. This is a useful tool if you, by any chance, miss the installation of Outlook components during the Dynamics NAV installation process. It can also be used if the outlook component is corrupted.

Prerequisite components

This is a very important folder, which should be properly understood before we start the installation process. It gives the details of all the prerequisite components that are required for the installation process. It is extremely important that one must fulfil all the prerequisites in order to guarantee a successful installation process:

Prerequisite components

Role Tailored Client

This folder contains the configuration file for Role Tailored Client (RTC). It also contains all other essential component files that help RTC to connect to the middle tier. This folder is required in the later part of this chapter, in the ClickOnce installation in particular.

SQL Demo database

This is another very important folder, which contains the license file along with the precious SQL Demo database backup file. In most of the cases when we accidentally corrupt our demo database, we can easily restore this .bak file. This comes in very handy if we want to play with the database and objects.

Test toolkit

I personally believe this part to be the best part of Dynamics NAV 2016. It contains tools that can be used to test our customizations against regression issues. Most of us do not even know about this part, and I would like to go into detail over this in Chapter 4, Testing and Debugging. Some experts also call it the last missing piece to complete the big puzzle called Road to Repeatability.

Upgrade toolkit

This folder contains the tools that are key to the upgrade process. We will go into detail on the Upgrade toolkit in Chapter 9, Upgrade and Migration.

Windows PowerShell Scripts

This folder contains most of the PowerShell Scripts, which can be used for various PowerShell operations related to multi-tenancy, database, company data, Azure installation, and many others. In fact, most of the manual operations can be customized using PowerShell Scripts, which is available in this folder. Since this is an extremely useful topic, I have explained it in detail in the Installation scenarios section of this chapter.

Microsoft SQL Server requirements for Microsoft Dynamics NAV

The following are the Microsoft SQL Server requirements for Microsoft Dynamics NAV:

  • Microsoft SQL Server 2014
    • Express, Standard, or Enterprise 
  • Microsoft SQL Server 2012 Service Pack 2
    • Express, Standard, or Enterprise (64 bit only)
  • Azure SQL Database V12
    • Standard and Premium service tiers.

The components needed while installing SQL Server are as follows:

  • Database Engineer Services
  • Client Tools Connectivity
  • Management Tools-complete
Note

This can be useful when we select every component while installing. It's always a good idea to know what are the requirements in particular to save time and memory. In this book, we will not cover basic installation of SQL Server assuming it to be the basic process that is similar to all the other older versions such as Microsoft Dynamics NAV 2013 and 2015.

Data encryption between MS SQL Server and Microsoft Dynamics NAV 2016

It is recommended to use Internet Protocol security (IPsec) for data encryption to maintain a secure channel between NAV and SQL System. IPSec uses cryptographic security services. For a better understanding of the concept, refer to the following diagram:

Data encryption between MS SQL Server and Microsoft Dynamics NAV 2016

Using Azure SQL Database

In Microsoft Dynamics NAV, we can also use the Azure SQL database, which is a cloud service. It provides data storage, and the best part is that it is inbuilt in the Azure services platform.

We can directly connect the Microsoft Dynamics NAV Server instance to Azure VM.

Note

For better performance, VM and the SQL database must be in the same Azure region, and NAV Development Environment must be on the same VM in Azure as in the Microsoft Dynamics NAV Server.