Deploy A D365 Environment

Share this:

In order to debug or develop new custom code you need to deploy a D365 environment. There are multiple different types of environments with different capabilities. In this article, learn how to deploy a cloud-hosted environment and how it is used. First, this environment is hosted in Azure. Next, users can access the front end D365 website. But most importantly, users can remote desktop into the machine itself. From there, they can use Visual Studio to read, write, deploy and debug x++ code. Follow along to learn how to create this type of environment.

Types Of Environments

Before walking through the steps to deploy a D365 environment, it is important to understand the different types of environments. This way, you can make sure you deploy the right environment for its use.

Tier 2 and Above

Tier 2 and above environments are used to perform user acceptance testing, performance testing, as well as the Production environment. There are several key factors that I want to explain that vary between the type of environment you deploy.

  • Tier 2 and above environments are hosted my Microsoft. They are viewed on the front page of an LCS project.
  • You can specify how powerful and what resources the machine has when you deploy the machine.
  • These are deployed using LCS, but require a license to deploy.
  • Users can really only access the front end D365 website.
  • One exception is that administrators can request ‘Just in Time’ access to query the SQL server database for a limited period of time. This is not possible for a Production environment.
  • Microsoft maintains the machine and keeps the security up to date.

Tier 1 Cloud-Hosted Environments

Next, when you plan to deploy a D365 environment, ask yourself, do I need to be able to read, write, or debug code? If the answer is yes, then the most commonly deployed environment is a Tier 1 cloud-hosted development environment.

  • Tier 1 environments are hosted in Azure.
  • You can specify how powerful and what resources the machine has when you deploy the machine.
  • Environments are deployed using LCS. You can deploy as many as you want. You pay for usage.
  • Users can access the front end D365 website from anywhere. As well as remote desktop into the machine to read, write, and debug code.
  • Users can use SQL Server Management studio on the machine to query the data on the D365 database all the time.
  • Users are responsible for updating security and maintaining the machine.

Self Hosted Virtual Machine (VM).

Developers can download a Virtual Hard Drive (VHD), and user Hyper_V to run the hard drive on their own local machine. Please see my article Create a D365 Development Environment for the steps on how to set this up. However, there are several benefits and disadvantages of using this type of environment.

  • These environments do not cost any money.
  • The environments take up memory and processing power from your machine.
  • Because of this, they generally operate slower than azure cloud-hosted machines.
  • They take up a could of hundred gigabytes of hard drive space on your hard drive.

Unified Development Experience

Next, Microsoft has recently announced a new type of environment that is in preview. This environment is called the Unified Development Experience. See their documentation here. These may replace cloud-hosted environments in the future. I will save a deeper walk through of these environments for another article.

  • A developer uses the Power Platform Admin Center to deploy a Microsoft hosted environment.
  • The environment hosts the D365 website, database, and code.
  • Users cannot remote desktop into the environment
  • Instead, developers ‘connect’ to the environment using Visual Studio on their own machine.
  • Metadata, such as version, and custom code is synched between the local machine and cloud hosted machine.
  • Developers read, write, and debug code from their local machine.

Deploy Cloud-Hosted Environment

Now that you understand the various types of environments, let us walk through how to deploy a D365 environment. Specifically, learn the steps for deploying a Tier 1 cloud-hosted development environment.

Create and Log In To LCS Project

First, login to lcs.dynamics.com, using an account that has azure permission to deploy environments. You must have an LCS project setup.

See Microsoft’s documentation on how to create an LCS project if you do not have one. Otherwise, select your existing project.

You also will need to add azure subscription to that LCS project. Again, see Microsoft’s documentation.

Create Cloud-Hosted Environment

Second, to deploy a D365 environment, click on the ‘three lines‘ button at the top. Then, select ‘cloud-hosted environments’ from the drop down.

A form will open that will show all of your existing cloud-hosted environments. If you have never created one, none will be listed.

Next, click the ‘+ Add’ button. If you do not see this button, ensure you are logged in with a user that has the necessary permissions.

Specify The D365 Version

Third, a dialog will open on the right side. At this time, specify which version of D365 you would like to deploy. See this Microsoft page for more details on what is included in each release.

Typically, you should deploy the same version that you are using in Production. Or, select the most recent version if you want to explore that version.

After selecting the first option, the ‘Platform version’ should only have one drop down option. Then, click the Next button.

Next, you will be asked what environment topology you would like to use.

  • Demo – Select this option if you do NOT plan to read, write or debug code. Essentially only use the front end website.
  • DevTest – Select this option if you plan to read, write, or debug code using Visual Studio.

After that, select ‘Finance and Operations – Develop‘ from the next list of options. You would only select ‘Finance and Operations – Build‘ if you were deploying a ‘build’ machine used by DevOps.

Next, select which Azure subscription you would like to use to deploy a D365 environment. Note, you will only be prompted if there exists more than one has been set up.

Environment Name And Size

Fourth, on the next screen, set the environment name, size of machine to use, advanced settings, and agree to the terms.

Specifically, set the ‘Environment name‘ field to the name you want to show in LCS. Note, this name needs to be unique. To clarify, no other environments can have this same name.

Next, set the ‘Size’ drop down to be the size of machine you wish to use. Note, this is a very important step. See Microsoft’s pricing documentation for how much each size costs. In this example, I used the DS12 v2.

Note, the below screenshot is just an example and is subject to change. Run the calculator again for your own region.

Advanced Settings

Fifth, click the ‘Advanced Settings‘ button to customize your environment.

All things considered, there are a lot of settings. And, the values to use are very much dependent on your particular scenario. In this example, I will show you the options, and make a few recommendations. Regardless, select the best options for your situation.

To start, I recommend you leave the Visual Studio Customization to their default values.

Next, go the Customize SQl Database Configuration tab. If you want demo data, set the first option to ‘Demo’. Otherwise, set it to ‘None’.

After that, go to ‘Disk space configuration’. Leave these on their default values unless you know you need more space on your hard drives.

On the next tab, set the Premium Storage Settings to ‘Enable‘. In addition to increasing the performance of your drives, this can also result in a faster processor used.

Next, leave Managed Disk Settings in their default state.

Now, in the Customize virtual machine names tab, set the first field to the name of your environment. This is the name used in by Azure. I recommend you use the same name as you specified earlier for the LCS name.

More Settings

Next, determine if you plan to use Power Platform or not. If not, leave the ‘Configure Power Platform Environment‘ option on the Power Platform Integration tab to ‘No‘. Otherwise, change the option to ‘Yes’.

Now, on the ‘Dynamics 365 for Finance and Operations‘ tab, leave the ‘Publish this environment to Dynamics 365 home page‘ set to Disabled.

Lastly, unless you have a specific need, leave the default of ‘New virtual network‘ option selected on the ‘Customized virtual network‘ tab.

Finally, dismiss the ‘Advanced settings‘ dialog and click ‘Next‘ back on the main dialog.

Warnings and Errors

Sixth, you may receive a message like this:

Currently, the Unified Developer Experience is still under preview. Therefore, when ready, you can click the Deploy button.

Next, it is important to understand that Premium Storage is only supported with specific VM sizes. If you receive the following error message, go back and double check which size you picked. Then, change it to a size that supports Premium Storage, or disable Premium Storage from the Advanced Settings.

Lastly, if you receive an error message like the following, just try deploying again.

Waiting

In due time, the environment status will change from Queued, to Deploying, then Deployed. Altogether it may take 4 to 8 hours to deploy the environment. So, remember to click the reload button on your browser to see the updated status.

Connect To The Environment

Once deployed, select the row, then click the ‘Full details‘ link.

Next, click on the link under the ‘VM Name‘ to download a ‘remote desktop‘ connection file. Then, double click on the file to remote into the environment. Next, on the dialog screen, click the ‘more choices‘ button. Finally, use the User name and password listed in LCS as the credentials to remote into the environment.

Separately, click Login>Log on to environment, to open a browser to the front end of the D365 environment.

Conclusion

After you deploy a D365 environment, and remote into the environment, remember to sign into Visual Studio. Optionally, download custom code from source control, install additional browsers, notepad++, and generally make the environment comfortable.

Peter Ramer
Peter Ramer is a part of the Managed Application Services team at RSM working on Microsoft Dynamics 365. He focuses on the Retail and Commerce industries. When he is not solving problems and finding ways to accelerate his clients' business, he enjoys time with his three kids and amazing wife.

Share this:

8 thoughts on “Deploy A D365 Environment

Add yours

  1. Hi Peter Ramer, Nice blogs

    As I saw there are many environments on LCS like
    Dev,
    UAT,
    Sand box ,
    PROD etc…

    As I know, we have concept like
    Client
    AOS
    Database.

    Are the above-mentioned environments (Dev, UAT, Sandbox, Prod) are followed 3 Tier architecture?

    Kindly elaborate please.

    Thanks!

    1. Each D365 environment has an AOS and a database all in one server. This is true for tier 1 cloud hosted dev environments, as well as Microsoft hosted tier 2 and above environments which is what Test, UAT, and Prod use.

      Unlike in Ax 2012 and before there is no specific AC Client that you have to install to work with D365. The client is your internet browser. So while you still have to have it on your computer, most computers have Microsoft Edge already installed. Or you can install chrome or any other browser you choose. Then enter in the URL of the D365 environment you want to connect to, then login with the email and password, and then you are in.

      1. Thanks Peter, for the response.

        So, I can say that the DEV environment in Cloud hosted Tier 1
        and other environments like Test, UAT, Prod are Microsoft hosted tier 2 environments.

        correct?

        For the Tier 1 environment (Cloud hosted), Client, AOS and database is in Single server.

        For the Tier 2 environment (Microsoft hosted), is it same as Tier1?
        I mean Client, AOS and database…

        Kindly elaborate please.

        Thanks!

        1. To your first question, yes you have it correct.
          To the second question a tier 1 and a tier 2 both have and Aos and a database. They do not have a Client. The client is your internet browser.
          We can’t see inside a tier2 and above so we don’t know exactly what they look like. And in many ways it doesn’t really matter to us. We just connect to them using one url in the browser. That’s what is important.

          1. Thanks Peter, for the response.

            Exactly Tier1 (Dev) , we can see inside but for the Tier2 environments like UAT, Test, Prod we can’t see inside. Only we can access through URL the client (internet browser).

            So, for both Tier1 and Tier2 etc. all (AOS and Database) are in one server each. And the client is internet browser only for both.

            correct?

            Thanks!

          2. Correct.
            Since we can’t see inside tier2 and above, technically we can’t see the architecture of those machines, and it doesn’t really matter to us. It doesn’t change how we deploy code, or use the system. But I do believe they are in one server, though they can vary in what processing power they provide within those servers.

Leave a Reply

Your email address will not be published. Required fields are marked *

Proudly powered by WordPress | Theme: Baskerville 2 by Anders Noren.

Up ↑