-
Notifications
You must be signed in to change notification settings - Fork 475
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #970 from Azure-Samples/e2e/databricks/parking-sen…
…sors-V1 [E2E Databricks]: feat: improving deployment experience and functionality
- Loading branch information
Showing
34 changed files
with
765 additions
and
469 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
4 changes: 2 additions & 2 deletions
4
e2e_samples/parking_sensors/databricks/config/cluster.config.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
62 changes: 39 additions & 23 deletions
62
e2e_samples/parking_sensors/infrastructure/modules/alerts.bicep
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,52 +1,68 @@ | ||
//https://learn.microsoft.com/en-us/azure/templates/microsoft.insights/metricalerts?pivots=deployment-language-bicep | ||
// Parameters | ||
@description('The project name.') | ||
param project string | ||
@description('The environment for the deployment.') | ||
@allowed([ | ||
'dev' | ||
'stg' | ||
'prod' | ||
]) | ||
param env string | ||
@description('The location of the resource.') | ||
param location string = resourceGroup().location | ||
@description('The unique identifier for this deployment.') | ||
param deployment_id string | ||
@description('The name of the Data Factory.') | ||
param datafactory_name string | ||
@description('The ID of the action group.') | ||
param action_group_id string | ||
|
||
// Resource: Metric Alert | ||
resource adpipelinefailed 'Microsoft.Insights/metricAlerts@2018-03-01' = { | ||
name: '${project}-adffailedalert-${env}-${deployment_id}' | ||
location: 'global' | ||
tags: { | ||
DisplayName: 'ADF Pipeline Failed' | ||
Environment: env | ||
Project: project | ||
DeploymentId: deployment_id | ||
} | ||
properties: { | ||
actions: [ | ||
{ | ||
actionGroupId: action_group_id | ||
} | ||
description: 'ADF pipeline failed' | ||
enabled: true | ||
severity: 1 | ||
evaluationFrequency: 'PT1M' | ||
windowSize: 'PT5M' | ||
scopes: [ | ||
'${subscription().id}/resourceGroups/${resourceGroup().name}/providers/Microsoft.DataFactory/factories/${datafactory_name}' | ||
] | ||
autoMitigate: false | ||
targetResourceType: 'Microsoft.DataFactory/factories' | ||
targetResourceRegion: location | ||
criteria: { | ||
'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria' | ||
allOf: [ | ||
{ | ||
threshold : 1 | ||
name : 'Metric1' | ||
metricNamespace: 'Microsoft.DataFactory/factories' | ||
metricName: 'PipelineFailedRuns' | ||
operator: 'GreaterThan' | ||
timeAggregation: 'Total' | ||
criterionType: 'StaticThresholdCriterion' | ||
name: 'PipelineFailedRunsCriteria' | ||
metricName: 'PipelineFailedRuns' | ||
metricNamespace: 'Microsoft.DataFactory/factories' | ||
operator: 'GreaterThan' | ||
threshold: 1 | ||
timeAggregation: 'Total' | ||
criterionType: 'StaticThresholdCriterion' | ||
} | ||
] | ||
] | ||
} | ||
description: 'ADF pipeline failed' | ||
enabled: true | ||
evaluationFrequency: 'PT1M' | ||
scopes: [ | ||
'${subscription().id}/resourceGroups/${resourceGroup().name}/providers/Microsoft.DataFactory/factories/${datafactory_name}' | ||
actions: [ | ||
{ | ||
actionGroupId: action_group_id | ||
webHookProperties: { | ||
exampleProperty: 'exampleValue' | ||
} | ||
} | ||
] | ||
severity: 1 | ||
targetResourceRegion: location | ||
targetResourceType: 'Microsoft.DataFactory/factories' | ||
windowSize: 'PT5M' | ||
autoMitigate: false | ||
} | ||
} | ||
// Outputs | ||
@description('The ID of the created metric alert.') | ||
output adpipelinefailed_id string = adpipelinefailed.id |
16 changes: 12 additions & 4 deletions
16
e2e_samples/parking_sensors/infrastructure/modules/appinsights.bicep
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,33 @@ | ||
//https://learn.microsoft.com/en-us/azure/templates/microsoft.insights/components | ||
// Parameters | ||
@description('The project name.') | ||
param project string | ||
@description('The environment for the deployment.') | ||
@allowed([ | ||
'dev' | ||
'stg' | ||
'prod' | ||
]) | ||
param env string | ||
@description('The location of the resource.') | ||
param location string = resourceGroup().location | ||
@description('The unique identifier for this deployment.') | ||
param deployment_id string | ||
|
||
|
||
resource appinsights 'Microsoft.Insights/components@2020-02-02-preview' = { | ||
// Resource: Application Insights | ||
resource appinsights 'Microsoft.Insights/components@2020-02-02' = { | ||
name: '${project}-appi-${env}-${deployment_id}' | ||
location: location | ||
tags: { | ||
DisplayName: 'Application Insights' | ||
Environment: env | ||
Project: project | ||
DeploymentId: deployment_id | ||
} | ||
kind: 'other' | ||
properties: { | ||
Application_Type: 'other' | ||
} | ||
} | ||
|
||
// Output: Application Insights Name | ||
@description('The name of the created Application Insights resource.') | ||
output appinsights_name string = appinsights.name |
15 changes: 13 additions & 2 deletions
15
e2e_samples/parking_sensors/infrastructure/modules/dashboard.bicep
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.