Database Automation using GithubActions and Azure Pipelines !

Github Actions Labs

Lab 1 : Azure SQL Database and update database as code

BranchLink : AzureSQLDatabase

Lab 2 : Azure MYSQL Database and update database as code

BranchLink : AzureMYSQL

Lab 3 : Azure Postgres Database and update database as code

BranchLink : AzurePostgresDatabase

Lab 4 : Create Online Polls using Django App and PostgreSQL DB

BranchLink : Django App and PostgreSQL DB

Lab 5 : Create Webapp for Car Rental Vendor using Java and MySQL

BranchLink : Java and MySQL DB

Azure DevOps Pipeline Labs

Lab 6 :Create Polls using Django App and PostgresQLDB

BranchLink : Polls App

Lab 7 :Create Car Rental Wesbite using Java and MySQLDB

BranchLink : CarRental

Instructions to Get Started on this Labs

Prequisite(Mandate)

1. Github Personal Account

GithubAccount

2. Azure Subscription

AzureFreeAccount

Step by Step Guides to help you get started !

Reference 1 : Github Actions Syntax

Reference 2 : Connecting to Azure using Service principal

Service Principal is used to Authenticate and perform task on Azure subscription. Here is command line reference to create one service principal for you

  • Giving Service Principal access to Complete Subscription

    az ad sp create-for-rbac --name "myApp" --role contributor --scopes /subscriptions/{subscription-id} --sdk-auth

  • If you want scope of service principal retricted to resource Group follow command below

    az ad sp create-for-rbac --name "myApp" --role contributor --scopes /subscriptions/{subscription-id}/resourceGroups/{resource-group} --sdk-auth

    Output of this will be similar

    {
    
      "clientId": "<GUID>",
    
      "clientSecret": "<GUID>",
    
      "subscriptionId": "<GUID>",
    
      "tenantId": "<GUID>",
    
      (...)
    
    }
    

Copy Complete Parenthesis and create Github Secret , This will be our First Github Secret !

Code Branches for this Hands on Lab

Reference 3 : Code Branches for this Hands on Lab