Like any ERP implementation, deploying Dynamics 365 on-premises is comprised of many significant tasks including planning for the deployment, installing the software, and maintaining it. The process is time consuming and requires sufficient effort and investment since the deployment entails several roles such as:
- Business managers who are responsible for mapping processes to Microsoft Dynamics 365, deciding on default values, and identifying any required customizations
- Technical staff who are responsible for determining how Dynamics 365 will be deployed on the network, how users will access the system and how customizations will be implemented
- Project managers are responsible for managing the enterprise-wide implementation
Configuring D365 On-premises Environment
Whether you choose a vendor, value-added reseller, or consultant, here’s how you can plan, install, and configure your Microsoft Dynamics 365 on-premises environment.
Create a Valid Deployable Package
Create a package from Azure/Local server of customization.
Open Visual Studio as Administrator.
Click on Dynamics 365 à Deploy à Create Deployment Package.
Select the models of your customization and click Create. You can select multiple models at a time.
The system will create a folder with the name “DeployablePackage” (in the package file location path you provided in the previous step). The time for creation will depend on the number of models you have selected.
You can shorten the package name using any character from A-Z.
Upload Deployable Package on LCS
You will be able to see the number of environments associated with that project. In this case, there are 4 environments:
- Production – Not yet configured
- Environment 1 - Deployed
- Environment Dev - Failed
- Not yet configured
Click on and select Asset library
Select software deployable package. To upload a new package that was created earlier, click on +.
Click on Add a file. Then click on Browse, select package from the location where your package exists and click on Upload. It will take 10-15 minutes for the package to get uploaded. You will be able to see the package in the Asset library.
Once you refresh the page after a few minutes, you will be able to see that the package has been validated.
To configure the environment, click on Configure.
Choose the version you wish to deploy. Then click on Next.
Select a topology to deploy.
Input Environment name and select Connector. Then click on Advanced settings.
Deployment settings -> Supported version
Select Active Directory Settings and fill in all the required details.
Select SQL Database Configuration and fill in all the required details.
Select File Share Settings and fill in all the required details.
Select SSRS Configuration Settings and fill in all the required details.
Select Configure Service Settings and fill in all the required details.
Select Application Certificate Settings and fill in all the required details.
Select Customize solution assets and select the package you want to deploy. Then click on Done.
After filling in all the required details in “Advanced settings” you need to check the highlighted checkboxes as shown below. Then click on Next.
Once you click on next, you will be asked, “Are you sure want to deploy?” as shown below. Click on Deploy.
You will be able to see “Environment Dev” is in deploying state and will take around 2 hours.
To deploy the “Environment Dev”, there are two options:
Since “Environment Dev” is in a failed state, use the Delete option. Click on the Delete button.
It will confirm the delete action; click on Yes.
After you click on Delete, you will be able to see the screen as below on LCS and find that the environment is deleted.
Environment Cleanup Activity
After Delete environment you can perform the cleanup activity if required.
Delete WP and Assets folder from “The file share path for the Microsoft Dynamics 365 Instance. This share is used as the document store files uploaded by users .”
Next, download the latest local agent and configuration from LCS. Open
Click on and select Project settings.
Select On-premises connectors. Select the connector, and then select Edit.
On the menu on the left side of the page, select Setup host infrastructure, and then select Download agent installer.
You must now verify that the zip file that is downloaded is unblocked. Navigate to the zip file, right-click on it, and then select Properties. In the Properties dialog box, select Unblock, and then select Apply.
On the Configure agent tab, select Download configurations to download the localagent-config.json configuration file.
Copy the zip file and the localagent-config.json file into one of the Orchestrator nodes, such as C:\DynamicsAgent in the Orch1 virtual machine (VM).
Unzip the agent installer to C:\DynamicsAgent\LocalAgent.
In the Command Prompt window, navigate to C:\DynamicsAgent\LocalAgent, and run the following command.
LocalAgentCLI.exe Cleanup <path of localagent-config.json>.
Verify that the local agent has been successfully cleaned up by looking in Service Fabric Explorer and making sure that there are no apps in the Deployed Applications section in the Orchestrator nodes.
After the local agent is successfully cleaned up, run the following command:
LocalAgentCLI.exe Install <path of localagent-config.json>
After the local agent is successfully installed, navigate back to your on-premises connector in LCS. On the Validate setup tab, select Message agent to test LCS connectivity to your new local agent.
Deploy Custom Package on On-premises Environment
You will be able to see the number of environments associated with that project.
Select the environment in which you want to apply custom package and Click on Full details.
Click on Maintain and Apply updates. Select the package which you want to apply and click on Apply.
By clicking on Apply, it will ask you to confirm as shown below. Click on Yes. Your Dynamics 365 on-premises environment is now successfully deployed.
Dynamics 365 On-premises for Success
The decision to deploy Dynamics 365 on-premises is an important and complex one. The on-premises solution allows you to deploy Dynamics 365 either on your own servers or those of your IT partner. You can keep all your data in-house and ensure high levels of security and accessibility. By carefully following the above steps, you can ensure successful deployment of your Dynamics 365 on-premises environment and achieve unparalleled success from your investment.
About the Author - Jigal Patel
Jigal Patel is a technical professional with over nine years of experience including five years working on Microsoft Dynamics AX. Currently, he is been involved in leading AX projects including implementation, customization, integration, upgrade and post implementation support.