Ad Code

✨🎆 JOIN MERN, JAVA, PYTHON, AI, DEVOPS, SALESFORCE Courses 🎆✨

Get 100% Placement Oriented Program CLICK to new more info click

Azure tutorial step by step by shiva sir

 

What is Microsoft Azure?

Microsoft Azure is a cloud computing platform that lets you build, deploy, and manage applications using Microsoft’s global data centers instead of your local machine.

In simple terms 👇
👉 You don’t need to buy servers
👉 You don’t worry about infrastructure
👉 You pay only for what you use


It supports:

  • Web apps
  • APIs
  • Databases
  • AI/ML
  • DevOps pipelines
  • Virtual machines
Azure Tutorial (Step-by-Step Beginner to Advanced)

Step 1: Create Azure Account

👉 Go to: https://azure.microsoft.com
👉 Sign up using Microsoft account

💡 You’ll get:

  • Free credits (~$200)
  • Free services (limited usage)
 Step 2: Azure Portal Overview

Main sections:

  • Dashboard → Your resources
  • Resource Groups → Folder for resources
  • App Services → Web hosting
  • Virtual Machines → Servers
  • Storage Accounts → File storage 

Step 3: Create First Resource (Web App)

👉 Follow this:

  1. Go to App Services
  2. Click Create
  3. Fill details:
    • Subscription
    • Resource Group
    • App Name
    • Runtime (e.g. .NET, Node.js)
  4. Click Deploy

💡 Done! Your app is live 🌍

 Step 4: Resource Group Concept

👉 Think of it like a folder:

Example:

Project: StudentApp
├── Web App
├── Database
├── Storage

Step 5: Deploy Your Application

Option 1: GitHub Deployment

  • Connect Azure with GitHub repo
  • Auto deploy on push

Option 2: Visual Studio

  • Right click project → Publish → Azure

Option 3: ZIP Deployment

  • Upload project files
Step 6: Azure Virtual Machine (VM)

Create VM:

  1. Go to Virtual Machines
  2. Click Create
  3. Choose:
    • OS (Windows/Linux)
    • Size (RAM/CPU
  4. Connect using RDP

tep 8: Azure SQL Database

👉 Managed database service

Features:

  • Auto backup
  • High security
  • Scalable

🔹 Step 9: Networking Basics

  • Virtual Network (VNet)
  • Subnet
  • IP address
  • Firewall rules

🔹 Step 10: Azure DevOps

👉 CI/CD pipeline

Tools:

  • Repos
  • Pipelines
  • Boards
Pipeline

Step 1: Create GitHub Repository

Go to:

GitHub

Create Repository

  1. Click New Repository
  2. Enter repository name
  3. Select Public or Private
  4. Click Create Repository

Step 2: Push Your Project to GitHub

Open terminal or Git Bash in your project folder.

Initialize Git

git init

Add Files

git add .

Commit

git commit -m "Initial commit"

Connect GitHub Repository

git remote add origin https://github.com/USERNAME/REPOSITORY.git

Push Code

git branch -M main
git push -u origin main

Now your project is uploaded to GitHub.


Step 3: Login to Azure Portal

Open:

Azure Portal

Login with your Microsoft account.


Step 4: Create App Service in Azure

Search

Search:

App Services

Click

Create → Web App

Step 5: Fill Web App Details

Basic Information

OptionExample
SubscriptionYour Azure Subscription
Resource GroupCreate New
Namemywebapp123
PublishCode
Runtime StackASP.NET Core / Node / Python
RegionCentral India
OSWindows/Linux
Pricing PlanFree F1

Click Next


Step 6: Connect GitHub During Deployment

Azure will ask:

Continuous Deployment

Select:

Enable

Step 7: Authorize GitHub

Azure redirects to GitHub.

Click:

Authorize Azure

Give permission.


Step 8: Select Repository

Choose:

OptionExample
OrganizationYour GitHub Username
RepositoryYour Project Repo
Branchmain

Step 9: Azure Creates GitHub Actions

Azure automatically creates:

.github/workflows/

This is CI/CD pipeline automation.

Whenever you push code:

  • GitHub builds project
  • Azure deploys automatically

Step 10: Review + Create

Click:

Review + Create

Then:

Create

Deployment starts.


Step 11: Open Live Website

After deployment:

Go to:

Overview → Default Domain

Example:

https://mywebapp123.azurewebsites.net

Your app is live.


Step 12: Auto Deployment Testing

Now make code changes.

Example:

git add .
git commit -m "Updated homepage"
git push

GitHub Actions automatically deploys to Azure.


Step 13: Monitor Deployment

In GitHub:

Go to:

Actions Tab

You can see:

  • Build logs
  • Deployment logs
  • Errors

ASP.NET Core Special Setup

If you are deploying ASP.NET Core:

Publish Profile Method

Sometimes Azure deployment fails.

Then use:

Get Publish Profile

from Azure App Service.


GitHub Actions Example for ASP.NET Core

Azure generates YAML automatically like this:

name: Build and deploy ASP.NET Core app

on:
push:
branches:
- main

jobs:
build-and-deploy:
runs-on: windows-latest

steps:
- uses: actions/checkout@v3

- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: '8.0.x'

- name: Restore
run: dotnet restore

- name: Build
run: dotnet build --configuration Release

- name: Publish
run: dotnet publish -c Release -o publish

- name: Deploy
uses: azure/webapps-deploy@v2

Common Errors & Solutions

1. 403 Forbidden

Solution

  • Restart App Service
  • Re-download publish profile
  • Check deployment credentials

2. Build Failed

Solution

Check:

GitHub → Actions → Logs

Usually:

  • Missing packages
  • Wrong .NET version
  • Wrong startup command

3. Node Modules Missing

Solution

Add:

npm install

inside workflow.


Best Practice Architecture

Local Machine

GitHub Repository

GitHub Actions

Azure App Service

Live Website

Recommended Azure Services



Post a Comment

0 Comments