Provision and manage environments

Completed

The table of cloud-hosted environments on the Cloud-Hosted Environments page of a project has an Add button so you can deploy new environments.

 Screenshot of the cloud-Hosted Environments page.

When you select the name, application version, platform version, and purpose of the environment that you want to deploy, you should consider changing a few key settings:

  • VM type - Depends upon your client's needs.

  • Machine name - Makes your RDP window headers more human-readable than a GUID.

  • Data - If you don't want demo data, make sure that None is selected.

You can create, maintain, and delete cloud-hosted environments by using Lifecycle Services tools and components. Typically, you’ll create a Lifecycle Service implementation project to host all cloud-hosted environments for a project. Cloud-hosted environments are created in Azure with the Azure connector settings.

Configure the Azure connector

You create cloud-hosted environments in Azure by using the configuration from Azure connector in Lifecycle Services. The first time you configure settings for cloud-hosted environments, you’ll be prompted to configure the Azure connector and are guided to the Lifecycle Services project settings for Azure connectors.

A requirement for Azure connectors is that you must use an Azure subscription that’s a contributor for Dynamics Deployment Services, and then enable Lifecycle Services to use the Azure subscription. The contributor role for Dynamics Deployment Services is assigned using Azure identity and access management (IAM) for the subscription in the Azure portal.

To do this:

  1. Select Add in project settings for Azure connectors to configure the requirement to allow a new Azure connector to be created in Lifecycle Services. A prompt for Microsoft Azure setup appears in Lifecycle Services.
  2. Complete the Name, Azure subscription ID, and Azure subscription Microsoft Entra ID Tenant Domain (or ID) fields.
  3. Lifecycle Services attempts to validate the Dynamics Deployment Services role and Authorization, and if validation is successful, you must select an Azure region that’ll be used for creating the cloud-hosted environment. If you select Connect, the new Azure connector will be created.

You can have more Azure connectors in Lifecycle Services, but one will always be the default.

Configure Azure DevOps

Configure Azure DevOps in the project settings in your Lifecycle Services project. You must have this configured so you can create a build pipeline when deploying a build and test environment.

Configuring Azure DevOps requires entering a URL for your organization in Azure DevOps and selecting a DevOps project.

Creating a cloud-hosted environment

When you configure an Azure connector as a requirement for cloud-hosted environments, you can create environments. To do this:

  1. Enter the Cloud-hosted environments menu, and then select Add.
  2. Select the application version and platform for the cloud hosted environment, and then select your environment topology:
    1. DEMO - An environment for demo purposes is deployed.
    2. DEVTEST - There are two options:
      1. Build and test - An environment for build and test is deployed. If your Azure DevOps is configurated for your Lifecycle Services project, a build pipeline will be created in Azure DevOps using this environment.
      2. Development - An environment for development is deployed.
  3. Configure an environment name and the size of your environment, and various Advanced settings:
    • Environment name - Enter a logical name, depending on your company’s naming standard.
    • Size - Virtual machine sizes vary in price and performance. Select based on your specific requirements.
    • Advanced settings - Configure these as needed, per your project requirements:
      • Customize SQL Database Configuration - Specify that a database with demo data will deploy in your environment.
      • Disk - Select disk space, premium storage, and type of storage. Costs will vary depending on your selection.
      • Customize virtual machine names - Specify name preferences.
      • Power Platform Integration - Configure Power Platform integration.

        Note

        With tier 1 environments, you must do this during deployment, and it can’t be changed after creation.

      • Dynamics 365 for Finance and Operations - Select whether to publish the home page.
      • Customize virtual network - Select whether to use a new or existing virtual network.
  4. Select Next when you complete all configurations, and your new environment will be created. The environment creation can take a while (four to six hours). Your new cloud-hosted environment will have a status of Queued in the cloud hosted environment list until it’s deployed. The Deployment status will change to Deploying during creation.

Update a cloud-hosted environment

You can update cloud-hosted environments to a new application and platform version by configuring details for the environment. To do this, follow these steps:

  1. View available updates from the Full details in the cloud hosted environment list.
  2. Maintain your current environment configuration by selecting Maintain and Apply update options for the selected cloud hosted environment. The Apply updates option lists all updates found in the Lifecycle Services project Asset library.
  3. Import updates from the global Asset library to your project’s Asset library by selecting Import, selecting the update, and then selecting Pick.
  4. Select and confirm the software deployable package that you want to apply, and then the deployment status will change to Queued and then Servicing as the update proceeds.

After your environment updates, the deployment status will change from Servicing to Deployed.

Start and stop a cloud-hosted environment

From the cloud-hosted environment list, you can start or stop an environment by following these processes:

  • Start an environment by selecting it, and then selecting Start. The deployment status will change to Starting, and then change to Deployed. Your environment then is accessible.
  • If an environment’s deployment status is Deployed, you can stop it by selecting the environment in the cloud hosted environment list, and then selecting Stop. The deployment status changes to Stopping, and then Stopped.
  • Delete a stopped environment by selecting it, and then select Deallocate. Deallocation will prepare the environment for deletion, and then you can delete it.

Note

You can start and stop cloud-hosted environments directly in Azure, but it won’t update the deployment status in Lifecycle Services. Therefore, an environment with a status of Deployed can be stopped directly in Azure and then wouldn’t be accessible.