40) Tutorial: Deploy Dynamics 365 for Finance and Operations demo to Azure
This tutorial demonstrates how to deploy your very own Dynamics 365 for Finance and Operations demo / development environment in your own Azure subscription. Microsoft provides a portal for these kind of deployments, named Lifecycle Services (a.k.a. LCS).
Important disclaimer!Please keep in mind that your Azure subscription will be charged for all deployed billable resources, like storage and compute hours. The author of this tutorial cannot be held responsible for any unforeseen expenses arising by following steps below. You could use a MPN/MSDN subscription (containing a spending limit) to avoid excessive expenses. If you prefer to host your demo on your own hardware, please follow my other tutorial instead. |
Requirements
This tutorial assumes you have access to a valid Azure AD account which has:
- Owner privileges to an active Azure subscription. Can be any kind of subscription as long as it’s active and you’re able to deploy resources.
- Global Administrator privileges to the Azure AD / Office 365 tenant to which the Azure subscription above is associated to.
- Some patience for deploying the resources ;-).
Preparation steps
- Navigate to the LCS portal (lcs.dynamics.com) and sign in using your admin account as described above.
- If you’re attempting to access LCS for the first time, you will be prompted to read and accept the online service agreement and privacy statement. Finally, click Accept.
- At the top right corner, click your account name and verify if the organization status does not equal “Prospect Organization”. Instead, it should be listed as “Customer” or “Partner”.
- So, if your tenant is listed as Prospect Organization, the LCS portal will deny any attempts to deploy D365FO to an Azure subscription because you’re not a registered customer. Luckily, there are two options to overcome this issue:
Option A: Find and contact a Dynamics 365 partner nearby and let them arrange an environment for you. Personally I would recommend this option because ERP software is not something you “just simply enroll” in your organization.
Or…
Option B: Sign up for a trial Dynamics 365 Finance & Operations license yourself, by following this direct URL:
https://signup.microsoft.com/Signup?OfferId=3f9e84aa-d15d-4293-ac4c-5c467f1d4224&pc=814e410e-2e4a-49f1-940d-486c8bce0319&ali=1
If you’re already logged in to Azure AD, the following message should appear.
If not, click Sign in at the top right corner.
Otherwise, click Yes, add it to my account when you’re sure you’re logged in with the right account.
(By the way: noticed “On-Prem Trial”? We’re just using this this license to activate the “customer” status in able to deploy the Cloud version of D365FO.) - Sign out and log in to LCS again. Now repeat step 3 and ensure the “Prospect” status is changed, probably to “Customer” or “Partner” as shown in the exhibit below.
- Now it’s time to hook up your Azure subscription to LCS.
Let’s first create a new LCS project by clicking the + (plus) sign. - Fill in all required fields. You can enter whatever you would like to name it, as long as you set the product name and product version to the value: Dynamics 365 for Finance and Operations.
Finally click Create. - Your newly created project should be added to the list of projects. Click it’s name to open the project dashboard. Then go to the main menu (= button) at the top ribbon, and click Project settings.
- Navigate to the Azure connectors section, make sure your organization is listed as Customer and click Authorize to deploy the needed service principals to your tenant and subscription. You will be prompted to consent permissions. Click Accept.
Noticed how the Dynamics Deployment Services [wsfed-enabled] service principal is added and authorized to your tenant? It will be used to deploy and maintain the deployable Azure resources. - Make sure the authorization status has been switched to Authorization complete as shown below.
- Open up a second browser tab, navigate to the Azure portal (portal.azure.com) and go to your subscription. Click Access control (IAM), and assign the Contributor role the Dynamics Deployment Services [wsfed-enabled] service principal as shown below.
Also, make sure your account is added directly (as Owner or Contibutor) to the subscription access controls. Group-based role inheritance will prevent LCS from proceeding in connecting to Azure (and that’s a pity!) - Go back to the LCS browser tab, and navigate to the Azure connectors settings (as described in step #9 above) and click the + Add button to connect LCS to your Azure subscription.
- LCS will now require some details about your subscription:
Name: give it a descriptive name, doesn’t need to match your subscription name
Azure subscription ID: copy and paste from the Azure portal
Azure subscription AAD tenant domain: let it autofill, it should match the tenant name of the account you’re using
Configure to use ARM: of course - LCS now detects if your account is eligible to deploy D365FO resources to Azure.
It validates your Contributor permissions. If it is not successful, give it a few minutes and retry. Otherwise, check the FAQ section below. - You can continue the wizard since you’re already authorized to the Azure subscription (step #11).
LCS will ask to select an Azure region to deploy resources by default. Go ahead and select your preferable region. If you’re located in the Netherlands, select West Europe for best (client latency) performance. - Ensure the connector is added to the LCS project as shown below.
- All preparations are now completed to deploy a D365FO sandbox. Go ahead and move on to the next section.
Deploying the D365FO demo / development sandbox
- Within your LCS project, go to the main menu (= button) at the top ribbon, and click Cloud-hosted Environments.
- Then click + Add to start the deployment wizard.
- At the first wizard page, LCS requests the select the desired application and platform version.
Select the latest versions, or other if needed. Click Next. - At the second page, you can choose between DEMO or DEVTEST topology. This affects the type of image LCS will select during deployment. For example, when you would like to develop (using Visual Studio), select DEVTEST. In one of the next steps you can select whether you would like to have (Contoso) demo data or not. In my opinion, I would always select DEVTEST.
- The next page will depend on the choice you’ve made at the previous step.
If you have selected DEVTEST, you will be prompted to choose between Build and test and Develop.
This can be a little confusing, because both options will enable you to develop. The main difference relies in the presence of absence of an Azure DevOps build agent. Build and test has one, Develop has not. - On the next page you can configure the VM. Give it a descriptive name and select the desired VM SKU.
For best performance I would recommend to select a SKU which provides a minimum of 4 CPU cores and 16 GB of RAM. In my case I’ve selected D4 v3.
Tip: Use the Azure Calculator to create a pricing estimate. Also Azureprice.net is a good starting point to make an estimate.
Click Advanced settings. - Walk through each of the configuration items. Below I’ll give you some best practices to minimize additional costs:
Visual Studio Team Services / Customization:
leave default, or customize the build agent name
Supported version:
leave default
Customize SQL Database Config:
you can let LCS deploy (Contoso) demo data if you like
Disk space configuration:
provide the max number of disks the VM SKU supports minus 2
Premium Storage:
leave default: Disabled
Managed Disk settings:
leave default: None. Together with non-premium storage you will be charged per-GB in stead of per-disk-unit.
Customize virtual machine names:
maximum chars the VM SKU supports
Dyn365 F&O:
enable to pin this sandbox to home.dynamics.com
Customize virtual network:
optionally connect it to an existing vnet, otherwise fill in a descriptive name - Finally, click Done, agree on the pricing and license terms (checkbox) and click Next.
At the confirmation dialog, click Deploy. - A new deployment (status Queued) should appear in your list of Cloud-hosted environments.
This can take up a few hours, you’ll have to be a little patient ;-).
In the meanwhile you can monitor for any new Resource Groups to popup in your subscription. - As soon as the VM resource is deployed I would recommend to configure an auto-shutdown timer to prevent excessive compute hours. Go to the VM properties (in the Azure portal) and configure a shutdown time.
- As soon as the deployment status is switched to Deployed you can use the Log on to environment link to get started!
Happy DAX’ing! If you have any questions, feel free to drop a comment below.
FAQ – Common issues
Q: I cannot select “Dynamics 365 for Finance and Operations” during LCS project creation. For example, the only option is “Dynamics NAV” or “Dynamics AX 2012”.
A: Make sure you’re logged in with an Azure AD account, and not a Microsoft/Live/Passport account. Also, make sure your organization status is not set to “prospect organization” at the top right. If it is prospect, go back to preparation step #4.
Q: I get this error when I try to connect LCS to Azure, or when deploying a sandbox:
“This action cannot be performed by prospect users. Please contact support with ID: {0}.
A: This error pops up when your LCS organization status is set to “Prospect organization”. You can change it by following preparation step #4 above. If it’s already non-prospect, try to create a new LCS project. Sometimes the “old” organization status will stick to the LCS project.
Q: I get this error message randomly within LCS:
“An unexpected client error has occurred”.
A: It seems the LCS portal is having some issues with a few kind of browsers, like Firefox.
Try using another browser like Edge, Internet Explorer (ieuw!), or Google Chrome. If the error persists, try to clear browser cache and sign-out and sign-in again. Still persisting? Maybe there is some trouble (uh ohh), and retry in a few hours.
Try using another browser like Edge, Internet Explorer (ieuw!), or Google Chrome. If the error persists, try to clear browser cache and sign-out and sign-in again. Still persisting? Maybe there is some trouble (uh ohh), and retry in a few hours.
Q: My organization authorization (admin consent) keeps remaining status “pending” and isn’t switching to “Authorization complete”. Now I’m unable to deploy a sandbox.
A: First of all, wait a few minutes to allow LCS to discover your subscription. Make sure the service principal (Dynamics Deployment Services [wsfed-enabled]) is given the right role assignment on your Azure subscription. It should have “Contributor” permissions.
Q: During creation of the Cloud-hosted environment sandbox, the wizard won’t let me pass the permissions check (Contributor on admin account).
A: Make sure your account is added directly to the subscription RBAC access controls. There seems to be issues with discovering your permissions via group-based inheritance.
Happy Daxing!!!!!!!
Comments
Post a Comment