Skip to content

Commit

Permalink
AOE onboarding (microsoft#775)
Browse files Browse the repository at this point in the history
Co-authored-by: Hélder Pinto <hepint@microsoft.com>
Co-authored-by: Helder Pinto <helder.pinto@microsoft.com>
  • Loading branch information
3 people authored Jul 8, 2024
1 parent 12efb0e commit 861676f
Show file tree
Hide file tree
Showing 239 changed files with 81,548 additions and 14 deletions.
61 changes: 61 additions & 0 deletions .github/workflows/aoe-cd-dev.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
name: AOE Continuous Deployment (DEV)
on:
workflow_dispatch:
push:
branches:
- dev
permissions:
id-token: write
contents: read
jobs:
AOE-CD:
environment: aoe-dev
runs-on: ubuntu-latest
env:
AZURE_SUBSCRIPTION_ID: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
AOE_SQL_ADMIN: ${{ secrets.AOE_SQL_ADMIN }}
AOE_SQL_PASSWD: ${{ secrets.AOE_SQL_PASSWD }}
AOE_LOCATION: ${{ secrets.AOE_LOCATION }}
AOE_NAMEPREFIX: ${{ secrets.AOE_NAMEPREFIX }}
AOE_WORKSPACENAME: ${{ secrets.AOE_WORKSPACENAME }}
AOE_WORKSPACERG: ${{ secrets.AOE_WORKSPACERG }}
steps:
- run: echo "This job is now running on a ${{ runner.os }} server hosted by GitHub for the ${{ github.ref_name }} branch of the ${{ github.repository }} repository!"
- name: Installing modules
shell: pwsh
run: |
Set-PSRepository PSGallery -InstallationPolicy Trusted
Install-Module -Name Az.Accounts -RequiredVersion 2.19.0 -Force
Install-Module -Name Az.Resources -RequiredVersion 6.16.2 -Force
Install-Module -Name Az.Storage -RequiredVersion 6.2.0 -Force
Install-Module -Name Az.OperationalInsights -RequiredVersion 3.2.0 -Force
Install-Module -Name Az.Sql -RequiredVersion 4.14.1 -Force
Install-Module -Name Az.Automation -RequiredVersion 1.10.0 -Force
Install-Module -Name Microsoft.Graph.Authentication,Microsoft.Graph.Identity.DirectoryManagement -Force
- name: Check out repository code
uses: actions/checkout@v3
- name: Login via Az module
uses: azure/login@hf_447_release
with:
client-id: ${{ secrets.AZURE_CLIENT_ID }}
tenant-id: ${{ secrets.AZURE_TENANT_ID }}
subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
enable-AzPSSession: true
- name: Create Deployment Settings JSON file
run: |
echo '{
"SubscriptionId": "'"$AZURE_SUBSCRIPTION_ID"'",
"NamePrefix": "'"$AOE_NAMEPREFIX"'",
"WorkspaceReuse": "n",
"DeployWorkbooks": "y",
"SqlAdmin": "'"$AOE_SQL_ADMIN"'",
"SqlPass": "'"$AOE_SQL_PASSWD"'",
"TargetLocation": "'"$AOE_LOCATION"'",
"DeployBenefitsUsageDependencies": "n"
}' > ./src/optimization-engine/deploymentSettings.json
- name: Testing PowerShell script call
shell: pwsh
run: |
Set-Location ./src/optimization-engine
./Deploy-AzureOptimizationEngine.ps1 -SilentDeploymentSettingsPath ./deploymentSettings.json -TemplateUri "https://raw.githubusercontent.com/${{ github.repository }}/${{ github.ref_name }}/src/optimization-engine/azuredeploy.bicep"
- run: echo "🍏 This job's status is ${{ job.status }}."
59 changes: 59 additions & 0 deletions .github/workflows/aoe-cd-prod.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
name: AOE Continuous Deployment (PROD)
on:
workflow_dispatch:
push:
branches:
- main
permissions:
id-token: write
contents: read
jobs:
AOE-CD:
environment: aoe-prod
runs-on: ubuntu-latest
env:
AZURE_SUBSCRIPTION_ID: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
AOE_SQL_ADMIN: ${{ secrets.AOE_SQL_ADMIN }}
AOE_SQL_PASSWD: ${{ secrets.AOE_SQL_PASSWD }}
AOE_LOCATION: ${{ secrets.AOE_LOCATION }}
AOE_NAMEPREFIX: ${{ secrets.AOE_NAMEPREFIX }}
steps:
- run: echo "This job is now running on a ${{ runner.os }} server hosted by GitHub for the ${{ github.ref_name }} branch of the ${{ github.repository }} repository!"
- name: Installing modules
shell: pwsh
run: |
Set-PSRepository PSGallery -InstallationPolicy Trusted
Install-Module -Name Az.Accounts -RequiredVersion 2.19.0 -Force
Install-Module -Name Az.Resources -RequiredVersion 6.16.2 -Force
Install-Module -Name Az.Storage -RequiredVersion 6.2.0 -Force
Install-Module -Name Az.OperationalInsights -RequiredVersion 3.2.0 -Force
Install-Module -Name Az.Sql -RequiredVersion 4.14.1 -Force
Install-Module -Name Az.Automation -RequiredVersion 1.10.0 -Force
Install-Module -Name Microsoft.Graph.Authentication,Microsoft.Graph.Identity.DirectoryManagement -Force
- name: Check out repository code
uses: actions/checkout@v3
- name: Login via Az module
uses: azure/login@hf_447_release
with:
client-id: ${{ secrets.AZURE_CLIENT_ID }}
tenant-id: ${{ secrets.AZURE_TENANT_ID }}
subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
enable-AzPSSession: true
- name: Create Deployment Settings JSON file
run: |
echo '{
"SubscriptionId": "'"$AZURE_SUBSCRIPTION_ID"'",
"NamePrefix": "'"$AOE_NAMEPREFIX"'",
"WorkspaceReuse": "n",
"DeployWorkbooks": "y",
"SqlAdmin": "'"$AOE_SQL_ADMIN"'",
"SqlPass": "'"$AOE_SQL_PASSWD"'",
"TargetLocation": "'"$AOE_LOCATION"'",
"DeployBenefitsUsageDependencies": "n"
}' > ./src/optimization-engine/deploymentSettings.json
- name: Testing PowerShell script call
shell: pwsh
run: |
Set-Location ./src/optimization-engine
./Deploy-AzureOptimizationEngine.ps1 -SilentDeploymentSettingsPath ./deploymentSettings.json -TemplateUri "https://raw.githubusercontent.com/${{ github.repository }}/${{ github.ref_name }}/src/optimization-engine/azuredeploy.bicep"
- run: echo "🍏 This job's status is ${{ job.status }}."
59 changes: 59 additions & 0 deletions .github/workflows/aoe-cd-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
name: AOE Continuous Deployment (TEST)
on:
workflow_dispatch:
push:
branches:
- features/aoe
permissions:
id-token: write
contents: read
jobs:
AOE-CD:
environment: aoe-test
runs-on: ubuntu-latest
env:
AZURE_SUBSCRIPTION_ID: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
AOE_SQL_ADMIN: ${{ secrets.AOE_SQL_ADMIN }}
AOE_SQL_PASSWD: ${{ secrets.AOE_SQL_PASSWD }}
AOE_LOCATION: ${{ secrets.AOE_LOCATION }}
AOE_NAMEPREFIX: ${{ secrets.AOE_NAMEPREFIX }}
steps:
- run: echo "This job is now running on a ${{ runner.os }} server hosted by GitHub for the ${{ github.ref_name }} branch of the ${{ github.repository }} repository!"
- name: Installing modules
shell: pwsh
run: |
Set-PSRepository PSGallery -InstallationPolicy Trusted
Install-Module -Name Az.Accounts -RequiredVersion 2.19.0 -Force
Install-Module -Name Az.Resources -RequiredVersion 6.16.2 -Force
Install-Module -Name Az.Storage -RequiredVersion 6.2.0 -Force
Install-Module -Name Az.OperationalInsights -RequiredVersion 3.2.0 -Force
Install-Module -Name Az.Sql -RequiredVersion 4.14.1 -Force
Install-Module -Name Az.Automation -RequiredVersion 1.10.0 -Force
Install-Module -Name Microsoft.Graph.Authentication,Microsoft.Graph.Identity.DirectoryManagement -Force
- name: Check out repository code
uses: actions/checkout@v3
- name: Login via Az module
uses: azure/login@hf_447_release
with:
client-id: ${{ secrets.AZURE_CLIENT_ID }}
tenant-id: ${{ secrets.AZURE_TENANT_ID }}
subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
enable-AzPSSession: true
- name: Create Deployment Settings JSON file
run: |
echo '{
"SubscriptionId": "'"$AZURE_SUBSCRIPTION_ID"'",
"NamePrefix": "'"$AOE_NAMEPREFIX"'",
"WorkspaceReuse": "n",
"DeployWorkbooks": "y",
"SqlAdmin": "'"$AOE_SQL_ADMIN"'",
"SqlPass": "'"$AOE_SQL_PASSWD"'",
"TargetLocation": "'"$AOE_LOCATION"'",
"DeployBenefitsUsageDependencies": "n"
}' > ./src/optimization-engine/deploymentSettings.json
- name: Testing PowerShell script call
shell: pwsh
run: |
Set-Location ./src/optimization-engine
./Deploy-AzureOptimizationEngine.ps1 -SilentDeploymentSettingsPath ./deploymentSettings.json -TemplateUri "https://raw.githubusercontent.com/${{ github.repository }}/${{ github.ref_name }}/src/optimization-engine/azuredeploy.bicep"
- run: echo "🍏 This job's status is ${{ job.status }}."
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -354,3 +354,8 @@ coverage.xml

# Microsoft Power BI
.pbi/

# Optimization Engine local deployment files
last-deployment-state.json
database-connection-settings.json
deployment-settings-*.json
2 changes: 1 addition & 1 deletion docs/_automation/powershell/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
layout: default
title: PowerShell
has_children: true
nav_order: 40
nav_order: 41
description: 'Automate and scale your FinOps efforts.'
permalink: /powershell
---
Expand Down
3 changes: 2 additions & 1 deletion docs/_includes/tools.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
- 🏦 [FinOps hubs]({{ "/hubs" | relative_url }}) – Open, extensible, and scalable cost reporting.{% endif %}{% if include.all == "1" or include.pbi == "1" %}
- 📊 [Power BI reports]({{ "/power-bi" | relative_url }}) – Accelerate your reporting with Power BI starter kits.{% endif %}{% if include.all == "1" or include.opt == "1" %}
- 📒 [Cost optimization workbook]({{ "/optimization-workbook" | relative_url }}) – Central hub for cost optimization.{% endif %}{% if include.all == "1" or include.gov == "1" %}
- 📒 [Governance workbook]({{ "/governance-workbook" | relative_url }}) – Central hub for governance.{% endif %}{% if include.all == "1" or include.ps == "1" %}
- 📒 [Governance workbook]({{ "/governance-workbook" | relative_url }}) – Central hub for governance.{% endif %}{% if include.all == "1" or include.aoe == "1" %}
- 🔍 [Azure Optimization Engine]({{ "/optimization-engine" | relative_url }}) – Extensible solution for custom optimization recommendations.{% endif %}{% if include.all == "1" or include.ps == "1" %}
- 🖥️ [PowerShell module]({{ "/powershell" | relative_url }}) – Automate and manage FinOps solutions and capabilities.{% endif %}{% if include.all == "1" or include.bicep == "1" %}
- 🦾 [Bicep Registry modules]({{ "/bicep" | relative_url }}) – Official repository for Bicep modules.{% endif %}{% if include.all == "1" or include.data == "1" %}
- 🌐 [Open data]({{ "/data" | relative_url }}) – Data available for anyone to access, use, and share without restriction.{% endif %}{% if include.all == "1" or include.datatypes == "1" %}
Expand Down
4 changes: 2 additions & 2 deletions docs/_reporting/hubs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ Required permissions for deploying or updating hub instances are covered in the

You will need one or more of the following to export your cost data:

| Scope | Permission |
| Scope | Permission |
| ----------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------- |
| Subscriptions and resource groups (all account types) | [Cost Management Contributor](https://learn.microsoft.com/azure/role-based-access-control/built-in-roles#cost-management-contributor). |
| EA billing scopes | Enterprise Reader, Department Reader, or Account Owner (aka enrollment account). |
Expand All @@ -205,6 +205,6 @@ For additional details, refer to [Cost Management documentation](https://learn.m

## 🧰 Related tools

{% include tools.md bicep="0" data="1" gov="0" pbi="1" ps="1" opt="1" %}
{% include tools.md aoe="1" bicep="0" data="1" gov="0" pbi="1" ps="1" opt="1" %}

<br>
9 changes: 9 additions & 0 deletions docs/_resources/changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,15 @@ Legend:
> - Reports will still be released as PBIX files so this change should not impact end users.
> - Visualizations are not being switched to [Power BI Enhanced Report (PBIR)](https://learn.microsoft.com/power-bi/developer/projects/projects-report#pbir-format) format yet due to functional limitations that would impact end users (as of June 2024).
🔍 Optimization engine
{: .fs-5 .fw-500 .mt-4 mb-0 }

> ➕ Added:
>
> 1. Added Azure Optimization Engine (AOE), an extensible solution for custom optimization recommendations.
<br>

🌐 Open data
{: .fs-5 .fw-500 .mt-4 mb-0 }

Expand Down
2 changes: 1 addition & 1 deletion docs/_workbooks/governance-workbook/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,6 @@ The governance workbook is an Azure Monitor workbook that provides a comprehensi

## 🧰 Related tools

{% include tools.md opt="1" %}
{% include tools.md opt="1" aoe="1" %}

<br>
2 changes: 1 addition & 1 deletion docs/_workbooks/optimization-workbook/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,6 @@ The cost optimization workbook is an Azure Monitor workbook that provides a sing

## 🧰 Related tools

{% include tools.md hubs="1" gov="1" %}
{% include tools.md hubs="1" gov="1" aoe="1" %}

<br>
Binary file added docs/assets/images/aoe/architecture.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/assets/images/aoe/powerbi-transformdata.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 861676f

Please sign in to comment.