Skip to content

Latest commit

 

History

History
92 lines (79 loc) · 5.91 KB

deployment.md

File metadata and controls

92 lines (79 loc) · 5.91 KB

Solution Prerequisites

  • Azure subscription
  • Contributor Role on Azure Subscription
  • Application Developer & Groups Administrator roles
  • Power BI Tenant Administrator role
  • GitHub account
  • Azure CLI (Version >2.62)

NOTE: Installation of Azure CLI might require you to restart your machine

Deployment overview

Deployment process is almost fully automated and only requires manual intervention in places where the admin consent is required

The installation process consists of following steps:

  1. Clone repository to the local machine (~2 minutes)
  2. Provision Azure environment (~15 minutes)
  3. Allow Security Group to access Power BI API (~2 minutes)
  4. Verify if the admin consent is provided for the newly created App Registration (~2 minutes)
  5. Refresh data in PowerBI with the help of ADF job (~10 minutes)
  6. Update credentials in your Power BI report (~3 minutes)
  7. Enjoy browsing your organization's Power BI statistics in one place! (~1 minute)

Step by step installation guide

1) Clone repository to the local machine (~2 minutes)

  1. Execute the following command in your PowerShell: git clone https://github.com/AstralForest/Power_BI_Monitoring.git
  2. Enter newly created folder called "Power_BI_Monitoring"

2) Provision Azure environment (~15 minutes)

  1. Execute the following command in PowerShell: .\Provision-PBI-Monitoring-Demo.ps1
  2. Follow instructions of the script. It will require just the short name of the organization (up to 5 letters) and the region where to provision it (you can press Enter to proceed with northeurope). All the rest is done automatically

NOTE. Steps which are being executed by the script:

  1. Provisions all Azure components
  2. Copies database image to storage account and imports that into newly created database
  3. Imports ADF resources into newly created Azure Data Factory instance
  4. Creates App Registration, grants it privileges and creates Service Principal for it
  5. Creates a Security Group and adds service principal to it
  6. Provisions PowerBI workspace, deploys report and changes the connection string to a newly created database
  7. Writes down essential variables to the configuration file "adf_config.json"

3) Allow Security Group to access Power BI API (~2 minutes)

  1. Go to Power BI Admin settings
  2. Add security group called "sg_{companyName}_pbi_mon_demo" to the following field:image
  3. Click "Apply"

4) Verify if the admin consent is provided for the newly created App Registration (~2 minutes)

  1. Go to Portal App Registration
  2. Find and click on app registration created as part of the automatic deployment process. It should be called "appreg-{companyName}-pbi-mon-demo" where the {companyName} is the 5 character string provided during deployment
  3. Go to API permission to check whether all Configured permissions have status approved as shown on the picture below:image
  4. If the status is not Approved, ask your organization's administrator to "Grant Admin consent for {Company Name}". So to click here:image

5) Refresh data in PowerBI with the help of ADF job (~10 minutes)

  1. Go back to the PowerShell inside the "Power_BI_Monitoring" folder cloned to the local machine
  2. Execute the following command: .\Trigger-ADF-Pipeline.ps1
  3. Wait until the script is executed till the end

NOTE. Script steps:

  1. Triggers pipeline in newly created ADF instance called "Power BI Monitoring Master Pipeline"
  2. Once the first pipeline finished it executes the second one called "Load Power BI API Activity Events 30days" to populate 30 days of history for the organization

6) Update credentials in your Power BI report (~3 minutes)

  1. Go to Power BI Portal
  2. Click on Workspaces and select newly created "PBI_Demo_Workspace"

image

  1. Go to report's dataset settings

image

  1. Click on "Edit credentials"

image

  1. Select authentication "OAuth2" and click "Sign In"

image

  1. Select the account you were provisioning the environment with in the prompt window

7) Enjoy browsing your organization's Power BI statistics in one place! (~1 minute)

  1. Go to Power BI Portal
  2. Click on Workspaces and select newly created "PBI_Demo_Workspace"

image

  1. Refresh your Power BI dataset and once it is refreshed open the report

image

Additional information

Naming conventions used when deploying resources:

  • Resource Group: rg-{companyName}-pbi
  • Server Name: server-{companyName}-pbimon-01
  • Database Name: db-{companyName}-pbimon-01
  • Key Vault Name: kv-{companyName}-pbimon-01
  • Azure Data Factory: adf-{companyName}-pbimon-01
  • Storage Account: st{companyName}pbimon01
  • App Registration: appreg-{companyName}-pbi-mon-demo
  • Service Principal: appreg-{companyName}-pbi-mon-demo
  • Security Group: sg_{companyName}_pbi_mon_demo
  • Power BI Workspace: PBI_Demo_Workspace
  • Power BI Report: PBI_Monitoring_Demo_2024