Azure Classroomnotes 11/Nov/2022

Blob Storage

Mindmap

Uploading Blobs to containers

  • Lets learn how to upload the blobs from powershell
  • Azure cmdlets will be in the pattern of <verb>-Az<Noun>
  • To install Azure powershell Refer Here
  • For easier installation Refer Here
  • Installing necessary softwares for Azure, DevOps Refer Here
  • Setting up dev environment for Azure Powershell
    • Install powershell extension in visual studio code
  • Create a new file called as storage1.ps1
$resg_name = 'storage1'
$location = 'eastus'
Write-Host "Creating a resource group with name $resg_name in $location"
$resg = New-AzResourceGroup -Name $resg_name -Location $location
Write-Host "Created a resource group with name $resg_name in $location"

$mystorageaccount = New-AzStorageAccount `
    -ResourceGroupName $resg_name `
    -Name 'qtstorfromps1' -Location $location `
    -SkuName Standard_RAGRS

# Create a storage account context
$ctx = New-AzStorageContext -StorageAccountName $mystorageaccount.StorageAccountName -UseConnectedAccount

# Create storage container called as images


$images_container = New-AzStorageContainer -Name 'images' `
    -Permission 'Nonw' -Context $ctx

  • Note: We had issue with context which we will be fixing in next session.
Published
Categorized as Uncategorized Tagged

By continuous learner

devops & cloud enthusiastic learner

Leave a ReplyCancel reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Please turn AdBlock off
Animated Social Media Icons by Acurax Responsive Web Designing Company

Discover more from Direct DevOps from Quality Thought

Subscribe now to keep reading and get access to the full archive.

Continue reading

Exit mobile version
%%footer%%