Skip to content

MertSenel/IaC-CICD-ARMTemplate-AzureDataBricks-Sample

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 

IaC-CICD-ARMTemplate-AzureDataBricks-Sample - Showcase Project

Infrastructure as Code Showcase Project using ARM Templates and CICD for Azure Databricks

Build Status Deployment Status

CI/CD Sample using ARM Template Deploying an Azure DataBricks Workspace with VNET Injection

Azure DevOps Project

https://dev.azure.com/mertsenel/Infrastructure-as-Code-Samples

Credits

The base ARM template referenced from Azure quickstart templates:

https://github.com/Azure/azure-quickstart-templates/tree/master/101-databricks-workspace-with-vnet-injection

Builds

https://dev.azure.com/mertsenel/Infrastructure-as-Code-Samples/_build?definitionId=5&_a=summary&view=buildsHistory

Releases

https://dev.azure.com/mertsenel/Infrastructure-as-Code-Samples/_release?definitionId=3&view=mine&_a=releases

Details of the Project, Improvements and Additions on top of the base ARM Template:

Project:

  • ARM Template has been modified to support Environment paramater, this would allow multiple SDLC enviroments can be deployed via same template, with minimum input as namings are generated within variables block via the input of the paramater.
  • The environment abbrevation ex. dev, qa, test, staging, prod is automatically appended to naming conventions of resources and resource groups.
  • This structure allows dynamic paramaterization of the CD pipelines.

(The project was initially just deployed a standalone DataBricks Workspace, later on I've converted the project to deploy Azure Databricks workspace with VNET injection. I will leave development branches in case you want to see my work, history is also available through Pull Requests)

Azure DevOps Pipelines:

Continuous Integration

  • Yaml based pipeline built for validating the ARM template and archiving template and parameter files to be consumed by Release Pipelines.
  • A Pester test script is also added, for a second verification with the Azure Powershell AZ Module's Test-AzResourceGroupDeployment and evauluation ouput of this cmdlet.
  • TODO: Although Pester test script is successfully passing its test while running locally, it is unable to get a succesfull pass result while running on hosted agents of the Azure DevOps. To be Fixed.

Local Pester Test Run Screenshot:

Alt text

  • Pester Tests are now fixed for CI. Results are published in NUnit format and published to the Build CI Pipeline.

Pester Tests Run Screenshot from Build CI:

Alt text

Sample Build Pipeline Screenshot:

Alt text

Continuous Deployment

  • Enabled Continous Deployment for both Pull Request and Push(to master and release branches) to Dev environment.
  • This environment and Release stage can later be used to run integration tests before promoting deployment to higher stages.
  • Created a Release Pipeline to have Dev and Test and UAT Stages, with stage specific "env" variables to pass to ARM Deployment task to override the "env" parameter of the ARM template.
  • Have seperate ARM templates for prerequisites resources and main DataBricks resource. Release Pipeline variables are used to pipe output (VNET Resource ID) to the main template as a paramater.

Release Screenshots

Sample Release Pipeline

Alt text

Sample Release Pipeline Stage

Alt text

Code Management / GitHub

  • Enabled master branch protection in GitHub repository with status checks requirement for safe contribution.

Deployed Resource Screenshots in Azure After Release

Below screenshots are to demonstrate naming convention and how easy it is to scale projects for different stages with dynamic paramaters.

Resource Groups

All Resource Groups after Successful Release

Alt text

CI (Manual Run from Local)

Alt text

DEV

Alt text

TEST

Alt text

UAT

Alt text

Other Screenshots

Sample VNET Delegation

Alt text

Sample NSG After Databricks Delegation

Alt text

About

Infrastructure as Code Showcase Project using ARM Templates and CI/CD for Azure Databricks

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published