Impulz Technologies LLC

Menu
  • Home
  • Products
    • IMPULZ Positive Pay
    • IMPULZ Product unlock
  • Solutions
    • Microsoft Dynamics 365 Finance & Supply Chain Management
    • Microsoft Azure
    • Microsoft Power Platform
      • Power BI
      • Power Apps
  • Services
    • Application Support And Maintenance
    • Azure Cloud Services
    • ISV Development
    • Project Resources
  • About Us
  • Blog
  • Clients
  • Contact Us

Impulz Technologies LLC

Create Build & Development Server In D365 FO – Part 1

  • Home
  • Blog
  • Business
  • Create Build & Development Server In D365 FO – Part 1
  • November 1, 2023November 1, 2023
  • Muhammad Ali

Azure DevOps Pipelines is a cloud service that you can use to automatically build, test and deploy your code to (m)any environments. Since Apr 2019 you can use new Azure DevOps tasks for Microsoft Dynamics 365 to upload and deploy your application deployable package to LCS environments. This blog describes how to create build and development server and set up Azure DevOps to build and deploy code for Microsoft Dynamics 365 to LCS environment.

1-Pre-Requisite:

  • Before implementing this blog you must have to go through my previous blog How To Setup A Connection Between Azure DevOps & LCS. to successfully create build & development server.

2-Setup Agent Pool:

If you are an organization administrator, you create and manage agent pools from the agent pools tab in admin settings.

  1. Sign in to your organization (https://dev.azure.com/{yourorganization}).
  2. Choose Azure DevOps, Organization settings.
  3. Click on “New agent pool…” button and give it a name.

3-Build Agent Setup

As part of the LCS deployment to a Microsoft-hosted environment, you can configure a Build Agent properties. As a part of the deployment process, you can configure your build agent name and the name of the agent pool that will be this agent owner. The agent pool must exist prior to deployment or the deployment will fail. By default, the “Default” agent pool is used, but here we are using our own agent pool.

  • In your LCS environment, go to your Project and select cloud hosted environment setting from the top.
  • Here you can select the Add button and after selecting the proper version choose the Dev/Test Environement Topology.
  • After that choose the Build/Test environment and in advance setting choose the pool which you were created in past.
  • When a Build VM is deployed in Developer topology through LCS, it is pre-configured and ready to start a build. You can change the default configuration at any time from the Visual Studio IDE or the Azure DevOps interface.

3.1-Setup Build Pipeline

  • In your Azure DevOps Project Pipeline Section, Select your pipeline and click “Edit”. Default build pipeline will consist of many steps. I will just walk through the most important. As a first step, you give your pipeline a proper name and select the agent pool you created in the previous step.
  • Then, you can map source code folders you want to include in the build and cloak the ones you want to exclude. Optionally select Clean options and whether you want to apply Label in your selected Azure repository branch. To distinguish between Labels, you can leverage various built-in variables or create your own. I will talk about variables later.
  • These were the basic steps and now you can test your build pipeline. If needed, you can adjust build parameters and finally queue a new build.
  • As a result of a successful build, build artifacts are published in your pipeline. Build artifacts are the files produced by your build, e.g. application deployable package. You can download artifacts produced by your build from an instance of the successfully completed build.

4-Developer Agent Setup

To deploy a cloud development environment in your Lifecycle Services (LCS) project:

  • Create a connection between an LCS project and your Azure subscription. You’ll need your Azure subscription ID and authorize the use of the subscription.
  • Select + under Environments to deploy.
  • Select an application and platform version.
  • Select an environment topology.
  • If you chose a cloud-hosted environment, select which Azure connector you want to use.Then Select Develop Topology.
  • Then on next page, simply click the done and your dev machine is deployed, it usually takes 5 to 6 hours approximately for the machine to be in deployed state.
  • The user who requests the cloud environment is provisioned as the administrator in that environment.
  • User accounts are provisioned on the development VM to allow access to the environment using Remote Desktop, these credentials are accessible on the environment page in LCS.

4.1-Visual Studio Solution and Project Setup

  • Login to Azure DevOps then go to your Project > Repos.
  • Click the 3 dots next to the Trunk folder to create 2 folders called ‘Dev’ and ‘Main’.
  • Create 2 sub-folders called ‘Metadata’ and ‘Projects’ under each of the Dev and Main folders. Your folder structure should look like this:
  • Login to your Dev environment.
  • Launch File Explorer to create the following folder structure in your C drive.
  • Launch Visual Studio in Admin mode.
  • Create a new project.
  • Type ‘Finance Operations’ in the search field then select Finance Operations and click next.
  • Enter your project name, location, and solution name then set your location to “C:\VS\Projects\” folder. Leave the box ‘Place solution and project in the same directory’ unchecked and click create.
  • From the main menu, click View > Team Explorer.
  • Click the Home icon then Source Control Explorer.
  • Click the plug icon at the top to connect your local environment with Azure DevOps Project.
  • From the Source Control Explorer, open Workspaces.
  • Click ‘add’ to create a workspace:<ComputerName>_Dev.
  • Select the Dev workspace then click edit. Map your Source Control Folders to your Local Folders as follows. Click ok when done.
  • Switch to your Dev workspace.
  • Convert the Dev and Main Folders to Dev and Main Branches:Right click Dev > Branching and Merging > Convert to Branch.Right click Main > Branching and Merging > Convert to Branch.
  • In this way, developers work in the Dev branch and when they successfully done their work we simply merge the code from Dev > Main Branch and apply the changes.
  • Right-click the Main folder then select ‘Check In Pending Changes’. This will copy the files to the Main folder in DevOps Repos (Main Source Control).

5-Conclusion

  • Now you simply have to commit the changes by going to the pending changes section in source control explorer and your code is successfully synced to the Azure DevOps Repo and triggered the build pipeline, In this way you can successfully create build and development server and connect Azure DevOps to automate your package deployment!

 

Thank you for your time to read this. In part 2, I will discuss how to deploy a build artifact to selected LCS environment.

HAPPY LEARNING!

Posted in Business, Dynamics 365, Microsoft Azure, New Technologies, UncategorizedTagged Azure, D365 FO Azure DevOps, Dynamics 365 Finanace and Operations development VM, Dynamics Lifecycle Services, Microsoft Azure, Microsoft Dynamics 365, Microsoft Dynamics 365 version control

Recent Posts

  • Optimizing Azure Workloads: Automate VM Startup and Shutdown
  • Landed Cost – Auto Cost Setup in Microsoft D365 Finance and Supply Chain
  • Big Data Capabilities of Azure Synapse, Databricks, and Data Factory
  • Fix Database Synchronization Errors in Microsoft Dynamics AX 2012
  • Dynamics 365 Finance and Supply Chain: Implement budget check via custom logic

Recent Comments

No comments to show.

Archives

  • April 2024
  • December 2023
  • November 2023
  • October 2023
  • July 2023
  • April 2023
  • February 2023
  • January 2023
  • October 2022
  • September 2022
  • August 2022
  • July 2022

Categories

  • Business
  • Dynamics 365
  • Dynamics 365 Finance and Supply Chain
  • Dynamics AX 2012
  • Introductions
  • Microsoft Azure
  • Microsoft Dataverse
  • Microsoft Power Platform
  • New Technologies
  • Power BI
  • Uncategorized

Latest Post

  • Optimizing Azure Workloads: Automate VM Startup and Shutdown
  • Landed Cost – Auto Cost Setup in Microsoft D365 Finance and Supply Chain
  • Big Data Capabilities of Azure Synapse, Databricks, and Data Factory
  • Fix Database Synchronization Errors in Microsoft Dynamics AX 2012
  • Dynamics 365 Finance and Supply Chain: Implement budget check via custom logic

Tags

Auto Cost Automation Ax2012 Azure Azure AD Azure Databricks Azure Data Factory Azure Synapse Cost Accounting D365 D365 code management D365 FO Azure DevOps Dataverse Development DevOps Duty Dynamics 365 Finanace and Operations development VM Dynamics 365 Finance and Operations Dynamics 365 Finance and Supply Chain Dynamics 365 FO Security Dynamics 365 with git Dynamics Lifecycle Services Export Freight Full Sync errors Import Item Cost Allocation Landed Cost Lifecycle Services Microsoft Azure Microsoft Dataverse Microsoft dynamics Microsoft Dynamics 365 Microsoft Dynamics 365 Commerce Microsoft Dynamics 365 Finance and Operations Microsoft Dynamics 365 version control Model Driven Apps Power Apps Power Platform Shipment SQL Error Transportation Voyages Web APIs XDS Framework
© Impulz Technologies - All right reserved.