Thu, 02/09/2023 - 13:39 By mario.ortegaaguayo Contributor Lloyd Sebag
6 comments
Continuous deployment in Microsoft Power Platform

Power Platform Managed Environments and Pipelines:

What is Managed Environments?

Managed Environments is a suite of capabilities that allows system administrators to manage Power Platform with more control, less effort, and more insights. Administrators can use Managed Environments with any type of environment except the Developer environments.

Once enabled, users will need a Power Apps, Power Automate or 365 license Premium to use respective resources in this environment.

Managed Environments from an IT perspective allow administrators to get better insights and feedback into how the environment is used.

The principal features that Managed environments offer to administrators are:

 

  1. Weekly digest: system administrators will receive by email analytics about top apps, most impactful makers, and inactive resources you can safely clean up. Weekly digest will be delivered to administrator mailboxes once a week.

 

  1. Sharing Limits: Administrators can limit the number of users who can share canvas apps. 

 

  1. Data Policies: Administrators can easily identify all the data policies that are applied to an environment. Data policies define the consumer connectors that data can be shared with. They make sure that data is managed in a uniform manner across your organization. 

 

  1. Solution checker: With the solution checker feature, you can perform a rich static analysis check on your solutions against a set of best practice rules and quickly identify these problematic patterns. After the check completes, administrator receives a detailed report that lists the issues identified, the components and code affected, and links to documentation that describes how to resolve each issue.

 

Solution checker analyzes three solution components:

  • Dataverse custom workflow activities.
  • Dataverse web resources (HTML and JavaScript).
  • Dataverse configurations, for instance SDK message steps.

 

How to enable Managed Environments

  1. In the Power platform admin center, in the left panel, select Environments.
  2. Select the check mark to the left of an environment.
  3. On the command bar, select Enable Managed Environments. If the environment is already managed, select Edit Managed Environments.
  4. Configure the settings, and then select Enable or Save.

 

Power Platform Managed Environments and Pipelines

 

It needs to be highlighted three points regarding user permissions.

  1. You need to be Administrator (role of Global administrator, Power Platform service administrator or Dynamics 365 administrator in Azure Active Directory.
  2. Any user with permissions to see the environment details can view the Managed Environments properties for an environment.
  3. Users with the Delegated Admin role or the Environment Admin security role are not allowed to change the Managed Environments property in an environment.

 

What are pipelines in Power Platform?

Pipelines in Power Platform aim to democratize application lifecycle management (ALM) for Power Platform and Dynamics 365 customers by bringing ALM automation, continuous integration and continuous delivery (CI/CD) capabilities into the service in a manner that is more approachable for all makers, admins, and developers.

Pipelines significantly reduce the effort and domain knowledge previously required to realize the ROI from adopting healthy, automated ALM processes within your team or organization.

Pipelines offer the next advantages:

  • Admins easily configure automated deployment pipelines in minutes rather than days or weeks.
  • Makers have an intuitive user experience for easily deploying their solutions.
  • Professional developers can (optionally) run pipelines using their preferred tools such as the Power Platform command line interface (CLI).

 

How to configure pipelines

Before starting to configure pipelines, we need to clarify a few points:

  • It is necessary to create a host environment, known as Pipeline Orchestrator, which is a special purpose environment which acts as storage and management layer for all pipeline configuration security and run history. The recommendation is to create this environment as a dedicated production environment separate from the other environments and tenants.
  • Environments that would be configured to be part of pipeline experience must have the same Region as the “Pipelines host”
  • Pipeline Orchestrator "CAN BE" Managed Environment but the rest of the environments "MUST BE" Managed Environments.
  • In Pipeline Orchestrator environment, you need to install "Power Platform Pipelines" application as resource. You can install it in the next path:                                        Power Platform Admin Center-> Environments -> Pipeline Orchestrator -> Resources -> Dynamics 365 apps -> Install App -> Power Platform Pipelines.

 

Power Platform Managed Environments and Pipelines

 

Once installed, open "Pipeline Orchestrator" environment and in Pipeline Setup -> Environment you will create a Dev Environment and Prod Environment linked to the original environment through the ID.

 

Pipeline Setup Environments

 

Below you have the configuration for each environment. Highlight that you can get "Environment ID" from the admin center, just by clicking on the required environment.

It is also worth mentioning that, in the field "Environment Type", is required to specify which is the purpose of the environment. In this case, "Dev Environment" is the data source, therefore is a "Development Environment", and "Prod environment" will be the "Target Environment" or the environment where the data will be deployed.

 

Power Platform Managed Environments and PipelinesProd environment Setup

 

The next step is to create the Pipeline. As you see in the picture below, you click on "New" for navigating to the Pipeline configuration.

 

Pipeline Configuration

 

After that, provide a name and in "Linked Development Environments", you can add an existing development environment, in this case, the one you created earlier.

 

Power Platform Managed Environments and Pipelines

 

To conclude the Pipeline setup, you need to create a "New Deployment Stage". Clicking on this button, a pop-up will be opened for the Deployment Stage creation. Add Prod Environment in "Target Deployment Environment ID", then click on "Save and Close". The configuration is now complete.

 

Pipeline setup 2

 

Pipeline setup 3

 

The final step is to deploy a solution from Dev environment to Prod environment.

For this deployment, you have to navigate to your solution created in Dev Environment. As seen below, a new section is created and you can now select the previously created Pipeline "Testing Pipelines". By clicking on "Deploy here", the solution will be deployed from the Dev environment to the Prod environment.

 

Deploying Dev->Prod1

 

Select your Pipeline and Stage (if you have only one Stage and Pipelines, it is selected by default) and click "Next".

 

Power Platform Managed Environments and Pipelines

 

After the validation, a Summary will be showed. Here you can specify the Version and review some configuration fields.

Click on "Deploy" for finishing the deployment process.

 

Power Platform Managed Environments and Pipelines

 

In conclusion, Microsoft has released a very useful tool for Power Platform developers and administrators. We will soon be able to see the final release and what functionalities they add.

Power Platform Managed Environments and Pipelines

Comments

Hi Mario,
in this pipeline how do you set (or update) solution's environment variables? In a managed environment, they cannot be updated.

Thanks in advance,

Mon, 03/06/2023 - 18:40
Sean (not verified)

Hi
I have followed the above instructions, set up my new environment to be a managed environment BEFORE I installed the Pipelines APP and when i run the app i keep getting the error = Pipelines is only supported in Managed Environments.
ANy ideas what. am doing wrong?

Tue, 03/07/2023 - 14:32
Mike Kolling (not verified)

Does this error prevent you from continuing? When I add a deployment environment in the Deployment Pipeline Configuration app I also get a notification at the top of my screen saying pipelines is only supported in managed environments. But if I navigate to the 'Environments'-tab in the menu at the left of Deployment Pipeline Configuration app I can see that the environment was added and the validation status = 'Success'.

In other words, it's only a heads-up. Not an error that prevents you from continuing. But it is confusing, if you ask me.

Fri, 03/17/2023 - 14:43
PipelineHelp (not verified)

In reply to by Mike Kolling (not verified)

hi,

Is there a preferred way to go for configuring the permissions for dev., users and for deployment?

Thankx in advance

Wed, 08/23/2023 - 14:05
Ronald Limborgh (not verified)

Hi,

Pipeline security is managed within the host environment by assigning security roles. Additionally, users must currently have access to all environments associated with a pipeline in order to create or run the pipeline.

When you installed the Power Platform pipelines application, two security roles were added:

  • Deployment Pipeline User: Has privileges to run pipelines that have been shared with them.
  • Deployment Pipeline Administrator: Has full control over all pipeline configuration, without needing system administrator security role membership.

 

For more info Set up pipelines in Power Platform - Power Platform | Microsoft Learn

 

Regards,

Mario

Mon, 08/28/2023 - 11:30

In reply to by Ronald Limborgh (not verified)

Add new comment

Image CAPTCHA
Enter the characters shown in the image.